[Paraview] Transformation extraction from Transform filter

Juan Fernando Duque Lombana jduquelo at eafit.edu.co
Wed Feb 18 09:42:07 EST 2009


Thank you Utkarsh!

I used a property iterator to get the names of the properties you suggested;
Finally with this lines of code I was able to get the information I needed:

 vtkSMProxyProperty *Transform_prop =
vtkSMProxyProperty::SafeDownCast(myFilters[0]->getProxy()->GetProperty("Transform"));

 vtkSMProxy* myTransformProxy=Transform_prop->GetProxy(0);
 vtkSMDoubleVectorProperty *Position_prop =
vtkSMDoubleVectorProperty::SafeDownCast(myTransformProxy->GetProperty("Position"));

 vtkSMDoubleVectorProperty *Rotation_prop =
vtkSMDoubleVectorProperty::SafeDownCast(myTransformProxy->GetProperty("Rotation"));

Thank you!

On Tue, Feb 17, 2009 at 5:23 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> The "Transform" property is a vtkSMProxyProperty. Use GetProxy(0) to
> get the actual source proxy that produces the transform while is the
> ("extended_sources", "Transform3") proxy. It does not have API to
> access the transform directly, however. You can only get the
> scale/translation/rotation values.
>
> On Tue, Feb 17, 2009 at 4:27 PM, Juan Fernando Duque Lombana
> <jduquelo at eafit.edu.co> wrote:
> > Good day everyone,
> >
> > Does anyone knows how to extract the "Transform" matrix from a Transform
> > filter?
> >
> > I've been trying using the following line:
> >
> > vtkSMDoubleVectorProperty *Transform_prop =
> >
> vtkSMDoubleVectorProperty::SafeDownCast(myFilterPipeline->getProxy()->GetProperty("Transform"));
> >
> > But when I try to access any:
> >
> > Transform_prop->GetElement(i);
> >
> > I get a segmentation fault,
> >
> > Any hints or ideas?
> >
> > Thank you in advance!
> >
> >
> > ... Juan Fernando Duque Lombana.
> >
> > _______________________________________________
> > 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
> >
> >
>



-- 
... Juan Fernando Duque Lombana.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090218/eec37732/attachment-0001.htm>


More information about the ParaView mailing list