[Insight-users] itk::BSplineDownsampleImageFilter

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 6 23:15:33 EST 2010


Hi Jef,

Thanks for reposting this.

The screenshots that you sent are quite revealing.

The BSplineDownsampleImageFilter is certainly
doing something wrong along the Y axis.

We just added two new unit test for the:

*  itkBSplineDownsampleImageFilter and
*  itkBSplineUpsampleImageFilter

and verified that with the new test,
the scaling of the Y axis is incorrect.

Could you please file a bug entry in the bug tracker ?
http://public.kitware.com/Bug/my_view_page.php

and please mention in the report that the change in
behavior happened between ITK 3.16 and ITK 3.8
that should be helpful for tracking the problem.


     Thanks


            Luis


---------------------------------------------------------------------
On Fri, Mar 5, 2010 at 1:17 PM, jef vdmb <jvdmb at hotmail.com> wrote:
> Hi,
> (appologies if I missed your reply)
> I am resending my reply concerning the BSplineDownsampleImageFitler, just in
> case the previous message got lost.
>
> Any ideas? Can I consider the 3.8 version as correct or was there a specific
> reason it was modified?
> Thank you in advance for your help on the matter!
> Regards,
> Jef
>
> ________________________________
> From: jvdmb at hotmail.com
> To: luis.ibanez at kitware.com
> CC: insight-users at itk.org
> Subject: RE: [Insight-users] itk::BSplineDownsampleImageFilter
> Date: Mon, 8 Feb 2010 14:26:54 +0000
>
> Hi Luis,
> Thanks for your quick reply! I attached a screenshot to illustrate the
> change in behavior I observed.
> As the names of the images (visible in the bottom left corner of the images)
> suggest, the top left picture is the input image, top right the output image
> when using the 3.8 version of the DownsampleImageFilter, bottom left
> the output image when using the 3.16 version of the DownsampleImageFilter
> and bottom right the output image when using the 3.16 version of the
> UpsampleImageFilter.
> The origin remains unchanged for all images (even with the centered
> coordinate system). The size and spacing of the images are, respectively:
> 209x155x169  2x2x2 (input)
> 104x77x84  4x4x4 (output_downsample_3_8)
> 104x77x84  4x4x4 (output_downsample_3_16)
> 418x310x338  1x1x1 (output_upsample_3_16)
> It seems that the images have the correct size and spacing. However based on
> their appearance, the  "image content" is incomplete in the case of the 3.16
> version. Only half of the image is shown in the Y-dimension. This is not the
> case for the 3.8 version or for the upsampler. I am unable to say if these
> images are correct however.
> Thanks,
> Jef
>
>
>> Date: Fri, 5 Feb 2010 12:44:59 -0500
>> Subject: Re: [Insight-users] itk::BSplineDownsampleImageFilter
>> From: luis.ibanez at kitware.com
>> To: jvdmb at hotmail.com
>> CC: insight-users at itk.org
>>
>> Hi Jef,
>>
>> Could you please describe in more detail what you mean by
>>
>> "portraited half in Y -dimension?"
>>
>> if you could post a screenshot that will be great.
>>
>> It will help us a lot to track the potential source of the problem.
>>
>> FYI, please note that one of the recent changes in ITK is that
>> the coordiantes of pixels are now copmuted consistently at the
>> center of the pixel. This applies to the BSpline Grids as well,
>> and had an impact on what gets to be considered to be inside
>> and outside of the image.
>>
>> (this may or may not be related to the change in behavior that
>> you are observing...)
>>
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>>
>> ------------------------------------------------------------------
>> On Thu, Feb 4, 2010 at 12:33 PM, jef vdmb <jvdmb at hotmail.com> wrote:
>> > Hi,
>> >
>> > I am using the bspline downsample filter in the 3.16 version
>> >
>> >      typedef itk::BSplineResampleImageFilterBase<InputImageType,
>> > InputImageType> ResamplerType;
>> >      typename itk::BSplineDownsampleImageFilter<
>> > InputImageType,InputImageType, ResamplerType >::Pointer df
>> >           = itk::BSplineDownsampleImageFilter<
>> > InputImageType,InputImageType, ResamplerType >::New();
>> >         df->SetSplineOrder(3);
>> >     df->SetInput(input);
>> >     df->Update();
>> >
>> > Unless I am using this filter incorrectly, it would seem that there is a
>> > problem with the filter. The output computed is wrong. The output image
>> > properties are set correctly (half the size, double the spacing,...) but
>> > the
>> > content of the original image is only portraited half in Y -dimension?
>> > This
>> > is not the case in the 3.8 version, the filter seems to have broken
>> > somewhere in between, probalby due to changes in the file
>> > itkBSplineResampleImageFilterBase.txx.
>> >
>> > The result is the same for all resampler types:
>> >
>> >     typedef itk::BSplineResampleImageFilterBase<InputImageType,
>> > InputImageType> ResamplerType;
>> >     typedef itk::BSplineCenteredResampleImageFilterBase<InputImageType,
>> > InputImageType> CenteredResamplerType;
>> >     typedef itk::BSplineL2ResampleImageFilterBase<InputImageType,
>> > InputImageType> L2ResamplerType;
>> >     typedef
>> > itk::BSplineCenteredL2ResampleImageFilterBase<InputImageType,
>> > InputImageType> CenteredL2ResamplerType;
>> >
>> > The Upsampler doesn't show the same issues, it works fine in both 3.16
>> > and
>> > 3.8 versions.
>> >
>> > Regards,
>> > Jef
>> >
>> >
>> >
>> > ________________________________
>> > Hotmail: Free, trusted and rich email service. Get it now.
>> > _____________________________________
>> > 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
>> >
>> >
>
> ________________________________
> Hotmail: Free, trusted and rich email service. Get it now.
> ________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.


More information about the Insight-users mailing list