<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br>Hi David,<br><br>yes I opened the file with Paraview and it's all perfectly visualised.<br>I've printed 'data' and the path name is ok.<br><br>what the compiler returns is this:<br>Unhandled exception at 0x775c1ffe in QTVTK_Diorama.exe: 0xC0000005: Access violation reading location 0x5f5bc9f4.<br><br>Many Thanks.<br>Giancarlo<br><br><hr id="stopSpelling">Date: Wed, 3 Feb 2010 11:43:40 -0500<br>From: daviddoria+vtk@gmail.com<br>CC: vtkusers@vtk.org<br>Subject: Re: [vtkusers] -&gt;Update()....what does that do?<br><br><div class="ecxgmail_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="ecxgmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




<div>
Hello VTK users,<br>this might be already posted but I can'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>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkPolyDataReader&gt; drs =&nbsp; vtkSmartPointer&lt;vtkPolyDataReader&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; drs-&gt;SetFileName(data);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; drs-&gt;Update();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 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'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'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="ecxgmail_quote"><br></div>A couple of things -</div><div class="ecxgmail_quote"><br></div>
<div class="ecxgmail_quote">1) try opening the file with Paraview. If it crashes, your file is bad.</div><div class="ecxgmail_quote">2) did you print 'data' to make sure the file name is as you expect?</div><div class="ecxgmail_quote">
<br clear="all">Thanks,<br><br><div>David&nbsp;</div></div>                                               <br /><hr />Non sei a casa? <a href='http://www.messenger.it/web/default.aspx' target='_new'>Accedi a Messenger dal Web!</a></body>
</html>