[Insight-developers] image information reset by gradient magnitude filter

Bill Lorensen bill.lorensen at gmail.com
Thu Feb 5 11:14:46 EST 2009


Gaëtan,

That explains it. The fault, really, is that we do not test
non-default spacing in most tests. This was a very subtle bug I think.
A better test would have uncovered the problem with your changes.

Thanks to Richard for finding it.

Bill

On Thu, Feb 5, 2009 at 10:49 AM, Gaëtan Lehmann
<gaetan.lehmann at jouy.inra.fr> wrote:
>
> Hi,
>
> Le 5 févr. 09 à 16:29, Bill Lorensen a écrit :
>
>> Luis,
>>
>> This error has always been present I believe.
>>
>> I reproduced the problem using CVS HEAD. I modified the filter's test
>> by adding non-default image information to the test input. Then, after
>> the filter runs, I compared the input and output image information.
>> Before my fix, the information differed. You can duplicate the failure
>> with my new test, if you comment out my fix (one line) and re-run the
>> test.
>>
>> This filter creates an internal image to accumulate results over each
>> dimension. Since the internal image never copied the image information
>> from the input image, the internal image had default settings for the
>> information. This internal image was used as the input to a mini
>> pipeline. The output of the internal mini-pipeline is grafted onto the
>> output of the filter.
>
> This design has not always been there. I have introduced it to add the
> multithreading support.
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkGradientMagnitudeRecursiveGaussianImageFilter.txx?root=Insight&r1=1.18&r2=1.19
>
> The changes looked quite simple and not dangerous to me. The lack of failing
> test has comforted me in that opinion.
> That bug show that I was wrong.
>
> My apologies for that bug.
>
> Gaëtan
>
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.mandriva.org
> http://www.itk.org  http://www.clavier-dvorak.org
>
>


More information about the Insight-developers mailing list