[Paraview] [ParaView] Load VRML question...

Camilo Marin igetmyjunkmailhere at gmail.com
Tue Jul 21 15:55:55 EDT 2009


Thank you very much for the detailed explanation Pat, we are now able to
position and scale our VRML models (im working along with Andres who sent
the question). Thank you also to you Utkarsh for the help. Just for the tip
i finally downcasted to a vtkSMDoubleVectorProperty when calling
GetProperty("Position") on the proxy.

Thanks again.

El 16 de julio de 2009 17:30, pat marion <pat.marion at kitware.com> escribió:

> pqPipelineSource is a type of pqProxy, so you can call getProxy() on
> it to get a vtkSMProxy*.  From there you can access the properties
> that you are seeing in the GUI.  It looks like the transform filter
> has just one property, and it's a proxy property representing the
> actual transform (named Transform3 and described in utilities.xml).
> So you'll probably need to call GetProperty("Transform") and downcast
> the returned pointer to vtkSMProxyProperty.  From the
> vtkSMProxyProperty you can get another vtkSMProxy pointer, and this
> vtkSMProxy should have the actual Position, Translation, and Scale
> properties.
>
> After you modify properties you can call UpdateVTKObjects() on the
> vtkSMProxy, this is similar to clicking the Apply button.
>
> http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkSMProxy.html
> http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkSMProperty.html
>
> Pat
>
>
> 2009/7/16 Andrés Felipe Padilla <anfeken at gmail.com>:
> > Thanks a lotUtkarsh, we can now load our model. We are trying now to
> create
> > a transform filter for moving the model around. We are creating it the
> same
> > way we create a source (with pqObjectBuilder) but we have not found a way
> to
> > specify the transformation attributes (rotation, translation, scaling)
> > without using the GUI. We have read the filters.xml and there are such
> > propeties specifying those attributes. However, it is not clear how we
> can
> > manipulate those attributes via pqObjectBuilder or via pqPipelineSource.
> > Thanks.
> >
> > 2009/7/15 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> >>
> >> For some reason the proxy is named "vrmlreader" (all lowercase). Try
> >> using that name when calling createSource().
> >>
> >> If you run into such issues, you can always look at
> >> ParaView3Source/Servers/ServerManager/Resources/readers.xml to
> >> determine the name of the proxy for the reader you want to create.
> >>
> >> Utkarsh
> >>
> >> 2009/7/15 Andrés Felipe Padilla <anfeken at gmail.com>:
> >> > We tried the following using the vtkVRMLSource
> >> >
> >> > std::string file = "/models/flag.wrl";
> >> > leVRML = vtkVRMLSource::New();
> >> > leVRML->SetFileName(file.c_str());
> >> >
> >> > However, we do not know how to visualize the VRMLObject in the Active
> >> > View.
> >> >
> >> > We tried the following using pqObjectBuilder:
> >> >
> >> >  pqPendingDisplayManager *pdm =
> >> >
> >> >
> qobject_cast<pqPendingDisplayManager*>(pqApplicationCore::instance()->manager("PENDING_DI
> >> > SPLAY_MANAGER"));
> >> > pdm->setAddSourceIgnored(true);
> >> > leSource = builder->createSource("sources", "VRMLSource", s);
> >> > leSource->getProxy()->UpdateVTKObjects();
> >> > pdm->setAddSourceIgnored(false);
> >> > leSource->setModifiedState(pqProxy::UNMODIFIED);
> >> > pqOutputPort* oPort = leSource->getOutputPort(0);
> >> > builder->createDataRepresentation(oPort,
> >> > pqActiveView::instance().current());
> >> > (pqActiveView::instance().current())->render();
> >> >
> >> > but VRMLSource does not exist, so this approach fails. We were trying
> to
> >> > look if creating a proxy with the vtkVRMLSource would work but we
> >> > haven't
> >> > figure that out yet. Can this source be added via an XML or something
> >> > (*throwing some ideas) so it can be used with the objectBuilder?
> >> >
> >> > Thanks.
> >> >
> >> > Andrés
> >> >
> >> > 2009/7/15 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> >> >>
> >> >> What you described should work. Can you post relevant sections of the
> >> >> code?
> >> >>
> >> >> Utkarsh
> >> >>
> >> >> 2009/7/15 Andrés Felipe Padilla <anfeken at gmail.com>:
> >> >> > Thanks for your quick answer Utkarsh. However, we are trying to
> load
> >> >> > a
> >> >> > VRML
> >> >> > file without having to use the menus. We are using vtkVRMLSource,
> but
> >> >> > we
> >> >> > don't know to visualize it. We are trying to use the
> pqObjectBuilder
> >> >> > methods, createSource and createDataRepresentation, but it does not
> >> >> > work
> >> >> > with VRML files. Is there a way for loading and displaying the file
> >> >> > without
> >> >> > using the menus? Thanks a lot for your help.
> >> >> >
> >> >> > 2009/7/13 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> >> >> >>
> >> >> >> You can simply open a vrml file as if you are loading a data file
> >> >> >> using "File |Open". ParaView will create the vtkVRMLSource for
> you.
> >> >> >>
> >> >> >> vtkVRMLSource has methods like SetFileName that you use to set the
> >> >> >> filename programmatically and they are indeed public.
> >> >> >>
> >> >> >> Utkarsh
> >> >> >>
> >> >> >> 2009/7/13 Andrés Felipe Padilla <anfeken at gmail.com>:
> >> >> >> > Hi,
> >> >> >> > I've been trying to load a VRML on ParaView unsucessfully from
> >> >> >> > code.
> >> >> >> > From
> >> >> >> > the API and the code i see that the vtkVRMLSource could allow
> one
> >> >> >> > to
> >> >> >> > load a
> >> >> >> > VRML but i have some issues with it. I create a vtkVRMLSource
> with
> >> >> >> > the
> >> >> >> > New()
> >> >> >> > method but from there i cant see where to go. I cannot specify
> >> >> >> > this
> >> >> >> > object
> >> >> >> > the file i want to load as all its members are protected. So my
> >> >> >> > question
> >> >> >> > is
> >> >> >> > how do i tell the vtkVRMLSource to load my VRML?
> >> >> >> > Thanks
> >> >> >> > _______________________________________________
> >> >> >> > 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 ParaView Wiki at:
> >> >> >> > http://paraview.org/Wiki/ParaView
> >> >> >> >
> >> >> >> > Follow this link to subscribe/unsubscribe:
> >> >> >> > http://www.paraview.org/mailman/listinfo/paraview
> >> >> >> >
> >> >> >> >
> >> >> >
> >> >> >
> >> >
> >> >
> >
> >
> > _______________________________________________
> > 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 ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090721/3a90b600/attachment-0001.htm>


More information about the ParaView mailing list