[vtkusers] Length of array

David E DeMarle dave.demarle at kitware.com
Sun Jul 26 15:36:04 EDT 2015


GetNumberOfTuples returns the number of entries in the array (the length).

GetNumberOfComponents returns the number of elements in each entry.
  For example and array holding temperature would be 1, an array for wind
direction could be 2, an array for RGB colors would be 3 etc.

Multiply the two by GetDataTypeSize will give you the total number of bytes.




David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Sun, Jul 26, 2015 at 1:28 PM, Abdul Abdul <abdul.sw84 at gmail.com> wrote:

> Hello,
>
> Does the function GetNumberOfComponents()
> <http://www.vtk.org/doc/nightly/html/classvtkAbstractArray.html#aa1d5f14f89cdba498e8ba24611fac063>
> return the length of a vtk array? Or, there is another function that can be
> used in this regard?
>
> Thanks.
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150726/3a8d937b/attachment.html>


More information about the vtkusers mailing list