vtkImageViewer2 - Render() problem.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Taken from one of Will's exercises (reorganized exercises, exercise3b_answer.cxx):
Any code like this executes once only if the viewer is of type vtkImageViewer2:
for (i = 1; i < 93; ++i) { viewer->SetZSlice(i);
// compute the string
sprintf(tstr,"Slice: %i",i);
tactor->SetInput(tstr);
// we must reset the clipping range for each slice or set it ahead of
// time because they are positioned in world coordinates
viewer->GetRenderer()->ResetCameraClippingRange();
viewer->Render();
}
What happens is that after the first render the next call to Render() hangs.
If the viewer is of type vtkImageViewer the code works OK.
The problem is in both Windows XP and Linux. Using .NET under XP or gcc3.3 under Linux.