[Insight-developers] Coordinate system semantics of ImageIOBase?
Luis Ibanez
luis.ibanez at kitware.com
Thu Jan 15 17:51:35 EST 2009
"Glimpsing at the Source leaves no Doubt"
Insight/Code/Common/itkImageBase.h
Lines 450-463:
a) Index (ijk) are multiplied by the
scale then by the direction matrix
(scale & directions are premultiplied in
itkImageBase.txx: lines 191)
b) The origin is added to th result of (a).
Regards,
Luis
------------------------
Rupert Brooks wrote:
> Yep, at the risk of being pedantic, i'll try to be as explicit as
> possible. Note that the origin is kind
> of a special point, so its probably important to consider the whole
> transformation.
>
> Let D be the matrix of directions, S be the diagonal matrix of
> spacings, and V be the origin,
>
> Let I be a vector of voxel coordinates of a point in the image.
>
> Then i think that, in ITK, the world coordinates W of this point I,
> are located at
>
> W = DSI + V
>
> Conversely,
> I = (DS)^(-1)(W-V)
>
> ITK gurus?
>
> Rupert
>
>
>
> On Wed, Jan 14, 2009 at 1:58 AM, Steve M. Robbins <steve at sumost.ca> wrote:
>
>>On Tue, Jan 13, 2009 at 07:33:32AM -0500, Rupert Brooks wrote:
>>
>>
>>>>>Just a couple questions:
>>>>>
>>>>
>>>>>MINC and ITK use different ways of specifying the origin / offset of
>>>>>the coordinate system. I believe
>>>>>that MINC uses the xstart, ystart, zstart as the distance _along the
>>>>>x,y,z direction cosines_, while
>>>>>ITK places the origin _such that pixel 0,0,0 is at the origin_.
>>>>
>>>>If that's true, then it is my misunderstanding.
>>>>
>>>>Since ImageIOBase::GetOrigin() is not documented, I asked this list
>>>>about it:
>>>>
>>>>ME:
>>>>
>>>>>The method GetOrigin(int i) returns a double; I assume that
>>>>>GetOrigin(0), GetOrigin(1), GetOrigin(2) return the column,
>>>>>row, and slice, respectively, of the world-space origin.
>>>>>Is that correct?
>>>>>
>>>>
>>>>Louis responded "Yes"; c.f.
>>>>http://www.itk.org/mailman/private/insight-developers/2008-December/011435.html
>>>>
>>>>To me, that means that ITK's GetOrigin() is the same notion as MINC's
>>>>"starts". If these are not identical, then I need a better description
>>>>of what GetOrigin() returns.
>>>
>>>I think this conversation is about the ITK origin - which is the location of the
>>>pixel zero. However - i think that the wording is funny -
>>
>>
>>Agreed: my wording is clumsy. Let me try to phrase it more precisely.
>>
>>Suppose we have read a 3D image using some subclass of itk::ImageIOBase.
>>
>>Let T be the voxel-to-world transformation given by the metadata of
>>the image; i.e. the direction cosines & etc.
>>
>>Let x be the 3-vector
>>
>> x = (GetOrigin(0), GetOrigin(1), GetOrigin(2))
>>
>>My interpretation is that T(x) = (0,0,0).
>>
>>I believe that your interpretation is that T(0,0,0) = x.
>>
>>
>>ITK-gurus: which is correct?
>>
>>Thanks,
>>-Steve
>>
>>-----BEGIN PGP SIGNATURE-----
>>Version: GnuPG v1.4.9 (GNU/Linux)
>>
>>iD8DBQFJbY0N0i2bPSHbMcURApkhAKCHnm+vvkX5FTe8WPkUweDZ3CHNmQCeN7VH
>>ZDSF7fmjZ+2d960eK0H4AuQ=
>>=/T7Z
>>-----END PGP SIGNATURE-----
>>
>>
>
>
>
>
More information about the Insight-developers
mailing list