|
Tags: 2017 source edit, Replaced |
(22 intermediate revisions by 6 users not shown) |
Line 1: |
Line 1: |
− | <noinclude>{{documentation/versioncheck}}</noinclude> | + | <noinclude>{{documentation/versioncheck}} |
− | <!-- ---------------------------- -->
| + | </noinclude> |
− | {{documentation/{{documentation/version}}/module-header}}
| |
− | <!-- ---------------------------- -->
| |
| | | |
− | <!-- ---------------------------- -->
| + | {{documentation/banner |
− | {{documentation/{{documentation/version}}/module-section|Introduction and Acknowledgements}}
| + | | text = [https://slicer.readthedocs.io/en/latest/user_guide/modules/transforms.html This page has been moved to read-the-docs.] |
− | {{documentation/{{documentation/version}}/module-introduction-start|{{documentation/modulename}}}}
| + | | background-color = 8FBC8F }} |
− | {{documentation/{{documentation/version}}/module-introduction-row}}
| |
− | :'''Author(s)/Contributor(s):''' Alex Yarmarkovich (Isomics, SPL), Jean-Christophe Fillion-Robin (Kitware), Julien Finet (Kitware), Andras Lasso (PerkLab, Queen's), Franklin King (PerkLab, Queen's)<br>
| |
− | :'''Acknowledgements:''' This work is part of the [http://www.na-mic.org/ National Alliance for Medical Image Computing] (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.<br>
| |
− | :'''Contact:''' Alex Yarmarkovich, <email>alexy@bwh.harvard.edu</email><br>
| |
− | {{documentation/{{documentation/version}}/module-introduction-row}}
| |
− | {{documentation/{{documentation/version}}/module-introduction-logo-gallery
| |
− | |{{collaborator|logo|isomics}}|{{collaborator|longname|isomics}}
| |
− | |{{collaborator|logo|kitware}}|{{collaborator|longname|kitware}}
| |
− | |{{collaborator|logo|namic}}|{{collaborator|longname|namic}}
| |
− | |{{collaborator|logo|nac}}|{{collaborator|longname|nac}}
| |
− | }}
| |
− | {{documentation/{{documentation/version}}/module-introduction-end}}
| |
− | | |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Module Description}}
| |
− | {{documentation/{{documentation/version}}/module-description}}
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Use Cases}}
| |
− | Most frequently Transform module is used for these scenarios:
| |
− | | |
− | * Manual Registration: You can insert a transformation node into your scene, and in the Data module drag a volume or a model under it,
| |
− | making them children of the transformation node. After that any changes to the transformation matrix of this node will be applied to the display of children volumes and models.
| |
− | | |
− | * Visualize the displacement that transforms specify: Transforms can be visualized in both 2D and 3D views, as glyphs representing the displacement vectors as arrows, cones, or spheres; regular grids that are deformed by the transform; or contours that represent lines or surfaces where the displacement magnitude has a specific value.
| |
− | | |
− | * Apply transforms: You can dynamically transform a node by selecting them in the ''Transformable'' list and clicking the ''right arrow'' button. Whenever the transform changes, the transformed nodes are updated accordingly. The ''Harden Transform'' (its button is below the ''left arrow'' button) can be used for applying the transform to nodes permanently. Transforms themselves can be transformed, therefore chain of transforms can be constructed. Non-linear transforms can be concatenated too, but to to the lack of standard file format for storing concatenated inverted transforms, such composite non-linear transforms cannot be saved to file.
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Tutorials}}
| |
− | * Please use tutorial about [http://www.slicer.org/slicerWiki/index.php/Documentation/4.0/Training loading and viewing data].
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Panels and their use}}
| |
− | | |
− | Transform editing and application:
| |
− | {|
| |
− | |-
| |
− | | [[Image:TransformsModule-43.png|thumb|280px|Transforms module panel]]
| |
− | | [[Image:QSlicerTransformsModule.png|thumb|660px|''LinearTransform'' applied to ''Meningioma2''<br>Rotations: IS 45º<br>Translations: LR -41mm, IS 36mm]]
| |
− | |}
| |
− | | |
− | Transform display options:
| |
− | {|
| |
− | |-
| |
− | | [[Image:GlyphArrow2d.png|thumb|280px|Glyph visualization (arrow, 2D): the arrow shows the displacement vector at the arrow starting point, projected to the slice]]
| |
− | | [[Image:GlyphCone2d.png|thumb|280px|Glyph visualization (cone, 2D): the cone shows the displacement vector at the cone centerpoint, projected to the slice]]
| |
− | | [[Image:GlyphSphere2d.png|thumb|280px|Glyph visualization (sphere, 2D): the circle diameter shows the displacement vector magnitude at the circle centerpoint]]
| |
− | |-
| |
− | | [[Image:GlyphArrow3dSlice.png|thumb|280px|Glyph visualization (arrow, 3D, slice region): the arrow shows the displacement vector at the arrow starting point]]
| |
− | | [[Image:GlyphCone3dVolumeRoi.png|thumb|280px|Glyph visualization (cone, 3D, annotation ROI region): the cone shows the displacement vector at the cone centerpoint]]
| |
− | | [[Image:GlyphSphere3dVolume.png|thumb|280px|Glyph visualization (sphere, 3D, volume region, with glyph magnitude filtering): the sphere diameter shows the displacement vector magnitude at the circle centerpoint]]
| |
− | |-
| |
− | | [[Image:Grid2d.png|thumb|280px|Grid visualization (2D): shows a regular grid, deformed by the displacement vector projected to the slice]]
| |
− | | [[Image:Grid3dSlice.png|thumb|280px|Grid visualization (3D, slice region): shows a regular grid, deformed by the displacement vector]]
| |
− | | [[Image:Grid3dVolume.png|thumb|280px|Grid visualization (3D, annotation ROI region): shows a regular grid, deformed by the displacement vector]]
| |
− | |-
| |
− | | [[Image:Contour2d.png|thumb|280px|Contour visualization (2D): iso-lines corresponding to selected displacement magnitude values]]
| |
− | | [[Image:Contour3dVolume.png|thumb|280px|Grid visualization (3D, volume region): iso-surfaces corresponding to selected displacement magnitude values]]
| |
− | |}
| |
− | | |
− | {{documentation/{{documentation/version}}/module-parametersdescription}}
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Similar Modules}}
| |
− | * Related modules: [[Documentation/{{documentation/version}}/Modules/Data|Data module]], [[:Category:Documentation/{{documentation/version}}/Modules/Registration|Registration modules]].
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|References}}
| |
− | N/A
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Information for Developers}}
| |
− | ===Key [[Documentation/{{documentation/version}}/Developers/MRML|MRML]] nodes===
| |
− | * [http://slicer.org/doc/html/classvtkMRMLTransformableNode.html vtkMRMLTransformableNode]
| |
− | * [http://slicer.org/doc/html/classvtkMRMLTransformNode.html vtkMRMLTransformNode]
| |
− | ** [http://slicer.org/doc/html/classvtkMRMLLinearTransformNode.html vtkMRMLLinearTransformNode]
| |
− | ** [http://slicer.org/doc/html/classvtkMRMLBSplineTransformNode.html vtkMRMLBSplineTransformNode]
| |
− | ** [http://slicer.org/doc/html/classvtkMRMLGridTransformNode.html vtkMRMLGridTransformNode]
| |
− | How to programmatically apply a transform to a transformable node:
| |
− | vtkNew<[http://slicer.org/doc/html/classvtkMRMLLinearTransformNode.html vtkMRMLLinearTransformNode]> transformNode;
| |
− | scene->AddNode(transformNode.GetPointer());
| |
− | ...
| |
− | vtkNew<vtkMatrix4x4> matrix;
| |
− | ...
| |
− | transform->SetMatrixTransformToParent( matrix.GetPointer() );
| |
− | ...
| |
− | vtkMRMLVolumeNode* transformableNode = ...; // or vtkMRMLModelNode*...
| |
− | transformableNode->SetAndObserveTransformNodeID( transformNode->GetID() );
| |
− | | |
− | Because a ''transform'' node is also a ''transformable'' node, it is possible to concatenate transforms with each others:
| |
− | [http://slicer.org/doc/html/classvtkMRMLLinearTransformNode.html vtkMRMLLinearTransformNode*] transformNode = ...;
| |
− | [http://slicer.org/doc/html/classvtkMRMLLinearTransformNode.html vtkMRMLLinearTransformNode*] transformNode2 = ...;
| |
− | transformNode2->SetAndObserveTransformNodeID( transformNode->GetID() );
| |
− | ...
| |
− | transformable->SetAndObserveTransformNodeID( transformNode2->GetID() );
| |
− | | |
− | How to export the transform to as a displacement field (in a vector field volume)?
| |
− | | |
− | transformNode=slicer.util.getNode('LinearTransform_3')
| |
− | referenceVolumeNode=slicer.util.getNode('MRHead')
| |
− | slicer.modules.transforms.logic().CreateDisplacementVolumeFromTransform(transformNode, referenceVolumeNode, False)
| |
− | | |
− | How to visualize the displacement magnitude as a color volume?
| |
− | | |
− | transformNode=slicer.util.getNode('LinearTransform_3')
| |
− | referenceVolumeNode=slicer.util.getNode('MRHead')
| |
− | slicer.modules.transforms.logic().CreateDisplacementVolumeFromTransform(transformNode, referenceVolumeNode, True)
| |
− | | |
− | ===Events===
| |
− | When a transform node is observed by a transformable node, [http://slicer.org/doc/html/classvtkMRMLTransformableNode.html#ace1c30fc9df552543f00d51a20c038a6a4993bf6e23a6dfc138cb2efc1b9ce43b vtkMRMLTransformableNode::TransformModifiedEvent] is fired on the transformable node at observation time.
| |
− | Anytime a transform is modified, vtkCommand::ModifiedEvent is fired on the transform node and [http://slicer.org/doc/html/classvtkMRMLTransformableNode.html#ace1c30fc9df552543f00d51a20c038a6a4993bf6e23a6dfc138cb2efc1b9ce43b vtkMRMLTransformableNode::TransformModifiedEvent] is fired on the transformable node.
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-footer}}
| |
− | <!-- ---------------------------- -->
| |