<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Ok, thanks a lot, that works! <br><br>Greetings,<br>Natalie<br><br>> Date: Sun, 15 Mar 2009 18:37:22 -0400<br>> Subject: Re: [Paraview] problems setting vtkDoubleArray with 3 components<br>> From: berk.geveci@kitware.com<br>> To: bob.obara@kitware.com<br>> CC: nataliehapp@hotmail.com; paraview@paraview.org<br>> <br>> That's correct.<br>> <br>> On Sun, Mar 15, 2009 at 6:10 PM, Robert Michael O'Bara<br>> <bob.obara@kitware.com> wrote:<br>> > Hi All,<br>> ><br>> > I'm not 100% sure but I think you must call SetNumberOfComponents prior to<br>> > SetNumberOfTuples.<br>> ><br>> > Bob<br>> ><br>> > Robert M. O'Bara, MEng.<br>> > Research & Development Engineer<br>> ><br>> > On Mar 15, 2009, at 5:50 PM, Burlen Loring wrote:<br>> ><br>> >> Also, if you SetNumberOfComponents, and SetNumberOfTuples, you want to use<br>> >> SetTuple(i,Tuple) not InsertNextTuple, because that will add them at the<br>> >> end.<br>> >><br>> >> Natalie Happenhofer wrote:<br>> >>><br>> >>> Hi!<br>> >>> I´d like to set a vtkDoubleArray with 3 Components, it should be a vector<br>> >>> array, the code looks like this:<br>> >>><br>> >>><br>> >>> vtkDoubleArray* momentum = vtkDoubleArray::New();<br>> >>> momentum -> SetNumberOfTuples(numOfTuples);<br>> >>> momentum -> SetNumberOfComponents(3);<br>> >>><br>> >>> for(vtkIdType i = 0; i < numOfTuples; i++)<br>> >>> {double Tuple[3] = {xm_array -> GetValue(i), ym_array -> GetValue(i),<br>> >>> 0.0};<br>> >>><br>> >>> momentum -> InsertNextTuple(Tuple);<br>> >>> }<br>> >>><br>> >>> Executing the code, I get the following error:<br>> >>> " Point array Momentum with 3 components, has 78520 tuples but there are<br>> >>> only 58890 points"<br>> >>><br>> >>> numOfTuples just has the value 58890, it should not be inserting more<br>> >>> tuples than that.. ?<br>> >>><br>> >>> thx,<br>> >>> Natalie<br>> >>><br>> >>><br>> >>> ------------------------------------------------------------------------<br>> >>> Casi 50 razones para tener el nuevo Messenger. ¡Conócelas aquí y bájate<br>> >>> el nuevo! <http://www.nuevomessenger2009.com/><br>> >>> ------------------------------------------------------------------------<br>> >>><br>> >>> _______________________________________________<br>> >>> Powered by www.kitware.com<br>> >>><br>> >>> Visit other Kitware open-source projects at<br>> >>> http://www.kitware.com/opensource/opensource.html<br>> >>><br>> >>> Please keep messages on-topic and check the ParaView Wiki at:<br>> >>> http://paraview.org/Wiki/ParaView<br>> >>><br>> >>> Follow this link to subscribe/unsubscribe:<br>> >>> http://www.paraview.org/mailman/listinfo/paraview<br>> >>><br>> >><br>> >> _______________________________________________<br>> >> Powered by www.kitware.com<br>> >><br>> >> Visit other Kitware open-source projects at<br>> >> http://www.kitware.com/opensource/opensource.html<br>> >><br>> >> Please keep messages on-topic and check the ParaView Wiki at:<br>> >> http://paraview.org/Wiki/ParaView<br>> >><br>> >> Follow this link to subscribe/unsubscribe:<br>> >> http://www.paraview.org/mailman/listinfo/paraview<br>> ><br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the ParaView Wiki at:<br>> > http://paraview.org/Wiki/ParaView<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.paraview.org/mailman/listinfo/paraview<br>> ><br><br /><hr />Con Messenger puedes ver si llegaron correos nuevos <a href='http://www.nuevomessenger2009.com/' target='_new'>¡Conoce todo lo nuevo del Messenger 2009!</a></body>
</html>