]> Creatis software - creaMaracasVisu.git/commitdiff
BUG Axis -900 -> 900
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 20 Apr 2009 09:03:26 +0000 (09:03 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 20 Apr 2009 09:03:26 +0000 (09:03 +0000)
lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx

index 39fb250a4094bba15d0a26a26c821d415de5d317..8f314e4de79bc4573c8fbe53db555436946c0c1b 100644 (file)
@@ -144,9 +144,8 @@ void manualContourModelCircle::UpdateSpline() // virtal
 manualContourModelLine::manualContourModelLine()
 : manualContourModel()
 {
-printf("EED manualContourModelLine::manualContourModelLine \n");
-       //      SetNumberOfPointsSpline(2);
-       SetNumberOfPointsSpline(100);
+       SetNumberOfPointsSpline(20);
+       this->SetCloseContour(false);
 }
 
 manualContourModelLine::~manualContourModelLine()
@@ -871,7 +870,8 @@ void manualContourModel::UpdateSpline() // virtual
        {
                _delta_JSTG = (double) (np) / double (_sizePointsContour - 1);  //Without the -1 the curve is not close
        } else {
-               _delta_JSTG = (double) (np-1) / double (_sizePointsContour );  //Without the -1 the curve is not close
+//             _delta_JSTG = (double) (np-1) / double (_sizePointsContour );  //Without the -1 the curve is not close
+               _delta_JSTG = (double) (np) / double (_sizePointsContour-1 );  //Without the -1 the curve is not close
        }
 //-----------------------------------------------------------------------------------------------------------
 }
@@ -1611,10 +1611,6 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){
                nps_t = nps-1;
        }
 
-       //ED
-       //printf("\n Number of points %d ",nps_t);
-
-       printf("EED %p manualViewContour::ifTouchContour >>>>  nps_t=%d  nps=%d  x=%f  y=%f  z=%f \n",  this , nps_t, nps, xx, yy, zz );        
        
        for( i = 0; i < nps_t; i++ ) 
        {
@@ -1624,8 +1620,6 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){
                d2= sqrt( (ppB[0]-xx)*(ppB[0]-xx) + (ppB[1]-yy)*(ppB[1]-yy) + (ppB[2]-zz)*(ppB[2]-zz));
                d3= sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2]));
 
-               //EED
-printf("%f %f %f - ", ppB[0], ppB[1], ppB[2] );        
 
                if (  ((d1+d2)>=d3) &&  ((d1+d2)<=d3*1.3) ) 
                {
@@ -1634,12 +1628,6 @@ printf("%f %f %f - ", ppB[0], ppB[1], ppB[2] );
                }
        }
        
-if (result==true)
-{
-  printf("EED %p manualViewContour::ifTouchContour  true   \n",  this  );      
-} else {
-       printf("EED %p manualViewContour::ifTouchContour false  \n",  this );   
-}      
        return result;
 }
 
@@ -2556,6 +2544,7 @@ void manualViewCircle::MoveContour(int x, int y, int z) // virtual
 
 manualViewLine::manualViewLine()
 {
+       _sizePointsContour=20;
 }
 // ----------------------------------------------------------------------------
 manualViewLine::~manualViewLine()
index f25e1f9db88b8d0a4e224e6d1bb378f0f7ccf67a..b118cc36adaa38c9d2353d58efdd24f81729a423 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMPRWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/20 07:39:30 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/04/20 09:03:30 $
+  Version:   $Revision: 1.9 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -2173,10 +2173,16 @@ void wxVtkMPR2DView::Refresh()
                        }
                        if (_direction==2) { 
                                _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
-                               _ptsA->SetPoint(0, x1 , y , -z2 );
-                               _ptsA->SetPoint(1, x2 , y , -z2 );
-                               _ptsB->SetPoint(0, x  , y1, -z2 );
-                               _ptsB->SetPoint(1, x  , y2, -z2 );
+                               _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
+                       //      _ptsA->SetPoint(0, x1 , y , -z2 );
+                       //      _ptsA->SetPoint(1, x2 , y , -z2 );
+                       //      _ptsB->SetPoint(0, x  , y1, -z2 );
+                       //      _ptsB->SetPoint(1, x  , y2, -z2 );
+                               
+                               _ptsA->SetPoint(0, x1 , y , z2 );
+                               _ptsA->SetPoint(1, x2 , y , z2 );
+                               _ptsB->SetPoint(0, x  , y1, z2 );
+                               _ptsB->SetPoint(1, x  , y2, z2 );
                        }
                        _backX=x;
                        _backY=y;