X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkMPR2DView.cxx;h=52eb4cf4f6b9a263b38976dbebc38d02e3860be1;hb=4df00b156385a2dd881c35fd7561ef9eb0885ee0;hp=5c9562ef3e54d8b2a5793e6ae0978d63efc24d58;hpb=efe55c8afe89bd1d090c59513f2be82ad3ab9b0d;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index 5c9562e..52eb4cf 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -137,21 +137,21 @@ void wxVtkMPR2DView::Configure(){ } */ - if (_direction==0) { + if (_direction==0) { // YZ camera->SetViewUp ( 0 , 1 , 0 ); camera->SetPosition ( 10000,(y1+y2)/2 , (z1+z2)/2 ); camera->SetFocalPoint ( 0 , (y1+y2)/2 , (z1+z2)/2 ); camera->SetParallelScale( (z2-z1)/3.0 ); } - if (_direction==1) { + if (_direction==1) { // XZ camera->SetViewUp ( 0 , 0 , -1 ); camera->SetPosition ((x1+x2)/2 , 10000 , (z1+z2)/2 ); camera->SetFocalPoint ((x1+x2)/2 , 0 , (z1+z2)/2 ); camera->SetParallelScale( (x2-x1)/3.0 ); } - if (_direction==2) { + if (_direction==2) { // XY camera->SetViewUp ( 0 , 1 , 0 ); camera->SetPosition ((x1+x2)/2 , (y1+y2)/2 , 10000); camera->SetFocalPoint ((x1+x2)/2 , (y1+y2)/2 , 0 ); @@ -220,25 +220,23 @@ void wxVtkMPR2DView::Refresh() y = (int)(y*spc[1]); z = (int)(z*spc[2]); - - if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) { - if (_direction==0) { + if (_direction==0) { // YZ _imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) ); - _ptsA->SetPoint(0, -x2, y1 , z ); - _ptsA->SetPoint(1, -x2, y2 , z ); - _ptsB->SetPoint(0, -x2, y , z1); - _ptsB->SetPoint(1, -x2, y , z2); + _ptsA->SetPoint(0, x2, y1 , z ); + _ptsA->SetPoint(1, x2, y2 , z ); + _ptsB->SetPoint(0, x2, y , z1); + _ptsB->SetPoint(1, x2, y , z2); } - if (_direction==1) { + if (_direction==1) { // XZ _imageViewer2XYZ->SetYSlice( (int)(GetVtkmprbasedata()->GetY()) ); _ptsA->SetPoint(0, x1 , y2 , z ); _ptsA->SetPoint(1, x2 , y2 , z ); _ptsB->SetPoint(0, x , y2 , z1); _ptsB->SetPoint(1, x , y2 , z2); } - if (_direction==2) { + if (_direction==2) { // XY _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); // _ptsA->SetPoint(0, x1 , y , -z2 ); @@ -464,9 +462,11 @@ void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z) } Refresh(); } + //------------------------------------------------------------------- -void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual +void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual { + wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction); if (_direction==0)