[Insight-developers] question regarding direction cosines

Blezek, Daniel J (Research) blezek at crd.ge.com
Thu Nov 10 11:19:41 EST 2005


Kent,

  Just below the picture of Sinead O'Connor, you talk about "Image Position (Patient)" being a directional cosine, I think that should be "Image Orientation Patient".

  I have to admit I'm a bit confused as to why you suggest setting the ITK origin to be 

IOP^-1 * IPP

IOP = Image Orientation Patient, IPP = Image Position Patient.

Isn't IPP already the origin of the coordinate system?  Does this imply an ITK image is to have the first pixel in the lower left?  I'm confused by this issue, but need to resolve it to register coronal and axial MR data.

-dan

P.S.  Being from Minnesota, I enjoyed your site. 8)  Corn, corn, corn.




-----Original Message-----
From: insight-developers-bounces+blezek=crd.ge.com at itk.org
[mailto:insight-developers-bounces+blezek=crd.ge.com at itk.org]On Behalf
Of Kent Williams
Sent: Thursday, November 10, 2005 9:54 AM
To: Leila baghdadi
Cc: insight-developers at itk.org
Subject: Re: [Insight-developers] question regarding direction cosines


Well, the definition of the direction cosines is that they define 3 
vectors, which define a coordinate system. The first vector corresponds 
to the fastest moving dimension in the image, the second to the next 
fastest, and the third to the slowest.

In other words, the direction cosines define a relationship between 
patient space and the indices into the image data array.

I suppose it would be possible to have a file with more than 3 
dimensions, with an organization such that the dimensions are ordered 
T,U,X,V,Z,Y (fastest moving index to slowest) or something like that. 
But I would worry about getting the most common case right, and work up 
from there.

I've written an article that will be in the Insight Journal, and here is 
a preliminary copy:

http://cornwarning.com/xfer/OrientationArticle.pdf

I hope that helps somewhat. Any more questions, feel free to ask.

Leila baghdadi wrote:

>Hi Kent
>
>that sounds like a good solution, the only problem with this is what if
>the spatial dimensions with meaningful directions are *not* the first 3
>dimensions,
>
>The way I envisioned this, the image could have dimensions of any order
>
>i.e, the three spatial dimensions can show up in any order, so that
>would make the upper left 3x3 of an NxN not meaningful
>
>will work on your solution plus correct ordering, I am sure once I
>commit the code I hear complaints about it
>
>
>Thanks again
>
>Leila
>On Tue, 2005-11-08 at 17:11 -0600, Kent Williams wrote:
>  
>
>>Direction Matrix is NxN where N is the number of dimensions in the 
>>image.  In general, only the first 3 directions have any spatial 
>>meaning, and 3D images are the most common by far.
>>
>>I'd suggest setting the direction matrix to identity, and then filling 
>>in the X,Y,Z (0,1,2) columns with the direction cosines representing the 
>>3D orientation -- basically the upper left 3x3 of the matrix.  Anyone 
>>else have a suggestion?
>>
>>Leila baghdadi wrote:
>>
>>    
>>
>>>Hi guys
>>>
>>>I am writing ImageIO classes for our specific file format (minc2) which
>>>is like itk N-dimensional,
>>>
>>>I am a bit confused about how to create a correct matrix for direction
>>>cosines,
>>>
>>>suppose I have an image with the following
>>>
>>>u,x,r,y,w,z
>>>
>>>so direction cosines are only for x,y,z
>>>
>>>the question is what is the correct way to create m_Direction of
>>>itkImageIOBase.*
>>>
>>>do I create a matrix (6x3) where I have (0,0,0) (1,0,0) (0,0,0) 
>>>
>>>or basically how do you carry the correct index for the spatial
>>>dimensions,
>>>
>>>Hopefully my question is clear if not please let me know
>>>
>>>Thanks
>>>
>>>Leila
>>>
>>>
>>>_______________________________________________
>>>Insight-developers mailing list
>>>Insight-developers at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>> 
>>>
>>>      
>>>

_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list