[Paraview-developers] Using VTK_WIREFRAME for vtkPolyData

Reuter, Michael A. reuterma at ornl.gov
Thu Feb 23 10:12:06 EST 2012


Hi,

We have a plugin that our application uses that returns a vtkPolyData dataset from a glyph filter, which uses a vtkCubeSource. In 3.10, we were able to set the representation to VTK_WIREFRAME in order to render the glyphs as open boxes. We use this in conjunction with another plugin to show indexed peaks in neutron event data. In 3.12, this no longer seems to be possible as it looks like Surface, Volume and Outline are the only options. When the code tries to apply the wireframe property,  it puts up a warning that says:

Generic Warning: In ParaView-3.12.0/ParaViewCore/ServerManager/vtkSMPropertyHelper.cxx, line 185
Call not supported for the current property type.

I can see that this can be set post-rendering interactively via the Display tab in the proxy tab widget, but I'd really like the wireframe to be the default representation type on render. The code we used to set the representation type is:
<code>

  // Show the data

  pqDataRepresentation *drep = builder->createDataRepresentation(\

        this->origSrc->getOutputPort(0), this->view);

  int reptype = VTK_SURFACE;

  if (this->isPeaksWorkspace(this->origSrc))

  {

    reptype = VTK_WIREFRAME;

  }

  vtkSMPropertyHelper(drep->getProxy(), "Representation").Set(reptype);

  drep->getProxy()->UpdateVTKObjects();

</code>

I've also attached the code for the plugin. Is there a new way to do this so that I can achieve the previous behavior?

Thanks,
M

Dr. Michael Reuter
Data Analysis and Visualization Group
Neutron Data Analysis and Visualization Division
Oak Ridge National Laboratory

Office: 1-865-241-7216
Fax: 1-865-574-6080
Email: reuterma at ornl.gov<mailto:reuterma at ornl.gov>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkPeaksReader.cxx
Type: application/octet-stream
Size: 4658 bytes
Desc: vtkPeaksReader.cxx
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20120223/631ded15/attachment.obj>


More information about the Paraview-developers mailing list