]> Creatis software - creaMaracasVisu.git/commitdiff
#3144 creaMaracasVisu Bug New Normal - changeWx28to30
authorEduardo DAVILA <davila@localhost.localdomain>
Tue, 10 Oct 2017 07:19:55 +0000 (09:19 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Tue, 10 Oct 2017 07:19:55 +0000 (09:19 +0200)
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3VContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx

index e6791913123eb47141f75923ba91727f9a0d03a7..c0848508945c197754effba6de0e979852e1dd58 100644 (file)
@@ -87,7 +87,6 @@ void manualView3VContour::RefreshContour()  // virtula
 {
        manualViewContour::RefreshContour();
        int i;
-       
        //EED 27 Juin 2012
     //Boundaring box   
        _minX=99999;
@@ -96,8 +95,6 @@ void manualView3VContour::RefreshContour()  // virtula
        _maxX=-99999;
        _maxY=-99999;
        _maxZ=-99999;
-       
-       
        double pp[3];
 // JSTG 25-02-08 ----------------------------------------
        //int nps = GetNumberOfPointsSpline();
@@ -107,11 +104,8 @@ void manualView3VContour::RefreshContour()  // virtula
        {
                _pts->GetPoint( i, pp );
                FilterCordinateXYZ(pp[0],pp[1],pp[2]);
-
 //EED 27 sep 2006
                _pts->SetPoint( i, pp[0] , pp[1] ,pp[2] );
-               
-               
                //EED 27 Juin 2012
                //Boundaring box
                if (pp[0] < _minX) { _minX = pp[0]; }
@@ -120,14 +114,12 @@ void manualView3VContour::RefreshContour()  // virtula
                if (pp[0] > _maxX) { _maxX = pp[0]; }
                if (pp[1] > _maxY) { _maxY = pp[1]; }           
                if (pp[2] > _maxZ) { _maxY = pp[2]; }           
-               
        }// for
-
 //EED 2017-03-02
-       if (_pts!=NULL) { 
+       if (_pts!=NULL) 
+       { 
                _pts->Modified(); 
        }
-
 }
 
 // ----------------------------------------------------------------------------
index e1588bf4f3cae10683c1d5523ac6f3e95a2bcee5..47b19a033d802a515087015598f727e703e940fd 100644 (file)
@@ -48,21 +48,16 @@ manualViewBaseContour::manualViewBaseContour()
        _spc[0]                         = 1;
        _spc[1]                         = 1;
        _spc[2]                         = 1;
-
        _coulorEdit_r           = 1;
        _coulorEdit_g           = 1;
        _coulorEdit_b           = 0;
-
        _coulorNormal_r         = 1;
        _coulorNormal_g         = 0;
        _coulorNormal_b         = 1;
-
        _coulorSelection_r      = 0;
        _coulorSelection_g      = 1;
        _coulorSelection_b      = 0;
-
        _widthline                      = 1;
-
 }
 // ----------------------------------------------------------------------------
 manualViewBaseContour::~manualViewBaseContour()
@@ -121,7 +116,7 @@ void manualViewBaseContour :: AddCompleteContourActor(  bool ifControlPoints )
 }
 // ---------------------------------------------------------------------------
 
-void manualViewBaseContour :: RemoveCompleteContourActor()
+void manualViewBaseContour::RemoveCompleteContourActor()
 {
        /*vtkRenderer * theRenderer =*/  _wxvtkbaseview->GetRenderer(); // JPRx ??
         //Removing the spline
index 800e47b1f124c72f21a0ac5818ae317e97f50c87..be5976a1d1c2c059b0758856218f77089f15e9e9 100644 (file)
@@ -188,7 +188,7 @@ public:
                        void                                    SetWidthLine(double width);
                        double                                  GetWidthLine();
 
-       virtual void                    ConstructVTKObjects();
+       virtual void                                    ConstructVTKObjects();
 
        void SetCellArray(bool type);
 //---------------------------------------------------
@@ -203,7 +203,7 @@ private:
        vtkActor                                                        *_contourVtkActor;
        vtkPolyDataMapper                                       *_bboxMapper;
 
-       void                    DeleteVtkObjects();
+       void                                                            DeleteVtkObjects();
        
 
 //---------------------------------------------------
index 60148cab5d189a4e5dcb8738770ca6448ee06b68..6c8765e33e90b778cb07a452367952d393950350 100644 (file)
@@ -40,7 +40,6 @@ void manualViewBullEyeSector::RefreshContour()
        double x,y,z;
        double xx,yy,zz;
 //----------------------------------
-
        //EED 27 Juin 2012
     //Boundaring box   
        _minX=99999;
@@ -49,10 +48,8 @@ void manualViewBullEyeSector::RefreshContour()
        _maxX=-99999;
        _maxY=-99999;
        _maxZ=-99999;
-       
        _manContModel->UpdateSpline();
     nps = _manContModel->GetNumberOfPointsSpline();
-
        if ( _pts!=NULL )
        {
                for( i = 0; i < nps; i++ )
@@ -62,7 +59,6 @@ void manualViewBullEyeSector::RefreshContour()
                        yy = y*_spc[1];
                        zz = z*_spc[2];
                        _pts->SetPoint(i , xx , yy , zz );
-                       
                        //EED 27 Juin 2012
                        //Boundaring box
                        if (xx < _minX) { _minX = xx; }
@@ -71,11 +67,8 @@ void manualViewBullEyeSector::RefreshContour()
                        if (xx > _maxX) { _maxX = xx; }
                        if (yy > _maxY) { _maxY = yy; }         
                        if (zz > _maxZ) { _maxY = zz; }         
-                       
-                       
                }// for
                //EED 2017-03-02
                _pts->Modified();
        } // if _pts
-
 }
index bddf6aa143923215b8b1ac9036a5dd94384b355c..0c082a20c818ea232c9fca2db8a25d3d966f970d 100644 (file)
@@ -87,7 +87,6 @@ void manualViewContour::Open(FILE *pFile)
 void manualViewContour::RefreshContour() // virtual
 {
        int i,np,nps;
-
 //JSTG 25-02-08 --------------------
        //double t,delta, x,y,z;
        double x,y,z;
@@ -146,9 +145,9 @@ void manualViewContour::RefreshContour() // virtual
        //--------------------------------------------------------------
                // EED 27 sep 2006
                //                      _pts->SetPoint(i, x,y,z );
-                                       xx=x*_spc[0];
-                                       yy=y*_spc[1];
-                                       zz=z*_spc[2];
+                                       xx = x*_spc[0];
+                                       yy = y*_spc[1];
+                                       zz = z*_spc[2];
                                        _pts->SetPoint(i,xx,yy,zz );
 
                            //EED 27 Juin 2012
@@ -157,7 +156,6 @@ void manualViewContour::RefreshContour() // virtual
                                        if (yy < _minY) { _minY = yy; }
                                        if (xx > _maxX) { _maxX = xx; }
                                        if (yy > _maxY) { _maxY = yy; }
-                               
                                }// for
                        }else{
                                        _pts->SetPoint(0, 0 , 0 , 0);
@@ -172,7 +170,10 @@ void manualViewContour::RefreshContour() // virtual
        _maxY=_maxY+1.0;
 
 //EED 2017-03-02
-       _pts->Modified();
+       if (_pts!=NULL) 
+       {
+               _pts->Modified();
+       }
 }
 
 // ----------------------------------------------------------------------------
index bba59fa26145fa87848e6806ff60865cf47e9c4c..f908f68e0d1adc0d60354ea5be9974068413a6b3 100644 (file)
@@ -43,7 +43,7 @@ manualViewPoints::~manualViewPoints()
 
  
 // ----------------------------------------------------------------------------
-manualViewPoints * manualViewPoints :: Clone()
+manualViewPoints * manualViewPoints::Clone()
 {
        manualViewPoints * clone = new manualViewPoints();
        CopyAttributesTo(clone);
index 1eb8d06da4f695dde1c27af09d2a5e4fa4f03a10..a55eb558fb54d43dacfec0cfa2111eafb23f5a9c 100644 (file)
@@ -66,7 +66,8 @@ void manualViewRoi::RefreshContour() // virtual
                if (np>=2)
                {
                        manualPoint     *mp;
-                       for( i = 0; i < np+1; i++ ) {
+                       for( i = 0; i < np+1; i++ ) 
+                       {
                                ii=i%np;
                                mp = _manContModel->GetManualPoint(ii);
 
@@ -85,10 +86,11 @@ void manualViewRoi::RefreshContour() // virtual
                                _pts->SetPoint(1, 0 , 0 , 0);
                } // if
        }
-
 //EED 2017-03-02
-       _pts->Modified();
-
+       if (_pts!=NULL) 
+       {
+               _pts->Modified();
+       }
 }
 
 // ----------------------------------------------------------------------------
index 489d46740378b397f99be174e0b14a589daaa084..8f62478e089105f4a839b4358359454d25d8b302 100644 (file)
@@ -68,15 +68,16 @@ END_EVENT_TABLE()
 //CONSTRUCTOR
 //----------------------------------------------------------------------------
 
+//wxDefaultSize
 mBarRange::mBarRange(wxWindow *parent, int w, int h)
-:wxScrolledWindow(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL)
+:wxScrolledWindow(parent,-1,wxDefaultPosition, wxSize(60,60) ,wxTAB_TRAVERSAL)
 {
-       acceptedClick           = true;
-       _bitmap_bar                     = NULL;
+       acceptedClick           =       true;
+       _bitmap_bar                     =       NULL;
        SetWidth (w);
        SetHeight(h);
-       _initialPoint           = 0;
-       trianglesHalfWidth      = 5;
+       _initialPoint           =       0;
+       trianglesHalfWidth      =       5;
        // Setting the default parts colors
        start_Colour            =       wxColour(1,0,255,254);
        actual_Colour           =       wxColour(255,255,202);