[vtkusers] vtkImageReader->Update causes Runtime error....why?
Giancarlo Amati
ilferraresebono at hotmail.it
Fri Jun 12 11:51:59 EDT 2009
Hi yes sure this is the function compiled under Visual Studio 2005 and QT:
void CMainWindow::renderGIPL(QString *filename){
double dr = 250.0/255.0,db = 250.0/255.0,dg = 240.00/255.0;
QByteArray temp = filename->toAscii();
char *data = temp.data();
vtkImageReader *VtkGiplReader = vtkImageReader::New();
VtkGiplReader->SetFileName(data);
VtkGiplReader->Update();
vtkImageData *m_vtkImgDATA = VtkGiplReader->GetOutput();
double isovalue = computeIsoValue(m_vtkImgDATA);
vtkImageMarchingCubes *iso = vtkImageMarchingCubes::New();
iso->SetInputConnection(VtkGiplReader->GetOutputPort());
iso->SetValue(0,isovalue);
iso->ComputeGradientsOff();
iso->ComputeScalarsOff();
vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();
isoMapper->SetInputConnection(iso->GetOutputPort());
isoMapper->Update();
vtkLODActor *isoAct = vtkLODActor::New();
isoAct->SetMapper(isoMapper);
isoAct->SetUserMatrix(this->registrationMatrix);
(isoAct->GetProperty())->SetColor(dr,db,dg);
_ren->AddActor(isoAct);
QTreeWidgetItem *child = new QTreeWidgetItem();
child->setText(0,fileNamePath);
child->setIcon(0,QIcon(QString(tr("../icons/bullets/model.png"))));
_ui->treeWidget->topLevelItem(0)->addChild(child);
isoAct->Delete();
isoMapper->Delete();
iso->Delete();
}
Date: Fri, 12 Jun 2009 11:29:15 -0400
From: daviddoria at gmail.com
CC: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkImageReader->Update causes Runtime error....why?
On Fri, Jun 12, 2009 at 11:23 AM, Giancarlo Amati <ilferraresebono at hotmail.it> wrote:
Hello everybody,
this is my code, simple and easy:
vtkImageReader *img = vtkImageReader::New();
img->SetFileName(fn);
img->Update();
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".
Anybody has any idea about it?
Kind Regards.
GC.
Can you upload the vti file in question somewhere? Then at least I can confirm the behavior.
Thanks,
David
_________________________________________________________________
Naviga più semplice, più veloce e più sicuro. Scarica Internet Explorer 8 per MSN!
http://cid-16be95750dd16d04.skydrive.live.com/self.aspx/le%20PV%20in%20viaggio!/89.JPG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090612/c12527e3/attachment.htm>
More information about the vtkusers
mailing list