[vtkusers] vtkGenericDataObjectReader, error handling

Bill Lorensen bill.lorensen at gmail.com
Fri Apr 19 13:12:01 EDT 2013


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:
http://vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ObserveError

Bill



On Fri, Apr 19, 2013 at 5:19 AM, Michal Szostakiewicz <creed at icm.edu.pl>wrote:

> Hi!
>
> When I use vtkGenericDataObjectReader (or any other reader), how can I
> check if the file I'm opening is a proper file?
>
> Method SetFileName() runs just fine, but then when I call Update() or
> GetOutput() it prints a bunch of errors (on Windows it's even worse,
> because it creates a separate window for them).
>
> So how can I check if user chose a valid VTK file?
>
>
> Best regards,
> Michał
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130419/e5f0fad7/attachment.htm>


More information about the vtkusers mailing list