]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageTransformation.cpp
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasRenderImageTransformation.cpp
index fe9eedcb38c3ba87b5904f788f7098be01f077fe..e2dad9083971c7133493d83373ae27261262034b 100644 (file)
@@ -10,7 +10,8 @@ wxMaracasRenderImageTransformation::wxMaracasRenderImageTransformation(wxMaracas
        surface1 = _surface1;
        surface2 = _surface2;
        surface3 = _surface3;
-
+       
+       propID = id;
        transformV = vtkTransform::New();
        transformS1 = vtkTransform::New();
        transformS2 = vtkTransform::New();
@@ -38,7 +39,6 @@ void wxMaracasRenderImageTransformation::Translate(int tx, int ty, int tz, int r
        double volspX;
        double volspY;
        double volspZ;
-
        vol->getImageData()->GetSpacing(volspX, volspY, volspZ);
 
        double surfspX;
@@ -51,25 +51,25 @@ void wxMaracasRenderImageTransformation::Translate(int tx, int ty, int tz, int r
        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->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*/ );
+       transformV->RotateX( rx*volspX );
+       transformS1->RotateX( rx*surfspX );
+       transformS2->RotateX( rx*surfspX );
+       transformS3->RotateX( rx*surfspX );
 
-       transformV->RotateY( ry/*volspY*/ );
-       transformS1->RotateY( ry/*surfspY*/ );
-       transformS2->RotateY( ry/*surfspY*/ );
-       transformS3->RotateY( ry/*surfspY*/ );
+       transformV->RotateY( ry*volspY );
+       transformS1->RotateY( ry*surfspY );
+       transformS2->RotateY( ry*surfspY );
+       transformS3->RotateY( ry*surfspY );
 
-       transformV->RotateZ( rz/*volspZ*/ );
-       transformS1->RotateZ( rz/*surfspZ*/ );
-       transformS2->RotateZ( rz/*surfspZ*/ );
-       transformS3->RotateZ( rz/*surfspZ*/ );
+       transformV->RotateZ( rz*volspZ );
+       transformS1->RotateZ( rz*surfspZ );
+       transformS2->RotateZ( rz*surfspZ );
+       transformS3->RotateZ( rz*surfspZ );
 
        transformV->Scale( (sx/100.0), (sy/100.0), (sz/100.0) );
        transformS1->Scale( (sx/100.0), (sy/100.0), (sz/100.0) );
@@ -80,22 +80,6 @@ void wxMaracasRenderImageTransformation::Translate(int tx, int ty, int tz, int r
 }
 
 
-/**
-** Scales a volume by the given value for the X axis
-*
-void wxMaracasRenderImageTransformation::Scale(int x, int y, int z)
-{
-       float resultX = x/100.0;
-       float resultY = y/100.0;
-       float resultZ = z/100.0;
-
-       //printf("wxMaracasRenderImageManagementPanel::Rotate int:scaleX = %d \n",x);
-       //printf("wxMaracasRenderImageManagementPanel::Rotate int:scaleY = %d \n", y);
-       //printf("wxMaracasRenderImageManagementPanel::Rotate int:scaleZ = %d \n", z);
-
-       Refresh();
-}*/
-
 /**
 ** Updates each Matrix
 **/