From: eduardo.davila@creatis.insa-lyon.fr Date: Thu, 9 Jan 2025 07:33:22 +0000 (+0100) Subject: #3571 Clean selection of group of points in ManualContours X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5bab5bd56476c9512f3808d9f00be062926d57d4;p=creaMaracasVisu.git #3571 Clean selection of group of points in ManualContours --- diff --git a/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx b/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx index 8aac66c..00b2f1d 100644 --- a/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx +++ b/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx @@ -57,16 +57,12 @@ void ReadAxisTree3D::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - printf("EED ReadAxisTree3D::Process start \n"); - - std::vector< std::vector * > tlst; - + std::vector< std::vector * > tlst; int i; for( i=0 ; i ); - } - + } int numberOfLines = 0; char tmpValue[50]; std::vector *vecData; @@ -82,8 +78,7 @@ void ReadAxisTree3D::Process() vecData->push_back( tmpValue ); } numberOfLines++; - } - + } std::cout<<"18-04-2012 RaC ReadAxisTree3D::Process Erase last element in vectors."<at(numberOfLines-1)<%s\n", bbGetInputFileName().c_str() ); + printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Points:%s\n", bbGetInputFileName().c_str() ); } //ff1 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx index 311aac2..043c8e4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx @@ -48,41 +48,43 @@ InteractorStyleMaracas * InteractorStyleMaracas::Clone() // virtual } // --------------------------------------------------------------------------- - void InteractorStyleMaracas::CopyAttributesTo( InteractorStyleMaracas * cloneObject) { // Fathers object //::CopyAttributesTo(cloneObject); - cloneObject->SetActive( this->GetActive() ); } - //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnChar() //virtual { return true; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnMouseMove() //virtual { return true; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnLeftButtonDown() //virtual { return true; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnLeftButtonUp() //virtual { return true; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnLeftDClick() //virtual { return true; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnMiddleButtonDown() //virtual { @@ -119,30 +121,33 @@ bool InteractorStyleMaracas::OnMouseWheelForward() //virtual { return true; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::OnMouseWheelBackward() //virtual { return true; } + //--------------------------------------------------------------------------- void InteractorStyleMaracas::SetVtkInteractorStyleBaseView(vtkInteractorStyleBaseView* vtkInteractorStyleBaseView) { _vtkInteractorStyleBaseView = vtkInteractorStyleBaseView; } + //--------------------------------------------------------------------------- void InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView() { _vtkInteractorStyleBaseView = NULL; } + //--------------------------------------------------------------------------- void InteractorStyleMaracas::SetActive(bool active) { _active = active; } + //--------------------------------------------------------------------------- bool InteractorStyleMaracas::GetActive() { return _active; } - - diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp index e4e1d35..237484c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp @@ -190,7 +190,6 @@ bool manualContourBaseControler::OnLeftButtonDown() crea::wxVTKRenderWindowInteractor *wxVTKiren; wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); wxVTKiren->GetEventPosition(X,Y); - MouseClickLeft(X,Y); } return true; @@ -219,7 +218,6 @@ bool manualContourBaseControler::OnLeftDClick() crea::wxVTKRenderWindowInteractor *wxVTKiren; wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); wxVTKiren->GetEventPosition(X,Y); - this->MouseDLeft(X,Y); } return true; @@ -255,7 +253,6 @@ bool manualContourBaseControler::OnRightButtonDown() crea::wxVTKRenderWindowInteractor *wxVTKiren; wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); wxVTKiren->GetEventPosition(X, Y); - MouseClickRight(X,Y); } return true; @@ -327,14 +324,34 @@ void manualContourBaseControler::MouseReleaseLeft(int x, int y) _state = 0; int id, manualPointsSZ; manualPointsSZ = _manContModel->GetSizeLstPoints(); +/* for ( id=0; idGetGroupSelectedPoint( id ) == true ) + if (_manViewBaseCont->GetGroupSelectedPoint( id ) == true ) { _state = 8; id = manualPointsSZ; } } // for +*/ + int acum = 0; + int backId = -1; + for ( id=0; idGetGroupSelectedPoint( id ) == true ) + { + backId=id; + acum++; + } + } // for id + if (acum>1) + { + _state = 8; + } else { + _state = 0; + _manViewBaseCont->SetGroupSelectedPoint( backId, false ); + } + } // if _state !=7 !=8 } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp index 0f61932..97ce37f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.cpp @@ -70,7 +70,6 @@ void manualContourControler::Configure() //virtual // ---------------------------------------------------------------------------- void manualContourControler::MouseClickLeft(int x, int y) { - bool ok = false; int z = GetZ(); int size= GetManualViewBaseContour()->GetNumberOfPoints(); @@ -124,12 +123,11 @@ void manualContourControler::MouseClickLeft(int x, int y) SetState(7); GetManualViewBaseContour()->InitRectangleSelection(x,y,z); } - // If nothing selected _state=8 if (GetState()==8) { _bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); - if (_bakIdPoint==-1 ) + if (_bakIdPoint==-1) { SetState(7); GetManualViewBaseContour()->InitRectangleSelection(x,y,z); @@ -159,15 +157,12 @@ void manualContourControler::MouseClickLeft(int x, int y) // ---------------------------------------------------------------------------- void manualContourControler::MouseMove(int x, int y) // virtual { - int z=GetZ(); + int z = GetZ(); GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); GetManualViewBaseContour()->SelectPosibleContour(x,y,z); if (GetState()==1){ SetPoint( _bakIdPoint , x , y ,z); } if (GetState()==5){ SetPoint( _bakIdPoint , x , y ,z); } - if (GetState()==9){ GetManualViewBaseContour()->SetNewPositionGroupSelectedPoints( x,y,z ); } - - if ( GetState()==6 && !IsEditable() && GetPosibleToMove() &&IsMoving() ) { GetManualViewBaseContour()->MoveContour(x,y,z); @@ -178,15 +173,12 @@ void manualContourControler::MouseMove(int x, int y) // virtual GetManualViewBaseContour()->Refresh(); this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); } /// if State !=7 - if (GetState()==7 ) { GetManualViewBaseContour()->SelectPointsInRectangleRegion(x,y,z); GetManualViewBaseContour()->Refresh(); this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); } /// if State ==7 - - if (!IsEditable()) { GetManualViewBaseContour()->RemoveControlPoints(); @@ -194,7 +186,6 @@ void manualContourControler::MouseMove(int x, int y) // virtual GetManualViewBaseContour()->Refresh(); this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); } // if editable - } // ---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h index cde4cf9..0debf19 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h @@ -32,7 +32,6 @@ // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- - class creaMaracasVisu_EXPORT manualContourControler: public manualContourBaseControler { public: @@ -40,20 +39,15 @@ public: virtual ~manualContourControler(); virtual manualContourControler * Clone(); void CopyAttributesTo( manualContourControler *cloneObject ); - virtual void MouseClickLeft(int x, int y); virtual void MouseMove(int x, int y); virtual void MouseDLeft( int x, int y); void SetEasyCreation(bool easyCreation); bool GetEasyCreation(); - virtual void Configure(); - int _bakIdPoint; - protected: bool _easyCreation; - }; #endif // manualContourControler_h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp index 09c847b..d78cc62 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp @@ -530,7 +530,10 @@ void manualViewBaseContour::SelectPoint(int i, bool select) // ---------------------------------------------------------------------------- void manualViewBaseContour::SetGroupSelectedPoint(int i, bool select) { - _lstViewPoints[i]->SetGroupSelected(select); + if ( (i>=0) && (i<_lstViewPoints.size()) ) + { + _lstViewPoints[i]->SetGroupSelected(select); + } // if } // ---------------------------------------------------------------------------- @@ -1003,10 +1006,8 @@ void manualViewBaseContour::GetMinMax( double &minX,double &minY, double &minZ, { minX = 0; maxX = 0; - minY = 0; maxY = 0; - minZ = 0; maxZ = 0; } @@ -1114,3 +1115,8 @@ void manualViewBaseContour::InitGroupSelectionPointsToBeMove(int id) // virtual void manualViewBaseContour::SetNewPositionGroupSelectedPoints( int x , int y ,int z) // virtual { } + +//------------------------------------------------------------------- +int manualViewBaseContour::GetNumberOfPointsGroupSelectedPoints() +{ +} diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h index 20870f4..529f6da 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h @@ -183,7 +183,8 @@ public: virtual void SelectPointsInRectangleRegion(int x,int y,int z); virtual void InitGroupSelectionPointsToBeMove(int id); virtual void SetNewPositionGroupSelectedPoints( int x , int y ,int z); - + virtual int GetNumberOfPointsGroupSelectedPoints(); + //--------------------------------------------------- // PRIVATE METHODS & ATTS //--------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp index 35f9655..a297b5f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp @@ -28,7 +28,6 @@ // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- - manualViewContour::manualViewContour() { _id_viewPoint_for_text = 0; @@ -44,7 +43,6 @@ manualViewContour::~manualViewContour() { delete _initialConoturModel; } -// ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- manualViewContour * manualViewContour :: Clone() @@ -55,7 +53,6 @@ manualViewContour * manualViewContour :: Clone() } // --------------------------------------------------------------------------- - void manualViewContour::CopyAttributesTo( manualViewContour * cloneObject) { // Call to Fathers object @@ -63,14 +60,12 @@ void manualViewContour::CopyAttributesTo( manualViewContour * cloneObject) } // --------------------------------------------------------------------------- - int manualViewContour::GetType() // virtual { return 1; } // ---------------------------------------------------------------------------- - void manualViewContour::Save(FILE *pFile) { manualViewBaseContour::Save(pFile); @@ -101,10 +96,6 @@ void manualViewContour::RefreshContour() // virtual //double t,delta, x,y,z; double x,y,z; double xx,yy,zz; - - -// printf("EEDmanualViewContour::RefreshContour spc %f %f %f \n", _spc[0],_spc[1],_spc[2]); - //---------------------------------- if ( ShowLineVersion()==true ) { @@ -184,6 +175,10 @@ void manualViewContour::RefreshContour() // virtual { _pts->Modified(); } + + + + } // ---------------------------------------------------------------------------- @@ -339,7 +334,6 @@ bool manualViewContour::ifTouchContour(int x,int y,int z) double projY = ppA[1] + k*dirVec[1]; double projZ = ppA[2] + k*dirVec[2]; - // distance [projX,projY,projZ] and (xx,yy,zz] double d1= sqrt( (projX-xx)*(projX-xx) + (projY-yy)*(projY-yy) +(projZ-zz)*(projZ-zz) ); if (d1<=1) @@ -372,7 +366,6 @@ bool manualViewContour::ifTouchContour(int x,int y,int z) result = true; i = nps; } // if - } // for i } // if GetSizeLstPoints()==2 } // if min max @@ -463,15 +456,15 @@ void manualViewContour::SelectPointsInRectangleRegion(int x,int y,int z) // virt TransfromCoordViewWorld( XX2 , YY2 , ZZ2 ); if (XX2GetSizeLstPoints(); for ( i=0; iGetSizeLstPoints(); + for ( i=0; iGetGroupSelectedPoint(i) ) + { + numberOfPointsSelected++; + } + } // for + return numberOfPointsSelected; +} + //------------------------------------------------------------------- void manualViewContour::InitGroupSelectionPointsToBeMove(int id) { @@ -525,12 +533,12 @@ void manualViewContour::SetNewPositionGroupSelectedPoints( int x , int y , int int i,size = lstPointsGroupSelectedToMoveId.size(); for ( i=0 ; iGetManualPoint(id); + mp = _manContModel->GetManualPoint(id); mp->SetPoint(xx2,yy2,zz2); UpdateViewPoint(id); } // for i diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h index 3f61b55..4713b8f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h @@ -54,6 +54,7 @@ public: virtual void SelectPointsInRectangleRegion(int x,int y,int z); virtual void InitGroupSelectionPointsToBeMove(int id); virtual void SetNewPositionGroupSelectedPoints( int x , int y ,int z); + virtual int GetNumberOfPointsGroupSelectedPoints(); private: std::vector< std::vector > _initialMovingPoints; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx index b40c577..afc35c8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx @@ -138,20 +138,19 @@ void vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas(InteractorStyleMa } } } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::InsertInteractorStyleMaracas(int pos, InteractorStyleMaracas* interactorStyleMaracas) { interactorStyleMaracas->SetVtkInteractorStyleBaseView(this); _lstInteractorStyleMaracas.insert(_lstInteractorStyleMaracas.begin()+pos,interactorStyleMaracas); } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(int type) { InteractorStyleMaracas *intStyMar; - int i,size=_lstInteractorStyleMaracas.size(); - - for (i=0;iGetKeyCode(); CallLstInteractorStyleMaracas(10); } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::TransformCoordinate(double &X, double &Y, double &Z) { if(((wxVtk2DBaseView*)GetWxVtk2DBaseView())->_imageViewer2XYZ){ vtkImageViewer2 *imageViewer = ((wxVtk2DBaseView*)GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2(); - imageViewer->GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z); imageViewer->GetRenderer()->DisplayToWorld(); double fP[4]; imageViewer->GetRenderer()->GetWorldPoint( fP ); - if ( fP[3] ) { fP[0] /= fP[3]; fP[1] /= fP[3]; fP[2] /= fP[3]; } - // EEDx5 ((wxVtk2DBaseView*)GetWxVtk2DBaseView())->TransformCoordinate_spacing_ViewToModel(fP[0],fP[1],fP[2]); - X=fP[0]; Y=fP[1]; Z=fP[2]; } } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::SetwxVtkBaseView(wxVtkBaseView *wxvtkbaseview) { _wxvtkbaseview = wxvtkbaseview; } + //--------------------------------------------------------------------------- /*JCP 13/05/2009 wxVtk2DBaseView* vtkInteractorStyleBaseView::GetWxVtk2DBaseView() @@ -312,11 +308,13 @@ wxVtkBaseView* vtkInteractorStyleBaseView::GetWxVtk2DBaseView() { return _wxvtkbaseview; } + //--------------------------------------------------------------------------- wxVtkBaseView* vtkInteractorStyleBaseView::GetWxVtk3DBaseView() { return _wxvtkbaseview; } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::SetActiveAllInteractors(bool ok) { @@ -327,18 +325,20 @@ void vtkInteractorStyleBaseView::SetActiveAllInteractors(bool ok) intStyMar = _lstInteractorStyleMaracas[i]; intStyMar->SetActive(ok); } - } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::SetRefresh_waiting() { _refresh_waiting=true; } + //--------------------------------------------------------------------------- bool vtkInteractorStyleBaseView::GetRefresh_waiting() { return _refresh_waiting; } + //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::SetParent_refresh_waiting() { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx index 256aec6..419fc9e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx @@ -168,5 +168,3 @@ void vtkInteractorStyleBaseView2D::OnMouseWheelBackward () // virtual this->vtkInteractorStyleImage::OnMouseWheelBackward(); } } - - diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index b467559..7e6c99c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -105,11 +105,11 @@ void wxVtkMPR2DView::Configure() } // Axe A - if(_lineAActor==NULL){ + if(_lineAActor==NULL) + { _lineAActor = vtkActor::New(); _lineAActor->GetProperty()->SetDiffuseColor(1,0,0); _lineAActor->GetProperty()->SetLineWidth(0.5); - _ptsA = vtkPoints::New(); _ptsA->SetNumberOfPoints(2); _ptsA->SetPoint(0, -1000 , -1000 , -1000 ); @@ -426,6 +426,7 @@ int wxVtkMPR2DView::GetActualSlice() // virtual } return result; } + //------------------------------------------------------------------- void wxVtkMPR2DView::SetActualSlice(int slice) // virtual { @@ -442,6 +443,7 @@ void wxVtkMPR2DView::SetActualSlice(int slice) // virtual GetVtkmprbasedata()->SetZ(slice, true); } } + //------------------------------------------------------------------- bool wxVtkMPR2DView::IfMouseTouchX(double x, double y, double z) { @@ -466,6 +468,7 @@ bool wxVtkMPR2DView::IfMouseTouchX(double x, double y, double z) } return result; } + //------------------------------------------------------------------- bool wxVtkMPR2DView::IfMouseTouchY(double x, double y, double z) { @@ -490,6 +493,7 @@ bool wxVtkMPR2DView::IfMouseTouchY(double x, double y, double z) } return result; } + //------------------------------------------------------------------- bool wxVtkMPR2DView::IfMouseTouchZ(double x, double y, double z) { @@ -514,6 +518,7 @@ bool wxVtkMPR2DView::IfMouseTouchZ(double x, double y, double z) } return result; } + //------------------------------------------------------------------- void wxVtkMPR2DView::MoveX(double x, double y, double z) { @@ -529,6 +534,7 @@ void wxVtkMPR2DView::MoveX(double x, double y, double z) GetVtkmprbasedata()->SetX(x,true); } } + //------------------------------------------------------------------- void wxVtkMPR2DView::MoveY(double x, double y, double z) { @@ -544,6 +550,7 @@ void wxVtkMPR2DView::MoveY(double x, double y, double z) GetVtkmprbasedata()->SetY(y,true); } } + //------------------------------------------------------------------- void wxVtkMPR2DView::MoveZ(double x, double y, double z) { @@ -559,6 +566,7 @@ void wxVtkMPR2DView::MoveZ(double x, double y, double z) { } } + //------------------------------------------------------------------- void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z) { @@ -609,32 +617,27 @@ void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z) _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b); } } // if _direction==2 +// EED 2024-12 // Refresh(); } - //EED 5 juin 2009 //void wxVtkMPR2DView::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual void wxVtkMPR2DView::TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection, int type) //virtual //keepNormalDirection=false, type=2 { - wxVtkBaseView::TransFromCoordScreenToWorld(X,Y,Z,keepNormalDirection,_direction); - if ((_direction==0) && (keepNormalDirection==true) ) { X = ((vtkMPRBaseData*)GetVtkBaseData())->GetX(); } - if ((_direction==1) && (keepNormalDirection==true) ) { Y = ((vtkMPRBaseData*)GetVtkBaseData())->GetY(); } - if ((_direction==2) && (keepNormalDirection==true) ) { Z = ((vtkMPRBaseData*)GetVtkBaseData())->GetZ(); } - } //------------------------------------------------------------------- @@ -643,7 +646,6 @@ int wxVtkMPR2DView::GetDirection() // virtual return _direction; } - //------------------------------------------------------------------- //------------------------------------------------------------------- //-------------------------------------------------------------------