[Insight-developers] Behavior of the Evaluate EvaluateAtContinuousIndex
Luis Ibanez
luis.ibanez at kitware.com
Sun Sep 12 12:40:34 EDT 2010
Hi Kwame,
I have tried to mentally picture the case that you are
addressing, but haven't find an unambiguous way to do it.
Before we discuss how the case should be managed,
we should make sure that we all understand the specific
geometry of this particular case.
Please see below my attempt the graphically represent
the case. This is for the bottom boundary of an image.
The double line with the capita "O" represents the last
row of pixels. Note that in ITK a Pixel is a sample point.
| | |
| | |
----o-------------o-------------o-------
| | |
| | |
| INSIDE | |
| | |
| | |
| | |
====O=============O=============O=======
| | |
| | |
| OUTSIDE | |
| | |
| | |
| | |
----o-------------o-------------o-------
| | |
| | |
| | |
If we were doing a nearest-neighborhood interpolation,
we will say that it is valid to interpolate up to half-a-pixel
around the pixel sample point.
----o-------------o-------------o-------
| | |
| INSIDE | |
| XXXXXXXXXXXXXXX |
| X | X |
| X | X |
| X | X |
====O======X======A======X======O=======
| X | X |
| X | X |
| XXXXXXXXXXXXXXX |
| OUTSIDE | |
| | |
----o-------------o-------------o-------
So, here, around the pixel "A", all the region denoted with
X can be interpolated with a NN, and therefore all those
points will have the same value as "A".
Could you present your interpolation case in a
similar schematic representation ?
Please let us know,
Thanks
Luis
--------------------------------------------
On Fri, Sep 10, 2010 at 1:21 PM, Kwame Kutten <kkutten1 at jhmi.edu> wrote:
> I'm writing a WrapExtrapolateImageFunction for which the input index/point
> is wrapped around if it lies outside the image.
>
> Basically its output would be the same as if the image was padded using the
> WrapPadImageFilter.
>
>
>
> How do you think the Evaluate() and EvaluateAtContinuousIndex() methods
> should behave for a point or ContinousIndex that is outside the image bounds
> but between pixels?
>
>
>
> Currently, I pass an interpolator to the extrapolator...
>
>
>
> typedef itk::WrapExtrapolateImageFunction<ImageType,double>
> ExtrapolatorType;
>
> ExtrapolatorType::Pointer extrapolator =
> ExtrapolatorType::New();
>
> extrapolator->SetInputImage(image);
>
> extrapolator->SetInterpolator(interpolator);
>
>
>
>
>
> ...then the Evaluate() and EvaluateatContinuousIndex() methods wrap the
> ContinuousIndex or point around before evaluating its value with the
> interpolator.
>
>
>
> extrapolator->Evaluate(point);
>
>
>
> ...or...
>
>
>
> extrapolator->EvaluateAtContinousIndex(cindex);
>
>
>
> Is this the best way to handle these cases?
>
> Thanks
> _______________________________________________
> 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://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-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100912/b5dd8bc9/attachment.htm>
More information about the Insight-developers
mailing list