Axial and Sagittal rotation matrix in vtkMRMLSlicerNode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Axial and Sagittal rotation matrix in vtkMRMLSlicerNode

Haiyong Xu-2
Hi there,

I develop a module which requires to make use of "Reformat" view in
the 2D viewers (Red/Yellow/Green). To do that, I manually modify the
SliceToRAS matrix in an instance of vtkMRMLSliceNode. I noticed that
the matrix for Axial and Sagittal view are different from what I
expected.

SliceToRAS for Axial:

-1, 0, 0
 0, 1, 0
 0, 0, 1

I think the last column should be (0, 0, -1). Here is the reason,

In the Axial view, X points to Left, Y points to Anterior, Z should
point to Inferior if we use right-hand coordinate. Since the world
coordinate in 3DSlicer is Right/Anterior/Superior, there must be two
-1s in the rotation matrix between the Slice coordinate and RAS
coordinate.

It is the same for the sagittal view. But the SliceToRAS matrix for
coronal view is exactly the same as what I expected.

Please let me know if I was wrong. Thanks

--Haiyong
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Axial and Sagittal rotation matrix in vtkMRMLSlicerNode

pieper
Administrator
Hi Haiyong -

Hmm, you may be right on that.  The SliceToRAS really defines the
location of the plane, so it's in essence a 2D concept and I don't know
if the last column is used anywhere directly (it is used to calculate
the ijkToXY transform to go from screen space in the slice viewer back
to index space of the volume).  If you think changing the last column
will help your use case we can try it out and see if it breaks anything
else.

Best,
Steve

On Apr/1/10 10:46 AM, Haiyong Xu wrote:

> Hi there,
>
> I develop a module which requires to make use of "Reformat" view in
> the 2D viewers (Red/Yellow/Green). To do that, I manually modify the
> SliceToRAS matrix in an instance of vtkMRMLSliceNode. I noticed that
> the matrix for Axial and Sagittal view are different from what I
> expected.
>
> SliceToRAS for Axial:
>
> -1, 0, 0
>   0, 1, 0
>   0, 0, 1
>
> I think the last column should be (0, 0, -1). Here is the reason,
>
> In the Axial view, X points to Left, Y points to Anterior, Z should
> point to Inferior if we use right-hand coordinate. Since the world
> coordinate in 3DSlicer is Right/Anterior/Superior, there must be two
> -1s in the rotation matrix between the Slice coordinate and RAS
> coordinate.
>
> It is the same for the sagittal view. But the SliceToRAS matrix for
> coronal view is exactly the same as what I expected.
>
> Please let me know if I was wrong. Thanks
>
> --Haiyong
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Axial and Sagittal rotation matrix in vtkMRMLSlicerNode

Haiyong Xu-2
Thanks Steve. I will change it in my local copy of 3DSlicer and see if
there are anything unexpected happen.

Cheers,
Haiyong


On Thu, Apr 1, 2010 at 6:20 PM, Steve Pieper <[hidden email]> wrote:

> Hi Haiyong -
>
> Hmm, you may be right on that.  The SliceToRAS really defines the location
> of the plane, so it's in essence a 2D concept and I don't know if the last
> column is used anywhere directly (it is used to calculate the ijkToXY
> transform to go from screen space in the slice viewer back to index space of
> the volume).  If you think changing the last column will help your use case
> we can try it out and see if it breaks anything else.
>
> Best,
> Steve
>
> On Apr/1/10 10:46 AM, Haiyong Xu wrote:
>>
>> Hi there,
>>
>> I develop a module which requires to make use of "Reformat" view in
>> the 2D viewers (Red/Yellow/Green). To do that, I manually modify the
>> SliceToRAS matrix in an instance of vtkMRMLSliceNode. I noticed that
>> the matrix for Axial and Sagittal view are different from what I
>> expected.
>>
>> SliceToRAS for Axial:
>>
>> -1, 0, 0
>>  0, 1, 0
>>  0, 0, 1
>>
>> I think the last column should be (0, 0, -1). Here is the reason,
>>
>> In the Axial view, X points to Left, Y points to Anterior, Z should
>> point to Inferior if we use right-hand coordinate. Since the world
>> coordinate in 3DSlicer is Right/Anterior/Superior, there must be two
>> -1s in the rotation matrix between the Slice coordinate and RAS
>> coordinate.
>>
>> It is the same for the sagittal view. But the SliceToRAS matrix for
>> coronal view is exactly the same as what I expected.
>>
>> Please let me know if I was wrong. Thanks
>>
>> --Haiyong
>> _______________________________________________
>> slicer-users mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject