[Insight-users] curious problem with itkLinearInterpolateFunction
s.yang at dkfz-heidelberg.de
s.yang at dkfz-heidelberg.de
Thu Jun 23 08:39:34 EDT 2005
It 's right as you said, if i use NNInterploator.
but I 've still a question independend on any applications,
After a linear interpolation there is no reason to obtain a pixel with value 254
, whose neighborhoods are all 255. It can not be unterstood in mathematical sense.
I guess, that something ist not optimal in the function
EvaluateAtContinuousIndex(..), e.g using static_cast.
this story looks just like so:
255--------------255
| 255 ----- 255 |
| | x | |
| | | |
| 255 ----- 255 |
255--------------255
according to the definition of linear interpolation, x should be 255 everywhere
within its neighborhood. but actually it is 254. so e.g it may result in
gradient with non zero, or other undesireble effects.
best wishes
Siwei
Zitiere "Miller, James V (Research)" <millerjv at crd.ge.com>:
> If you want to resample a segmented image, it is best to the
> NearestNeighborImageFunction as the interpolator. This will guarentee
> your image will still have just 255s and 0s.
>
> Any other interpolator will, in fact, interpolate the data. So if a
> pixel in the resampled image corresponds to a subpixel location in the
> original image, an interpolated value will be calculated.
>
> Jim
>
>
>
> -----Original Message-----
> From: insight-users-bounces+millerjv=crd.ge.com at itk.org
> [mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
> s.yang at dkfz-heidelberg.de
> Sent: Wednesday, June 22, 2005 11:29 AM
> To: insight-users at itk.org
> Subject: [Insight-users] curious problem with
> itkLinearInterpolateFunction
>
>
> Hello all,
> a question about itkLinearInterpolateFunction, which is involved in
> ResampleImageFilter. I have a segmented image with a white object(pixel
> value=255) lies in black background(pixel value=0). If i transform it
> using e.g
> translation or rotation, and resample it into a new file, then i get an
> image,
> that seems to be OK. but i 've found, within this white object some
> pixes value
> are not 255 but 254. This error leads to some artefacts in my
> subseuquent work.
> I guess, the problem might consist in itkLinearInterpolateFunction. Can
> any one
> tell me, what wrong with it?
> By the way ,I tried the other two interpolatefunction BSpline und NN,
> but they
> were worse.
>
> thanks
> Siwei
> _______________________________________________
> 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