[Paraview-developers] Using VTK_WIREFRAME for vtkPolyData

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Feb 23 10:29:22 EST 2012


The property changed to a string property that now takes in a string
value such as "Wireframe", "Surface". This was done to minimize
conflicts between various plugins adding new representation types.

Utkarsh

On Thu, Feb 23, 2012 at 10:12 AM, Reuter, Michael A. <reuterma at ornl.gov> wrote:
> 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>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list