[vtkusers] (no subject)

kenichiro yoshimi rccm.kyoshimi at gmail.com
Sun Jul 6 20:35:16 EDT 2014


Hi Saeed,

Please keep the discussion on the mailing list because I am not a VTK
specialist.

I think cylindrical transformation will do if you confirm that your input
coordinate sequence is (r,theta,z) and write code similar to the following:

    // Get all data from the file
    vtkSmartPointer<vtkGenericDataObjectReader> reader =
        vtkSmartPointer<vtkGenericDataObjectReader>::New();
    reader->SetFileName(inputFilename.c_str());
    reader->Update();

    // convert cylindrical to Cartesian coordinate system
    vtkSmartPointer<vtkCylindricalTransform> cylTrans =
        vtkSmartPointer<vtkCylindricalTransform>::New();

    vtkSmartPointer<vtkTransformFilter> cylTransFilter =
        vtkSmartPointer<vtkTransformFilter>::New();
    cylTransFilter->SetInputData(reader->GetOutput());
    cylTransFilter->SetTransform(cylTrans);
    cylTransFilter->Update();

However there is a possibility that the transformed results will have a
lack of  the resolution in the circumferential direction. In that case, you
may need to subdivide in theta direction on input data preliminarily.

Regards,
yoshimi


2014-07-06 0:19 GMT+09:00 Saeed Mazrouei <saeed.mazrouei at gmail.com>:

> Hi,
>
> Thanks for your reply.
>
> I can read my data and make vtk structured grid but I do not know
> How can I transform data to Cartesian coordinate system using
> vtkCylindricalTransform.
> Iwould appreciate if you tell me.
> Regards
> Saeed
>
>
> On Sat, Jul 5, 2014 at 4:52 AM, kenichiro yoshimi <rccm.kyoshimi at gmail.com
> > wrote:
>
>> Hi,
>>
>> Unfortunately there may be not the form for cylindrical coordinate
>> system in vtk file format. But you can load your cylindrical data as
>> vtkRectilinearDataSet or vtkStructuredGrid data set and then transform
>> them to Cartecian coordinate system using vtkCylindricalTransform.
>>
>> Thanks,
>> Yoshimi
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140707/34453017/attachment.html>


More information about the vtkusers mailing list