-/**
-** Rotates a volume by the given degree for the X axis
-**/
-void wxMaracasRenderImageTransformation::Rotate(int x, int y, int z)
-{
- transformV->RotateX( x );
- transformS1->RotateX( x );
- transformS2->RotateX( x );
- transformS3->RotateX( x );
+ vol->getImageData()->GetSpacing(volspX, volspY, volspZ);
+
+ double surfspX;
+ double surfspY;
+ double surfspZ;
+ surface1->getImageData()->GetSpacing(surfspX, surfspY, surfspZ);
+
+ transformV->Identity();
+ transformS1->Identity();
+ transformS2->Identity();
+ transformS3->Identity();
+
+ transformV->Translate( tx/*volspX*/, ty/*volspY*/, tz/*volspZ*/ );
+ transformS1->Translate( tx/*surfspX*/, ty/*surfspY*/, tz/*surfspZ*/ );
+ transformS2->Translate( tx/*surfspX*/, ty/*surfspY*/, tz/*surfspZ*/ );
+ transformS3->Translate( tx/*surfspX*/, ty/*surfspY*/, tz/*surfspZ*/ );
+
+ transformV->RotateX( rx/*volspX*/ );
+ transformS1->RotateX( rx/*surfspX*/ );
+ transformS2->RotateX( rx/*surfspX*/ );
+ transformS3->RotateX( rx/*surfspX*/ );