[vtkusers] abort lengthy volume rendering
Dean Inglis
dean.inglis at on.aibn.com
Thu Oct 18 11:52:57 EDT 2001
I am using a tweaked version of John Biddiscombe's C++ Builder
BvtkRenderWindow and am developing an app with features similar to VolView.
How does one go about interrupting a lengthy volume rendering, e.g., during
a ray casting render with just a mouse click? I have tried the following:
FRenderWindow = vtkWin32OpenGLRenderWindow::New();
void (*pf) ( void *) = &CheckAbortFunc;
FRenderWindow->SetAbortCheckMethod( pf , reinterpret_cast<void
*>(FRenderWindow));
AbortFlag = FRenderWindow->GetAbortRender();
then...
void CheckAbortFunc(void *ptr)
{
vtkWin32OpenGLRenderWindow* ptrWin =
reinterpret_cast<vtkWin32OpenGLRenderWindow*>(ptr);
if ( ptrWin )
{
if(ptrWin->GetEventPending())
{
ptrWin->SetAbortRender( AbortFlag );
Beep();
}
}
}
the documentation is not explicit enough for vtkRenderWindow and its derived
classes for the following:
GetAbortRender, SetAbortRender, GetInAbortCheck, GetEventPending,
CheckAbortStatus
Can anyone provide some insight on the use of these methods?
thanks,
Dean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Inglis, Ph.D.
Clinical Research Unit
25 Charlton Avenue East, Unit 610
Hamilton, Ontario
L8N 1Y2
Tel: (905) 527-0028
Fax: (905) 521-1297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the vtkusers
mailing list