update reader after setting file name

This commit is contained in:
ozantonkal 2013-08-27 20:09:54 +02:00 committed by Ozan Tonkal
parent 3da7dd9849
commit e4b13f2ef0

View File

@ -17,6 +17,7 @@ cv::viz::Widget cv::viz::Widget::fromPlyFile(const String &file_name)
{ {
vtkSmartPointer<vtkPLYReader> reader = vtkSmartPointer<vtkPLYReader>::New (); vtkSmartPointer<vtkPLYReader> reader = vtkSmartPointer<vtkPLYReader>::New ();
reader->SetFileName (file_name.c_str ()); reader->SetFileName (file_name.c_str ());
reader->Update();
vtkSmartPointer<vtkDataSet> data = reader->GetOutput(); vtkSmartPointer<vtkDataSet> data = reader->GetOutput();
CV_Assert(data); CV_Assert(data);