<div dir="ltr">Please share your sample vtk/vtp file. I am assuming that your variable "mesh" is of type <span style="font-size:12.8px">vtkSmartPointer<vtkPolydata>.</span></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 9, 2017 at 1:12 AM, Isaac Castro Mateos <span dir="ltr"><<a href="mailto:isaac.casm@gmail.com" target="_blank">isaac.casm@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,<div><br></div><div>I am trying to read a vtp file with the  following code:</div><div><br></div><div><div>vtkSmartPointer< vtkXMLPolyDataReader > readerXML = vtkSmartPointer< vtkXMLPolyDataReader >::New();</div><div>readerXML->SetFileName(paths.<wbr>c_str());</div><div>readerXML->Update();</div><div>mesh = readerXML->GetOutput();</div></div><div><br></div><div>However, it is given me the following error:</div><div><br></div><div><div>ERROR: In /staff/icm16/My_repository/<wbr>Thirdparties/VTK-6.3.0/IO/XML/<wbr>vtkXMLReader.cxx, line 234</div><div>vtkXMLPolyDataReader (0x68f310): Error opening file /staff/icm16/TestSamples/<wbr>SegmentationVertebrae/<wbr>SegmentationsNew/V1/<wbr>meshWithSimilarityReg2.vtp</div><div><br></div><div><br></div><div>ERROR: In /staff/icm16/My_repository/<wbr>Thirdparties/VTK-6.3.0/Common/<wbr>ExecutionModel/vtkExecutive.<wbr>cxx, line 784</div><div>vtkCompositeDataPipeline (0x68fe90): Algorithm vtkXMLPolyDataReader(0x68f310) returned failure for request: vtkInformation (0x691600)</div><div>  Debug: Off</div><div>  Modified Time: 76</div><div>  Reference Count: 1</div><div>  Registered Events: (none)</div><div>  Request: REQUEST_INFORMATION</div><div>  ALGORITHM_AFTER_FORWARD: 1</div><div>  FORWARD_DIRECTION: 0</div></div><div><br></div><div><br></div><div>There is no problem at all when opening the file with paraview. I am using an Ubuntu machine with VTK-6.3.0.</div><div><br></div><div>Any idea what the problem could be?</div><div><br></div><div>Thanks a lot.</div><span class="HOEnZb"><font color="#888888"><div>Isaac.</div><div><br></div><div><br></div></font></span></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>