[Paraview] VTK Code to Paraview

Fabiano Papaiz fabianopapaiz at gmail.com
Tue Oct 23 15:50:48 EDT 2012


Hi Everybody, (sorry my english)

I am new in paraview and have some experience with VTK with python (some
codes that parse a DICOM Medical images and rendering as
volume/isosurface).

My basic question is: how can i use the output generated by my VTK code and
input in a paraview to be render? (Is this possible?)

Below an piece of my python code:

   reader = vtk.vtkDICOMImageReader()
   reader.SetDirectoryName(dirDicom)
   reader.Update()

   contour = vtk.vtk.vtkMarchingCubes()
   contour.SetInput( reader.GetOutput() )
   contour.ComputeNormalsOn()
   contour.SetValue( 0, 1250 )

   mapper = vtk.vtkPolyDataMapper()
   mapper.SetInput( contour.GetOutput() )
   mapper.ScalarVisibilityOff()

   actorBone = vtk.vtkLODActor()
   actorBone.SetNumberOfCloudPoints( 1000000 )
   actorBone.SetMapper( mapper )
   actorBone.GetProperty().SetColor( 1, 1, 1 )
   actorBone.GetProperty().SetOpacity( 0.7 )
   ##
   ##>>>> HERE,  Instead of use a vtkRenderWindow I want show in paraview.



Thanks,
Fabiano Papaiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121023/b1765d87/attachment.htm>


More information about the ParaView mailing list