[vtkusers] How to extract values of vtkpoint coordinates from vtkXMLPolyDataReader

Cory Quammen cory.quammen at kitware.com
Wed Aug 26 10:19:04 EDT 2015


Chiranjib,

vtkDataArray * array = polydata->GetPointData()->GetArray(arrayname);

A simple way to get individual components is with

double * tuple = new double[array->GetNumberOfComponents()];
array->GetTuple(desiredpoint, tuple);
delete[] tuple;

HTH,
Cory

On Wed, Aug 19, 2015 at 2:05 AM, Chiranjib Sur <sur.chiranjib at gmail.com>
wrote:

> I think, I have sent this email too quickly. Other than the point
> coordinates, if I want to obtain the value of the point attributes, how do
> I do that.
>
> I can understand the point coordinates can be obtained by
>
> polydata->GetPoints(Id,desirtedpoint).
>
> What are the alternatives to know the point attributes (scaler/vector) for
> the points.
>
> Thanks again,
> Chiranjib
>
>
> ---------- Forwarded message ----------
> From: Chiranjib Sur <sur.chiranjib at gmail.com>
> Date: Wed, Aug 19, 2015 at 11:31 AM
> Subject: How to extract values of vtkpoint coordinates from
> vtkXMLPolyDataReader
> To: VTK Users <vtkusers at vtk.org>
>
>
> Hi,
> I want to extract the value of the XMl attributes (e.g. the coordinates of
> the VTk points, PointData/Points/DataArray).
>
> I am able to read the file using vtkXMLPolyDataReder and view it in
> ParaView but I want to extract values individually.
>
> How do I do that?
>
> Thanks,
> Chiranjib
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150826/1fd78f7f/attachment.html>


More information about the vtkusers mailing list