70 likes | 389 Views
Adding Orientation to itkImage. Motivation. Image Coordinate Systems. Coordinate systems are an important part of any medical application. Medical scanners create regular, "rectangular" arrays of points and cells. The topology of the arrays is implicit in the representation.
E N D
Image Coordinate Systems • Coordinate systems are an important part of any medical application. • Medical scanners create regular, "rectangular" arrays of points and cells. • The topology of the arrays is implicit in the representation. • The geometric location of each point is also implicit.
vtk and itk images • vtk and itk store meta-information that can be used to convert between image coordinates (i-j-k) and world coordinates (x-y-z). • Each image has an origin that is a 3-D (n-D for itk) vector. The origin (x-y-z) specifies the world coordinate of the first point in memory. The spacing specifies the distance between points along each axis. • Using the spacing and origin, the transformation between i-j-k and x-y-z is a fast, simple computation. • x(yz) = origin + i(jk) * spacing; • i(jk) = (x(yz) - origin) / spacing;
(image) slow fast medium Requirement: Location + Orientation space: right-anterior-superior space origin: (117.5,-93,119) space directions: (-0.859375,0,0)(0,0,-0.859375)(0,5,0) none (RAS) superior anterior right
Proposed extensions to itk::Image • Add an itk::Matrix containing direction cosines • The i-j-k -> x-y-z transformation could include the orientation in the computation. • Adding the matrix will not change the existing API. • Almost all index to point calculations are confined to itk::Image. • The transformations in matrix form are: • XYZ = To* Rc * Ss * IJKwhere To is a translate to the origin, Rc is the matrix of direction cosines and Ss is a scale matrix of spacings. • There are performance considerations, so the implementation may cache some internal matrices and state.
Next Steps • Continue discussion on the Wiki • NAMIC Wiki:Community Coordinate Systems