- x1 = (int)(x1*spc[0]);
- y1 = (int)(y1*spc[1]);
- z1 = (int)(z1*spc[2]);
-
- x2 = (int)(x2*spc[0]);
- y2 = (int)(y2*spc[1]);
- z2 = (int)(z2*spc[2]);
-
- x = (int)(GetVtkmprbasedata()->GetX());
- y = (int)(GetVtkmprbasedata()->GetY());
- z = (int)(GetVtkmprbasedata()->GetZ());
-
- x = (int)(x*spc[0]);
- y = (int)(y*spc[1]);
- z = (int)(z*spc[2]);
-
- if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) {
-
- if (_direction==0) { // YZ
- _imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) );
- _ptsA->SetPoint(0, x2, y1 , z );
- _ptsA->SetPoint(1, x2, y2 , z );
- _ptsB->SetPoint(0, x2, y , z1);
- _ptsB->SetPoint(1, x2, y , z2);
+ xx1 = x1*spc[0];
+ yy1 = y1*spc[1];
+ zz1 = z1*spc[2];
+ xx2 = x2*spc[0];
+ yy2 = y2*spc[1];
+ zz2 = z2*spc[2];
+ x1 = (int)(x1*spc[0]);
+ y1 = (int)(y1*spc[1]);
+ z1 = (int)(z1*spc[2]);
+ x2 = (int)(x2*spc[0]);
+ y2 = (int)(y2*spc[1]);
+ z2 = (int)(z2*spc[2]);
+ xx = (int)(GetVtkmprbasedata()->GetX());
+ yy = (int)(GetVtkmprbasedata()->GetY());
+ zz = (int)(GetVtkmprbasedata()->GetZ());
+//EED 02/08/2013
+// x = round(xx*spc[0]);
+// y = round(yy*spc[1]);
+// z = round(zz*spc[2]);
+ x = xx*spc[0];
+ y = yy*spc[1];
+ z = zz*spc[2];
+ fixAxis2D = GetVtkmprbasedata()->GetFixAxis2D();
+ opacityAxis = GetVtkmprbasedata()->GetOpacityAxis();
+ if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ) || (fixAxis2D!=_backFixAxis2D) || (opacityAxis!=_backOpacityAxis))
+ {
+ double position[3];
+ double focalpoint[3];
+ GetRenderer()->GetActiveCamera()->GetPosition(position);
+ GetRenderer()->GetActiveCamera()->GetFocalPoint(focalpoint);
+ if (_direction==0) { // YZ
+ if(_imageViewer2XYZ)
+ {
+ _imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) );
+ }
+//EED 21 mars 2012 FLIP probleme ..PLOP..
+ //_ptsA->SetPoint(0, x2, y1 , z );
+ //_ptsA->SetPoint(1, x2, y2 , z );
+ //_ptsB->SetPoint(0, x2, y , z1);
+ //_ptsB->SetPoint(1, x2, y , z2);
+ _ptsA->SetPoint(0, xx2, yy1 , z );
+ _ptsA->SetPoint(1, xx2, yy2 , z );
+ _ptsB->SetPoint(0, xx2, y , zz1);
+ _ptsB->SetPoint(1, xx2, y , zz2);
+ position[1] = y;
+ position[2] = z;
+ focalpoint[1] = y;
+ focalpoint[2] = z;