Difference between revisions of "Complex Image Set"
Line 7: | Line 7: | ||
Proposed data structure shown in pseudocode | Proposed data structure shown in pseudocode | ||
− | // The | + | // itkImageCollection is a subclass of itkOrientedImage. The image itself (in the base class) |
− | // The memory for the | + | // is a standard itk image with uniform spacing & direction cosines. |
+ | // The memory for the base class image is not allocated until reformatting occurs. | ||
itkImageCollection : itkOrientedImage { | itkImageCollection : itkOrientedImage { | ||
// The sourceImageGroup is an array of image sections. Each image | // The sourceImageGroup is an array of image sections. Each image |
Revision as of 18:49, 17 July 2009
Home < Complex Image SetA complex image set cannot be represented by a single grid. Instead it is made up of multiple grids, because it includes things like:
- gantry tilt
- irregular slice spacing
- overlapping scans
Proposed data structure shown in pseudocode
// itkImageCollection is a subclass of itkOrientedImage. The image itself (in the base class) // is a standard itk image with uniform spacing & direction cosines. // The memory for the base class image is not allocated until reformatting occurs. itkImageCollection : itkOrientedImage { // The sourceImageGroup is an array of image sections. Each image // section corresponds to a group of slices with the same tilt, spacing, etc. itkArray<itkOrientedImage> sourceImageGroup; }
Normal ITK routines will operate on the reformatted image, using C++ inheritance. But if the user needs the original images or their headers, they are available.
At image load time, the image should be loaded as an image collection. By default, reformatting will occur automatically using the spacing found in the largest source image. If reformatting is not desired, the programmer must specify no reformatting prior to load.
After reformatting, the images within the source image group may be deallocated to save memory. Deallocation can refer to the image data only (retaining header information for the image group items), or the entire group may be destroyed (leaving only the reformatted image).
By default, the image save will write the reformatted image to disk. When saving as source image format, the reformatted image is first interpolated back to the source image space by the programmer.
See Also
Note from the ITK community about ITK 4.0 planning:
http://www.itk.org/Wiki/ITK_Release_4.0#Oriented_Images
Slicer bug 595