[vtkusers] SetProgressMethod

Marcel van Straten streets at mediaport.org
Mon Oct 30 11:41:52 EST 2000


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