[Insight-users] getting started DiscreteGausianDerivativeImageFilter

Ivan Macia imacia at vicomtech.org
Wed Jan 6 13:24:38 EST 2010


Hi,

Don't worry Richard, you are not being stupid :)

What you said meant that either I was using the filter wrongly and the
results were still correct (doing things wrong twice you get the correct
result) or it was a supersmart filter with a predictive effect such that it
could guess the direction you wanted.

The problem is that I had used the filter for the last time long time ago.
If you use the corresponding image functions you have to apply one
DiscreteGaussianDerivativeImageFunction after another but if you use the
filter you pass it an array for the order in each direction, no need to use
a filter for each direction. So the test was incorrectly designed.

The second error (to get the correct result) was attaching the wrong
baseline images :)

And yes, you can set a different variance for each direction too (it can be
also an array, if you pass a scalar then it is the same for all).

Sorry for the inconvenience, here it is the correct version/results
(hopefully)

Best regards

Iván

PD: I am sending CC to the mailing list, in case someone else is interested


2010/1/6 Richard Beare <richard.beare at gmail.com>

> Hi,
>
> I'm probably being really stupid, but I can't see where you set the
> direction of the derivative. There are 2 filters, one for the X
> direction, one for Y, but they seem to be set up the same way, which
> would imply that the output of the second one is actually a higher
> order derivative than the first, oriented the same way. What am I
> missing?
>
> It looks to me as though the variance and order should be set
> independently for each dimension in each filter - e.g
> derivativeX->SetVariance([variance, 0]) ;  // please excuse
> pseudocode.
>
> Is this correct?
>
> Thanks
>
>
> On Sat, Jan 2, 2010 at 11:48 PM, Ivan Macia <imacia at vicomtech.org> wrote:
> > Hi Richard,
> >
> > I made this class long time ago. It seems like I didn't provide any test
> for
> > this class or at least I can't find it, my apologies.
> > Attached you can find a test program, a source test image and baseline
> > images for different orders of derivatives in each direction. I used
> sigma =
> > 3.0 (variance = 9.0), and max_error = 0.001
> >
> > Note that each instance of the filter applies the derivative in a single
> > direction for a given order. For example to calculate the first order
> > derivative in X and the second in Y you apply an instance of the filter
> in X
> > direction with order one and another in Y with order two. Even if you use
> > order zero in a direction you still have to use the filter for that
> > direction, because it will calculate the standard gaussian.
> > If you want a vector image you have to compose it yourself, wait for me
> to
> > develop the filter or do it yourself :)
> >
> > If possible, it would be very nice if you could try the behaviour of the
> > filter with different spacing in each direction ( UseImageSpacingOn() ).
> I
> > think there was a pending issue with the handling of the spacing.
> >
> > I guess I will have to upload a new version of the paper with new tests.
> > Since this is in Review currently I would need someone with CVS write
> access
> > to commit the tests too. Do you have it?
> >
> > Regards
> >
> > Iván
> >
> > 2009/12/30 Richard Beare <richard.beare at gmail.com>
> >>
> >> Hi,
> >> I'm trying to experiment with DiscreteGausianDerivativeImageFilter as
> >> an alternative to GradientRecursiveGaussianImageFilter, but I'm having
> >> issues with correctly declaring my image types. Are there any examples
> >> anywhere? I haven't been able to find any. I want the components of
> >> the gradient and I'm using CovariantVector types for the
> >> GradientRecursiveGaussianImageFilter.
> >>
> >> Thanks.
> >> _____________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://www.kitware.com/products/protraining.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
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100106/ab4a7366/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DiscreteGaussianDerivativeImageFilter.cxx
Type: application/octet-stream
Size: 3464 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100106/ab4a7366/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DGDIF_baseline.zip
Type: application/zip
Size: 32747 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100106/ab4a7366/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceImage.png
Type: image/png
Size: 2362 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100106/ab4a7366/attachment-0001.png>


More information about the Insight-users mailing list