<div dir="ltr">I agree with Cory on Update() being redundant before the Write().<div><br></div><div><span style="font-size:13px">>    </span><span style="font-size:13px">vtkDataObject* dobj = someAlgorithm->GetOutput(1);</span><br style="font-size:13px"><span style="font-size:13px">>    dobj->Update();</span><br style="font-size:13px"><br style="font-size:13px"><span style="font-size:13px">should become:</span><br style="font-size:13px"><br>  someAlgorithm->Update(1); //to make sure there is something valid<br><span style="font-size:13px">  vtkDataObject* dobj = someAlgorithm->GetOutput(1); //keep the output for later use</span><br style="font-size:13px"><br></div><div>Because since vtk6, dobj no longer has any connection to the algorithm, so updating it (which used to update the algorithm for you) no longer has any meaning.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Thu, Dec 3, 2015 at 9:09 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Arno,<div><br></div><div>That pattern should be valid in VTK6. Are you getting compile errors?</div><div><br></div><div>I believe the Update() and Write() calls to the writer are redundant - you should need only one.</div><div><br></div><div>Thanks,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 2, 2015 at 5:56 PM, Arno Klein <span dir="ltr"><<a href="mailto:binarybottle@gmail.com" target="_blank">binarybottle@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><p>I am trying to update my code to migrate to VTK6 according to:<br><br><a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Update" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Update</a><br><br>According to the examples on that site, I understand that:<br><br>    vtkDataObject* dobj = someAlgorithm->GetOutput(1);<br>    dobj->Update();<br><br>should become:<br><br>    someAlgorithm->Update(1);<br><br><br>However, I don’t know how to deal with the following pattern:<br><br>void PointAreaComputer::WriteIntoFile(char *fileName)<br>{<br>    vtkPolyDataWriter* writer=vtkPolyDataWriter::New();<br>    writer->SetFileName(fileName);<br>    m_mesh->GetPointData()->SetScalars(m_pointsArea);<br>    writer->SetInputData(m_mesh);<br>    writer->Update();<br>    writer->Write();<br>    writer->Delete();<br>}<br><br>What should I do to make this compatible with VTK6?</p><p>Cheers,<br>@rno<br></p><div><div><div dir="ltr"><div dir="ltr"></div></div></div></div>
</div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</font></span></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>