Documentation/4.6/Developers/Tutorials/ExportToMaya

From Slicer Wiki
Revision as of 06:25, 7 November 2016 by UpdateBot (talk | contribs) (Nightly -> 4.6)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Documentation < 4.6 < Developers < Tutorials < ExportToMaya

Fiber tracts in the Slicer 3D View

Python code to capture the contents of the 3D View and export to an OBJ file called tracts

   exporter = vtk.vtkOBJExporter()
   exporter.SetFilePrefix('/tmp/tracts')
   layoutManager = slicer.app.layoutManager()
   view = layoutManager.threeDWidget(0).threeDView()
   exporter.SetRenderWindow(view.renderWindow())
   exporter.Write()


This code created two files tracts.obj and tracts.mtl which are available in OBJtracts.tar.