[vtkusers] SetProgressMethod
Andrew Maclean
a.maclean at acfr.usyd.edu.au
Tue Feb 13 20:07:32 EST 2001
Does anyone use SetProgressMethod() in their C++ code to inform users of the
progress of a filter? If so would they be prepared to show me an example of
the use of this?
I am currently using MSC VC++ and I have prototyped something like this:
Surf[i]->SetStartMethod( StartProcess, this);
Surf[i]->SetProgressMethod(ShowProgressSurf, (void *)Surf[i]);
Surf[i]->SetEndMethod( EndProcess, this);
////////////////////////////////////////////////////////////////
//
// Use these to signal that any one of the
// vtk processes are busy
//
////////////////////////////////////////////////////////////////
void StartProcess(void *pArg)
{
CMultipleSurfaceRendererDoc *MyThis =
(CMultipleSurfaceRendererDoc *)pArg;
MyThis->BeginWaitCursor();
WriteToStatusBar(_T("Processing..."));
}
void EndProcess(void *pArg)
{
CMultipleSurfaceRendererDoc *MyThis =
(CMultipleSurfaceRendererDoc *)pArg;
MyThis->EndWaitCursor();
WriteToStatusBar(_T(""));
}
void ShowProgressSurf(void *arg)
{
vtkSurfaceReconstructionFilter *self =
(vtkSurfaceReconstructionFilter *)(arg);
TRACE("progress: %f\n",self->GetProgress());
}
Do I have to construct a separate ShowProgress for each filter? Or is there
some way of constructing a more general one?
Is it also possible to pass text to these filters e.g a CString value?
Thanks for any hints,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010214/5f97665a/attachment.htm>
More information about the vtkusers
mailing list