<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 13, 2014 at 5:26 AM, Susanne Schmalkalt <span dir="ltr"><<a href="mailto:Susanne.Schmalkalt@gmx.de" target="_blank">Susanne.Schmalkalt@gmx.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Verdana;font-size:12px"><div>Hallo everybody,</div>

<div> </div>

<div>I have a question regarding vtkDoubleArray.</div>

<div> </div>

<div>I want to save doubles in an array which I then add to a PolyDataObject.</div>

<div>But when I add the variable and then call it again, the correct value dissapears.</div>

<div>Does someone have an idea why? what am I doing wrong?</div>

<div> </div>

<div> </div>

<div>        Instantiate(measurements,vtkDoubleArray);<br>
        measurements->SetNumberOfComponents(1);<br>
        measurements->SetNumberOfTuples(numberOfGridpoints);<br>
        measurements->SetName(name);<br>
        for(int i = 0; i < numberOfGridpoints; i++){<br>
            double temp[1];</div>

<div>            temp[0] = static_cast<double>(measurementArray[i][t]);<br>
            cout << " temp: " << temp[0];<br>
            measurements->InsertNextTupleValue(temp);<br>
            vtkIdType id = (vtkIdType)i;<br>
            double check[1];</div>

<div>            measurements->GetTupleValue(id,check);<br>
            cout << " check: " << check[0];<br>
        }<br>
        meshPolyData->GetPointData()->AddArray(measurements);</div>

<div> </div>

<div>Thank you for your help!</div>

<div>Susi</div></div></div></blockquote><div><br>Can you please post the smallest, compilable, self-contained example that demonstrates your problem?<br><br clear="all"><div>Thanks,<br><br>David</div> </div></div></div></div>