[Insight-developers] Image::TransformPhysicalPointToIndex
Miller, James V (CRD)
millerjv@crd.ge.com
Wed, 27 Feb 2002 16:56:45 -0500
Interesting problem.
I understand wanting nearest neighbor type calculation but if the transform
is changed to round then the index returned may not be a valid pixel (it
may be outside the image).
I think the default behavior should truncate and perhaps another method
could round.
-----Original Message-----
From: Lydia Ng [mailto:lng@insightful.com]
Sent: Wednesday, February 27, 2002 4:33 PM
To: insight-developers@public.kitware.com
Subject: [Insight-developers] Image::TransformPhysicalPointToIndex
Currently Image::TransformPhysicalPointToIndex
does a truncation to convert the index from
continuous space to discrete space. i.e
for (unsigned int i = 0 ; i < VImageDimension ; i++)
{
index[i] = static_cast<long>(inputPoint[i]);
}
Any objection if that the truncation is change
to vnl_math_rnd instead? ie.
for (unsigned int i = 0 ; i < VImageDimension ; i++)
{
index[i] = static_cast<long>( vnl_math_rnd(inputPoint[i]) );
}
- Lydia
_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers