]> Creatis software - creaMaracasVisu.git/commitdiff
BUG view MPR
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 10 Jun 2009 11:46:06 +0000 (11:46 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 10 Jun 2009 11:46:06 +0000 (11:46 +0000)
25 files changed:
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContour3VControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3DContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3DContour.h
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/manualViewCircle.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewLine.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h

index 1ad857ade176f582915ade38e8ba9c443f1fc313..0f50090a1a89980095442dab2fabe08a5c31eb63 100644 (file)
@@ -78,7 +78,7 @@ void manualContour3VControler::AddPoint( int x, int y, int z ) // virtual
                double  xx      = x;
                double  yy      = y;
                double  zz      = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz,_type);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz,_type);
 
                if (_type==0)
                {
@@ -132,7 +132,7 @@ void manualContour3VControler::InsertPoint(int x, int y, int z)
                        double                          xx              = x;
                        double                          yy              = y;
                        double                          zz              = z;
-                       GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz,_type);
+                       GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz,_type);
                        if (_type==0)
                        {
                                xx=_vtkmprbasedata->GetX();
@@ -194,7 +194,7 @@ void manualContour3VControler::SetPoint( int id ,int x ,int y ,int z ) // virtua
                double xx = x;
                double yy = y;
                double zz = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz,_type);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz,_type);
 
                if (_type==0)
                {
index 519061ddd9f204766b38d6d4e774367228b40e3c..24c974bf7d91a7027627295cad099b41627d9559 100644 (file)
@@ -422,7 +422,7 @@ void manualContourBaseControler::Magnet(int x, int y)
                        double  xx      = x;
                        double  yy      = y;
                        double  zz      = GetZ();
-                       GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+                       GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                        int                     id      = GetManualContourModel()->GetIdPoint(xx,yy,zz,32000,-1);
                        if (id!=-1)
                        {
@@ -452,7 +452,7 @@ void manualContourBaseControler::AddPoint(int x, int y, int z) // virtual
                double  xx      = x;
                double  yy      = y;
                double  zz      = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                /*int   id              =*/  GetManualContourModel()->AddPoint(xx,yy,zz);  // JPRx
                GetManualViewBaseContour()->AddPoint();
 //             GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -467,7 +467,7 @@ void manualContourBaseControler::InsertPoint(int x,int y,int z)  // virtual
                double                          xx              = x;
                double                          yy              = y;
                double                          zz              = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                if (GetManualContourModel()->GetSizeLstPoints()>1){
                        id = GetManualContourModel()->InsertPoint(xx,yy,zz);
                        GetManualViewBaseContour()->InsertPoint(id);
@@ -487,7 +487,7 @@ void manualContourBaseControler::SetPoint( int id ,int x , int y , int z){ // vi
                double xx = x;
                double yy = y;
                double zz = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPoint(xx,yy,zz);
                GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -499,7 +499,7 @@ void manualContourBaseControler::SetPointX( int id ,int x  ){
                double xx = x;
                double yy = 0;
                double zz = 0;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPointX(xx);
                GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -511,7 +511,7 @@ void manualContourBaseControler::SetPointY( int id ,int y  ){
                double xx = 0;
                double yy = y;
                double zz = 0;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPointY(yy);
                GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -523,7 +523,7 @@ void manualContourBaseControler::SetPointZ( int id ,int z  ){
                double xx = 0;
                double yy = 0;
                double zz = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPointZ(zz);
                GetManualViewBaseContour()->UpdateViewPoint(id);
index f0e8086d14040ad5f0de7833b6d789972c813eff..ee0f4d09b182760e2f5c53a6b72ecb233f7f534c 100644 (file)
@@ -684,6 +684,7 @@ std::vector<manualContourModel*> manualContourModel::ExploseModel(  )
 void manualContourModel::Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By)
 {
        manualPoint * mp;
+
        int i, size = GetSizeLstPoints();
 
        for( i=0; i<size; i++ )
index aa003292c0eab8a2ce5788a998b8634636d0e827..1d2edab0e9d32419d0ce0409134b78443c1a8fad 100644 (file)
@@ -35,7 +35,7 @@ void manualView3DContour::SetDimensions(int w, int h, int d)
        _d = d;
 }
 // ----------------------------------------------------------------------------
-void manualView3DContour::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type)
+void manualView3DContour::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type)
 {
        X = _vtkmprbasedata->GetX();
        Y = _vtkmprbasedata->GetY();
index aed36d1ed9b9671e23a5be298816d8ee5632b773..b245e6ce56902597b4e5c0cecd4fe62d73013e9e 100644 (file)
@@ -15,7 +15,7 @@ public:
        virtual manualView3DContour * Clone();
        void CopyAttributesTo( manualView3DContour *cloneObject );
 
-       virtual void    TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
+       virtual void    TransfromCoordViewWorld(double &X, double &Y, double &Z, int type);
                        void    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
 
        virtual int             SelectPosiblePoint ( int x, int y, int z );     
index d8a11392f5926f674a3f6e0adab05076219e1d20..c7a1d75526058b14f4dc0b965eb8537354f961e2 100644 (file)
@@ -100,7 +100,7 @@ int manualView3VContour::GetIdPoint(int x, int y, int z) // virtual
                double xx=x;
                double yy=y;
                double zz=z;
-               TransfromeCoordViewWorld(xx,yy,zz,-1);
+               TransfromCoordViewWorld(xx,yy,zz,-1);
                ii=_manContModel->GetIdPoint(xx,yy,zz,GetRange(),_type);
        }
        return ii;
@@ -115,7 +115,7 @@ bool manualView3VContour::ifTouchContour(int x,int y,int z){ // virtual
        double ppA[3];
        double ppB[3];
        double d1,d2,d3;
-       TransfromeCoordViewWorld(xx,yy,zz,-1);
+       TransfromCoordViewWorld(xx,yy,zz,-1);
 
 //EED 27 sep 2006
        xx = xx * _spc[0];
index 7508f651893237fe31da63b1b11984a1b9f09045..1f7e3768678e72bbe768b65e664ec97d74cda82e 100644 (file)
@@ -691,7 +691,7 @@ int manualViewBaseContour::GetIdPoint(int x, int y, int z) // virtual
                double xx = x;
                double yy = y;
                double zz = z;
-               TransfromeCoordViewWorld(xx,yy,zz);
+               TransfromCoordViewWorld(xx,yy,zz);
                ii=_manContModel->GetIdPoint(xx,yy,zz,_range,-1);
        }
        return ii;
@@ -721,9 +721,9 @@ int manualViewBaseContour::GetNumberOfPoints()
 }*/
 //----------------------------------------------------------------------------
 // virtual
-void manualViewBaseContour::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type)  // Virtual
+void manualViewBaseContour::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type)  // Virtual
 {
-       _wxvtkbaseview->TransFromeCoordScreenToWorld(X, Y, Z, type);
+       _wxvtkbaseview->TransFromCoordScreenToWorld(X, Y, Z,false, type);
 
 
 //EED 27 sep 2007
index 1766e970c9585d300a6c272838f31b233e827943..a97246c5de0410b92b3411e09d56d39266949c13 100644 (file)
@@ -122,7 +122,7 @@ public:
        virtual void MoveContour(int x, int y, int z);
        virtual void MoveContour(int horizontalUnits, int verticalUnits );
        virtual void GetMinMax( double &minX,double &minY, double &minZ, double &maxX, double &maxY, double &maxZ );
-       virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type=2);
+       virtual void TransfromCoordViewWorld(double &X, double &Y, double &Z, int type=2);
 
        void    ClearContour();
        virtual void    ClearPoint(int id);
index c23415471e8e6d1176c242b6d18c17c53b45bea6..75cba5f5384dd3c7e43d3e97ee9393c6fcdcf42f 100644 (file)
@@ -120,7 +120,7 @@ bool manualViewCircle::ifTouchContour(int x,int y, int z) // virtual
        double xx=x;
        double yy=y;
        double zz=z;
-       TransfromeCoordViewWorld(xx,yy,zz);
+       TransfromCoordViewWorld(xx,yy,zz);
 
        bool ok1=false;
        bool ok2=false;
@@ -154,7 +154,7 @@ void manualViewCircle::InitMove(int x, int y, int z)  // virtual
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        if (_manContModel->GetSizeLstPoints()==2){
                mp = _manContModel->GetManualPoint(0);
@@ -188,7 +188,7 @@ void manualViewCircle::MoveContour(int x, int y, int z) // virtual
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
index c5b00f74e1b9fb1555731980bda32993cd7d6e26..f35e2311f4a218b7d2c202f34e357b2f8a3d051a 100644 (file)
@@ -168,7 +168,7 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){
        double ppA[3];
        double ppB[3];
        double d1,d2,d3;
-       TransfromeCoordViewWorld(xx,yy,zz);
+       TransfromCoordViewWorld(xx,yy,zz);
 
 //EED 27 sep 2006
        xx = xx * _spc[0];
@@ -234,7 +234,7 @@ void manualViewContour::InitMove(int x, int y, int z)
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
        for ( i=0; i<manualPointsSZ; i++ )
@@ -252,7 +252,7 @@ void manualViewContour::MoveContour(int x, int y, int z)
        double YY=y;
        double ZZ=z;
 
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
        for ( i=0; i<manualPointsSZ; i++ )
index d19c8f3dea8915fcab5eb5add2f7be42ea4248e4..34994bdad1f6032d79fa4b2d114bcf6d3f04be7b 100644 (file)
@@ -48,7 +48,7 @@ void manualViewLine::InitMove(int x, int y, int z)  // virtual
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        if (_manContModel->GetSizeLstPoints()==2)
        {
@@ -73,7 +73,7 @@ void manualViewLine::MoveContour(int x, int y, int z) // virtual
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
index d86be6c05d0b8ec4318a8300a933877b92468151..570a372267537323075d52b518befe10a4e5e1c6 100644 (file)
@@ -134,7 +134,7 @@ bool manualViewRoi::ifTouchContour(int x,int y, int z) // virtual
        double xx=x;
        double yy=y;
        double zz=z;
-       TransfromeCoordViewWorld(xx,yy,zz);
+       TransfromCoordViewWorld(xx,yy,zz);
 
        bool ok1=false;
        bool ok2=false;
@@ -167,7 +167,7 @@ void manualViewRoi::InitMove(int x, int y, int z)  // virtual
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        if (_manContModel->GetSizeLstPoints()==4){
                mp = _manContModel->GetManualPoint(0);
@@ -200,7 +200,7 @@ void manualViewRoi::MoveContour(int x, int y, int z) // virtual
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
index ca4f013e440bb5f2f237e843d1ed9aac981803aa..edc09ca5b3a7bc9c344364fc1c68967d6c7fd10e 100644 (file)
@@ -82,11 +82,11 @@ void manualViewPerpPlaneContour::FilterCordinateXYZ (double &x, double &y, doubl
 }
 
 // ----------------------------------------------------------------------------
-void manualViewPerpPlaneContour::TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type )
+void manualViewPerpPlaneContour::TransfromCoordViewWorld( double &X,double &Y,double &Z,int type )
 {
        Z = 0;
        vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
-       vtkplane2Dview->TransfromeCoordViewWorld2(X,Y,Z);
+       vtkplane2Dview->TransfromCoordViewWorld2(X,Y,Z);
 }
 
 
@@ -192,7 +192,8 @@ bool manualViewPerpPlaneContour::ifTouchContour( int x, int y, int z)
        double X=x;
        double Y=y;
        double Z=z;
-       vtkplane2Dview->TransFromeCoordScreenToWorld(X,Y,Z);
+       vtkplane2Dview->TransFromCoordScreenToWorld(X,Y,Z);
+       
        double ppA[3];
        _pts->GetPoint(0, ppA);
        if (sqrt( (ppA[0]-X)*(ppA[0]-X) + (ppA[1]-Y)*(ppA[1]-Y) ) <=2)
index 6926a9b83ebdc921f3fc48e0675388ba9b246870..03240f9af6aa43badcdcb1abb9cc97b0e6357a40 100644 (file)
@@ -14,7 +14,7 @@ public:
 
        virtual void UpdateViewPoint(int id);
        virtual void RefreshContour();
-       virtual void TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type );
+       virtual void TransfromCoordViewWorld( double &X,double &Y,double &Z,int type );
        virtual bool ifTouchContour( int x, int y, int z);
 
 protected:
index 1c2d5c09ff9c27b3326838657a5c3edcd3aa0594..681263e93b8fb3b60537cc0df47260909ea558c2 100644 (file)
@@ -174,7 +174,7 @@ void HistogramDialog::OnLoadData(wxCommandEvent& event)
                        std::string line;
                        std::getline(file,line);
                        //int a=line.find("histogram Data");
-                       if(line.find("histogram Data")!=-1)
+                       if( (int)(line.find("histogram Data"))!=-1)
                        {
                                histogramReading=true;
                        
@@ -205,15 +205,15 @@ void HistogramDialog::OnLoadData(wxCommandEvent& event)
                                //histogramW->addPointToTransferenceFunction(gc,in);
                        }
                        */
-                       else if(line.find("TransferenceFunction")!=-1 && histogramReading)
+                       else if( (int)(line.find("TransferenceFunction"))!=-1 && histogramReading)
                        {
                                tf=true;
                        }
-                       else if(line.find("<Transferencepoint>")!=-1 && histogramReading && tf)
+                       else if( (int)(line.find("<Transferencepoint>"))!=-1 && histogramReading && tf)
                        {
                                tfp=true;
                        }
-                       else if(line.find("greyValue")!=-1 && histogramReading && tf && tfp)
+                       else if( (int)(line.find("greyValue"))!=-1 && histogramReading && tf && tfp)
                        {
                                int pos1=line.find(">");
                                int pos2=line.find("<",pos1+1);
@@ -221,7 +221,7 @@ void HistogramDialog::OnLoadData(wxCommandEvent& event)
                                gv=atoi(x.c_str());
                                
                        }
-                       else if(line.find("intensity")!=-1 && histogramReading && tf && tfp)
+                       else if( (int)(line.find("intensity"))!=-1 && histogramReading && tf && tfp)
                        {
                                int pos1=line.find(">");
                                int pos2=line.find("<",pos1+1);
@@ -231,17 +231,17 @@ void HistogramDialog::OnLoadData(wxCommandEvent& event)
                                tfp=false;
                                
                        }
-                       else if(line.find("Colors")!=-1 && histogramReading)
+                       else if( (int)(line.find("Colors"))!=-1 && histogramReading)
                        {
                                ctf=true;
                        }
                        
-                       else if(line.find("greyValueRGBpoint")!=-1 && histogramReading && ctf )
+                       else if( (int)(line.find("greyValueRGBpoint"))!=-1 && histogramReading && ctf )
                        {
                                ctfp=true;
                                
                        }
-                       else if(line.find("RGBgreyValue")!=-1 && histogramReading && ctf && ctfp)
+                       else if( (int)(line.find("RGBgreyValue"))!=-1 && histogramReading && ctf && ctfp)
                        {
                                int pos1=line.find(">");
                                int pos2=line.find("<",pos1+1);
@@ -249,7 +249,7 @@ void HistogramDialog::OnLoadData(wxCommandEvent& event)
                                gv=atoi(x.c_str());
                                
                        }
-                       else if(line.find("red")!=-1 && histogramReading && ctf && ctfp)
+                       else if( (int)(line.find("red"))!=-1 && histogramReading && ctf && ctfp)
                        {
                                int pos1=line.find(">");
                                int pos2=line.find("<",pos1+1);
@@ -257,14 +257,14 @@ void HistogramDialog::OnLoadData(wxCommandEvent& event)
                                red=atoi(x.c_str());
                                
                        }
-                       else if(line.find("green")!=-1 && histogramReading && ctf && ctfp)
+                       else if( (int)(line.find("green"))!=-1 && histogramReading && ctf && ctfp)
                        {
                                int pos1=line.find(">");
                                int pos2=line.find("<",pos1+1);
                                std::string x=line.substr(pos1+1,pos2-pos1-1);
                                gr=atoi(x.c_str());
                        }
-                       else if(line.find("blue")!=-1 && histogramReading && ctf && ctfp)
+                       else if( (int)(line.find("blue"))!=-1 && histogramReading && ctf && ctfp)
                        {
                                int pos1=line.find(">");
                                int pos2=line.find("<",pos1+1);
index 98a24ebf26ff36dd4a34ca7d143a39c74ed075c2..cf03c7c8234723cf75b5e258e73ffef32e93eb8b 100644 (file)
@@ -40,7 +40,7 @@ bool vtkInfoTextImageInteractor::OnMouseMove()
                yy=Y;
                zz=z;
        
-       _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransFromeCoordScreenToWorld(xx,yy,zz);
+       _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransFromCoordScreenToWorld(xx,yy,zz,true);
 
        
        GetVtkInfoTextImage()->PutWindowLevel();
index fb4e83661beb6e46fca5c66e344787f164c1bea0..d11286797ef7a41d1ba550b258e9b606d2988f28 100644 (file)
@@ -23,7 +23,7 @@ bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
 
 // --> dif
        vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
-       vtkplane2Dview->TransfromeCoordViewWorld2(xx,yy,zz);
+       vtkplane2Dview->TransfromCoordViewWorld2(xx,yy,zz);
 
        GetVtkInfoTextImage()->PutWindowLevel();
        GetVtkInfoTextImage()->PutColorLevel();
index 7e695a3d4f4e008896ffb163e6a21c7ab777b18c..74a9c9b5087c2044fd3678c02a3dd197e452ea06 100644 (file)
@@ -91,7 +91,7 @@ bool  vtkInteractorStyleMPRView::OnMouseMove ()
        double z=1;
        _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
        wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-//     wxvtkmpr2Dview->TransfromeCoordViewWorld(x,y,z);            
+//     wxvtkmpr2Dview->TransfromCoordViewWorld(x,y,z);     
 
        wxvtkmpr2Dview->ChangeAxisColor(x,y,z);
 
index 77b7fac94e2142926a18b3aa0a38291b65d110aa..d1142f9c3d07a51d31371fa259596927d6073fac 100644 (file)
@@ -93,7 +93,7 @@ bool vtkInteractorStylePlane2D::OnLeftDClick() // virtual
        vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
        vtkMPRBaseData *vtkmprbasedata = vtkplane2Dview->GetVtkmprbasedata();
 
-       vtkplane2Dview->TransfromeCoordViewWorld2(xx,yy,zz);
+       vtkplane2Dview->TransfromCoordViewWorld2(xx,yy,zz);
 
        vtkmprbasedata->SetX( xx );
        vtkmprbasedata->SetY( yy );
index e95ca9d077ecdd380bd622fc0f8978b43eb992c4..82442f5d04e3dee2bd6cbb5cefd4cbc95abf4d2c 100644 (file)
@@ -519,7 +519,7 @@ void vtkPlane2DView::SetVisibleLine(bool ok)
        _lineActor->GetProperty()->SetOpacity(opacity);
 }
 // ----------------------------------------------------------------------------
-void vtkPlane2DView::TransfromeCoordViewWorld2(double &X, double &Y, double &Z)
+void vtkPlane2DView::TransfromCoordViewWorld2(double &X, double &Y, double &Z)
 {
        double spc[3];
        GetVtkmprbasedata()->GetImageData()->GetSpacing(spc);
@@ -528,7 +528,7 @@ void vtkPlane2DView::TransfromeCoordViewWorld2(double &X, double &Y, double &Z)
        double yy = Y;
        double zz = 0;
 
-       TransFromeCoordScreenToWorld(xx,yy,zz);
+       TransFromCoordScreenToWorld(xx,yy,zz);
 
 
        vtkTransform *transf1 = vtkTransform::New();
index 2108748c53d888923617f1deaf600cce1ac882f5..8df8335b123923a166d1a2ffe52bb30b46e0c8a4 100644 (file)
@@ -38,7 +38,7 @@ public:
        void                    SetActive(bool active);
        void                    SetVisibleLine(bool ok);
 
-       void                    TransfromeCoordViewWorld2(double &X, double &Y, double &Z);
+       void                    TransfromCoordViewWorld2(double &X, double &Y, double &Z);
 
        int                             GetMipWidth();
        void                    SetMipWidth(int value);
index a5f79e960b213b8df6247bc56d8995a73c82ae4c..128a8446e16a65f50e84c0647f0e54233ba1ff8a 100644 (file)
@@ -91,7 +91,7 @@ vtkRenderWindow* wxVtkBaseView::GetRenWin()           // virtual
 
 //----------------------------------------------------------------------------
                                        
-void wxVtkBaseView::TransFromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual
+void wxVtkBaseView::TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection, int type) //virtual //keepNormalDirection=false, type=2
 {  
        GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z);
        GetRenderer()->DisplayToWorld();
index 4b16887e390fed8debb77d3fa7f70e826e7912ea..eb5dd6609e67dfd32d9a768fb7fc0d236d765324 100644 (file)
@@ -52,7 +52,7 @@ public:
        virtual void                                    RefreshView();
        virtual vtkRenderer*                    GetRenderer();
        virtual vtkRenderWindow*                GetRenWin();
-       virtual void                                    TransFromeCoordScreenToWorld(double &X, double &Y, double &Z, int type=2);
+       virtual void                                    TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false,int type=2);
        /* JCP 04/05/09
        void                                                    SetInteractorStyleBaseView( vtkInteractorStyleBaseView* interactorStyle);
        */
index f4c85f3c5c1f5ec7caa0717bc7710768d841f57b..0ec8f0dc196e5a1c1b4b7d6c9a12adb0d32a7d4b 100644 (file)
@@ -463,26 +463,32 @@ void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z)
        Refresh();
 }
 
+
 //EED 5 juin 2009
-//void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual 
-void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual 
+//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::TransFromeCoordScreenToWorld(X,Y,Z,_direction);
+       wxVtkBaseView::TransFromCoordScreenToWorld(X,Y,Z,keepNormalDirection,_direction);
 
-       if (_direction==0)
+       if ((_direction==0) && (keepNormalDirection==true) )
        {
                X = ((vtkMPRBaseData*)GetVtkBaseData())->GetX();
        }
-       if (_direction==1)
+       
+       if ((_direction==1) && (keepNormalDirection==true) )
        {
                Y = ((vtkMPRBaseData*)GetVtkBaseData())->GetY();
        }
-       if (_direction==2)
+       
+       if ((_direction==2) && (keepNormalDirection==true) )
        {
                Z = ((vtkMPRBaseData*)GetVtkBaseData())->GetZ();
        }
+       
 }
+
+
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
index 5df6055eaabb73923bd4a99556db87eab2c2ed94..751bdbd3bf8278c6114b050440b9733eeb1b0566 100644 (file)
@@ -29,7 +29,7 @@ public:
                        void                    MoveY(double x, double y, double z);
                        void                    MoveZ(double x, double y, double z);
                        void                    ChangeAxisColor(double x, double y, double z);
-       virtual void                    TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
+       virtual void                    TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2);
        
                        void                    SetVisibleAxis(bool ok);