[Insight-users] Re: ask for help : Extract Region of interest

Luis Ibanez luis.ibanez at kitware.com
Tue, 03 Feb 2004 17:16:54 -0500


Hi Deliang,


You may want to use the

    itkRegionOfInterestImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html


With this filter, you specify the region of
the input image that you want to extract, and
the filter will produce a new image containing
only the pixels inside this region.  The origin
of the image will be recomputed in order to match
the first fixel of the extracted region.


For an example on the use of this filter  you may
want to look at the file

   Insight/Examples/IO/
     ImageReadRegionOfInterestWrite.cxx


You can actually use this example as the complete
solution, since you can run it as a command line
application, provide your image as input, extract
the region and save the new image in a file.


Regards,


    Luis



------------------
Deliang Ye wrote:
> Hi Luis,
> 
> I got a rat's MRI(img/hdr) 256X256X256, how can I chop some slices from the
> MRI?, so that we only leave region of interest for our anlaysis.
> 
> Thanks a lot for your help!
> 
> -Deliang Ye
> 
>