[vtkusers] attributeError?!

João Domingos joao.sousa.domingos at gmail.com
Fri Aug 31 02:51:34 EDT 2012


Dear all,

is this a bug or am I really not seeing something obvious here?

(...)
pol2stenc = vtk.vtkPolyDataToImageStencil()
 pol2stenc.SetInput(self.dsurf.dense_representation_grid)
pol2stenc.SetOutputOrigin(origin);
  pol2stenc.SetOutputSpacing(spacing);
  pol2stenc.SetOutputWholeExtent(whiteImage.GetExtent());
  pol2stenc.Update();

# cut the corresponding white image and set the background:
 stencil = vtk.vtkImageStencil()
stencil.SetInput(whiteImage)
  stencil.SetStencilConnection(pol2stenc.GetOutputPort())
 stencil.ReverseStencilOff()
  stencil.SetBackgroundValue(0)
  stencil.Update()


Error:
    stencil.SetStencilConnection(pol2stenc.GetOutputPort())
AttributeError: SetStencilConnection

??


Many thanks for your help,
Domingos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120831/a6419ca5/attachment.htm>


More information about the vtkusers mailing list