Could you confirm that you are your trying to open a Wavefront OBJ file?<br>Could you try to open the mni-surface-mesh.obj file available in the VTKData package?<br>Otherwise, if possible, send me your obj file and I will try to see what happen. <br>
OBJ is quite a flexible file format and the reader may not support all variations.<br><br>Joachim<br><br><div class="gmail_quote">2013/2/7 Massinissa Bandou <span dir="ltr"><<a href="mailto:Massinissa.Bandou@usherbrooke.ca" target="_blank">Massinissa.Bandou@usherbrooke.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Joachim,<br>
<br>
Yes, I'm sure. the file name pointer is not null, I decide to write some<br>
cout in the ReadFile(cons char* file):<br>
void ReadFile(const char* file){<br>
std::cout<<file&lt;&lt;std::endl;<br>
this->fileName=file;<br>
std::cout<<file&lt;&lt;std::endl;<br>
<div class="im"> vtkOBJReader* obj = vtkOBJReader::New();<br>
</div> std::cout&lt;&lt;file&lt;&lt;std::endl;<br>
obj->SetFileName(file);<br>
std::cout<<file&lt;&lt;std::endl;<br>
obj->Update();<br>
std::cout<<file&lt;&lt;std::endl;<br>
this->data=obj->GetOutput();<br>
std::cout<<file&lt;&lt;std::endl;<br>
this->Visualize(obj->GetOutputPort());<br>
<br>
}<br>
<br>
<br>
and it crashes when I update obj. I got:<br>
C:/Users/Massi/Desktop/Data/Object/mesh.obj<br>
C:/Users/Massi/Desktop/Data/Object/mesh.obj<br>
C:/Users/Massi/Desktop/Data/Object/mesh.obj<br>
C:/Users/Massi/Desktop/Data/Object/mesh.obj<br>
<br>
even when I delete the update() it still crashes to the following code.<br>
<br>
thx! for reply!<br>
<br>
Massi<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkOBJReader-QVTKwidget-problem-tp5718346p5718352.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkOBJReader-QVTKwidget-problem-tp5718346p5718352.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><b>Joachim Pouderoux</b><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="1"><i>PhD, R&D Enginee</i>r</font> <br>
<b><font size="1"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></font></b><br></blockquote>