[vtkusers] self.headActor.GetProperty().SetColor(R,G,B)
aneuryzma
patrick.diviacco at gmail.com
Fri Oct 22 11:29:19 EDT 2010
This is my pipeline
self.ren = vtk.vtkRenderer()
self.renWin = vtk.vtkRenderWindow()
self.v16 = vtk.vtkVolume16Reader()
self.v16.SetDataDimensions(256, 256)
self.v16.SetDataByteOrderToLittleEndian()
self.v16.SetFilePrefix("C:/vtk/vtkdata/fullHead/headsq")
self.v16.SetImageRange(1, 93)
self.v16.SetDataSpacing(0.8, 0.8, 1.5)
self.v16.Update()
self.contour = vtk.vtkContourFilter()
self.contour.SetInputConnection(self.v16.GetOutputPort())
self.contour.SetValue(0, 1150)
self.normals = vtk.vtkPolyDataNormals()
self.normals.SetInputConnection(self.contour.GetOutputPort())
self.normals.SetFeatureAngle(60.0)
self.stripper = vtk.vtkStripper()
self.stripper.SetInputConnection(self.normals.GetOutputPort())
self.mapper = vtk.vtkPolyDataMapper()
self.mapper.SetInputConnection(self.stripper.GetOutputPort())
self.mapper.ScalarVisibilityOff()
self.headActor = vtk.vtkActor()
self.headActor.GetProperty().SetColor(1,1,1)
self.headActor.SetMapper(self.mapper)
self.mass = vtk.vtkMassProperties()
self.mass.SetInputConnection(self.contour.GetOutputPort())
#mass.Update()
self.renWinInteract = vtkTkRenderWindowInteractor(parent,
rw=self.renWin, width=visWidth, height=visHeight)
self.renWinInteract.Initialize()
self.renWinInteract.pack(side=visSide, fill='both', expand=1)
self.renWinInteract.Start()
self.ren.AddActor(self.headActor)
self.renWin.AddRenderer(self.ren)
self.renWin.Render()
--
View this message in context: http://vtk.1045678.n5.nabble.com/self-headActor-GetProperty-SetColor-R-G-B-tp3232393p3232448.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list