[Insight-users] itkRecursiveMultiResolutionPyramidImageFilter

Corinne Mattmann mattmaco at ee.ethz.ch
Fri, 9 Jan 2004 10:40:36 -0700


Hi Luis,

I added the code you suggested and it's working fine for my image.

Thanks very much for your help,
Corinne


-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: Thursday, January 08, 2004 8:18 PM
To: Corinne Mattmann
Cc: insight-users at itk.org; Lydia Ng
Subject: Re: [Insight-users]
itkRecursiveMultiResolutionPyramidImageFilter



Hi Corinne,

The reason why you are observing so much smoothing is
that the RecursiveMultiResolutionPyramidImageFilter
uses a DiscreteGaussianImageFilter internally in
order to smooth the images before the subsampling.

The DiscreteGaussianImageFilter specifies its
Variance in physical units, not in pixels.

Your image (BTW thanks for providing the spacing
information) has a relatively small spacing = 0.09.

The typical value of Variance computed from the
pyramid factors will be about 4.0, which for a
CT or MRI image corresponds normally to a sigma
of about 2 pixels wide.

In the case of your image, however, a Sigma of 2.0
is equivalent to a kernel 20 pixels wide, which is
obviously too large.

Maybe the solution is to disable the flag:

                 UseImageSpacing

in the smoothing filter, since the smoothing is being
done based on the relative scale factor of the schedule
rather than the physical size of the image pixels.

Please try adding

     smoother->SetUseImageSpacing( false );

in line 81.  In that way the values of Sigma will be interpreted as
number of pixels instead of number of millimeters (or in general:
physical units).


Please let us know if that works for you, so we
can make this change in the repository.



Thanks



    Luis



-----------------------
Corinne Mattmann wrote:
> Hi,
> 
> I'm using the itkRecursiveMultiResolutionPyramidImageFilter and I have

> some problems with this filter: It seems that this filter smoothes my 
> image that much before resampling, that I get an almost homogenous 
> image. If I take the "smoother" out of the filter (  
> shrinker->SetInput( caster->GetOutput() ); on line 83), then 
> everything works fine. Also if I set the variance very small 
> (variance[idim] = 0.01; on line 114) the result is okay. Can you 
> explain me why this smoother is not working for my image and why the 
> variance is chosen as it is?
> 
> Thanks,
> Corinne
> 
> ps: I have a 50x50x50 image with origin {3.37776, 1.73713, 3.37776} 
> and spacing {0.0965074, 0.0965074, 0.0965074}.
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org 
> http://www.itk.org/mailman/listinfo/insight-users
>