volume rendering frequency is very slow

Hi there! I am working on volume rendering for MIP/MinIP, VR and VE for MRI. Now here I edited so many codes for renderer, renderwindow, actor and mapper, etc.
But I found that it’s quite weried that when I tried to interacte with the renderwindow, I implemented with transporting the situation of mouse(here is the plan 1):

void MyClass::RotateMove(float fx, float fy)
{
	vtkCamera* camera = classRenderer->GetActiveCamera();

	double center[2];
	center[0] = classRenderWindow->GetSize()[0] / 2.0;
	center[1] = classRenderWindow->GetSize()[1] / 2.0;

	double dx = fx - center[0];
	double dy = fy - center[1];

	double angle = vtkMath::DegreesFromRadians(atan2(dy, dx));

	vtkSmartPointer<vtkTransform> RotateTrans = vtkSmartPointer<vtkTransform>::New();
	RotateTrans->PostMultiply();
	RotateTrans->RotateWXYZ(angle, 0, 0, 1);
	camera->ApplyTransform(RotateTrans);
	classRenderWindow->Render();
}

But I found that I can use a class namedvtkRenderInteractor and defined a subclass based on ‘vtkInteractorStyle’. That’s the plan 2.

Now when I run code with plan 1. I found the updating frequency is TOO SLOW, when I tried to rotate the view, the VR image started blinking, too.

I suspect that because I reset lots of parameters and update render window each time, can plan2 of ‘vtkRenderInteractor’ make rendering faster? Or it’s not about the way I rendered(like some bugs I didn’t get it)

Could you give me some advice? Thanks a lot!

Hi there, let me just simplify the problem? Will it helps?
Like, when I run WindowInteractor->Start(), will it tracks back to the final point with executing WindowInteractor->Start()? If so, I thought it might be the same with the situation that I pass the parameters manually instead of using vtkWindowRenderInteractorTrackBall.

GREAT THANKS!!!

@Hedwig_Huang I am afraid, I don’t follow the issue you’re facing. Are you trying to animate the rotation of a volume and it is slow to render. If so, try increasing the sample distance on the volume mapper. If not, could you please provide some code snippets and images/videos of the issue?