[Insight-users] A problem of image border when using itk::ResampleImageFilter!
Daniel Mace
dlm19 at duke.edu
Sun Aug 10 11:01:15 EDT 2008
Jun,
I ran into the same issue with resizing images. It's not necessarily a
bug, but rather a rounding issue with how ITK decides to calculate
whether the regions they are interpolating are inside/outside the
boundary of the image. I can't remember exactly where the rounding
issue took place, but try adding/subtracting a small value to your scale
change (e.g., switching from a 128*128 to a 256*256 would be a rescaling
of 0.5, subtract off 0.000001 to make it 0.499999).
Cheers,
Dan
Jun Xiong wrote:
> Dear all,
>
> I have a question about the image border interpolation question
> when using ResampleImageFilter. If i use itk::ResampleImageFilter to
> resample an image to a bigger size, the area around the image border
> (about half of the Spacing value), are NOT interpolated and as a
> result the borders are fade to the default pixel value of the
> resampling filter. For example, if i resample a slice(256*256) from
> the volume(size:128*128*64) in the x-z orientation(using the same
> spacing), the result image only contains 126 line effective data in
> the middle, others are default value. It seems that, the outer half
> of the image border are not interpolated and their values were set as
> the default value directly.
> If i use the PadImageFilter to pad the volume with one pixel, the
> result image contains 130 lines effective data. How can i get a result
> image containing 128 lines.
> Thank you very much!
>
> Best regards!
>
> Jun Xiong
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list