[Insight-developers] Coordinate system semantics of ImageIOBase?

Rupert Brooks rupe.brooks at gmail.com
Thu Jan 15 07:31:37 EST 2009


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-----
>
>



-- 
--------------------------------------------------------------
Rupert Brooks, Ph. D.

Attaché de recherches | Research Associate
Simulation des Matériaux Déformables | Simulation of Deformable Materials
Institut des matériaux industriels | Industrial Materials Institute
Conseil national de recherches Canada | National Research Council Canada
75, de Mortagne, Boucherville, Québec, Canada, J4B 6Y4
Gouvernement du Canada | Government of Canada


More information about the Insight-developers mailing list