From 307866a8f06b14018ea832926bdf3d887bfffea8 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Tue, 30 May 2017 14:52:06 +0200 Subject: [PATCH] #3093 creaMaracasVisu Feature New Normal - Contour Information in pixels and image units (spc) --- .../bbcreaMaracasVisuContourControlPoints.cxx | 2 +- ...aMaracasVisuwxManualTree_MPRWidget_Box.cxx | 2 +- bbtk/src/bbmaracasvisuViewerMPR.cxx | 14 ++++--- .../wxWindows/Contour/AutoControlPoints.cxx | 11 ++++- .../widgets/manualContour/manualBaseModel.cpp | 4 +- .../widgets/manualContour/manualBaseModel.h | 4 +- .../manualContour/manualContourModel.cpp | 34 +++++++++++----- .../manualContour/manualContourModel.h | 4 +- .../manualContour/manualViewBaseContour.cpp | 4 +- .../manualContour/manualViewContour.cpp | 40 +++++++++---------- .../widgets/manualContour/manualViewContour.h | 9 +---- .../widgets/manualContour/manualViewPoint.h | 14 +++---- .../manualContour/manualViewPoints.cpp | 9 +++-- .../wxWindows/widgets/wxMPRWidget.cxx | 10 +---- .../interface/wxWindows/widgets/wxMPRWidget.h | 5 +-- .../wxWindows/widgets/wxMPRWidget2.cxx | 4 +- .../wxWindows/widgets/wxMPRWidget2.h | 2 +- .../widgets/wxManualTree_MPRWidget.cxx | 10 +---- .../widgets/wxManualTree_MPRWidget.h | 3 +- .../widgets/wxMaracas_ViewerWidget.cxx | 1 - .../wxWindows/widgets/wxWidgetMesure2D.cxx | 5 --- .../wxWindows/widgets/wxWidgetMesure2D.h | 2 - .../widgets/wxWidgetMesure2D_Plane.h | 6 +-- .../src/interface/wxWindows/wxMaracasMPR.cxx | 9 +++-- .../src/interface/wxWindows/wxMaracasMPR.h | 2 +- .../wxWindows/wxMaracas_ManualTree_MPR.cxx | 4 +- .../wxWindows/wxMaracas_ManualTree_MPR.h | 2 +- 27 files changed, 108 insertions(+), 108 deletions(-) diff --git a/bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx b/bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx index c79906a..2433525 100644 --- a/bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx +++ b/bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx @@ -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) diff --git a/bbtk/src/bbcreaMaracasVisuwxManualTree_MPRWidget_Box.cxx b/bbtk/src/bbcreaMaracasVisuwxManualTree_MPRWidget_Box.cxx index fa4819d..b1cddd7 100644 --- a/bbtk/src/bbcreaMaracasVisuwxManualTree_MPRWidget_Box.cxx +++ b/bbtk/src/bbcreaMaracasVisuwxManualTree_MPRWidget_Box.cxx @@ -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 ); diff --git a/bbtk/src/bbmaracasvisuViewerMPR.cxx b/bbtk/src/bbmaracasvisuViewerMPR.cxx index 14b816e..edff206 100644 --- a/bbtk/src/bbmaracasvisuViewerMPR.cxx +++ b/bbtk/src/bbmaracasvisuViewerMPR.cxx @@ -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() { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx index e840799..95e0f68 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx @@ -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; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp index 06d7f33..5399daf 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp @@ -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::ExploseModel( ) } // --------------------------------------------------------------------------- -double manualBaseModel::GetPathArea() +double manualBaseModel::GetPathArea( double *spc ) { return 0.0; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h index 7a227bc..a82afc9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h @@ -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 // virtual std::vector ExploseModel( ); - virtual double GetPathArea(); + virtual double GetPathArea(double *spc); virtual void GetNearestPointAndNormal(double *p, double *rp, double *rn); virtual void SetCloseContour(bool closeContour); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp index b57c3b3..e5ab192 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp @@ -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; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h index ca053fd..d021a32 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h @@ -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); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp index 0bbdadc..198b7b1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp @@ -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); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp index f2aac54..bddf6aa 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp @@ -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; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h index bace49d..64caa62 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h @@ -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 > _initialMovingPoints; manualContourModel * _initialConoturModel; virtual void RefreshText(); - protected: double _minX; double _minY; double _minZ; double _maxX; double _maxY; - double _maxZ; - + double _maxZ; }; #endif // manualViewContour_h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.h index cb9f5b1..e0a8f82 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp index 8801ada..bba59fa 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp @@ -34,7 +34,8 @@ manualViewPoints::manualViewPoints() manualViewPoints::~manualViewPoints() { int i,size=_copyViewPoints.size(); - for (i=0;iGetIdPoint(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(copynpSetMarImageData(_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();} diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h index 88cf9a5..11b204e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h @@ -100,7 +100,7 @@ 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]; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx index 6757a18..7e698c3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx @@ -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) { } //---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h index cbb2068..fb8a4d9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx index d05a590..73e238e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx @@ -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); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h index 8d33679..6222038 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h @@ -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; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 8b0bcaa..8f47f97 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -317,7 +317,6 @@ 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(); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx index 195dc0a..d7ca22b 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx @@ -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; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h index eac924d..9bacb23 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h @@ -45,8 +45,6 @@ public: void OnCloseContour(wxCommandEvent& event); void OnVisibleInformation(wxCommandEvent& event); - void SetMesureScale(double mesureScale); - manualContourModel* GetManualContourModel(); virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h index 02dc429..a33254f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h @@ -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; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx index a5cc4e6..b6b82ac 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx @@ -44,12 +44,12 @@ 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) ; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h index 06cbd8f..f84c15d 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h @@ -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(); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx index f7e9181..1397ace 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx @@ -47,12 +47,12 @@ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -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 ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h index 4923594..aae9d0a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h @@ -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(); -- 2.45.0