[Paraview] Transform filter from python

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Jan 14 10:02:36 EST 2009


Attached is an example script. "Transform" property on the
TransformFilter is a proxy property that takes either the (transforms,
Transform) or (transforms, Transform2) proxy. These proxies have
properties to affect the transform as illustrated in the attached
script.


Utkarsh


On Wed, Jan 14, 2009 at 2:27 AM, Jérôme <jerome.velut at gmail.com> wrote:
> Hi,
>
> Just an idea: It seems that the error message warns about typo... Are
> you sure it is "translation" and not "Translation" ?
>
> regards,
>
> Jerome
>
> 2009/1/13 Jorge Mario Mazo <jmm.mecanica at gmail.com>:
>> I'm trying to use the TransformFilter
>>
>> but I do not know how to set the paramater for the filter
>>
>> help(servermanager.filters.TransformFilter)
>>
>> did not say much
>>
>> just
>> ################################
>>  SetPropertyWithName(self, pname, arg)
>>  |      Generic method for setting the value of a property.
>> #############################################
>>
>> fig.ListProperties()
>> ['Input', 'Transform']
>>
>> fig.GetProperty('Transform')
>> Property name= Transform value = None
>>
>>
>> I  tried
>>  fig.SetPropertyWithName('translation', [1,0,0])
>>
>>>>> fig.SetPropertyWithName('translation',[1,0,0])
>> Traceback (most recent call last):
>>  File "<console>", line 1, in <module>
>>  File "/Users/jmazo/ParaView-3.4.0/Build/Utilities/VTKPythonWrapping/paraview/servermanager.py",
>> line 162, in SetPropertyWithName
>>    raise exceptions.RuntimeError, "Property %s does not exist. Please
>> check the property name for typos." % pname
>> RuntimeError: Property translation does not exist. Please check the
>> property name for typos.
>>
>>
>>
>> same happened for rotation, scaling
>>
>> So i'm totally lost
>>
>>
>> thanks in advance!
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.py
Type: text/x-python
Size: 758 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090114/1d99ab58/attachment.py>


More information about the ParaView mailing list