On Tue, Oct 23, 2012 at 3:50 PM, Fabiano Papaiz <fabianopap...@gmail.com>wrote:

> 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.
>

The way you have set those properties at the end (the color/opacity), they
cannot be exported and viewed in Paraview. Since your 'contour' filter
produces a vtkPolyData, you can use vtkXMLPolyDataWriter to write it to a
vtp file which can then be opened with Paraview. I'd suggest you do that,
then setup the properties (color/opacity) in Paraview.

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to