]> Creatis software - creaMaracasVisu.git/commitdiff
#3138 creaMaracasVisu Feature New Normal - branch vtk7itk4wx3 vtk7itk4wx3
authorEduardo DAVILA <davila@localhost.localdomain>
Wed, 22 Nov 2017 14:39:32 +0000 (15:39 +0100)
committerEduardo DAVILA <davila@localhost.localdomain>
Wed, 22 Nov 2017 14:39:32 +0000 (15:39 +0100)
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModelCircle.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModelCircle.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewCircle.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewCircle.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewLine.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp

index 8020cc4a89ea98cab414e5560e83cbc5e7979592..4fece95ed380c68131eeb03d8b0a99c2c93ba6b5 100644 (file)
@@ -98,7 +98,7 @@ public:
        virtual bool  OnRightButtonUp();
 
        void    SetModelView(manualBaseModel *manContModel, manualViewBaseContour *manViewBaseCont);
-       manualBaseModel         * GetManualContourModel();
+       manualBaseModel                 * GetManualContourModel();
        manualViewBaseContour   * GetManualViewBaseContour();
 
 
index e5ab192a368b3d2889b255b2abbf733c2b8388de..7f4d128eb4135f35993b2db96c426b0c3eef1de8 100644 (file)
@@ -34,34 +34,25 @@ manualContourModel::manualContourModel()
     _cntSplineX = vtkKochanekSpline::New( );
     _cntSplineY = vtkKochanekSpline::New( );
     _cntSplineZ = vtkKochanekSpline::New( );
-
        this->SetCloseContour(true);
-
     _cntSplineX->SetDefaultTension( 0 );
        _cntSplineX->SetDefaultBias( 0 );
        _cntSplineX->SetDefaultContinuity( 0 );
-
     _cntSplineY->SetDefaultTension( 0 );
        _cntSplineY->SetDefaultBias( 0 );
        _cntSplineY->SetDefaultContinuity( 0 );
-
     _cntSplineZ->SetDefaultTension( 0 );
        _cntSplineZ->SetDefaultBias( 0 );
        _cntSplineZ->SetDefaultContinuity( 0 );
-
 //JSTG 25-02-08 -------------------------------------------------------------------------------------------------
-
        // this parameter is reset in the  VIRTUAL manualContourBaseControler::Configure
        _sizePointsContour      = 100;                  //JSTG 25-02-08 The change in the inisialization of these variable is critical.
-
        _delta_JSTG                     = 0.0;
 //---------------------------------------------------------------------------------------------------------------
-
 //CMRU 17-08-09 -------------------------------------------------------------------------------------------------
        _realSize                       = 0.0;
        _label                          = "";
 //---------------------------------------------------------------------------------------------------------------
-
 }
 
 // ----------------------------------------------------------------------------
@@ -72,15 +63,14 @@ manualContourModel::~manualContourModel()
                delete _lstPoints[i];
        }
        _lstPoints.clear();
-
        _cntSplineX->RemoveAllPoints();
        _cntSplineY->RemoveAllPoints();
        _cntSplineZ->RemoveAllPoints();
-
        _cntSplineX->Delete();
        _cntSplineY->Delete();
        _cntSplineZ->Delete();
 }
+
 // ----------------------------------------------------------------------------
 int manualContourModel::AddPoint(double x,double y,double z)
 {
@@ -88,7 +78,6 @@ int manualContourModel::AddPoint(double x,double y,double z)
    mp->SetPoint(x,y,z);
    AddManualPoint(mp);
    //UpdateSpline();
-
    return _lstPoints.size()-1;
 }
 // ----------------------------------------------------------------------------
@@ -187,6 +176,7 @@ void manualContourModel::DeleteAllPoints()
 
 void manualContourModel::MovePoint(int i,double dx,double dy,double dz)
 {
+printf("EED manualContourModel::MovePoint %p \n", this);
        manualPoint *mp=_lstPoints[i];
        double x=mp->GetX()+dx;
        double y=mp->GetY()+dy;
@@ -388,8 +378,6 @@ void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, doubl
 }
 
 // ----------------------------------------------------------------------------
-
-
 /*void manualContourModel::GetSplinePoint(double t, double &x, double &y, double &z)
 {
        if (_lstPoints.size()==0)
@@ -413,19 +401,18 @@ void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, doubl
                z       = _cntSplineZ->Evaluate(t);
        }
 }*/
+
 // ----------------------------------------------------------------------------
 double manualContourModel::GetPathSize(double *spc)
 {
        double result = 0;
        double x1,y1,z1;
        double x2,y2,z2;
-
 // JSTG 25-02-08 -----------------------------
        //double t,delta;
        //int i,np,nps;
        int i;
 //--------------------------------------------
-
        if (_lstPoints.size()==2)
        {
                x1 = spc[0] * _lstPoints[0]->GetX();
@@ -438,7 +425,6 @@ double manualContourModel::GetPathSize(double *spc)
        }
        if (_lstPoints.size()>2)
        {
-
 // JSTG 25-02-08 ------------------------------------------
                //np  = _lstPoints.size( );
                //nps = 200;
@@ -446,7 +432,6 @@ double manualContourModel::GetPathSize(double *spc)
                UpdateSpline();
                //GetSplinePoint(0,x1,y1,z1);
                GetSpline_i_Point(0,&x1,&y1,&z1);
-
                x1 = spc[0] * x1; 
                y1 = spc[1] * y1; 
                z1 = spc[2] * z1; 
@@ -466,11 +451,9 @@ double manualContourModel::GetPathSize(double *spc)
                        z1=z2;
                }// for
        }
-
        return result;
 }
 
-
 // ----------------------------------------------------------------------------
 double manualContourModel::GetPathArea(double *spc)
 {
@@ -485,7 +468,6 @@ double manualContourModel::GetPathArea(double *spc)
                double x2,y2,z2;
                bool okArea=true;
                int i, j;
-
                // This uses Green's theorem:
                // A = 1/2 * sum( xiyi+1 - xi+1yi); pO == pN
                // A < 0 -> A = |A| (a negative value could raise because points are
@@ -513,9 +495,7 @@ double manualContourModel::GetPathArea(double *spc)
                        x2=spc[0]*x2;
                        y2=spc[1]*y2;
                        z2=spc[2]*z2;
-                       area +=
-                                       (x1 * y2 ) -
-                                       ( x2 * y1 );
+                       area += (x1 * y2 ) - ( x2 * y1 );
                        if (z1!=z2)
                        {
                                okArea=false;
@@ -558,7 +538,6 @@ double manualContourModel::GetPathArea(double *spc)
 // p[x,y,z]   :  data in
 // rp[x,y,z]  :  data out  result point
 // rn[x,y,z]  :  data out   result normal
-
 void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double *rn)
 {
        double  distMin=999999999;
@@ -604,12 +583,11 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                                rn[0] = x2-x1;
                                rn[1] = y2-y1;
                                rn[2] = z2-z1;
-                       }
-                       x2=x1;
-                       y2=y1;
-                       z2=z1;
+                       } // if
+                       x2 = x1;
+                       y2 = y1;
+                       z2 = z1;
                }// for
-
 // JSTG 25-02-08 ------------------------------------------
                //if (tback==0)
                if (iback==0)
@@ -618,10 +596,10 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                        //GetSplinePoint(t,x1,y1,z1);
                        GetSpline_i_Point(i,&x1,&y1,&z1);
 //----------------------------------------------------------
-                       rn[0]=rp[0]-x1;
-                       rn[1]=rp[1]-y1;
-                       rn[2]=rp[2]-z1;
-               }
+                       rn[0] = rp[0]-x1;
+                       rn[1] = rp[1]-y1;
+                       rn[2] = rp[2]-z1;
+               } // if iback 
        } else {
                rp[0] = 0;
                rp[1] = 0;
@@ -629,11 +607,11 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                rn[0] = -1;
                rn[1] = 0;
                rn[2] = 0;
-       }
+       } // if np
 }
 
 // ----------------------------------------------------------------------------
-manualContourModel * manualContourModel :: Clone() // virtual
+manualContourModel * manualContourModel::Clone() // virtual
 {
        manualContourModel * clone = new manualContourModel();
        CopyAttributesTo(clone);
index f606f98a5c95510e5aff41a21a7078727199f6c9..b6b361c3bd167c8d2c368db82e3ae70ac8019f71 100644 (file)
@@ -80,7 +80,8 @@ void manualContourModelCircle::UpdateSpline() // virtal
        int nps = GetNumberOfPointsSpline();
        _deltaAngle=(3.14159265*2)/(nps-1);
 
-       if (np==2){
+       if (np==2)
+       {
                mpA                     = GetManualPoint(0);
                mpB                     = GetManualPoint(1);
                difX            = mpA->GetX() - mpB->GetX();
index 1d6a4115481618ae0c985d01af25e72bfbf723b7..a8d3d1d6aa73dee6caa957f17664646eb6810f9b 100644 (file)
@@ -42,7 +42,6 @@ private:
        double          _centerX;
        double          _centerY;
        double          _centerZ;
-
        virtual int             GetTypeModel();  
        virtual void    UpdateSpline();
 };
index 6c8765e33e90b778cb07a452367952d393950350..cbb4ec16d785796bc8624a03145e84c25360ec0f 100644 (file)
@@ -36,18 +36,18 @@ manualViewBullEyeSector::manualViewBullEyeSector()
 void manualViewBullEyeSector::RefreshContour()
 {
 //EED004
-       int i,nps;
-       double x,y,z;
-       double xx,yy,zz;
+       int     i,nps;
+       double  x,y,z;
+       double  xx,yy,zz;
 //----------------------------------
        //EED 27 Juin 2012
     //Boundaring box   
-       _minX=99999;
-       _minY=99999;
-       _minZ=99999;
-       _maxX=-99999;
-       _maxY=-99999;
-       _maxZ=-99999;
+       _minX = 99999;
+       _minY = 99999;
+       _minZ = 99999;
+       _maxX = -99999;
+       _maxY = -99999;
+       _maxZ = -99999;
        _manContModel->UpdateSpline();
     nps = _manContModel->GetNumberOfPointsSpline();
        if ( _pts!=NULL )
index 12d97e4f172c1f2c9189d0607653e483ccabb3cd..2fa468bbd1d00d90dc97d4186c03583e575c2f01 100644 (file)
@@ -30,8 +30,6 @@
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 
-// EED08
-
 manualViewCircle::manualViewCircle()
 {
 //     _sizePointsContour=5;   // default 100
@@ -41,7 +39,6 @@ manualViewCircle::~manualViewCircle()
 {
 }
 
-
 // ----------------------------------------------------------------------------
 manualViewCircle * manualViewCircle :: Clone()
 {
@@ -51,14 +48,12 @@ manualViewCircle * manualViewCircle :: Clone()
 }
 
 // ---------------------------------------------------------------------------
-
 void manualViewCircle::CopyAttributesTo( manualViewCircle * cloneObject)
 {
        // Fathers object
        manualViewBaseContour::CopyAttributesTo(cloneObject);
 }
 
-
 // ----------------------------------------------------------------------------
 int manualViewCircle::GetType() // virtual
 {
@@ -86,11 +81,11 @@ void manualViewCircle::GetMinMax(double &minX,double &minY, double &maxX, double
                maxX=mpA->GetX()+radio;
                maxY=mpA->GetY()+radio;
        } else {
-               minX=0;
-               maxX=0;
-               minY=0;
-               maxY=0;
-       }
+               minX    = 0;
+               maxX    = 0;
+               minY    = 0;
+               maxY    = 0;
+       } // if np
 }
 
 
@@ -99,60 +94,60 @@ void manualViewCircle::GetMinMax(double &minX,double &minY, double &maxX, double
 void manualViewCircle::InitMove(int x, int y, int z)  // virtual
 {
        manualPoint *mp;
-       double XX=x;
-       double YY=y;
-       double ZZ=z;
+       double          XX = x;
+       double          YY = y;
+       double          ZZ = z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
-       if (_manContModel->GetSizeLstPoints()==2){
+       if (_manContModel->GetSizeLstPoints()==2)
+       {
                mp = _manContModel->GetManualPoint(0);
-               _dp0[0]= mp->GetX() - XX;
-               _dp0[1]= mp->GetY() - YY;
-               _dp0[2]= mp->GetZ();
-
-               mp = _manContModel->GetManualPoint(1);
-               _dp1[0]= mp->GetX() - XX;
-               _dp1[1]= mp->GetY() - YY;
-               _dp1[2]= mp->GetZ();
+               _dp0[0] = mp->GetX() - XX;
+               _dp0[1] = mp->GetY() - YY;
+               _dp0[2] = mp->GetZ();
+               mp              = _manContModel->GetManualPoint(1);
+               _dp1[0] = mp->GetX() - XX;
+               _dp1[1] = mp->GetY() - YY;
+               _dp1[2] = mp->GetZ();
 /*
                mp = _manContModel->GetManualPoint(2);
                _dp2[0]= mp->GetX() - XX;
                _dp2[1]= mp->GetY() - YY;
                _dp2[2]= mp->GetZ();
-
                mp = _manContModel->GetManualPoint(3);
                _dp3[0]= mp->GetX() - XX;
                _dp3[1]= mp->GetY() - YY;
                _dp3[2]= mp->GetZ();
 */
-       }
+       } // if 
 }
 
-
 // ----------------------------------------------------------------------------
 void manualViewCircle::MoveContour(int x, int y, int z) // virtual
 {
+printf("EED  manualViewCircle::MoveContour %p \n", this);
        manualPoint *mp;
        double XX=x;
        double YY=y;
        double ZZ=z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
-
        mp = _manContModel->GetManualPoint(1);
        mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]);
-
 //     mp = _manContModel->GetManualPoint(2);
 //     mp->SetPoint(_dp2[0]+XX,_dp2[1]+YY,_dp0[2]);
-
 //     mp = _manContModel->GetManualPoint(3);
 //     mp->SetPoint(_dp3[0]+XX,_dp3[1]+YY,_dp0[2]);
-
        UpdateViewPoint(0);
        UpdateViewPoint(1);
 //     UpdateViewPoint(2);
 //     UpdateViewPoint(3);
+}
 
+// ----------------------------------------------------------------------------
+bool manualViewCircle::ShowLineVersion()
+{
+       return false;
 }
+
+
index dc58111a7035d31ac632f37d6ff2b54aa5ee3ebb..643c9e94a136aa72dc739b7811a218a365cbb086 100644 (file)
@@ -47,6 +47,7 @@ public:
        virtual void InitMove(int x, int y, int z);
        virtual void MoveContour(int x, int y, int z);
        void GetMinMax(double &minX,double &minY, double &maxX, double &maxY);
+       virtual bool ShowLineVersion();
 
 private:
        double                          _dp0[3];
index 0c082a20c818ea232c9fca2db8a25d3d966f970d..32ef7e736c9ba79a7d34e59b06b86d37e5162066 100644 (file)
@@ -32,8 +32,7 @@
 manualViewContour::manualViewContour()
 {
        _id_viewPoint_for_text  = 0;
-       _initialConoturModel    = new manualContourModel();
-       
+       _initialConoturModel    = new manualContourModel();     
        _minX                                   = 99999;
        _minY                                   = 99999;
        _maxX                                   = -99999;
@@ -78,37 +77,45 @@ void manualViewContour::Save(FILE *pFile)
 }
 
 // ----------------------------------------------------------------------------
-
 void manualViewContour::Open(FILE *pFile)
 {
 }
 
+// ----------------------------------------------------------------------------
+bool manualViewContour::ShowLineVersion()   // virtual
+{
+       bool result = false;
+    int np     = GetNumberOfPoints( );
+       if (np==2) 
+       {
+               result=true;
+       }
+       return result;
+}
+
 // ----------------------------------------------------------------------------
 void manualViewContour::RefreshContour() // virtual
 {
-       int i,np,nps;
+       int i,nps;
 //JSTG 25-02-08 --------------------
        //double t,delta, x,y,z;
        double x,y,z;
        double xx,yy,zz;
 //----------------------------------
-
-    np = GetNumberOfPoints( );
-
-       if (np==2) 
+       if ( ShowLineVersion()==true ) 
        {
                SetCellArray(false);
                manualPoint *mpA = _manContModel->GetManualPoint(0);
                manualPoint *mpB = _manContModel->GetManualPoint(1);            
                if ( _pts!=NULL )
                {
-                       xx=mpA->GetX() * _spc[0];
-                       yy=mpA->GetY() * _spc[1];
-                       zz=mpA->GetZ() * _spc[2];
-                       _minX=xx;
-                       _minY=yy;
-                       _maxX=xx;
-                       _maxY=yy;
+                       xx              = mpA->GetX() * _spc[0];
+                       yy              = mpA->GetY() * _spc[1];
+                       zz              = mpA->GetZ() * _spc[2];
+                       _minX   = xx;
+                       _minY   = yy;
+                       _maxX   = xx;
+                       _maxY   = yy;
                        _pts->SetPoint(0 , xx , yy , zz  );
                        xx=mpB->GetX() * _spc[0];
                        yy=mpB->GetY() * _spc[1];
@@ -128,12 +135,13 @@ void manualViewContour::RefreshContour() // virtual
 
                //EED 27 Juin 2012
                //Boundaring box        
-               _minX=99999;
-               _minY=99999;
-               _maxX=-99999;
-               _maxY=-99999;
+               _minX = 99999;
+               _minY = 99999;
+               _maxX = -99999;
+               _maxY = -99999;
                if ( _pts!=NULL )
                {
+                   int np      = GetNumberOfPoints( );
                        if (np>=2  )
                        {
                                for( i = 0; i < nps; i++ )
@@ -163,11 +171,10 @@ void manualViewContour::RefreshContour() // virtual
                        } // if
                } // _pts!=NULL
        } //np==2
-
-       _minX=_minX-1.0;
-       _minY=_minY-1.0;
-       _maxX=_maxX+1.0;
-       _maxY=_maxY+1.0;
+       _minX = _minX-1.0;
+       _minY = _minY-1.0;
+       _maxX = _maxX+1.0;
+       _maxY = _maxY+1.0;
 
 //EED 2017-03-02
        if (_pts!=NULL) 
@@ -292,50 +299,43 @@ void manualViewContour::RefreshText()  // virtual
 // ----------------------------------------------------------------------------
 bool manualViewContour::ifTouchContour(int x,int y,int z)
 {
-       bool result=false;
-
-       double xx=x;
-       double yy=y;
-       double zz=z;
+       bool result     = false;
+       double xx       = x;
+       double yy       = y;
+       double zz       = z;
        double ppA[3];
        double ppB[3];
        double d1,d2,d3;
        TransfromCoordViewWorld(xx,yy,zz);
-
 //EED 27 sep 2006
        xx = xx * _spc[0];
        yy = yy * _spc[1];
        zz = zz * _spc[2];
-
-       if ( (xx>=_minX) &&  (yy>=_minY) && (xx<=_maxX) && (yy<=_maxY)) {  // inside the boundaring box
-       
-
-               if (_manContModel->GetSizeLstPoints()==2)
+       if ( (xx>=_minX) &&  (yy>=_minY) && (xx<=_maxX) && (yy<=_maxY)) 
+       {  // inside the boundaring box
+               if ( ShowLineVersion()==true )
                {
                        manualPoint *mpA = _manContModel->GetManualPoint(0);
                        manualPoint *mpB = _manContModel->GetManualPoint(1);
                        _pts->GetPoint(0, ppA);
                        double dirVec[3];
-
                        // direction of the segment
             dirVec[0] = mpB->GetX() - mpA->GetX();                     
             dirVec[1] = mpB->GetY() - mpA->GetY();                     
             dirVec[2] = mpB->GetZ() - mpA->GetZ();                     
-
-
                        // proj = mpA + k*dirVec
                        double num;
                        double den = 0.0 ;
-                       num     =       dirVec[0]*( xx-mpA->GetX() );
-                       num     =       num + dirVec[1]*( yy-mpA->GetY() );
-                       num     =       num + dirVec[2]*( zz-mpA->GetZ() );
+                       num     = dirVec[0]*( xx-mpA->GetX() );
+                       num     = num + dirVec[1]*( yy-mpA->GetY() );
+                       num     = num + dirVec[2]*( zz-mpA->GetZ() );
                        den=dirVec[0]*dirVec[0] + dirVec[1]*dirVec[1] + dirVec[2]*dirVec[2];
                        double k;
                        if (den!=0) 
                        {
-                               k=num/den;
+                               k = num/den;
                        } else {
-                               k=99999999;
+                               k = 99999999;
                        }
                        // projection of th point xx,yy,zz  in segment mpA,mpB
                        double projX = mpA->GetX() + k*dirVec[0];
@@ -348,14 +348,14 @@ bool manualViewContour::ifTouchContour(int x,int y,int z)
                        { 
                                result=true;
                        } // if d1
-               } else{
+               } else {
                        unsigned int i, nps,nps_t;
                        nps       = _sizePointsContour;
                        if (this->_manContModel->IfCloseContour()==true)
                        {
                                nps_t = nps;
                        } else {
-                       nps_t = nps-1;
+                               nps_t = nps-1;
                        } // if close
                        for( i = 0; i < nps_t; i++ ) 
                        {
@@ -366,13 +366,12 @@ bool manualViewContour::ifTouchContour(int x,int y,int z)
                                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]));
                                if (  ((d1+d2)>=d3) &&  ((d1+d2)<=d3*1.3) ) 
                                {
-                                       result=true;
-                                       i=nps;
+                                       result  = true;
+                                       i               = nps;
                                } // if
                        } // for i
                } // if GetSizeLstPoints()==2
        } // if min max
-
        return result;
 }
 
index 64caa62eb7505ab2a4d061463d27c26a87dff0bd..8e1c14382a84cbdf3d7f02d1a9caed2a15a05d8c 100644 (file)
@@ -40,9 +40,10 @@ public:
        virtual ~manualViewContour();
        virtual manualViewContour * Clone();
        void CopyAttributesTo( manualViewContour *cloneObject );
-       virtual int GetType();
+       virtual int  GetType();
        virtual void Save(FILE *pFile);
        virtual void Open(FILE *pFile);
+       virtual bool ShowLineVersion();
        virtual void RefreshContour();
        virtual bool ifTouchContour(int x,int y, int z);
        virtual void InitMove(int x, int y, int z);
index 2e892e9ac9a6b1e4f2b34062df4a434353e0b5bf..031ac73237c171e0a4bde15981fae31df13058be 100644 (file)
@@ -41,7 +41,6 @@ manualViewLine::~manualViewLine()
 {
 }
 
-
 // ----------------------------------------------------------------------------
 manualViewLine * manualViewLine :: Clone()
 {
@@ -51,7 +50,6 @@ manualViewLine * manualViewLine :: Clone()
 }
 
 // ---------------------------------------------------------------------------
-
 void manualViewLine::CopyAttributesTo( manualViewLine * cloneObject)
 {
        // Fathers object
@@ -64,9 +62,7 @@ int manualViewLine::GetType() // virtual
        return 6;
 }
 
-
 // ----------------------------------------------------------------------------
-
 void manualViewLine::InitMove(int x, int y, int z)  // virtual
 {
        manualPoint *mp;
@@ -74,39 +70,31 @@ void manualViewLine::InitMove(int x, int y, int z)  // virtual
        double YY=y;
        double ZZ=z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
        if (_manContModel->GetSizeLstPoints()==2)
        {
                mp = _manContModel->GetManualPoint(0);
-               _dp0[0]= mp->GetX() - XX;
-               _dp0[1]= mp->GetY() - YY;
-               _dp0[2]= mp->GetZ();
-
+               _dp0[0] = mp->GetX() - XX;
+               _dp0[1] = mp->GetY() - YY;
+               _dp0[2] = mp->GetZ();
                mp = _manContModel->GetManualPoint(1);
-               _dp1[0]= mp->GetX() - XX;
-               _dp1[1]= mp->GetY() - YY;
-               _dp1[2]= mp->GetZ();
-
-       }
+               _dp1[0] = mp->GetX() - XX;
+               _dp1[1] = mp->GetY() - YY;
+               _dp1[2] = mp->GetZ();
+       } // if
 }
 
-
 // ----------------------------------------------------------------------------
 void manualViewLine::MoveContour(int x, int y, int z) // virtual 
 {
        manualPoint *mp;
-       double XX=x;
-       double YY=y;
-       double ZZ=z;
+       double          XX = x;
+       double          YY = y;
+       double          ZZ = z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
-
        mp = _manContModel->GetManualPoint(1);
        mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]);
-
-
        UpdateViewPoint(0);
        UpdateViewPoint(1);
 }
index a55eb558fb54d43dacfec0cfa2111eafb23f5a9c..1f868ec51f5ef08b5c53fad13bc44fd9cd0ab6ab 100644 (file)
@@ -70,7 +70,6 @@ void manualViewRoi::RefreshContour() // virtual
                        {
                                ii=i%np;
                                mp = _manContModel->GetManualPoint(ii);
-
        //EEDx6
                                double XX=mp->GetX(),YY=mp->GetY(),ZZ=mp->GetZ();
        //                      wxVtk2DBaseView *wxvtk2Dbasevie = (wxVtk2DBaseView*)this->GetWxVtkBaseView();
@@ -79,8 +78,7 @@ void manualViewRoi::RefreshContour() // virtual
        //EED 27 sep 2007
        //                      _pts->SetPoint(i, XX,YY,ZZ );
                                _pts->SetPoint(i, XX*_spc[0] , YY*_spc[1] , ZZ*_spc[2] );
-                       } //  rof
-
+                       } //  for
                } else {
                                _pts->SetPoint(0, 0 , 0 , 0);
                                _pts->SetPoint(1, 0 , 0 , 0);