Thanks for the suggestion. I have the python code like this:<br><br>import vtk<br><br># Create rendering window and renderer<br>ren = vtk.vtkRenderer()<br>renWin = vtk.vtkRenderWindow()<br>renWin.AddRenderer(ren)<br>renWin.SetSize(600, 600)<br>
<br># Interacting window<br>iren = vtk.vtkRenderWindowInteractor()<br>iren.SetRenderWindow(renWin)<br><br># Read VTK image data<br>reader = vtk.vtkXMLImageDataReader()<br>reader.SetFileName("py_3d_strike0_stack_XY.vti")<br>
<br>plane=vtk.vtkImageDataGeometryFilter()<br>plane.SetInputConnection(reader.GetOutputPort())<br>plane.SetExtent(0, 60, 0, 60, 0, 0)<br>#srange = plane.GetOutput().GetPointData().GetScalars().GetRange()<br><br>warp = vtk.vtkWarpScalar()<br>
warp.SetInputConnection(plane.GetOutputPort())<br>warp.UseNormalOn<br>warp.SetNormal(0.0,0.0,1.0)<br>warp.SetScaleFactor(2.0)<br><br># Color map<br>color=vtk.vtkColorTransferFunction()<br>color.SetColorSpaceToDiverging()<br>
<br>vprop=vtk.vtkProperty()<br>vprop.SetColor(color)<br><br>mapper = vtk.vtkPolyDataMapper()<br>mapper.SetInputConnection(warp.GetOutputPort())<br><br>actor = vtk.vtkActor()<br>actor.SetMapper(mapper)<br>actor.SetProperty(vprop)<br>
actor.GetProperty().SetRepresentationToWireframe()<br>actor.SetPosition(0.0,0.0,200.0) #Translate<br><br># Add the actors to the renderer, set the background<br>ren.AddActor(actor)<br><br>ren.ResetCamera()<br>ren.GetActiveCamera().Azimuth(0)<br>
ren.GetActiveCamera().Elevation(-70)<br>ren.SetBackground(1.0, 1.0, 1.0)<br>ren.ResetCameraClippingRange()<br><br>#iren.Initialize()<br>renWin.Render()<br>iren.Start()<br><br><br>Obviously I get the error in in ' actor.SetProperty(vprop) ' and I cannot implement vtkVolumeProperty() here. Am I missing something?<br>
<br>Any help/suggestions will greatly be appreciated.<br><br>Thanks,<br>Hom Nath<br><br>