[Insight-users] RegionOfInterestImageFilter not updating imag e pixel container

Miller, James V (Research) millerjv at crd.ge.com
Tue Jul 6 16:18:40 EDT 2004


This is probably a bug in ImageToListAdaptor (the superclass to
ScalarImageToListAdaptor).  ImageToListAdaptor uses information from the
Image->LargestPossibleRegion when it should really use the BufferedRegion.  
 
Can you try something quickly?  Change lines 69 and 74 of
Insight/Code/Numerics/Statistics/itkImageToListAdaptor.txx such that instead
of calling GetLargestPossibleRegion() they call GetBufferedRegion().  
 
If this fixes your problem, please let us know and we will fix the code in
the repository.
 
Jim

-----Original Message-----
From: Glenn Pierce [mailto:glennpierce at connectfree.co.uk]
Sent: Tuesday, July 06, 2004 2:49 PM
To: insight-users at itk.org
Subject: [Insight-users] RegionOfInterestImageFilter not updating image
pixel container


Hi

I am currently trying to generate a grey level histogram from from a region
of interest of an image.


To select the roi from the original image I am using
RegionOfInterestImageFilter.

I am then using a ListSampleToHistogramGenerator to generate the histogram.

The trouble is the ScalarImageToListAdaptor I am passing to the
ListSampleToHistogramGenerator
insists that the size of the roi I am passing is the size of the original
image.

I have tracked this down I believe to the fact that the pixelcontainer of
the region of interest does not get
changed. ie

if clip is a n instance of RegionOfInterestImageFilter

clip->GetOutput()->GetPixelContainer()->Size() is constant no matter the
region
passed to clip.

Is this a bug. Should the GetPixelContainer() be updated by
RegionOfInterestImageFilter ?
Or is there a work around ?

Thanks for the help.

Glenn 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20040706/628eed87/attachment.html


More information about the Insight-users mailing list