[Insight-developers] bug 6558
Simon Warfield
simon.warfield at childrens.harvard.edu
Tue Nov 18 15:36:44 EST 2008
Attached are two patches that modify the transformation of physical
points to indexes to use rounding.
This ensures the index selected corresponds to the extent of the voxel.
>>>> ------------------------
>>>> 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
>>>>>
>>>>>
>>>>>
>
>
>
--
Simon
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-itkImageTransformHelper.txt
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20081118/01b73d10/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-itkImageBase.txt
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20081118/01b73d10/attachment-0001.txt>
More information about the Insight-developers
mailing list