[Insight-users] Coordinates in ITK

Julien Lamy lamy at unistra.fr
Mon Jul 25 08:19:39 EDT 2011


Le 25/07/2011 11:07, JOJOW a écrit :
> In medical image processing, there are  three kinds of coordinate system:
> world, anatomical and image coordinate system. The latter two are more
> commonly used. In ITK, LPS is used as anatomical system. 
> 
> In ITK, 
> 
> PointType p0; 
> p0[0] = -1.0; // x coordinate 
> p0[1] = -1.0; // y coordinate 
> p0[2] = 10.0; // z coordinate 
> are used to set the coordinate of a point. If I write p0 to a txt file, I
> get [-1,-1,10]. 
> 
> ImageType::IndexType pixelIndex; 
> pixelIndex[0] = 27; // x position 
> pixelIndex[1] = 29; // y position 
> pixelIndex[2] = 37; // z position 
> are used to set the position of a voxel. 
> 
> My question is 
> How are the coordinate systems built for PointType and ImageType::Index? 
> If I read an nii image in MRIcroN, what is the relationship between X,Y,Z in
> MRIcroN and PointType coordinate or pixelIndex coordinate in ITK? 
> What is the relationship between  PointType coordinate and pixelIndex
> coordinate in ITK? 

The index coordinates are converted to physical coordinates using the
spacing, origin and direction of an image. Specifically, a voxel index I
is converted to a physical point P by : P = direction * spacing * I +
origin. The functions TransformXToY in itk::ImageBase perform these
conversions.

-- 
Julien


More information about the Insight-users mailing list