[Insight-developers] TransformPhysicalPointToIndex bug and ITK 3.10 orientation refactoring

Tom Vercauteren tom.vercauteren at m4x.org
Fri Oct 24 05:01:38 EDT 2008


Hi Luis (and others),

I saw the recent refactoring done on the Index <--> Point transforms.

It looks great and easier to maintain (once we get rid of the ifdef
blocks). I'm just wondering whether this couldn't be a great
opportunity to fix this bug:
http://www.itk.org/Bug/view.php?id=6558

What bothers me most is the casts that are similar to:
  index[i] = static_cast<typename IndexType::IndexValueType>(
continuous_index[i] );

Using something similar to
   index[i] = static_cast<typename IndexType::IndexValueType>(
vnl_math_rnd( continuous_index[i] ) );
would make more sense to me.

Then could do a performance optimization on vnl_math_rnd. I did such a
proposition to the vnl team but for some reason, it remained a
discussion only:
http://sourceforge.net/mailarchive/forum.php?thread_name=28392e8b0808050138r31574c90wddd19c0072a7da3c%40mail.gmail.com&forum_name=vxl-maintainers

Best,
Tom

P.S.: For the record, optimizing vnl_math_rnd & co would also allow
for fixing these bugs
http://www.itk.org/Bug/view.php?id=2078
http://www.itk.org/Bug/view.php?id=5692
which have long been waiting for a fix


More information about the Insight-developers mailing list