[Insight-users] Upsampling with constant boundary condition

Jan Margeta jmargeta at gmail.com
Tue May 10 12:10:52 EDT 2011


Hi Matt,

Thanks for the response and the pointer to the
VectorLinearInterpolateNearestNeighborExtrapolateImageFunction.
This class indeed seems to be doing what i would need but just for vector
images.

I can only agree the need for support of both inter and extrapolation in the
ResampleImageFilter. Will be glad to help with the testing.

For now, I will try to convert my images to singlechannel vector image
and resample them with the vector interextrapolator (while having some
performance loss).

Many thanks,

Jan




On Tue, May 10, 2011 at 5:21 PM, Matt McCormick <matt at mmmccormick.com>wrote:

> Hi Jan,
>
> >
> > Hi all, Is there a way (in ITK 3.20) to upsample an image with constant
> boundary condition using linear interpolator? It happens that when I
> upsample,
> my last frame and/or last slice are set to 0
> >  (or any other value that I specify with "SetDefaultPixelValue(0)"
>
> IMHO, ResampleImageFilter needs an ExtrapolateImageFunction in addition to
> an
> InterpolateImageFunction.
>
> http://www.itk.org/Doxygen/html/classitk_1_1ExtrapolateImageFunction.html
>
> Otherwise, in order to get that functionality, custom classes have to be
> created
> that involve a lot of copy/pasted code and are not very flexible, e.g.,
>
>
> http://www.itk.org/Doxygen/html/classitk_1_1VectorLinearInterpolateNearestNeighb
> orExtrapolateImageFunction.html<http://www.itk.org/Doxygen/html/classitk_1_1VectorLinearInterpolateNearestNeighb%0AorExtrapolateImageFunction.html>
>
> I should have some time in about a week or two, and I can give this a go.
>  I can
> make a patch, give it to the ITK developers for comment, and include you
> for
> testing if you would like.
>
>
> > in the resampler since it shoots out of the range of the input image). As
> far
> as I could find, the WindowedSincInterpolateImageFunction is the only one
> that
> has support for boundary conditions.
>
> I believe the boundary condition are only used if the center of the
> resampled
> location falls within the image and part of the windowed-sinc kernel falls
> outside the image.
>
> Matt
>
> _____________________________________
> 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/20110510/ea780129/attachment.htm>


More information about the Insight-users mailing list