Difference between revisions of "Documentation/Nightly/FAQ/Viewing and Resampling"
From Slicer Wiki
Line 12: | Line 12: | ||
<pre> | <pre> | ||
red = getNodes('vtkMRMLSliceNode*')['Red'] | red = getNodes('vtkMRMLSliceNode*')['Red'] | ||
+ | m = vtk.vtkMatrix4x4() | ||
+ | m.DeepCopy(red.GetSliceToRAS()) | ||
+ | m.Invert() | ||
+ | |||
t = slicer.vtkMRMLLinearTransformNode() | t = slicer.vtkMRMLLinearTransformNode() | ||
− | t.SetAndObserveMatrixTransformToParent( | + | t.SetAndObserveMatrixTransformToParent(m) |
</pre> | </pre> | ||
− | Then | + | Then put your volume under “t”. |
Revision as of 12:49, 25 June 2013
Home < Documentation < Nightly < FAQ < Viewing and ResamplingUser FAQ: {{{1}}}
</includeonly>
What coordinate systems does Slicer use?
See this documentation of Slicer coordinate systems.
How can I use the reformat widget view to resample my images?
You can do something like this in the python console:
red = getNodes('vtkMRMLSliceNode*')['Red'] m = vtk.vtkMatrix4x4() m.DeepCopy(red.GetSliceToRAS()) m.Invert() t = slicer.vtkMRMLLinearTransformNode() t.SetAndObserveMatrixTransformToParent(m)
Then put your volume under “t”.