<div dir="ltr"><div>Hi<br><br>-<span class="gmail-m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"></span> writer->SetInputData(<wbr>sphereSource->GetOutput());<br>+ writer->SetInputConnection(<wbr>sphereSource->GetOutputPort(0));<br><br></div>Regards,<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote">On Mon, Mar 27, 2017 at 2:37 PM, Panagiotis Foteinos <span dir="ltr"><<a href="mailto:panagiotis.foteinos@gmail.com" target="_blank">panagiotis.foteinos@gmail.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">Hi all.<div><br></div><div>I am attempting to write a sphere in a vtk file. The following snippet:</div><div><br></div><div>******************************<wbr>*******************</div><div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>vtkSmartPointer<<wbr>vtkSphereSource> sphereSource = vtkSmartPointer<<wbr>vtkSphereSource>::New();</div><div><br></div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>sphereSource->SetCenter(0.0, 0.0, 0.0);</div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>sphereSource->SetRadius(1.0);</div><div><br></div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>vtkSmartPointer<<wbr>vtkPolyDataWriter> writer = vtkSmartPointer<<wbr>vtkPolyDataWriter>::New();</div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>writer->SetInputData(<wbr>sphereSource->GetOutput());</div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>writer->SetFileName(filename.<wbr>c_str());</div><div><span class="m_2133257387069678451gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>writer->Update();</div></div><div>******************************<wbr>*******************<br></div><div><br></div><div>creates an empty file.</div><div><br></div><div>Any suggestions?</div><div><br></div><div>Warm Regards,</div><div>Panos</div></div>
<br>______________________________<wbr>_________________<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/<wbr>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_<wbr>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=<wbr>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/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>