[vtkusers] vtkSphericalTransform

David Gobbi david.gobbi at gmail.com
Mon Oct 26 13:48:36 EDT 2009


Hi Alessandro,

You can use the vtkProgrammableFilter to perform your own transformation.
Take a look at Examples/Modelling/Python/expCos.py

   David


On Mon, Oct 26, 2009 at 3:21 AM, Alessandro Artusi
<artusialessandro4 at googlemail.com> wrote:
> Hi,
>
> I have noticed that vtkSphericalTransform does not allow to define your own
> parameters for the spherical transform i.e. in case i want to map the data
> based on the depth.
> So to overcome this problem I need to read the data back from the
> vtkContourFilter and manipulate them with my own transformation and then I
> will use vtkPolydatamapper to map the data.
>
> How may i do it? and how will be the form of the data structure of these
> data?
>
> Thanks,
> Alessandro.
>
> On Mon, Oct 26, 2009 at 10:00 AM, Alessandro Artusi
> <artusialessandro4 at googlemail.com> wrote:
>>
>> Thanks a lot Jerome, now I got the mapping on spherical coordinates. I
>> have other problems but the spherical transform is working.
>>
>> Thanks a lot,
>> Alessandro.
>>
>> On Sun, Oct 25, 2009 at 2:41 PM, Jérôme <jerome.velut at gmail.com> wrote:
>>>
>>> I don't understand... vtkTransformPolyDataFilter is specialized for
>>> polygonal datasets, and vtkContourFilter's output is also polygonal.
>>> Did you change the GetOutput( ) to GetOutputPort( ) as I told you? The
>>> best you can do is to copy/paste the error message, it would be very helpful
>>> for our understanding.
>>>
>>> Best regards,
>>> Jerome
>>>
>>> 2009/10/23 Alessandro Artusi <artusialessandro4 at googlemail.com>
>>>>
>>>> Hi Jerome,
>>>>
>>>> what i get is an error vtkTransformPolydataFilter  is expecting as input
>>>> not a Polydata as the output from the vtkcontourFilter.
>>>>
>>>> Any idea?
>>>>
>>>> Thanks,
>>>> Alessandro.
>>>> On Fri, Oct 23, 2009 at 5:30 PM, Jérôme <jerome.velut at gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>> You should have to use "GetOutputPort" together with
>>>>> SetInputConnection. You should also say what does not work !
>>>>>
>>>>> Hope that helps,
>>>>> Jerome
>>>>>
>>>>> 2009/10/23 Alessandro Artusi <artusialessandro4 at googlemail.com>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I want to transform the output of the vtkConoturFilter in spherical
>>>>>> coordinates.
>>>>>>
>>>>>> I am using vtkTransformPolydataFilter to apply the
>>>>>> vtkSphericalTransform to thr utput of the vtkcontourFilter but does not
>>>>>> work.
>>>>>>
>>>>>> code:
>>>>>> sp = vtkSphericalTransform()
>>>>>> t = vtkvtkTransformPolydataFilter()
>>>>>> t.SetInputConnection(contour.GetOutput()) #conotur is the output of
>>>>>> the vtkContourFilter
>>>>>> t.SetTransform(sp)
>>>>>>
>>>>>> Some one can help?
>>>>>>
>>>>>> Thanks,
>>>>>> AA
>>>>>> _______________________________________________
>>>>>> 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 VTK FAQ at:
>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list