[vtkusers] self.headActor.GetProperty().SetColor(R,G,B)

Jothy jothybasu at gmail.com
Fri Oct 22 11:45:44 EDT 2010


I tested without

 self.renWinInteract = vtkTkRenderWindowInteractor(parent,rw=self.renWin,
width=visWidth, height=visHeight)

  self.renWinInteract.pack(side=visSide, fill='both', expand=1)

and it works well.

Jothy


On Fri, Oct 22, 2010 at 4:29 PM, aneuryzma <patrick.diviacco at gmail.com>wrote:

>
> 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.
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101022/0f5d9651/attachment.htm>


More information about the vtkusers mailing list