[vtkusers] vtkOBJReader QVTKwidget problem

Joachim Pouderoux joachim.pouderoux at kitware.com
Thu Feb 7 12:21:29 EST 2013


Could you confirm that you are your trying to open a Wavefront OBJ file?
Could you try to open the mni-surface-mesh.obj file available in the
VTKData package?
Otherwise, if possible, send me your obj file and I will try to see what
happen.
OBJ is quite a flexible file format and the reader may not support all
variations.

Joachim

2013/2/7 Massinissa Bandou <Massinissa.Bandou at usherbrooke.ca>

> Hi  Joachim,
>
> Yes, I'm sure. the file name pointer is not null, I decide to write some
> cout in the ReadFile(cons char* file):
> void ReadFile(const char* file){
>         std::cout<<file&lt;&lt;std::endl;
>         this->fileName=file;
>         std::cout<<file&lt;&lt;std::endl;
>         vtkOBJReader* obj = vtkOBJReader::New();
>         std::cout&lt;&lt;file&lt;&lt;std::endl;
>         obj->SetFileName(file);
>         std::cout<<file&lt;&lt;std::endl;
>         obj->Update();
>         std::cout<<file&lt;&lt;std::endl;
>         this->data=obj->GetOutput();
>         std::cout<<file&lt;&lt;std::endl;
>         this->Visualize(obj->GetOutputPort());
>
>     }
>
>
> and it crashes when I update obj. I got:
> C:/Users/Massi/Desktop/Data/Object/mesh.obj
> C:/Users/Massi/Desktop/Data/Object/mesh.obj
> C:/Users/Massi/Desktop/Data/Object/mesh.obj
> C:/Users/Massi/Desktop/Data/Object/mesh.obj
>
> even when I delete the update() it still crashes to the following code.
>
> thx! for reply!
>
> Massi
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/vtkOBJReader-QVTKwidget-problem-tp5718346p5718352.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>



-- 
*Joachim Pouderoux*

*PhD, R&D Enginee*r
*Kitware SAS <http://www.kitware.fr>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130207/57f982bb/attachment.htm>


More information about the vtkusers mailing list