|
Tags: 2017 source edit, Replaced |
(21 intermediate revisions by 6 users not shown) |
Line 1: |
Line 1: |
− | <!-- ---------------------------- --> | + | <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/models.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}}
| |
− | {{documentation/{{documentation/version}}/module-acknowledgements}}<br>
| |
− | Information on NA-MIC can be obtained from the [http://www.na-mic.org/ NA-MIC website].<br>
| |
− | Author: Nicole Aucoin, SPL<br>
| |
− | Contact: Contact: Nicole Aucoin, <email>nicole@bwh.harvard.edu</email><br>
| |
− | {{documentation/{{documentation/version}}/module-introduction-row}}
| |
− | {{documentation/{{documentation/version}}/module-introduction-logo-gallery
| |
− | |{{collaborator|logo|spl}}|{{collaborator|longname|spl}}
| |
− | |{{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}}
| |
− | {|
| |
− | |-
| |
− | |Examples:
| |
− | * Use Case 1: Manipulating the appearance of the surface models that are part of anatomical atlases, for example one found in the [http://www.slicer.org/pages/Special:PubDB_View?dspaceid=1265 SPL/PNL Brain Atlas] or the [http://www.slicer.org/publications/item/view/1953 SPL Knee Atlas].
| |
− | **turning visibility on or off for individual structure (e.g. turn the skin off)
| |
− | **change the color, opacity, and "shininess" of a structure (e.g. make the skin appear semitransparent)
| |
− | **drag and drop interface to organize models into hierarchical groups (e.g. lateral ventricles, third and fourth ventricles of the brain under the name ventricles of the brain). These groups can be turned on and off by manipulating the parent.
| |
− | * Use Case 2: Adjusting the appearance of surface models generated from the Model Maker module
| |
− | | [[File:Slicer4-Models-KneeAtlas.jpeg|left|300px|Knee Atlas Models]]
| |
− | |}
| |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Tutorials}}
| |
− | | |
− | * Tutorial about [http://wiki.na-mic.org/Wiki/index.php/Slicer3:Training loading and viewing data].
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Panels and their use}}
| |
− | | |
− | A list of all the panels in the interface, their features, what they mean, and how to use them.
| |
− | {|
| |
− | |-
| |
− | | [[File:ModelsModule-2011-11-25.png|thumb|200px]]
| |
− | | [[File:Slicer4-Models-SceneHierarchy.jpeg|thumb|200px|Model Hierarchy]] | |
− | | [[File:Slicer4-Models-Information.jpeg|thumb|200px|Model Information]]
| |
− | | [[File:Slicer4-Models-Display.jpeg|thumb|200px|Model Display Properties]]
| |
− | | [[File:Slicer4-Models-Clipping.jpeg|thumb|200px|Model Clipping Properties]]
| |
− | |}
| |
− | | |
− | {{documentation/{{documentation/version}}/module-parametersdescription}}
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Similar Modules}}
| |
− | * The [[Documentation/{{documentation/version}}/Modules/Annotations|Annotations]] module uses geometry to mark locations and so has similar functionality to the models module.
| |
− | * The [[Documentation/{{documentation/version}}/Modules/ProbeVolumeWithModel|Probe Volume With Model]] module allows a user to apply a scalar overlay to a model by sampling a volume.
| |
− | * The [[Documentation/{{documentation/version}}/Modules/MergeModels|Merge Models]] module will allow you to create a single model from two models
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|References}}
| |
− | N/A
| |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-section|Information for Developers}}
| |
− | {{documentation/{{documentation/version}}/module-developerinfo}}
| |
− | | |
− | ===Create a model node with a polydata=== | |
− | {|
| |
− | ! Recommended: Using Models [[Documentation/{{documentation/version}}/Developers/Tutorials/CreateLoadableModule#Dependency_between_modules|module dependency]]
| |
− | ! Advanced: Prone to obsolescence, errors and memory leaks
| |
− | |-
| |
− | |valign="top"|
| |
− | vtkSlicerModelsLogic* modelsLogic =
| |
− | vtkSlicerModelsLogic::SafeDownCast(modelsModule->logic());
| |
− | vtkMRMLModelNode* modelNode =
| |
− | modelsLogic->AddModel(polyData /*or polyDataAlgorithm->GetOutput()*/);
| |
− | |
| |
− | vtkNew<vtkMRMLModelNode> modelNode;
| |
− | modelNode->SetAndObservePolyData(polyData /*or polyDataAlgorithm->GetOutput()*/);
| |
− | mrmlScene->AddNode(modelNode.GetPointer());
| |
− |
| |
− | vtkNew<vtkMRMLModelDisplayNode> modelDisplayNode;
| |
− | mrmlScene->AddNode(modelDisplayNode.GetPointer());
| |
− | modelNode->SetAndObserveDisplayNodeID(modelDisplayNode->GetID());
| |
− | |}
| |
− | | |
− | ===Multiple models===
| |
− | | |
− | It's possible to have multiple models combined into one model and have each shape assigned different color values, but it requires either using Merge Models to merge the shapes into one file and using python to create a scalar overlay to assign values to each vertex (assuming the user can determine which vertex belongs to which shape), or using Paraview, as per [http://slicer-users.65878.n3.nabble.com/saving-multiple-colors-Models-within-one-STL-or-VTK-tp3974004p3974701.html Andras Lasso]:
| |
− | | |
− | Merge multiple STL files into a single colored VTK file in Paraview:
| |
− | | |
− | *Load all the models
| |
− | *Assign a constant scalar to the points by using the Calculator filter (use a different constant for each model, e.g., 1, 2, 3, 4, ...)
| |
− | *Merge the Calculator outputs with the Append Geometry filter
| |
− | *Save the Append Geometry filter output with File / Save Data / File type VTK or VTP (download the sample ParaView state file from [http://dl.dropbox.com/u/1528749/SlicerHelp/merge.pvsm here])
| |
− | | |
− | Then in Slicer you can load the model, open the Models module, open Scalars, enable "Visible", select "Result" as active scalar, select a color table.
| |
− | | |
− | | |
− | <!-- ---------------------------- -->
| |
− | {{documentation/{{documentation/version}}/module-footer}}
| |
− | <!-- ---------------------------- -->
| |