Difference between revisions of "Documentation/Nightly/Extensions/Add3DTextExtension"

From Slicer Wiki
Jump to: navigation, search
(Created page with "<noinclude>{{documentation/versioncheck}}</noinclude> <!-- ---------------------------- --> {{documentation/{{documentation/version}}/module-header}} <!-- --------------------...")
 
(Update on 2016-05-19)
 
(2 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
{{documentation/{{documentation/version}}/module-introduction-row}}
 
{{documentation/{{documentation/version}}/module-introduction-row}}
  
 +
Extension: [[Documentation/{{documentation/version}}/Extensions/Add3DTextExtension|Add3DText]]<br><br>
  
Extension: [[Documentation/{{documentation/version}}/Extensions/CleaverExtension|CleaverExtension]]<br><br>
+
Acknowledgements:
Cleaver - A MultiMaterial Tetrahedral Meshing Library and Application<br>
 
  
 +
This project is partially supported by Natural Science Foundation of China (Grant No.51005156 and 81171429).
  
Acknowledgments:<br><br>
 
Cleaver is an Open Source software project that is principally funded through the SCI Institute's NIH/NIGMS CIBC Center. Please use the following acknowledgment and send us references to any publications, presentations, or successful funding applications that make use of NIH/NIGMS CIBC software or data sets. <br>
 
"This project was supported by the National Institute of General Medical Sciences of the National Institutes of Health under grant number P41GM103545."<br><br>
 
  
Developed at the [http://sci.utah.edu SCI Institute], [http://www.utah.edu University of Utah].<br><br>
+
Get this extension: [https://github.com/f-tang/Add3DText Code Resource] <br><br>
[http://www.sci.utah.edu/cibc-software/cleaver-cibc.html Project Webpage] <br><br>
 
  
Author: Jonathan Bronson <br>
+
Author: Fenghe Tang, Xiaojun Chen (Shanghai Jiao Tong University) <br>
Contributor1: Josh Levine (Co-Author)<br>
+
Contact1: Xiaojun Chen, <email>xiaojunchen@163.com</email><br>
Contributor2: Ross Whitaker (Co-Author)<br>
+
Contact2: Fenghe Tang, <email>miketfh@sjtu.edu.cn</email><br>
Contributor3: Brig Bagley (Developer)<br><br>
 
Contact1: Jonathan Bronson, <email>bronson@sci.utah.edu</email><br>
 
Contact2: Brig Bagley, <email>brig@sci.utah.edu</email><br>
 
  
 
{|
 
{|
|[[Image:Sci.png|thumb|340px|SCI Institute]]
+
|[[Image:SJTU_Logo.png|thumb|Shanghai Jiao Tong University]]
|[[Image:CleaverCIBC.png|thumb|340px|Cleaver - CIBC]]
 
|[[Image:uofu.jpg|thumb|340px|University of Utah]]
 
 
|}
 
|}
  
Line 37: Line 29:
 
{{documentation/{{documentation/version}}/module-section|Module Description}}
 
{{documentation/{{documentation/version}}/module-section|Module Description}}
  
CleaverExtension is a Slicer CLI Module that takes a set of NRRD Volumes and creates a set of tetrahedral meshes
+
Add3DText is a Slicer Loadable module that allows users to emboss 3D text on the model(.stl format). <br><br>
to import into the Slicer MRML.<br><br>
 
 
 
Based on the "Lattice Cleaving" algorithm (see References), this method is theoretically guaranteed to produce valid meshes with bounded dihedral angles, while still conforming to multimaterial material surfaces. Empirically these bounds have been shown to be significant.
 
  
 
<!-- ---------------------------- -->
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Use Cases}}
 
{{documentation/{{documentation/version}}/module-section|Use Cases}}
 
{|
 
{|
|[[Image:FrogSlices.jpeg|thumb|540px|Input Frog image slices]]
+
|[[Image:Add3DText_ScreenShot.png|thumb|720px|Screen shot]]
|[[Image:SlicerFrogOutput.png|thumb|375px|Frog Surface]]
 
 
|}
 
|}
  
 
<!-- ---------------------------- -->
 
<!-- ---------------------------- -->
{{documentation/{{documentation/version}}/module-section|Panels and their use}}
+
{{documentation/{{documentation/version}}/module-section|Tutorials}}
 +
 
 +
*Panels:
  
 
{|
 
{|
|
+
|[[Image:Add3DText_Panel.png|thumb|360px|Module UI]]
|[[Image:SlicerGui.png|thumb|300px|Module UI]]
 
 
|}
 
|}
*Input Volume 1-8 : Import up to 8 different volumes (NRRD) of the same dimension for Cleaver to mesh.
 
*Output Model1-10 : Create up to 10 new models for Cleaver to write mesh data to. If none or too few are specified for the output, the console will provide the locations of the VTK mesh files and MRML scene file to load.
 
*Use Padding : Often a good option to allow if material transitions exist at the volume boundaries.
 
*Scaling : Scale the volume up or down for higher or lower resolution.
 
*Alpha Short : The minimum distance on an edge cut after which Cleaver does not warp a vertex.
 
*Alpha Long : The maximum distance on an edge cut after which Cleaver will create a sub-tetrahedron (Cleave the current tet).
 
*Verbose : Whether the console is to output detailed information on the cleaving steps.
 
*Output format:
 
**VTKtet : The default option that creates VTK mesh files with the output volume tets.
 
**VTKfac : These VTK files define meshes that signify transitions between materials.
 
**tetgen : This output can be read into the TetGen Program.
 
**scirun : This output can be read into SCI's SciRun program.
 
**matlab : This output can be read into MATLAB.
 
*Restore Defaults : Restores the default options.
 
*AutoRun : Runs the program automatically when a change is made (does not work with CleaverExtension).
 
*Apply : Runs the CLI with the above options within Slicer. See output in the console.
 
*Cancel : Stop the current process.
 
  
Cleaver operates on indicator functions (each defined by an input volume), and requires at least two. If you provide only a single function, Cleaver attempts to make an 'inverse' material for you automatically, by multiplying the field by -1 (therefore one material should have voxel value of X and the other material should have voxel value of -X).
+
*1. MRMLViewTree: To hide/display/delete/rename a model node.
 +
*2. Model combo box: Select a model that you want to emboss your text on.
 +
*3. Text edit: Type your text here, English Characters & Numbers ONLY.
 +
*4. "Set text" button: Confirm your text.
 +
*5. "Locate text" button: Click this button, and then click on the model to locate your text.
 +
**If you want to re-locate your text, click this button again.
 +
*6. "Text size" slider: Drag to adjust the size of your text.
 +
*7. "OK" button: Apply your text on the model.
 +
**It will create a NEW model instead of modifying the original one.
 +
*8. "Cancel" button: Cancel your operation.
  
One other thing you might want to watch out for is you're using a very discontinuous input field. This is going to lead to stair-stepping artifacts on your output mesh. Providing smooth input functions will eliminate this problem.
 
  
<!-- ---------------------------- -->
+
*Before you locate the text, please first "center the 3D view on the scene", or the text location may be affected.
{{documentation/{{documentation/version}}/module-section|Tutorials}}
+
 
*Both volumes and models are provided and created, respectively. When running in VTKtet output mode, the tet models are automatically loaded into Slicer.<br>
 
 
{|
 
{|
|[[Image:Screenshot1.jpeg|thumb|700px|Example2]]
+
|[[Image:Add3DText_3.png|thumb|480px|Center the 3D ciew on the scene]]
|}<br>
+
|}
*Volumes are imported, then the program is run in VTKtet output mode. The output MRML is then loaded and clipped.<br>
+
 
 +
*The direction of the text is always from left to right on your screen. To adjust the relative direction of the model and your text, you can rotate the model before locate your text.
 +
 
 
{|
 
{|
|[[Image:Screenshot2.jpeg|thumb|700px|Example3]]
+
|[[Image:Add3DText.png|thumb|Relative direction 1]]
|}<br>
+
|[[Image:Add3DText_2.png|thumb|Relative direction 2]]
*Volumes are imported, then the program is run in VTKfac output mode. The output MRML is then loaded and clipped.<br>
+
|}
{|
 
|[[Image:Screenshot3.jpeg|thumb|700px|Example4]]
 
|}<br>
 
*An illustration of noting the output files of CleaverExtension when no models are provided. These can then be loaded into Slicer manually.<br>
 
{|
 
|[[Image:Screenshot4.jpeg|thumb|700px|Example1]]
 
|}<br>
 
 
 
Sample data: [[Media:CleaverSampleData.zip]]
 
* Option 1 - Use  Cleaver-MRHead-label.nrrd + Cleaver-MRHeader-label-inverse.nrrd.
 
* Option 2a - Use Cleaver-MRHead-label-shifted.nrrd and let Cleaver infer the inverse.
 
* Option 2b - Use Cleaver-MRHead-label-shifted-Gaussian.nrrd and let Cleaver infer the inverse. This is a Gaussian smoothed version of option 2a to show how a smooth function can prevent stair-stepping artefacts.
 
  
 
<!-- ---------------------------- -->
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|References}}
 
{{documentation/{{documentation/version}}/module-section|References}}
* Bronson J., Levine, J., Whitaker R., "Lattice Cleaving: Conforming Tetrahedral Meshes of Multimaterial Domains with Bounded Quality". Proceedings of the 21st International Meshing Roundtable (San Jose, CA, Oct 7-10, 2012).<br>
+
N/A
 
 
  
 
<!-- ---------------------------- -->
 
<!-- ---------------------------- -->
Line 113: Line 81:
 
<!-- ---------------------------- -->
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-footer}}
 
{{documentation/{{documentation/version}}/module-footer}}
[[Category:Documentation/{{documentation/version}}/Modules/Segmentation]]
 
 
<!-- ---------------------------- -->
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/extension-footer}}
 
{{documentation/{{documentation/version}}/extension-footer}}

Latest revision as of 08:21, 19 May 2016

Home < Documentation < Nightly < Extensions < Add3DTextExtension


For the latest Slicer documentation, visit the read-the-docs.


Introduction and Acknowledgements

Extension: Add3DText

Acknowledgements:

This project is partially supported by Natural Science Foundation of China (Grant No.51005156 and 81171429).


Get this extension: Code Resource

Author: Fenghe Tang, Xiaojun Chen (Shanghai Jiao Tong University)
Contact1: Xiaojun Chen, <email>xiaojunchen@163.com</email>
Contact2: Fenghe Tang, <email>miketfh@sjtu.edu.cn</email>

Shanghai Jiao Tong University

Module Description

Add3DText is a Slicer Loadable module that allows users to emboss 3D text on the model(.stl format).

Use Cases

Screen shot

Tutorials

  • Panels:
Error creating thumbnail: File missing
Module UI
  • 1. MRMLViewTree: To hide/display/delete/rename a model node.
  • 2. Model combo box: Select a model that you want to emboss your text on.
  • 3. Text edit: Type your text here, English Characters & Numbers ONLY.
  • 4. "Set text" button: Confirm your text.
  • 5. "Locate text" button: Click this button, and then click on the model to locate your text.
    • If you want to re-locate your text, click this button again.
  • 6. "Text size" slider: Drag to adjust the size of your text.
  • 7. "OK" button: Apply your text on the model.
    • It will create a NEW model instead of modifying the original one.
  • 8. "Cancel" button: Cancel your operation.


  • Before you locate the text, please first "center the 3D view on the scene", or the text location may be affected.
Error creating thumbnail: File missing
Center the 3D ciew on the scene
  • The direction of the text is always from left to right on your screen. To adjust the relative direction of the model and your text, you can rotate the model before locate your text.
Relative direction 1
Error creating thumbnail: File missing
Relative direction 2

References

N/A

Information for Developers

For technical questions or problems, please use contacts in the introduction.