[Paraview] Retrieving tuples from dataset

Natalie Happenhofer nataliehapp at hotmail.com
Thu Apr 23 04:53:29 EDT 2009


Hi!
I got it to work with saving every component of the input array in a separate vtkDoubleArray. 

input1 -> GetPointData() -> GetArray(arr1) -> GetData(0,numOfTuples1,0,0, scalars1comp0);
input1 -> GetPointData() -> GetArray(arr1) -> GetData(0,numOfTuples1,1,1, scalars1comp1);
input1 -> GetPointData() -> GetArray(arr1) -> GetData(0,numOfTuples1,2,2, scalars1comp2);

input2 -> GetPointData() -> GetArray(arr2) -> GetData(0,numOfTuples2,0,0, scalars2comp0);
input2 -> GetPointData() -> GetArray(arr2) -> GetData(0,numOfTuples2,1,1, scalars2comp1);
input2 -> GetPointData() -> GetArray(arr2) -> GetData(0,numOfTuples2,2,2, scalars2comp2);

Then I´m working with those arrays. 

greetings,
Natalie
> Date: Mon, 20 Apr 2009 07:27:57 -0400
> Subject: Re: [Paraview] Retrieving tuples from dataset
> From: berk.geveci at kitware.com
> To: nataliehapp at hotmail.com
> CC: paraview at paraview.org
> 
> Natalie,
> 
> Those methods definitely work otherwise our dashboards would be
> showing it. You must be doing something wrong. Make sure that tuple[]
> is a double array.
> 
> -berk
> 
> On Mon, Apr 20, 2009 at 3:50 AM, Natalie Happenhofer
> <nataliehapp at hotmail.com> wrote:
> > Hi!
> > Thanks, retrieving works now, but the next problem is inserting:
> > I tried the following:
> >
> > result -> InsertTuple3(i,tuple[0],tuple[1],tuple[2]);
> >
> > or
> >
> > result -> InsertNextTuple(tuple);
> >
> > but none of those methods work correctly. I checked the values of tuple,
> > they are correct, but in the output - dataset, the values are wrong..
> >
> > thx,
> > Natalie
> >
> >
> >> Date: Sat, 18 Apr 2009 16:51:49 -0400
> >> Subject: Re: [Paraview] Retrieving tuples from dataset
> >> From: berk.geveci at kitware.com
> >> To: nataliehapp at hotmail.com
> >> CC: paraview at paraview.org
> >>
> >> For sanity check, what do these return?
> >>
> >> scalars->GetValue(i*3+1)
> >> scalars->GetValue(i*3+2)
> >>
> >> scalars->GetTuple(i)[1]
> >> scalars->GetTuple(i)[2]
> >>
> >> -berk
> >>
> >> On Fri, Apr 17, 2009 at 8:58 AM, Natalie Happenhofer
> >> <nataliehapp at hotmail.com> wrote:
> >> > Hi!
> >> > I´m having trouble retrieving the data from a vector-valued
> >> > vtkDoubleArray,
> >> > my code looks like this:
> >> >
> >> > double tuple[3]; //tuple should be stored in this array
> >> > scalars -> GetTupleValue(i,tuple);
> >> >
> >> > The first component, i.e. tuple[0] is retrieved properly, but tuple[1]
> >> > and
> >> > tuple[2] are definitely wrong, does anyone see the reason?
> >> > (the array has 3 components, that´s checked).
> >> > Or is there any other method I could use?
> >> >
> >> > thx,
> >> > Natalie
> >> >
> >> > ________________________________
> >> > Hay un nuevo Messenger que tienes que conocer... ¡Mira las novedades!
> >> > _______________________________________________
> >> > 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 ParaView Wiki at:
> >> > http://paraview.org/Wiki/ParaView
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.paraview.org/mailman/listinfo/paraview
> >> >
> >> >
> >
> > ________________________________
> > ¿Quieres saber cómo va a estar el clima mañana? ¡Ingresa ahora a MSN!
> > _______________________________________________
> > 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 ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >

_________________________________________________________________
¿Quieres saber cómo va a estar el clima mañana? Ingresa ahora a MSN
http://tiempo.latam.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090423/7cb0e4a0/attachment.htm>


More information about the ParaView mailing list