[Insight-users] Base question on derivative filters
Oleksandr Dzyubak
adzyubak at gmail.com
Wed Sep 9 11:03:31 EDT 2009
Hi Luis,
Thanks for your clarification.
Using power of OpenSource, I looked over the templates you recommended
and particular the ::SetUp method.
Couple questions.
1) const ScalarRealType spacingTolerance = 1e-8;
Is it 0.01 micron?
2) ::SetNormalizeAcrossScale method.
You have to use Sigma which is not dimensionless.
Do you use sigma renormalization in such a way that it becomes dimensionless
and afterward you work with only dimensionless variables?
Alex
Luis Ibanez wrote:
>
> Hi Alex,
>
> The RecursiveGaussianImageFilter "approximates" convolution,
> but it doesn't "perform" convolution.
>
> This filter implements an IIR filter.
> For details, please see:
>
> "Fast Algorithms for Low-Level Vision"
> R.Deriche in IEEE-PAMI Vol.12, No.1, January 1990, pp 78-87,
>
> "Recursively Implementing The Gaussian and Its Derivatives",
> R. Deriche,
> INRIA, 1993, ftp://ftp.inria.fr/INRIA/tech-reports/RR/RR-1893.ps.gz
>
>
> Note that "convolution" by itself doesn't really
> set units, *unless* you take unit conversion into
> account in the computation of the convolution
> kernel coefficients.
>
>
> Using the power of Open Source, things will be
> a lot clearer if you look at the internals of the code. :-)
>
>
> For example, look at lines 56-69 of
> Insight/Code/BasicFilters/itkDiscreteGaussianImageFilter.txx
>
> Which actually performs a convolution with a truncated
> approximation of the Gaussian kernel.
>
> Note the use of the "m_UseImageSpacing" variable.
>
> On the other hand, look at the
>
> itkRecursiveSeparableImageFilter which is the parent
> class of the itkRecursiveGaussianImageFilter. In particular
> look at lines 264-267 of itkRecursiveSeparableImageFilter.txx:
>
> const typename InputImageType::SpacingType & pixelSize
> = inputImage->GetSpacing();
>
> this->SetUp( pixelSize[m_Direction] );
>
> and their effect on
> lines 79-256 in itkRecursiveGaussianImageFilter.txx
>
>
>
>
> Regards,
>
>
> Luis
>
>
> -----------------------------------------------------------------------------------------------------------------------
> On Wed, Sep 9, 2009 at 10:22 AM, Oleksandr Dzyubak <adzyubak at gmail.com
> <mailto:adzyubak at gmail.com>> wrote:
>
>
> Maybe I am misreading the description.
>
> From the Class description:
>
> RecursiveGaussianImageFilter
> <http://www.itk.org/Doxygen/html/classitk_1_1RecursiveGaussianImageFilter.html>
> is the base class for recursive filters that approximate
> convolution with the Gaussian kernel.
>
> In this case, wouldn't the units from the RecursiveGaussian filter
> match those you would have
> from the convolution?
>
> Alex
>
> Luis Ibanez wrote:
>
> The RecursiveGaussian filter doesn't use convolution.
>
> The value of sigma is set in physical coordinates.
>
> The output pixel values will have units of :
>
> input intensity values / physical coordinates
>
> *IF* you use the FirstOrder setting.
>
> Note that there are also ZeroOrder and SecondOrder
> settings.
>
> In which case the intensity units of the output will be:
>
> ZeroOrder: input intensity units
>
> Second Order : input intensity units / (physical units)^2
>
>
>
> Regards,
>
>
> Luis
>
>
>
> -------------------------------------------------------------------------------
> On Wed, Sep 9, 2009 at 9:51 AM, Oleksandr Dzyubak
> <adzyubak at gmail.com <mailto:adzyubak at gmail.com>
> <mailto:adzyubak at gmail.com <mailto:adzyubak at gmail.com>>> wrote:
>
> Don't you change the units while convolving with the Gaussian?
>
> Alex
>
> Kishore Mosaliganti wrote:
>
> The resulting units are in world coordinates. You will not
> need to divide by spacing. The sigma is also in world
> coordinates.
>
> Kishore
>
> On Tue, Sep 8, 2009 at 11:49 AM, Gomez Herrero, Alberto
> <alberto.gomez-herrero at philips.com
> <mailto:alberto.gomez-herrero at philips.com>
> <mailto:alberto.gomez-herrero at philips.com
> <mailto:alberto.gomez-herrero at philips.com>>
> <mailto:alberto.gomez-herrero at philips.com
> <mailto:alberto.gomez-herrero at philips.com>
> <mailto:alberto.gomez-herrero at philips.com
> <mailto:alberto.gomez-herrero at philips.com>>>> wrote:
>
> Hello all,
>
> this is a question regarding derivative
> filters in general
> and the
> RecursiveGaussianImageFilter in particular.
>
> When we compute, say, the first order
> derivative of, say, a 2D
> image “ I“ we get two images of the same size,
> “Ix”, and
> “Iy”. My
> question is, the resulting value (i.e. the Ix and
> Iy gray
> levels)
> is expressed in what units?, I mean, if the gradient is
> defined as
> increment_of_gray_level /
> increment_of_distance_in_world_coordinates,
> everything is
> ok; but
> if this filter works as a simple pixelwise convolution
> mask, then
> the gradient is in increment_of_gray_level /
> increment_of_pixels.
> In that case, I need to divide by the spacing to get the
> right units.
>
> I guess this is a very basic question, but
> I really need to
> make
> sure that this filters work as the first definition. I
> can’t find
> it in the code, I only know that the sigma for the
> smoothing is in
> world coordinates though…
>
> Anyone can clarify this please?
>
> Thanks,
>
> Alberto
>
>
>
> ------------------------------------------------------------------------
> The information contained in this message may be
> confidential and
> legally protected under applicable law. The message
> is intended
> solely for the addressee(s). If you are not the intended
> recipient, you are hereby notified that any use,
> forwarding,
> dissemination, or reproduction of this message is
> strictly
> prohibited and may be unlawful. If you are not the
> intended
> recipient, please contact the sender by return
> e-mail and
> destroy
> all copies of the original message.
>
> _____________________________________
> Powered by www.kitware.com <http://www.kitware.com>
> <http://www.kitware.com>
> <http://www.kitware.com>
>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
> ------------------------------------------------------------------------
>
>
>
> _____________________________________
> Powered by www.kitware.com <http://www.kitware.com>
> <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> _____________________________________
> Powered by www.kitware.com <http://www.kitware.com>
> <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
>
More information about the Insight-users
mailing list