• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

ima-has.cc

00001 #include <mln/core/image/image2d.hh>
00002 int main()
00003 {
00004   using namespace mln;
00005 
00006   // \{
00007   // Default border size is set to 0.
00008 
00009   // Image defined on a box2d from
00010   // (0, 0) to (2, 2)
00011   image2d<int> ima1(2, 3);
00012 
00013   std::cout << "ima1.has(0, 0) : "
00014             << ima1.has(point2d(0, 0)) << std::endl;
00015 
00016   std::cout << "ima1.has(-3, 0) : "
00017             << ima1.has(point2d(-3, 0)) << std::endl;
00018 
00019   std::cout << "ima1.has(2, 5) : "
00020             << ima1.has(point2d(2, 5)) << std::endl;
00021 
00022   std::cout << "=========" << std::endl;
00023 
00024   // Set default border size to 0.
00025   border::thickness = 0;
00026 
00027   // Image defined on a box2d from
00028   // (0, 0) to (2, 2)
00029   image2d<int> ima2(2, 3);
00030 
00031   std::cout << "ima2.has(0, 0) : "
00032             << ima2.has(point2d(0, 0)) << std::endl;
00033 
00034   std::cout << "ima2.has(-3, 0) : "
00035             << ima2.has(point2d(-3, 0)) << std::endl;
00036 
00037   std::cout << "ima2.has(2, 5) : "
00038             << ima2.has(point2d(2, 5)) << std::endl;
00039   // \}
00040 }

Generated on Tue Oct 4 2011 15:23:56 for Milena (Olena) by  doxygen 1.7.1