[vtkusers] SetProgressMethod

Andrew Maclean a.maclean at acfr.usyd.edu.au
Mon Oct 30 17:55:45 EST 2000


Just a guess but I think the problem lies with "this->thresh1" in the call
this->thresh1->GetImageThreshold()->SetProgressMethod(this->Progress,this->t
hresh1);
It's type doesn't seem to be void *.

I hope this helps.

Andrew

-----Original Message-----
From: Marcel van Straten [mailto:streets at mediaport.org]
Sent: Tuesday, 31 October 2000 03:42
To: vtk users
Subject: [vtkusers] SetProgressMethod

Hi all,

I'm trying to use SetProgressMethod in C++ to show the progress of a filter.
I implemented it this way:

////////////////////////////////////////////////////////////////////////////
////////////////////////
// Progress monitoring
////////////////////////////////////////////////////////////////////////////
////////////////////////
void qvChamferCostFunction::Progress(void *arg) {
 vtkImageThreshold *thresh = (vtkImageThreshold *)arg;
   cout << "Progress: " << thresh->GetProgress() << "\n";

}

...
qvChamferCostFunction::qvChamferCostFunction(QWidget *parent, const char
*name):QVBox (parent, name)
{
...

this->thresh1->GetImageThreshold()->SetProgressMethod(this->Progress,this->t
hresh1);
...
}

When compiling (MS VC++) I get the following error:
error C2664: 'SetProgressMethod' : cannot convert parameter 1 from 'void
(void *)' to 'void (__cdecl *)(void *)'
        None of the functions with this name in scope match the target type

If you know what's wrong, please help me,

thanks in advance,
Marcel





More information about the vtkusers mailing list