Determine rotation axis of rotating object

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

Determine rotation axis of rotating object

Markus Krenn

Hello!

 

Is it possible to determine the rotation axis of a tracked rotating object with Slicer? There is no translation, rotation only.

I would like to visualize the tracked object and also the current rotation axis.

 

greets

markus


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: Determine rotation axis of rotating object

Tamas Ungi-2

Hi Markus,

 

There is no GUI for this. But if you open the Python console in Slicer, then you can use all vtk functions by python scripting. If you just open Slicer, create a new transform (in my case the ID became 'vtkMRMLLinearTransformNode4'), set some rotation with the sliders, then you can get the rotation axis using the following python commands in Slicer's python console:

 

>>> scene = slicer.mrmlScene

>>> transformNode = scene.GetNodeByID( 'vtkMRMLLinearTransformNode4' )

>>> transform = vtk.vtkTransform()

>>> m = vtk.vtkMatrix4x4()

>>> transformNode.GetMatrixTransformToWorld( m )

>>> transform.SetMatrix( m )

>>> transform.GetOrientationWXYZ()

(36.16266623302074, 0.4032361535889049, 0.9072671809385486, -0.11944399034963572)

 

Tamas

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Markus Krenn
Sent: October 23, 2014 11:16 AM
To: [hidden email]
Subject: [slicer-users] Determine rotation axis of rotating object

 

Hello!

 

Is it possible to determine the rotation axis of a tracked rotating object with Slicer? There is no translation, rotation only.

I would like to visualize the tracked object and also the current rotation axis.

 

greets

markus


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: Determine rotation axis of rotating object

Markus Krenn

Hello Tamas!

 

Thanks, I’ll try this way.

 

greets

markus

 

Von: Tamas Ungi [mailto:[hidden email]]
Gesendet: Donnerstag, 23. Oktober 2014 17:27
An: Markus Krenn; [hidden email]
Betreff: RE: Determine rotation axis of rotating object

 

Hi Markus,

 

There is no GUI for this. But if you open the Python console in Slicer, then you can use all vtk functions by python scripting. If you just open Slicer, create a new transform (in my case the ID became 'vtkMRMLLinearTransformNode4'), set some rotation with the sliders, then you can get the rotation axis using the following python commands in Slicer's python console:

 

>>> scene = slicer.mrmlScene

>>> transformNode = scene.GetNodeByID( 'vtkMRMLLinearTransformNode4' )

>>> transform = vtk.vtkTransform()

>>> m = vtk.vtkMatrix4x4()

>>> transformNode.GetMatrixTransformToWorld( m )

>>> transform.SetMatrix( m )

>>> transform.GetOrientationWXYZ()

(36.16266623302074, 0.4032361535889049, 0.9072671809385486, -0.11944399034963572)

 

Tamas

 

 

From: [hidden email] [[hidden email]] On Behalf Of Markus Krenn
Sent: October 23, 2014 11:16 AM
To: [hidden email]
Subject: [slicer-users] Determine rotation axis of rotating object

 

Hello!

 

Is it possible to determine the rotation axis of a tracked rotating object with Slicer? There is no translation, rotation only.

I would like to visualize the tracked object and also the current rotation axis.

 

greets

markus


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.