<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi yes sure this is the function compiled under Visual Studio 2005 and QT:<br><br><br>void CMainWindow::renderGIPL(QString *filename){<br>&nbsp;&nbsp;&nbsp; double dr = 250.0/255.0,db = 250.0/255.0,dg = 240.00/255.0;<br><br>&nbsp;&nbsp;&nbsp; QByteArray temp = filename-&gt;toAscii(); <br>&nbsp;&nbsp;&nbsp; char *data = temp.data(); <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; vtkImageReader *VtkGiplReader = vtkImageReader::New();<br>&nbsp;&nbsp;&nbsp; VtkGiplReader-&gt;SetFileName(data);<br>&nbsp;&nbsp;&nbsp; VtkGiplReader-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; vtkImageData *m_vtkImgDATA&nbsp; = VtkGiplReader-&gt;GetOutput();<br>&nbsp;&nbsp;&nbsp; double isovalue = computeIsoValue(m_vtkImgDATA);<br><br>&nbsp;&nbsp;&nbsp; vtkImageMarchingCubes *iso = vtkImageMarchingCubes::New();<br>&nbsp;&nbsp;&nbsp; iso-&gt;SetInputConnection(VtkGiplReader-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; iso-&gt;SetValue(0,isovalue);<br>&nbsp;&nbsp;&nbsp; iso-&gt;ComputeGradientsOff();<br>&nbsp;&nbsp;&nbsp; iso-&gt;ComputeScalarsOff();<br><br>&nbsp;&nbsp;&nbsp; vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();<br>&nbsp;&nbsp;&nbsp; isoMapper-&gt;SetInputConnection(iso-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; isoMapper-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; vtkLODActor *isoAct = vtkLODActor::New();<br>&nbsp;&nbsp;&nbsp; isoAct-&gt;SetMapper(isoMapper);<br>&nbsp;&nbsp;&nbsp; isoAct-&gt;SetUserMatrix(this-&gt;registrationMatrix);<br>&nbsp;&nbsp;&nbsp; (isoAct-&gt;GetProperty())-&gt;SetColor(dr,db,dg);<br><br>&nbsp;&nbsp;&nbsp; _ren-&gt;AddActor(isoAct);<br><br><br>&nbsp;&nbsp;&nbsp; QTreeWidgetItem *child = new QTreeWidgetItem();<br>&nbsp;&nbsp;&nbsp; child-&gt;setText(0,fileNamePath);<br>&nbsp;&nbsp;&nbsp; child-&gt;setIcon(0,QIcon(QString(tr("../icons/bullets/model.png"))));<br><br>&nbsp;&nbsp;&nbsp; _ui-&gt;treeWidget-&gt;topLevelItem(0)-&gt;addChild(child);<br><br><br>&nbsp;&nbsp;&nbsp; isoAct-&gt;Delete();<br>&nbsp;&nbsp;&nbsp; isoMapper-&gt;Delete();<br>&nbsp;&nbsp;&nbsp; iso-&gt;Delete();<br><br>}<br><br><br><hr id="stopSpelling">Date: Fri, 12 Jun 2009 11:29:15 -0400<br>From: daviddoria@gmail.com<br>CC: vtkusers@vtk.org<br>Subject: Re: [vtkusers] vtkImageReader-&gt;Update causes Runtime error....why?<br><br><div class="EC_gmail_quote">On Fri, Jun 12, 2009 at 11:23 AM, Giancarlo Amati <span dir="ltr">&lt;<a href="mailto:ilferraresebono@hotmail.it">ilferraresebono@hotmail.it</a>&gt;</span> wrote:<br><blockquote class="EC_gmail_quote" style="padding-left: 1ex;">




<div>
Hello everybody,<br><br>this is my code, simple and easy:<br><br>vtkImageReader *img = vtkImageReader::New();<br>img-&gt;SetFileName(fn);<br>img-&gt;Update();<br><br>dunno why but it causes this RunTime Error: "The value of ESP was not properly saved across a function call. This is
usually a result of calling a function pointer declared with a
different calling convention".<br><br>Anybody has any idea about it?<br><br>Kind Regards.<br>GC.<br><br></div></blockquote></div><br>Can you upload the vti file in question somewhere? Then at least I can confirm the behavior.<br>
<br clear="all">Thanks,<br><br>David<br><br /><hr />Preparati alla sfida all'ultima combinazione, <a href='http://livesearch.games.msn.com/crosswire/default_it/' target='_new'>gioca con Crosswire!</a></body>
</html>