[vtkusers] Re: Flipping the image with vtkCamera::Yaw() makes image disappear
Dean Inglis
dean.inglis at sympatico.ca
Sun Mar 4 20:10:32 EST 2007
Hi Jesús,
sorry about the cut n paste error,
to flip horizontal, forget about the view up
flipping...
/// flip horizontal --------
vtkRenderer* renderer;
if (this->ImageViewer && (renderer = this->ImageViewer->GetRenderer()) !=
NULL )
{
int axis = this->ImageViewer->GetSliceOrientation();
double cameraPosition[3];
renderer->GetActiveCamera()->GetPosition(cameraPosition);
double cameraFocalPoint[3];
renderer->GetActiveCamera()->GetPosition(cameraFocalPoint);
for ( int i = 0; i < 3; ++i )
{
cameraPosition[i] = 2.0*cameraFocalPoint[i] - cameraPosition[i];
}
renderer->GetActiveCamera()->SetPosition(cameraPosition);
renderer->ResetCameraClippingRange();
this->ImageViewer->Render();
}
Dean
More information about the vtkusers
mailing list