[Insight-developers] Image::DirectionType should be Nx3 rather than NxN?

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jul 4 11:06:16 EDT 2007


On 7/4/07, Steve M. Robbins <steve at sumost.ca> wrote:
> Bill,
>
> Perhaps my original message was too oblique.

'oblique' ... speaking of directions cosines :)
>  Upon reflection, I
> would phrase my objection this way: the dimension of the physical
> space is independent of the image dimension.  The two examples I
> cited should prove this: you can take a 2D image in 3D space, and
> you can take a 4D (volumetric time series) in a 3D space.
>
> As it stands now, the GDCM ImageIO class effectively throws away
> information when you read a 2D image: you get only the first two
> components of the 3-vectors.


This issue rings a bell and I am pretty sure this was fixed. In the
cstor of GDCMImageIO I made sure to alawys use 3D:

  this->SetNumberOfDimensions(3); //needed for getting the 3 coordinates of
                                   // the origin, even if it is a 2D slice.

Are you using an itk::OrientedImage ?

> I understand that ITK is intended to be generic, and yes I can
> conceive of taking an nD image inside an nD space.  But is there any
> way that the DirectionType could specify the row and column dimensions
> independently?  Well, the number of columns should be the image
> dimension, but the number of rows should be specifiable independently
> somehow and arguably default to 3.

I have to agree with that. Image can prefectly be a 2D raster type
(width * height), but expressed in a 4D space (image position, image
orientation...). ITK should differentiate Pixel Data and Image.

-Mathieu


More information about the Insight-developers mailing list