<div dir="ltr"><div>Unfortunately, it looks like there is no way to know if the file can be read. You can try to catch the vtkError. This example may be helpful:<br><a href="http://vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ObserveError">http://vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ObserveError</a><br>
<br></div>Bill<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 19, 2013 at 5:19 AM, Michal Szostakiewicz <span dir="ltr">&lt;<a href="mailto:creed@icm.edu.pl" target="_blank">creed@icm.edu.pl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
When I use vtkGenericDataObjectReader (or any other reader), how can I<br>
check if the file I&#39;m opening is a proper file?<br>
<br>
Method SetFileName() runs just fine, but then when I call Update() or<br>
GetOutput() it prints a bunch of errors (on Windows it&#39;s even worse,<br>
because it creates a separate window for them).<br>
<br>
So how can I check if user chose a valid VTK file?<br>
<br>
<br>
Best regards,<br>
Micha³<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" 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" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>