[vtkusers] Fwd: Fwd: Choose the second component in vtkDataArray without copy

Manh Nguyen nevermind145 at gmail.com
Sat Jun 1 06:18:09 EDT 2013


---------- Forwarded message ----------
From: Manh Nguyen <nevermind145 at gmail.com>
Date: Wed, May 29, 2013 at 11:25 AM
Subject: Re: [vtkusers] Fwd: Choose the second component in vtkDataArray
without copy
To: mirko heuegger <mheuegger at gmail.com>, vtkusers at vtk.org


HI,

basically I just need 1 component out of the vectorData (and later on
select other component).
As u see in my previous email, the vtkDataArray  reads all the data (from
qflow velocities) and put it in the vtkDataArray, So basically,
vtkDataArray hold all the data, with the information that it knows that it
has 3 components (it is defined in the file). Also I can not use another
reader, because I'm loading VTI files, which requires a different reader. I
hope this will answer your question.
Sincerely

Tat Manh Nguyen


On Wed, May 29, 2013 at 10:29 AM, mirko heuegger <mheuegger at gmail.com>wrote:

> Hello!
>
> A Other Question, how are you trying to read the vectorData?
>
> And what is the return from reader->GetNumberOfVectorsInFile() (the
> reader-object should be something like a vtkDataSetReader)?
>
>
> regards
>
> mirko
>
>
>
> On Tue, May 28, 2013 at 3:58 PM, Manh Nguyen <nevermind145 at gmail.com>wrote:
>
>>
>> Dear vtk developers,
>>
>> I have created this code:
>>
>> vtkDataArray *DataArray =
>> reader->GetOutput()->GetPointData()->GetArray("qflow velocities");
>>
>>
>> The DataArray is an array with 3 components (x,y,z), but by default it
>> read only the x component?
>>
>>
>> Is there a way to select only the components without using CopyComponent
>> or any other copy functions?
>>
>>  I have tried GetVectors but it crashed. the data just load single
>> Scalars.
>>
>> Does vtkDataArray have something like get Component Array? or something?
>>
>> Sincerely,
>>
>> Tat Manh Nguyen
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Real programmers don't document; if it was
> hard to write, it should be hard to understand.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130601/5b0ed7e1/attachment.htm>


More information about the vtkusers mailing list