<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff size=2>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. </FONT></SPAN></DIV>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff size=2>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().
</FONT></SPAN></DIV>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff size=2>If
this fixes your problem, please let us know and we will fix the code in the
repository.</FONT></SPAN></DIV>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=921030820-06072004><FONT face=Verdana color=#0000ff
size=2>Jim</FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Glenn Pierce
[mailto:glennpierce@connectfree.co.uk]<BR><B>Sent:</B> Tuesday, July 06, 2004
2:49 PM<BR><B>To:</B> insight-users@itk.org<BR><B>Subject:</B> [Insight-users]
RegionOfInterestImageFilter not updating image pixel
container<BR><BR></FONT></DIV>Hi<BR><BR>I am currently trying to generate a
grey level histogram from from a region of interest of an image.<BR><BR><BR>To
select the roi from the original image I am using
RegionOfInterestImageFilter.<BR><BR>I am then using a
ListSampleToHistogramGenerator to generate the histogram.<BR><BR>The trouble
is the ScalarImageToListAdaptor I am passing to the
ListSampleToHistogramGenerator<BR>insists that the size of the roi I am
passing is the size of the original image.<BR><BR>I have tracked this down I
believe to the fact that the pixelcontainer of the region of interest does not
get<BR>changed. ie<BR><BR>if clip is a n instance of
RegionOfInterestImageFilter<BR><BR>clip->GetOutput()->GetPixelContainer()->Size()
is constant no matter the region<BR>passed to clip.<BR><BR>Is this a bug.
Should the GetPixelContainer() be updated by RegionOfInterestImageFilter
?<BR>Or is there a work around ?<BR><BR>Thanks for the help.<BR><BR>Glenn
</BLOCKQUOTE></BODY></HTML>