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

Luis Ibanez luis.ibanez at kitware.com
Fri Oct 24 12:55:40 EDT 2008


Hi Tom,


This would be indeed a good opportunity for fixing this bug.


In order to fulfill our backward compatibility promise, however,
my suggestion will be to also condition this fix using a CMake
variable that will make possible for users to get the old
behavior.


Maybe something like:

       ITK_USE_CENTERED_PIXEL_COORDINATES


Please let us know what you think,


   Thanks


      Luis



------------------------
Tom Vercauteren wrote:
> 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