[ITK Community] [Insight-users] coordinate system
WANG Chengjia
wangchengjia1986 at gmail.com
Wed Feb 19 06:52:28 EST 2014
Hi Luis,
Thank you for your advice!
Is there an example of convert the RAS/LPI coordinate in ITK to the image
IJK coordinate? I think at least there should be some mechanism allow the
user convert the coordinate system.
I can find a lot of examples for registration, but not many example that
arbitrarily transform a 3D volume. I'm totally stocked here.
Thank you very much!
Best,
Chengjia
On Wed, Feb 19, 2014 at 5:41 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
> Hi Wang,
>
> Please note that in ITK, the resampling of an image is done in physical
> coordiantes, not in pixel space (the image grid).
>
> That is, ITK will actually take into account the pixel spacing of your
> images, as well as the Direction matrix of the images themselves.
>
> This may account for some of the differences that you see when comparing
> to Matlab operations.
>
>
> Note also that the ITK transforms have a "Center" of rotation parameter,
> that play into the calculation.
>
>
> Thanks
>
> Luis
>
>
>
> On Tue, Feb 18, 2014 at 10:41 PM, WANG Chengjia <
> wangchengjia1986 at gmail.com> wrote:
>
>> More generally, I have a transformation matrix calculated, anyone know
>> how to transform a volume using this matrix?
>>
>> It is just a simple Rigid 3D transformation. In Matlab, I just use "tform
>> = maketform('affine', transM');" to make up the transformation and apply it
>> using " tformarray " then the images are perfectly aligned. But in ITK, I
>> find I have to switch the x, y coordinate of translation when doing
>> "targetTransform->SetTranslation(trans)". The result was still wrong,
>> although quite close to the one I got in Matlab.
>>
>> Can anyone help? Thanks in advance!
>>
>> Best,
>>
>>
>>
>> On Tue, Feb 18, 2014 at 7:39 PM, WANG Chengjia <
>> wangchengjia1986 at gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I'm now working on a machine learning based 3D image registration work.
>>> To create the ground truth registration, I need to firstly using simple
>>> least square method to calculate a transformation from the corresponding
>>> point (I'm using RIRE datasets).
>>>
>>> The same working flow in matlab and itk produced the same transformation
>>> matrix, but different transformed volume! In matlab, it's well aligned
>>> using the coordinates of control points given by RIRE dataset. But in ITK I
>>> have to inverse and switch the translation parameters. Then I realized it's
>>> because of the different coordinate system in itk and Matlab.
>>>
>>> Can anyone tell me a method to convert transformation matrix calculated
>>> from the common coordinate system into the ITK one?
>>>
>>> Thank you very much!
>>>
>>> Best,
>>>
>>> --
>>> Chengjia Wang
>>> Phd Student,
>>> University of Edinburgh
>>> Clinical Research Imaging Center (CRIC)
>>> Toshiba Medical Visualization Systems Europe, Ltd
>>> Email: wangchengjia1986 at gmail.com
>>>
>>
>>
>>
>> --
>> Chengjia Wang
>> Phd Student,
>> University of Edinburgh
>> Clinical Research Imaging Center (CRIC)
>> Toshiba Medical Visualization Systems Europe, Ltd
>> Email: wangchengjia1986 at gmail.com
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>
>>
>
--
Chengjia Wang
Phd Student,
University of Edinburgh
Clinical Research Imaging Center (CRIC)
Toshiba Medical Visualization Systems Europe, Ltd
Email: wangchengjia1986 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140219/4f1f3616/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
More information about the Community
mailing list