]> Creatis software - creaMaracasVisu.git/commitdiff
#3093 creaMaracasVisu Feature New Normal - Contour Information in pixels and image...
authorEduardo DAVILA <davila@localhost.localdomain>
Tue, 30 May 2017 12:52:06 +0000 (14:52 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Tue, 30 May 2017 12:52:06 +0000 (14:52 +0200)
27 files changed:
bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx
bbtk/src/bbcreaMaracasVisuwxManualTree_MPRWidget_Box.cxx
bbtk/src/bbmaracasvisuViewerMPR.cxx
lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp
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/manualViewPoint.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h
lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx
lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h
lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx
lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h

index c79906a1e3ebd1b477ab2e94b7e1eb2eb5312730..243352547a8716f305df14df2c40229d356471f4 100644 (file)
@@ -5,7 +5,6 @@
 #include "bbcreaMaracasVisuPackage.h"
 
 
-
 namespace bbcreaMaracasVisu
 {
 
@@ -33,6 +32,7 @@ void ContourControlPoints::Process()
   
        // Contorno 1
 
+
        if ( bbGetInputwxVtkBaseView() != NULL )
        {
                if (_manContourControl_1==NULL)
index fa4819d29419fdf92ca4b75287e113979ba0b3cd..b1cddd794edba93849519e3657ede95e44e8f51b 100644 (file)
@@ -45,7 +45,7 @@ void wxManualTree_MPRWidget_Box::CreateWidget(wxWindow* parent)
 
 //     marImageData                    *marimagedata           = new marImageData( bbGetInputIn() );
        marImageData                    *marimagedata           = new marImageData( reader->GetOutput() );
-       wxManualTree_MPRWidget  *window                         = new wxManualTree_MPRWidget( parent,marimagedata ,1);
+       wxManualTree_MPRWidget  *window                         = new wxManualTree_MPRWidget( parent,marimagedata );
        window->ConfigureVTK();
 
        bbSetOutputWidget( window );
index 14b816ec867ca29b400bc91085214f093e8fd5a2..edff2060542bd15bab07cca1f977392401806c2d 100644 (file)
@@ -51,7 +51,7 @@ END_EVENT_TABLE( );
                mbbViewerMPR    = box;
 
                
-               wxwidget = new wxMPRWidget2( panel, marimagedata , 1 ); 
+               wxwidget = new wxMPRWidget2( panel, marimagedata );     
 
                if(marimagedata != NULL){
                        wxwidget->ConfigureVTK();
@@ -64,12 +64,16 @@ END_EVENT_TABLE( );
                panel   -> Layout();            
   }
 
-  void wxWidgetMPR::setImageData(vtkImageData* img){
-         wxwidget->setImageData(img, 1);
+  void wxWidgetMPR::setImageData(vtkImageData* img)
+  {
+         wxwidget->setImageData(img);
   }
-  void wxWidgetMPR::ConfigureVTK(){
+
+  void wxWidgetMPR::ConfigureVTK()
+  {
                wxwidget->ConfigureVTK();
-       }
+  }
+
 //--------------------------------------------------------------------------
   wxWidgetMPR::~wxWidgetMPR()
   {
index e84079974529508e41bf338882ff63c65da9ada5..95e0f68985b045a44bbcf21e503108fe6f493974 100644 (file)
@@ -259,7 +259,16 @@ void AutoControlPoints::CirclePoints(double cx, double cy, double r, double grad
                        _chargecontrolpointsY.push_back(y);
                        _chargecontrolpointsZ.push_back(z);
                }
-               _pathsize = _mContourModel->GetPathSize();
+
+// EED 2017-05-30
+//             _pathsize = _mContourModel->GetPathSize(  );
+               double spc[3];
+               spc[0]=1;
+               spc[1]=1;
+               spc[2]=1;
+               _pathsize = _mContourModel->GetPathSize( spc );
+
+
 //printf("\nPATH SIZE = %f",_pathsize);
 
                 std::ofstream file1;
index 06d7f330374a88f974fd0cad4e22e5c5a591e04f..5399daf62a3d71fa7f6c3baba06492e6ff3e6896 100644 (file)
@@ -293,7 +293,7 @@ void manualBaseModel::SetNumberOfPointsSpline(int size)
        _sizePointsContour = size;
 }
 // ---------------------------------------------------------------------------
-double manualBaseModel::GetPathSize()
+double manualBaseModel::GetPathSize(double *spc)
 {
        return 0.0;
 }
@@ -352,7 +352,7 @@ std::vector<manualBaseModel*> manualBaseModel::ExploseModel(  )
 }
 
 // ---------------------------------------------------------------------------
-double manualBaseModel::GetPathArea()
+double manualBaseModel::GetPathArea( double *spc )
 {
        return 0.0;
 }
index 7a227bc06026318818000fbbd2f53f88ecbe46c0..a82afc9645190281efa07aa7ba7150cf07e54891 100644 (file)
@@ -84,7 +84,7 @@ public:
        virtual int                             GetIdPoint(double x, double y, double z, int i_range,int type);
        virtual manualPoint*    GetManualPoint(int id);
        virtual int                             GetSizeLstPoints();
-       virtual double                  GetPathSize();
+       virtual double                  GetPathSize(double *spc);
        virtual void                    Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By);
        virtual void                    GetSpline_i_Point(int i, double *x, double *y, double *z);
        virtual void                    GetSpline_t_Point(double t, double *x, double *y, double *z);
@@ -101,7 +101,7 @@ public:
        // @return std::vector<manualBaseModel*>
        //
        virtual std::vector<manualBaseModel*> ExploseModel(  );
-       virtual double                  GetPathArea();
+       virtual double                  GetPathArea(double *spc);
        virtual void                    GetNearestPointAndNormal(double *p, double *rp,  double *rn);
 
        virtual void                    SetCloseContour(bool closeContour);
index b57c3b333b7dda64ba8ef595e35d8afd19aaf7ce..e5ab192a368b3d2889b255b2abbf733c2b8388de 100644 (file)
@@ -414,7 +414,7 @@ void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, doubl
        }
 }*/
 // ----------------------------------------------------------------------------
-double manualContourModel::GetPathSize()
+double manualContourModel::GetPathSize(double *spc)
 {
        double result = 0;
        double x1,y1,z1;
@@ -428,12 +428,12 @@ double manualContourModel::GetPathSize()
 
        if (_lstPoints.size()==2)
        {
-               x1=_lstPoints[0]->GetX();
-               y1=_lstPoints[0]->GetY();
-               z1=_lstPoints[0]->GetZ();
-               x2=_lstPoints[1]->GetX();
-               y2=_lstPoints[1]->GetY();
-               z2=_lstPoints[1]->GetZ();
+               x1 = spc[0] * _lstPoints[0]->GetX();
+               y1 = spc[1] * _lstPoints[0]->GetY();
+               z1 = spc[2] * _lstPoints[0]->GetZ();
+               x2 = spc[0] * _lstPoints[1]->GetX();
+               y2 = spc[1] * _lstPoints[1]->GetY();
+               z2 = spc[2] * _lstPoints[1]->GetZ();
                result = sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1) );
        }
        if (_lstPoints.size()>2)
@@ -447,12 +447,18 @@ double manualContourModel::GetPathSize()
                //GetSplinePoint(0,x1,y1,z1);
                GetSpline_i_Point(0,&x1,&y1,&z1);
 
+               x1 = spc[0] * x1; 
+               y1 = spc[1] * y1; 
+               z1 = spc[2] * z1; 
                //for( i = 1; i < nps; i++ )
                for( i = 1; i < GetNumberOfPointsSpline(); i++ )
                {
                        //t = delta * (double)i;
                        //GetSplinePoint(t,x2,y2,z2);
                        GetSpline_i_Point(i,&x2,&y2,&z2);
+                       x2 = spc[0] * x2; 
+                       y2 = spc[1] * y2; 
+                       z2 = spc[2] * z2; 
 //---------------------------------------------------------
                        result=result + sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1) );
                        x1=x2;
@@ -463,8 +469,10 @@ double manualContourModel::GetPathSize()
 
        return result;
 }
+
+
 // ----------------------------------------------------------------------------
-double manualContourModel::GetPathArea()
+double manualContourModel::GetPathArea(double *spc)
 {
        double result = 555;
        if ((_lstPoints.size()>=3) && IfCloseContour()==true )
@@ -499,6 +507,12 @@ double manualContourModel::GetPathArea()
                        GetSpline_i_Point(i,&x1,&y1,&z1);
                        GetSpline_i_Point(j,&x2,&y2,&z2);
 //----------------------------------------------------------------
+                       x1=spc[0]*x1;
+                       y1=spc[1]*y1;
+                       z1=spc[2]*z1;
+                       x2=spc[0]*x2;
+                       y2=spc[1]*y2;
+                       z2=spc[2]*z2;
                        area +=
                                        (x1 * y2 ) -
                                        ( x2 * y1 );
@@ -608,9 +622,7 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                        rn[1]=rp[1]-y1;
                        rn[2]=rp[2]-z1;
                }
-       }
-       else
-       {
+       } else {
                rp[0] = 0;
                rp[1] = 0;
                rp[2] = 0;
index ca053fdbce90c6ff38b98824c8f8599fb3ac82ad..d021a3212746f5d6b3f421181864d78d73a04847 100644 (file)
@@ -103,8 +103,8 @@ public:
        //void                  GetSplinePoint(double t, double &x, double &y, double &z);      //Method Original
        //void                  GetSplineiPoint(int i, double &x, double &y, double &z);        //Method Original
 //-------------------------------------------------------------------------------
-       virtual double                  GetPathSize();
-       virtual double                  GetPathArea();
+       virtual double                  GetPathSize(double *spc);
+       virtual double                  GetPathArea(double *spc);
 
        void                                    GetNearestPointAndNormal(double *p, double *rp,  double *rn);
        
index 0bbdadc97890262b2010c1e950a3f702b39751b1..198b7b1a5e55678bcff87ec2eeac3b5cbce448b6 100644 (file)
@@ -354,7 +354,7 @@ void manualViewBaseContour::InitTextActor()
        vtkTextProperty *tprop = _textActor->GetTextProperty();
        tprop->SetFontSize(14);
        tprop->SetFontFamilyToArial();
-       tprop->SetColor(0, 0, 1);
+       tprop->SetColor(1, 1, 0);
 
 
        //      Text 2
@@ -370,7 +370,7 @@ void manualViewBaseContour::InitTextActor()
        vtkTextProperty *tprop2 = _textActor2->GetTextProperty();
        tprop2->SetFontSize(14);
        tprop2->SetFontFamilyToArial();
-       tprop2->SetColor(0, 0, 1);
+       tprop2->SetColor(1, 1, 0);
 
 }
 
index f2aac544f42d586b04c478843ea5d26d47b744b6..bddf6aa143923215b8b1ac9036a5dd94384b355c 100644 (file)
@@ -32,7 +32,6 @@
 manualViewContour::manualViewContour()
 {
        _id_viewPoint_for_text  = 0;
-       _mesureScale                    = 1;
        _initialConoturModel    = new manualContourModel();
        
        _minX                                   = 99999;
@@ -62,8 +61,6 @@ void manualViewContour::CopyAttributesTo( manualViewContour * cloneObject)
 {
        // Call to Fathers object
        manualViewBaseContour::CopyAttributesTo(cloneObject);
-
-       cloneObject->SetMesureScale(_mesureScale);
 }
 
 // ---------------------------------------------------------------------------
@@ -181,6 +178,7 @@ void manualViewContour::RefreshContour() // virtual
 // ----------------------------------------------------------------------------
 void manualViewContour::RefreshText()  // virtual
 {
+
        if ((_textActor!=NULL) && ( _textActor->GetProperty()->GetOpacity()!=0 )){
                int size = GetNumberOfPoints();
                char text[50];
@@ -188,16 +186,20 @@ void manualViewContour::RefreshText()  // virtual
                strcpy(resultText, "000");
                char resultText2[250];
                strcpy(resultText2, "000");
+               double spcP[3];
+               spcP[0]=1;
+               spcP[1]=1;
+               spcP[2]=1;
 
 //CMRU 19-08-09 ----------------------------------
                std::string label;
                label = _manContModel->GetLabel();
 // ------------------------------------
-
+       
                if (size==2)
                {
                        strcpy(resultText,"L= ");
-                       gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
+                       gcvt ( this->_manContModel->GetPathSize( spcP ), 5, text );
                        strcat(resultText,text);
                        strcat(resultText,"p");
 
@@ -206,7 +208,7 @@ void manualViewContour::RefreshText()  // virtual
                        strcat(resultText,label.c_str());
 
                        strcpy(resultText2,"L= ");
-                       gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
+                       gcvt ( this->_manContModel->GetPathSize( _spc ), 5, text );
                        strcat(resultText2,text);
                        strcat(resultText2,"u");
 
@@ -217,34 +219,34 @@ void manualViewContour::RefreshText()  // virtual
                        if (_manContModel->IfCloseContour()==true)
                        {
                                strcpy(resultText,"P= ");
-                               gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
+                               gcvt ( this->_manContModel->GetPathSize( spcP ), 5, text );
                                strcat(resultText,text);
                                strcat(resultText,"p");
 
-                               gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea(), 5, text );
+                               gcvt ( this->_manContModel->GetPathArea( spcP ), 5, text );
                                strcat(resultText,"   A= ");
                                strcat(resultText,text);
                                strcat(resultText,"p^2 ");
 
 
                                strcpy(resultText2,"P= ");
-                               gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
+                               gcvt ( this->_manContModel->GetPathSize( _spc ), 5, text );
                                strcat(resultText2,text);
                                strcat(resultText2,"u");
 
-                               gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea(), 5, text );
+                               gcvt ( this->_manContModel->GetPathArea( _spc ), 5, text );
                                strcat(resultText2,"   A= ");
                                strcat(resultText2,text);
                                strcat(resultText2,"u^2 ");
 
                        } else {
                                strcpy(resultText,"L= ");
-                               gcvt (  _mesureScale * this->_manContModel->GetPathSize(), 5, text );
+                               gcvt ( this->_manContModel->GetPathSize( spcP ), 5, text );
                                strcat(resultText,text);
                                strcat(resultText,"p");
 
                                strcpy(resultText2,"L= ");
-                               gcvt (  _mesureScale * this->_manContModel->GetPathSize(), 5, text );
+                               gcvt ( this->_manContModel->GetPathSize( _spc ), 5, text );
                                strcat(resultText2,text);
                                strcat(resultText2,"u");
 
@@ -388,11 +390,6 @@ void manualViewContour::ClearPoint(int id)
        manualViewBaseContour::DeletePoint( id );
 }
 
-//-------------------------------------------------------------------
-void manualViewContour::SetMesureScale(double mesureScale)
-{
-       _mesureScale = mesureScale;
-}
 //-------------------------------------------------------------------
 void manualViewContour::InitMove(int x, int y, int z)
 {
@@ -411,14 +408,15 @@ void manualViewContour::InitMove(int x, int y, int z)
                this->_initialConoturModel->AddPoint( mp->GetX() - XX, mp->GetY() - YY, mp->GetZ() );
        }
 }
+
 //-------------------------------------------------------------------
 void manualViewContour::MoveContour(int x, int y, int z)
 {
        manualPoint *mpOrigin = NULL;
        manualPoint *mpMoving = NULL;
-       double XX=x;
-       double YY=y;
-       double ZZ=z;
+       double XX = x;
+       double YY = y;
+       double ZZ = z;
 
        TransfromCoordViewWorld(XX,YY,ZZ);
 
@@ -431,6 +429,8 @@ void manualViewContour::MoveContour(int x, int y, int z)
        }
        UpdateViewPoints();
 }
+
+//-------------------------------------------------------------------
 void manualViewContour::MoveContour(int horizontalUnits, int verticalUnits )
 {
        manualPoint *mpOrigin = NULL;
index bace49d05a826064e3f12165a0ade0b63c82471e..64caa62eb7505ab2a4d061463d27c26a87dff0bd 100644 (file)
@@ -40,12 +40,9 @@ public:
        virtual ~manualViewContour();
        virtual manualViewContour * Clone();
        void CopyAttributesTo( manualViewContour *cloneObject );
-
        virtual int GetType();
        virtual void Save(FILE *pFile);
        virtual void Open(FILE *pFile);
-
-
        virtual void RefreshContour();
        virtual bool ifTouchContour(int x,int y, int z);
        virtual void InitMove(int x, int y, int z);
@@ -53,21 +50,17 @@ public:
        virtual void MoveContour(int horizontalUnits, int verticalUnits );
        virtual void DeletePoint(int id); 
        virtual void ClearPoint(int id);
-                       void SetMesureScale(double mesureScale);
 private:
-       double  _mesureScale;
        std::vector< std::vector<double> > _initialMovingPoints;
        manualContourModel * _initialConoturModel;
        virtual void    RefreshText();
-
 protected:
        double _minX;
        double _minY;
        double _minZ;
        double _maxX;
        double _maxY;
-       double _maxZ;
-       
+       double _maxZ;   
 };
 
 #endif // manualViewContour_h
index cb9f5b1b24893c530ceeb994f036fa0aae86209a..e0a8f8209324c8617455d8a53e7630aeffa8835f 100644 (file)
@@ -137,17 +137,17 @@ protected:
        //
        // Point spacing (def=1)
        //
-       double          _spc[3];
+       double                          _spc[3];
 
        // Point normal color
-       double          _colorNormal_r;
-       double          _colorNormal_g;
-       double          _colorNormal_b;
+       double                          _colorNormal_r;
+       double                          _colorNormal_g;
+       double                          _colorNormal_b;
 
        // Posible selected point color
-       double          _colorPosibleSelected_r;
-       double          _colorPosibleSelected_g;
-       double          _colorPosibleSelected_b;
+       double                          _colorPosibleSelected_r;
+       double                          _colorPosibleSelected_g;
+       double                          _colorPosibleSelected_b;
 };
 
 #endif // manualViewPoint_h
index 8801adad45937f506e169f3cbfd45ae93a7aa984..bba59fa26145fa87848e6806ff60865cf47e9c4c 100644 (file)
@@ -34,7 +34,8 @@ manualViewPoints::manualViewPoints()
 manualViewPoints::~manualViewPoints()
 {
        int i,size=_copyViewPoints.size();
-       for (i=0;i<size; i++){
+       for (i=0;i<size; i++)
+       {
                delete _copyViewPoints[i];
        }
        _copyViewPoints.clear();
@@ -79,7 +80,8 @@ bool manualViewPoints::ifTouchContour(int x,int y,int z) //VIRTUAL
 
        int id = _manContModel->GetIdPoint(xx,yy,zz,_range,2);
 
-       if(id!=-1){
+       if(id!=-1)
+       {
                result = true;
        }
        
@@ -100,7 +102,8 @@ void manualViewPoints::RefreshContour()  // VIRTUAL
        int np = GetNumberOfPoints();
        int copynp= _copyViewPoints.size();
 
-       while(copynp!=np){
+       while(copynp!=np)
+       {
 
                if(copynp<np)
                {
index 218e4240f18ea96af58c714ae036269456e88e3a..99fad9d0c4426b44050d5452c4c7294b7389dd8c 100644 (file)
@@ -118,7 +118,7 @@ END_EVENT_TABLE( );
 
 
 wxMPRWidget::wxMPRWidget( wxWindow* parent,
-                          marImageData *marimageData , double voxelSize)
+                          marImageData *marimageData )
 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
 {
 
@@ -159,7 +159,6 @@ wxMPRWidget::wxMPRWidget( wxWindow* parent,
 
        if(marimageData!=NULL){
                _marImageData                                   = marimageData;
-               _voxelSize                                              = voxelSize;
                _vtkmprbasedata                                 = new vtkMPRBaseData(); 
                _vtkmprbasedata->SetMarImageData(_marImageData);
                
@@ -193,7 +192,7 @@ wxMPRWidget::wxMPRWidget( wxWindow* parent,
 }
 
 //----------------------------------------------------------------------------
-void wxMPRWidget::setImageData(vtkImageData * img, double voxelsize)
+void wxMPRWidget::setImageData(vtkImageData * img)
 {
 
        if(_marImageData!=NULL){
@@ -203,8 +202,6 @@ void wxMPRWidget::setImageData(vtkImageData * img, double voxelsize)
                _marImageData                                   = new marImageData(img);
        }
        
-       _voxelSize                                                      = voxelsize;
-
        if(_vtkmprbasedata==NULL){
                _vtkmprbasedata                                 = new vtkMPRBaseData(); 
                _vtkmprbasedata->SetMarImageData(_marImageData);        
@@ -682,7 +679,6 @@ void wxMPRWidget::ConfigureVTK(){
        if (_vtkplane2Dview!=NULL){_vtkplane2Dview                              ->      Configure();}
        if (_widgetMesure!=NULL){_widgetMesure                                  ->      ConfigureA(_vtkplane2Dview);}
        if (_widgetMesure!=NULL){_widgetMesure                                  ->      SetActiveLink(true);}
-       if (_widgetMesure!=NULL){_widgetMesure                                  ->      SetMesureScale( _voxelSize );}
        if (_wxsphereview!=NULL){_wxsphereview                                  ->      Configure();}
 
        if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D        ->  Configure();}
@@ -702,8 +698,6 @@ void wxMPRWidget::ConfigureVTK(){
 //     imageData->GetSpacing(spc);
 //     _widgetMesure_B->SetMesureScale(spc[0]);
 
-       if (_widgetMesure_B!=NULL)                                      {_widgetMesure_B->SetMesureScale( _voxelSize );}
-
 
        if (_wxsphereview_B!=NULL)                                      {_wxsphereview_B                                ->      Configure();}
 
index 88cf9a52eaeb4b238847dfd0a76feb811e161ee5..11b204eee392e59fb445f7fad29cc3e7c542ffcd 100644 (file)
 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
 {
 public:
-    wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL,double voxelSize = -1);
+    wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL);
        ~wxMPRWidget( );
        void ConfigureVTK();
 
@@ -123,10 +123,9 @@ public:
        //returns the 2d view of the specific direction (0|1|2)
        wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction);
 
-       void setImageData(vtkImageData * img, double voxelsize);
+       void setImageData(vtkImageData * img);
 
 private:
-       double                                  _voxelSize;
        marImageData                    *_marImageData; 
        vtkMPRBaseData                  *_vtkmprbasedata; 
        wxVtkMPR2DView                  *_vtkmpr2Dview[3]; 
index 6757a1882da05e00759ccae60ead7db8bf390fd3..7e698c3abdbedcf552db2cec7162c28d28ba4946 100644 (file)
@@ -30,8 +30,8 @@
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
-wxMPRWidget2::wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize)
-: wxMPRWidget(parent,marimagedata,voxelSize)
+wxMPRWidget2::wxMPRWidget2(wxWindow* parent,marImageData *marimagedata)
+: wxMPRWidget(parent,marimagedata)
 {
 }
 //----------------------------------------------------------------------------
index cbb20686123fe28aecc4744b5d25666caa04009c..fb8a4d980067ed9a0dc9202421671b4c2be1a920 100644 (file)
@@ -31,7 +31,7 @@
 class creaMaracasVisu_EXPORT wxMPRWidget2 : public wxMPRWidget
 {
 public:
-       wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize);
+       wxMPRWidget2(wxWindow* parent,marImageData *marimagedata);
        ~wxMPRWidget2();
        virtual void OnRefreshView(wxCommandEvent & event);
 private:
index d05a590073fdefc32daadc18ccb82e3d85faae2f..73e238e94eda97041ba2e32741dd5c954f8ece46 100644 (file)
@@ -62,11 +62,10 @@ END_EVENT_TABLE( );
 
 
 wxManualTree_MPRWidget::wxManualTree_MPRWidget( wxWindow* parent,
-                          marImageData *marimageData ,double voxelSize )
+                          marImageData *marimageData )
 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
 {
 
-       _voxelSize                                                      = voxelSize;
        _marimageData                                           = marimageData;
 
        _wxvtk3Dbaseview_Clipping3D_C           = NULL;
@@ -76,7 +75,7 @@ wxManualTree_MPRWidget::wxManualTree_MPRWidget( wxWindow* parent,
     wxSplitterWindow   *pnlSplitter    = new wxSplitterWindow( this , -1);
        
        int ww,hh;
-       _MPRWidget2                                     = new wxMPRWidget2(pnlSplitter,_marimageData,voxelSize);
+       _MPRWidget2                                     = new wxMPRWidget2(pnlSplitter,_marimageData);
        wxPanel *       contour3DView   = Create3DViewContour( pnlSplitter , _MPRWidget2->GetVtkMPRBaseData());
        this->GetSize(&ww,&hh);
 
@@ -177,7 +176,6 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _mViewContour_2->SetModel( _mContourModel_2 );
        _mViewContour_2->SetWxVtkBaseView( wxvtkbaseview );
        _mViewContour_2->SetRange( 1 );
-       _mViewContour_2->SetMesureScale( _voxelSize     );
 
 //EED 3 oct 2006
        _mViewContour_2->SetSpacing(spc);
@@ -191,7 +189,6 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _mViewContour_0->SetModel( _mContourModel_2 );
        _mViewContour_0->SetWxVtkBaseView( wxvtkbaseview );
        _mViewContour_0->SetRange( 1 );
-       _mViewContour_0->SetMesureScale( _voxelSize     );
 
 //EED 3 oct 2006
        _mViewContour_0->SetSpacing(spc);
@@ -205,7 +202,6 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _mViewContour_1->SetModel( _mContourModel_2 );
        _mViewContour_1->SetWxVtkBaseView( wxvtkbaseview );
        _mViewContour_1->SetRange( 1 );
-       _mViewContour_1->SetMesureScale( _voxelSize     );
 
 //EED 3 oct 2006
        _mViewContour_1->SetSpacing(spc);
@@ -220,7 +216,6 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _mViewContour_p         ->      SetModel( _mContourModel_2 );
        _mViewContour_p         ->      SetWxVtkBaseView( wxvtkbaseview );
        _mViewContour_p         ->      SetRange( 1 );
-       _mViewContour_p->SetMesureScale( _voxelSize     );
 
 //EED 3 oct 2006
        _mViewContour_p->SetSpacing(spc);
@@ -238,7 +233,6 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _mViewContour_3D->SetModel( _mContourModel_2 );
        _mViewContour_3D->SetWxVtkBaseView( wxvtkbaseview );
        _mViewContour_3D->SetRange( 1 );
-       _mViewContour_3D->SetMesureScale(_voxelSize     );
 
 //EED 3 oct 2006
        _mViewContour_3D->SetSpacing(spc);
index 8d33679b1a57befb60955098c353d913a0a849d7..62220389a6fe6999051ea2fa3977dcdebd93769b 100644 (file)
@@ -91,7 +91,7 @@
 class wxManualTree_MPRWidget : public wxPanel
 {
 public:
-    wxManualTree_MPRWidget( wxWindow* parent , marImageData *marimageData , double voxelSize );
+    wxManualTree_MPRWidget( wxWindow* parent , marImageData *marimageData  );
        ~wxManualTree_MPRWidget( );
 
        void ConfigureVTK();
@@ -107,7 +107,6 @@ public:
 
 
 private:
-       double                                                          _voxelSize;
        marImageData                                            *_marimageData; 
        wxMPRWidget2                                            *_MPRWidget2;
 
index 8b0bcaa09bebb903a142611d466135fd0ed54f82..8f47f97123b89c99066db0c3e3aab6f7b5b1094d 100644 (file)
                if ( mwidgetMesure       !=NULL ) { mwidgetMesure->ConfigureA(mvtkplane2Dview); }
                if ( mwidgetMesure       !=NULL ) { mwidgetMesure->ConfigureA(mvtkplane2Dview); }
                if ( mwidgetMesure       !=NULL ) { mwidgetMesure->SetActiveLink(true);         }
-               if ( mwidgetMesure       !=NULL ) { mwidgetMesure->SetMesureScale( 1 );         }
                if ( mwxsphereview       !=NULL ) { mwxsphereview->Configure();                 }
 
                
index 195dc0adc77195019564eaa92c4c191f0e851277..d7ca22bbe490b4627a5c44a6106d02a9cb1cf6fe 100644 (file)
@@ -193,11 +193,6 @@ void wxWidgetMesure2D::OnVisibleInformation(wxCommandEvent& event)
        _wxvtk2Dbaseview->RefreshView();
 }
 //-------------------------------------------------------------------
-void wxWidgetMesure2D::SetMesureScale(double mesureScale)
-{
-       _mViewContour_1->SetMesureScale(mesureScale);
-}
-//-------------------------------------------------------------------
 manualContourModel*    wxWidgetMesure2D::GetManualContourModel()
 {
        return _mContourModel_1;
index eac924d5e960d65434d94e59f48a87eacdcf247a..9bacb23ffa90ab6fffb0938818ca68f5f5edb109 100644 (file)
@@ -45,8 +45,6 @@ public:
        void OnCloseContour(wxCommandEvent& event);
        void OnVisibleInformation(wxCommandEvent& event);
 
-       void SetMesureScale(double mesureScale);
-
        manualContourModel*     GetManualContourModel();
        virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
 
index 02dc429bc98571cfcab26ec9a163fd9aca52ef0b..a33254f53701665e17927c7a9ab52af81543a59e 100644 (file)
@@ -41,10 +41,10 @@ public:
        void                    CircleLine();
 
 protected:
-       virtual wxWindow                *CreateWin1a(wxWindow *parent);
+       virtual wxWindow                        *CreateWin1a(wxWindow *parent);
 private:
-       wxCheckBox                              *_cb_line; 
-       wxCheckBox                              *_cb_circle; 
+       wxCheckBox                                      *_cb_line; 
+       wxCheckBox                                      *_cb_circle; 
 
        // Circle 1
        vtkPoints                                       *_ptsCircle1;
index a5cc4e6800a0b67e9d5baa45b8c36e67a74100c4..b6b82acbc7fe6b5c517ec5ced1c3c0cb3774aa45 100644 (file)
 
 
 wxMaracasMPR::wxMaracasMPR( wxWindow* parent,
-                            marImageData* marimagedata , double voxelSize)
+                            marImageData* marimagedata )
 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
 {
        _MPR=NULL;
        wxBoxSizer* szTop = new wxBoxSizer( wxVERTICAL );
-       _MPR = new wxMPRWidget( this, marimagedata , voxelSize);
+       _MPR = new wxMPRWidget( this, marimagedata);
        szTop->Add( _MPR, 1  , wxGROW |  wxALL , 0 );
        this->SetAutoLayout( true );
        this->SetSizer( szTop );
@@ -94,8 +94,9 @@ void wxMaracasMPR::RefreshView()
        _MPR->RefreshView();
 }
 
-void wxMaracasMPR::setImageData(vtkImageData *img, double voxelsize){
-       _MPR->setImageData(img, voxelsize);
+void wxMaracasMPR::setImageData(vtkImageData *img, double voxelsize)
+{
+       _MPR->setImageData( img) ;
 
 }
 
index 06cbd8f1ec823fdb9c7f2e96ac817028df6c47f2..f84c15d4c5dbfed19a4a9bd226a12f4b1c4f1a9c 100644 (file)
@@ -55,7 +55,7 @@
 class  creaMaracasVisu_EXPORT  wxMaracasMPR : public wxPanel
 {
 public:
-    wxMaracasMPR( wxWindow* parent, marImageData* marimagedata=NULL,double voxelSize=-1);
+    wxMaracasMPR( wxWindow* parent, marImageData* marimagedata=NULL);
     ~wxMaracasMPR( );
        void ConfigureVTK();
        vtkMPRBaseData  *GetVtkMPRBaseData();
index f7e9181b070276e51d599b336ac0bd544961734e..1397acef7884bebf8460a6b2dfcd144a7681391a 100644 (file)
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
-wxMaracas_ManualTree_MPR::wxMaracas_ManualTree_MPR( wxWindow* parent, marImageData* marimagedata,double voxelSize )
+wxMaracas_ManualTree_MPR::wxMaracas_ManualTree_MPR( wxWindow* parent, marImageData* marimagedata )
 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
 {
 
   // Create the main frame window
-       _MPR = new wxManualTree_MPRWidget( this, marimagedata , voxelSize);
+       _MPR = new wxManualTree_MPRWidget( this, marimagedata );
        wxBoxSizer* szTop = new wxBoxSizer( wxVERTICAL );
        szTop->Add( _MPR, 1  , wxEXPAND |  wxALL , 0 );
        this->SetAutoLayout( true );
index 49235940a4ec0308447ff9ccdd459115ec007bac..aae9d0a648d4c9731a9f43d3430d50c9b7fca2cd 100644 (file)
@@ -54,7 +54,7 @@
 class wxMaracas_ManualTree_MPR : public wxPanel
 {
 public:
-    wxMaracas_ManualTree_MPR( wxWindow* parent, marImageData* marimagedata,double voxelSize);
+    wxMaracas_ManualTree_MPR( wxWindow* parent, marImageData* marimagedata);
     ~wxMaracas_ManualTree_MPR( );
        void ConfigureVTK();
        vtkMPRBaseData          *GetVtkMPRBaseData();