[Insight-users] still struggling with TransformPhysicalPointToIndex

David Pastor david.pastor at die.upm.es
Fri Mar 13 07:21:07 EDT 2009


 Hi!

 I commented days ago some possible problems with this method. I've received some feedback about it, but not sorted out yet!

There is a whole review on this about a bug or bad implementation as it was using truncation instead of rounding or flooring. Also there was some discussion about making the transformation corned-based or centre-based. I don't know which is the status of this in the current version.

My problem is that the same PointType element is transformed to different IndexType elements in images that only differ on the dimension (same SizeType and same SpacingType). I double-checked the header files and everything is consistent.

Particularly, the size on the z axis is different (one pixel distance) between a 3D image and the same frame in a 4D image. I think the dimension should not affect in here.

 It seems that the truncation could be an issue, but as u said it will affect the two images instead and not just one of them. Otherwise the center-based vs corner-based problem is not a big deal here.

 What i don't really understand is what TransformPhysicalPointToIndex does... as far as i understand it only should divide each coordinate by the scaling,  round or floor the value and make the transformation from center-based
 coordinates to a corner-based index count (which is mainly add the offset).

 I'm just considering doing this process by myself and see what happens.

Someone suggested something about the "loop unrolling in itk::ImageTransformHelper".

Cheers
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090313/f1227d5d/attachment.htm>


More information about the Insight-users mailing list