[Insight-users] Accumulate a dimension

Miller, James V (Research) millerjv at crd.ge.com
Mon Oct 4 12:06:00 EDT 2004


You might want to try the BasicFilters/itkGetAverageSliceImageFilter.h

This filter isn't well documented, but I believe its intention is to take
a ND image and output a (N-1)D image where each pixel is the average of the
pixels along the collapsed dimension.

I don't think this filter has been tested much.  So if you have a problem
please let us know and we'll try to fix it.

Jim


-----Original Message-----
From: Emiliano Beronich [mailto:emiliano at veccsa.com]
Sent: Monday, October 04, 2004 10:45 AM
To: Miller, James V (Research)
Cc: 'Gavin Baker'; ITK
Subject: Re: [Insight-users] Accumulate a dimension


Thanks Gavin and James,

As James said, itk::ShrinkImageFilter only does point sampling and I 
need to sum the 4th dimension. The image is a Gated-SPECT. The first 3 
dimensions are spatials and the 4th is temporal. I need to sum all the 
volumes to get only one.

I have added a feature request in the bug tracker,
http://www.itk.org/Bug/bug.php?op=show&bugid=1224&pos=0

Regards,
Emiliano






Miller, James V (Research) wrote:
> The itk::ShrinkImageFilter only does point sampling of the image being
> shrunk.
> 
> It does not have all the modes of the vtkImageShrink3D were the sampling
> function can be averaging, minimum, maximum, median.
> 
> To date what we have done is to use two filters, one that computes a
> function
> over a neighborhood (mean, median, etc) and a second filter that point 
> samples the output of the neighborhood function (ShrinkImageFilter).
> 
> This is not quite as efficient as having a single filter that shrinks
using
> some sampling function. You can add a feature request to the bug tracker
if
> you would like this type of functionality.
> 
> There are also a series of BSpline related interpolation and resampling 
> filters.  Take a look at BasicFilters/itkBSpline*.h
> 
> Jim
> 
> 
> -----Original Message-----
> From: Gavin Baker [mailto:gavinb+xtk at cs.mu.OZ.AU]
> Sent: Monday, October 04, 2004 7:32 AM
> To: Emiliano Beronich
> Cc: ITK
> Subject: Re: [Insight-users] Accumulate a dimension
> 
> 
> 
> Hello Emiliano,
> 
> On Thu, Sep 30, 2004 at 06:18:07PM -0300, Emiliano Beronich wrote:
> 
> 
>>I have a 4D-image and I need to accumulate the 4-dimension to convert it 
>>to a 3D image. Something like this is accomplished by 
>>vtkShrinkImageFilter but I would like to do it inside ITK.
>>Do you know how can I do it?
> 
> 
> There is an ITK equivalent, namely itk::ShrinkImageFilter, described here:
> 
>     http://www.itk.org/Doxygen/html/classitk_1_1ShrinkImageFilter.html
> 
> You may also be interested in the itk::ExtractImageFilter, which lets you
> simply collapse dimensions as well as extract regions of interest:
> 
>     http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html
> 
> There is also the related itk::CropImageFilter:
> 
>     http://www.itk.org/Doxygen/html/classitk_1_1CropImageFilter.html
> 
> Between all these, you should be able to do almost whatever you need.
> 
> Regards,
> 
>   :: Gavin
> 


More information about the Insight-users mailing list