MantisBT - ITK
View Issue Details
0000738ITKpublic2004-04-07 12:222010-11-04 23:07
Luis Ibanez 
Cory W Quammen 
normalmajoralways
closedduplicate 
 
 
completed
0000738: Physical Point to Index : floor/ceil/round
The transformation between physical points and indices in the itkImage.h file is not matching
the description of the image coordinate system
in the SoftwareGuide.

One of the two should be fixed.
The interpolators may also need to be verified.

Reported in the users-list by Janne Hämäläinen
No tags attached.
duplicate of 0006558closed MichelKitware Physical coordinates of a pixel - Severe inconsistency and bug in ImageBase 
Issue History
2007-09-18 10:51Luis IbanezNote Added: 0009067
2007-11-15 09:29mnieberNote Added: 0009681
2010-11-04 22:56Cory W QuammenAssigned ToLuis Ibanez => Cory W Quammen
2010-11-04 23:06Cory W QuammenRelationship addedduplicate of 0006558
2010-11-04 23:07Cory W QuammenSprint Status => completed
2010-11-04 23:07Cory W QuammenNote Added: 0022879
2010-11-04 23:07Cory W QuammenStatusassigned => closed
2010-11-04 23:07Cory W QuammenResolutionopen => duplicate

Notes
(0001320)
Jim Miller   
2004-07-30 13:45   
We should probably adopt the convention that the origin of an image is in the center of a pixel. This means the physical extent of an image extends by half a pixel from the physical coordinates of the corner pixels.

ImageFunction::ConvertPointToNearestIndex() and ImageFunction::ConvertContinuousIndexToNearestIndex() seem to do the right thing.

ImageFunction caches the first and last index in the region as ContinuousIndices (m_StartContinuousIndex, m_EndContinuousIndex). We'll need to check their use to determine whether they should be padded by 0.5

ImageFunction::IsInsideBuffer(ContinuousIndex) would need to be updated.

ImageRegion::IsInside(ContinuousIndex) would need to be updated.

Image::TransformPhysicalPointToContinuousIndex() calls ImageRegion::IsInside(ContinuousIndex) which is incorrect, see above. Otherwise this code would be ok.

Image::TransformPhysicalPointToIndex() uses truncation where is should round. This routine also call ImageRegion::IsInside()

We should also check any filter that makes use of image spacing (look for calls to GetSpacing()) and check whether these filters are doing a physical to index calculation that needs to be corrected.

(0009067)
Luis Ibanez   
2007-09-18 10:51   
We will address it during WA10.

non-trivial.
(0009681)
mnieber   
2007-11-15 09:29   
>> We should probably adopt the convention that the origin of an image is in the center of a pixel. This means the physical extent of an image extends by half a pixel from the physical coordinates of the corner pixels.

I have experienced major problems with this convention. It would maybe go to far to explain (but ask me if you like), but please make sure that - under the chosen convention - resampling the image does not change the part of physical space that is occupied by the image.
(0022879)
Cory W Quammen   
2010-11-04 23:07   
This issues is discussed (and resolved) in much more detail in bug 6558. See http://public.kitware.com/Bug/view.php?id=6558. [^]