[Insight-developers] Origin information for slices.

Mark Foskey mark_foskey@unc.edu
Thu, 24 Oct 2002 10:38:32 -0400


In an ITK image, the origin has the same dimensionality as the image. 
If, as is often the case, the image is a 2D slice of a 3D volume, then 
that really doesn't make sense.  We especially need the third coordinate 
if we intend to reconstruct 3D image from a collection of slices.

One possibility is to insist that slices be loaded as M x N x 1 3D 
images.  Are there any appreciable disadvantages to that?  Will we ever 
want to run a 2D filter on a slice, but simultaneously have information 
about where that slice lies in a volume?

Otherwise, we need a sensible way for m_Origin to have a different 
number of entries than the dimensionality of the image.  And we need to 
include the possibility of higher dimensional images too.  We might have 
a 3D or 2D slice of a movie.  Perhaps the easiest approach is to store 
the origin as a std::vector<double>  and let there be a 
GetOriginDimensions() method that returns m_Origin.size().

What do people think?

-- 
Mark Foskey    (919) 843-5436   Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu             Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey   Chapel Hill, NC  27599-7515