Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Example2.cpp

00001 
00002 #include<ImLib3D/ImLib3D.hpp>
00003 #include<ImLib3D/TestPatterns.hpp>
00004 
00005 // Demonstrates use of iterators
00006 
00007 int
00008 main(int argc,char **argv)
00009 {
00010     // Read a floating point image from file 
00011     Image3Df ima("example1.im3D");
00012 
00013     // Iterate through whole image using a fast iterator
00014     Image3Df::iteratorFast p1;
00015     for(p1=ima.begin();p1!=ima.end();p1++)
00016     {
00017         (*p1)=log(*p1);
00018     }
00019 
00020     // Iterate through whole image with an iterator that has  knowledge of x,y,z position
00021     Image3Df::iteratorXYZ p2;
00022     for(p2=ima.begin();p2!=ima.end();p2++)
00023     {
00024         *p2=p2.x + p2.y + p2.z;
00025     }
00026 
00027 }

Generated on Fri Jun 17 13:36:00 2005 for ImLib3D by  doxygen 1.4.2