[Insight-users] Threshold segmentation and image iterators

Karthik Krishnan Karthik.Krishnan at kitware.com
Tue Jul 12 15:41:30 EDT 2005


Deepti wrote:

>Hi,
>I am trying to segment 3D images using LevelSetThreshold program. In
>order to be able to see the output 3D image I am tring to iterate the
>segmented image, so that I can see the 3D image ultimately.
>However, the problem is when I have to decide on the start indices and
>size of the input image, to assign the same size region for reading the
>image. How can I determine the size and the start indices at run time?
>
>  
>
I cannot comprehend your problem. Please elaborate. But I'll take a shot 
at the answer anyway.

image->GetBufferedRegion().GetSize();
image->GetBufferedRegion.GetOrigin();

See the doxygen for the class ImageBase for more on buffered regions, 
largest possible region etc

And you could construct the iterator as:

itk::ImageRegionIterator< ImageType > it( image, 
image->GetBufferedRegion() );
or
itk::ImageRegionIterator< ImageType > it( image, 
inputImage->GetBufferedRegion() );

>Any sort of help will be appreciated!
>
>Thanks
>
>  
>


More information about the Insight-users mailing list