<div class="gmail_quote">On Wed, Feb 3, 2010 at 11:33 AM, Giancarlo Amati <span dir="ltr">&lt;<a href="mailto:ilferraresebono@hotmail.it">ilferraresebono@hotmail.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
Hello VTK users,<br>this might be already posted but I can&#39;t find it in the repository. So, I apologies for any duplicate.<br><br>I have these statements:<br><br>QByteArray temp = fn-&gt;toAscii(); <br>char *data = temp.data();<br>
        vtkSmartPointer&lt;vtkPolyDataReader&gt; drs =  vtkSmartPointer&lt;vtkPolyDataReader&gt;::New();<br>        drs-&gt;SetFileName(data);<br>         drs-&gt;Update();<br>        vtkPolyData *pd = drs-&gt;GetOutput();<br>
<br>where QByteArray is a QT array of byte then converted into a string and passed as input to PolyDataReader. so basically it&#39;s the path of the file .vtk (which is a polydata) I would like to load.<br><br>but the problem is that when i get to <br>
<br>drs-&gt;Update();<br><br>it all crashes saying that an Unhandled expection has been generated.<br><br>I checked out around and apparently it&#39;s the standard way to read a vtk file (the one I have is ASCII format).<br>
<br>Any suggestion would be helpful..<br><br>Kind Regards.<br>Giancarlo Amati<br>                                               </div><div><br></div></blockquote><div class="gmail_quote"><br></div>A couple of things -</div><div class="gmail_quote"><br></div>
<div class="gmail_quote">1) try opening the file with Paraview. If it crashes, your file is bad.</div><div class="gmail_quote">2) did you print &#39;data&#39; to make sure the file name is as you expect?</div><div class="gmail_quote">
<br clear="all">Thanks,<br><br><div>David </div></div>