I just came across the following subtlety:

I set the model transform matrix with the command _curRendererL->GetActiveCamera()->SetModelTransformMatrix(F_EA_L);

Then I mark the camera as modified and Render the scene:

_curRendererL->GetActiveCamera()->Modified();

_renderWindowL->Render();

Now, I read the model transform matrix and write both the original F_EA_L and the read one to the console:

vtkMatrix4x4* mvL = _curRendererL->GetActiveCamera()->GetModelViewTransformMatrix();

for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) std::cout << mvL->GetElement(i, j) << " "; std::cout << std::endl; }

for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) std::cout << F_EA_L->GetElement(i, j) << " "; std::cout << std::endl; }

This is, what I get:

-0.893959 0.446191 0.0418398 102.39

0.164383 0.395993 -0.90342 -158.083

-0.41968 -0.800769 -0.427362 -651.013

0 0 0 1

-0.893959 0.446191 0.0418398 102.39

0.164383 0.395993 -0.90342 -158.083

-0.41968 -0.800769 -0.427362 -650.013

0 0 0 1

Everything is fine except for the z-coordinate of the translation vector: The orginal matrix contained -650.013 the read matrix shows -651.013. And this is reproducible with arbitrary matrices - the z-coordinate is always 1.0 smaller than the original.

I am thankful for any hints that could solve this problem.