From 69c806e632999e11e12e8626609f4192d3aec364 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Mon, 4 Dec 2017 22:37:38 +0100 Subject: [PATCH] #3155 creaMaracasVisu Feature New Normal - ViewerPlane ComplexBox --- bbtk/bbs/boxes/ViewerByPlane.bbg | 307 ++++++++++++++++++ bbtk/bbs/boxes/ViewerByPlane.bbs | 125 +++++++ .../widgets/manualInteractorWindowLevel.cxx | 33 +- .../wxWindows/widgets/vtkBaseData.cxx | 28 +- .../interface/wxWindows/widgets/vtkBaseData.h | 8 +- .../wxWindows/widgets/vtkImageViewer2_XYZ.cxx | 27 +- .../wxWindows/widgets/vtkImageViewer2_XYZ.h | 9 +- .../wxWindows/widgets/vtkMPR3DDataViewer.cxx | 25 +- .../wxWindows/widgets/wxVtk2DBaseView.cxx | 20 +- .../wxWindows/widgets/wxVtkMPR2DView.cxx | 97 +++--- .../wxWindows/widgets/wxVtkMPR2DView.h | 10 +- .../wxWindows/widgets/wxVtkMPR3DView.cxx | 63 +--- .../wxWindows/widgets/wxVtkMPR3DView.h | 15 +- .../widgets/wxVtkMPR3DViewCntrlPanel.cxx | 145 +++++---- .../widgets/wxVtkMPR3DViewCntrlPanel.h | 8 +- 15 files changed, 657 insertions(+), 263 deletions(-) create mode 100644 bbtk/bbs/boxes/ViewerByPlane.bbg create mode 100644 bbtk/bbs/boxes/ViewerByPlane.bbs diff --git a/bbtk/bbs/boxes/ViewerByPlane.bbg b/bbtk/bbs/boxes/ViewerByPlane.bbg new file mode 100644 index 0000000..c03f890 --- /dev/null +++ b/bbtk/bbs/boxes/ViewerByPlane.bbg @@ -0,0 +1,307 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ViewerByPlane.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:TRUE +COMPLEXBOXNAME:ViewerByPlane +PACKAGENAME:creaMaracasVisu +COMPLEXOUTPUTS:3 +COMPLEX_PORT +widget +257.430958:-172.402527:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview1 +281.392519:-172.262009:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +render1 +237.266428:-170.682480:-900.000000 +FIN_COMPLEX_PORT +COMPLEXINPUTS:2 +COMPLEX_PORT +FileNale +129.540696:84.595186:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +typeMHDorSeek +331.570354:88.190320:-900.000000 +FIN_COMPLEX_PORT +BOXES:19 +BOX +creaMaracasVisu:ViewerNV:Box01 +ISEXEC:FALSE +218.560896:-8.198420:-900.000000 +282.280896:-18.198420:-900.000000 +PORT +ColorLevel:"900" +PORT +WindowLevel:"2000" +PORT +nTypeView:"6 1 2 0" +FIN_BOX +BOX +vtk:CreateImage:Box02 +ISEXEC:FALSE +175.450119:15.183182:-900.000000 +221.025119:5.183182:-900.000000 +PORT +InitialValue:"500" +FIN_BOX +BOX +creaVtk:MHDFileInfo:Box03 +ISEXEC:FALSE +184.219079:37.426139:-900.000000 +229.794079:27.426139:-900.000000 +FIN_BOX +BOX +std:ConcatStrings:Box04 +ISEXEC:FALSE +121.881190:64.180099:-900.000000 +167.456190:54.180099:-900.000000 +FIN_BOX +BOX +creaVtk:ReadMHDPlane:Box05 +ISEXEC:FALSE +97.902089:-53.418561:-900.000000 +143.477089:-63.418561:-900.000000 +PORT +DirectionPlane:"XY" +PORT +Type:"1" +FIN_BOX +BOX +std:GetVectorIntElement:Box06 +ISEXEC:FALSE +65.832872:-29.890255:-900.000000 +137.007872:-39.890255:-900.000000 +PORT +I:"2" +FIN_BOX +BOX +std:ConcatStrings:Box07 +ISEXEC:FALSE +49.273686:-53.161098:-900.000000 +94.848686:-63.161098:-900.000000 +PORT +In1:"0 0 " +FIN_BOX +BOX +vtk:InversCrop:Box08 +ISEXEC:FALSE +103.966831:-88.915948:-900.000000 +149.541831:-98.915948:-900.000000 +PORT +Type:"1" +FIN_BOX +BOX +creaVtk:ReadMHDPlane:Box12 +ISEXEC:FALSE +218.450362:-55.313033:-900.000000 +264.025362:-65.313033:-900.000000 +PORT +DirectionPlane:"ZX" +PORT +Type:"1" +FIN_BOX +BOX +std:GetVectorIntElement:Box13 +ISEXEC:FALSE +202.761259:-36.747075:-900.000000 +273.936259:-46.747075:-900.000000 +PORT +I:"1" +FIN_BOX +BOX +vtk:InversCrop:Box14 +ISEXEC:FALSE +172.775551:-77.128930:-900.000000 +218.350551:-87.128930:-900.000000 +PORT +Type:"1" +FIN_BOX +BOX +std:ConcatStrings:Box15 +ISEXEC:FALSE +165.908201:-55.667861:-900.000000 +211.483201:-65.667861:-900.000000 +PORT +In1:"0 " +PORT +In3:" 0" +FIN_BOX +BOX +creaVtk:ReadMHDPlane:Box18 +ISEXEC:FALSE +359.467754:-54.452037:-900.000000 +405.042754:-64.452037:-900.000000 +PORT +DirectionPlane:"YZ" +PORT +Type:"1" +FIN_BOX +BOX +std:GetVectorIntElement:Box19 +ISEXEC:FALSE +343.778651:-35.886079:-900.000000 +414.953651:-45.886079:-900.000000 +PORT +I:"0" +FIN_BOX +BOX +vtk:InversCrop:Box20 +ISEXEC:FALSE +282.374914:-96.383547:-900.000000 +327.949914:-106.383547:-900.000000 +PORT +Type:"1" +FIN_BOX +BOX +std:ConcatStrings:Box21 +ISEXEC:FALSE +306.925593:-54.806865:-900.000000 +352.500593:-64.806865:-900.000000 +PORT +In3:" 0 0" +FIN_BOX +BOX +std:MagicBox:Box22 +ISEXEC:FALSE +300.550446:23.204815:-900.000000 +346.125446:13.204815:-900.000000 +FIN_BOX +BOX +std:MagicBox:Box23 +ISEXEC:FALSE +327.163217:69.325261:-900.000000 +372.738217:59.325261:-900.000000 +FIN_BOX +BOX +wx:ComboBox:Box27 +ISEXEC:FALSE +288.859714:45.574941:-900.000000 +334.434714:35.574941:-900.000000 +PORT +In:"0 1 3" +FIN_BOX +CONNECTIONS:38 +CONNECTION +Box02:Out:Box01:In +NumberOfControlPoints:0 +CONNECTION +Box03:DimSize:Box02:Dimensions +NumberOfControlPoints:0 +CONNECTION +Box03:ElementSpacing:Box02:Spacing +NumberOfControlPoints:0 +CONNECTION +Box03:ElementType:Box02:OutputFormat +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box03:FileName +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box05:FileName +NumberOfControlPoints:0 +CONNECTION +Box01:Point:Box06:In +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box07:In2 +NumberOfControlPoints:0 +CONNECTION +Box07:Out:Box08:Origin +NumberOfControlPoints:0 +CONNECTION +Box02:Out:Box08:ImageFix +NumberOfControlPoints:0 +CONNECTION +Box05:Out:Box08:ImageMove +NumberOfControlPoints:0 +CONNECTION +Box01:BoxChange:Box08:BoxExecute +NumberOfControlPoints:0 +CONNECTION +FileNale:FileNale:Box04:In1 +NumberOfControlPoints:0 +CONNECTION +Box01:Widget:widget:widget +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box05:Slice +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box12:FileName +NumberOfControlPoints:0 +CONNECTION +Box01:Point:Box13:In +NumberOfControlPoints:0 +CONNECTION +Box13:Out:Box12:Slice +NumberOfControlPoints:0 +CONNECTION +Box01:BoxChange:Box14:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box02:Out:Box14:ImageFix +NumberOfControlPoints:0 +CONNECTION +Box15:Out:Box14:Origin +NumberOfControlPoints:0 +CONNECTION +Box13:Out:Box15:In2 +NumberOfControlPoints:0 +CONNECTION +Box12:Out2:Box14:ImageMove +NumberOfControlPoints:0 +CONNECTION +Box19:Out:Box18:Slice +NumberOfControlPoints:0 +CONNECTION +Box21:Out:Box20:Origin +NumberOfControlPoints:0 +CONNECTION +Box19:Out:Box21:In2 +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box18:FileName +NumberOfControlPoints:0 +CONNECTION +Box01:Point:Box19:In +NumberOfControlPoints:0 +CONNECTION +Box01:BoxChange:Box20:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box02:Out:Box20:ImageFix +NumberOfControlPoints:0 +CONNECTION +Box18:Out2:Box20:ImageMove +NumberOfControlPoints:0 +CONNECTION +Box01:wxVtkBaseView1:wxvtkbaseview1:wxvtkbaseview1 +NumberOfControlPoints:0 +CONNECTION +Box01:Renderer1:render1:render1 +NumberOfControlPoints:0 +CONNECTION +Box22:Out:Box05:Type +NumberOfControlPoints:0 +CONNECTION +Box22:Out:Box12:Type +NumberOfControlPoints:0 +CONNECTION +Box22:Out:Box18:Type +NumberOfControlPoints:0 +CONNECTION +typeMHDorSeek:typeMHDorSeek:Box23:In +NumberOfControlPoints:0 +CONNECTION +Box27:OutString:Box22:In +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/boxes/ViewerByPlane.bbs b/bbtk/bbs/boxes/ViewerByPlane.bbs new file mode 100644 index 0000000..0b57843 --- /dev/null +++ b/bbtk/bbs/boxes/ViewerByPlane.bbs @@ -0,0 +1,125 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) +# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ViewerByPlane.bbs +# ---------------------------------- + +include std +include itkvtk +include creaMaracasVisu +include vtk +include creaVtk +include std +include wx + +define ViewerByPlane creaMaracasVisu + +author "Author ??" +description "Description ??" + +category "" + +new creaMaracasVisu:ViewerNV Box01 + set Box01.ColorLevel "900" + set Box01.WindowLevel "2000" + set Box01.nTypeView "6 1 2 0" + +new vtk:CreateImage Box02 + set Box02.InitialValue "500" + +new creaVtk:MHDFileInfo Box03 + +new std:ConcatStrings Box04 + +new creaVtk:ReadMHDPlane Box05 + set Box05.DirectionPlane "XY" + set Box05.Type "1" + +new std:GetVectorIntElement Box06 + set Box06.I "2" + +new std:ConcatStrings Box07 + set Box07.In1 "0 0 " + +new vtk:InversCrop Box08 + set Box08.Type "1" + +new creaVtk:ReadMHDPlane Box12 + set Box12.DirectionPlane "ZX" + set Box12.Type "1" + +new std:GetVectorIntElement Box13 + set Box13.I "1" + +new vtk:InversCrop Box14 + set Box14.Type "1" + +new std:ConcatStrings Box15 + set Box15.In1 "0 " + set Box15.In3 " 0" + +new creaVtk:ReadMHDPlane Box18 + set Box18.DirectionPlane "YZ" + set Box18.Type "1" + +new std:GetVectorIntElement Box19 + set Box19.I "0" + +new vtk:InversCrop Box20 + set Box20.Type "1" + +new std:ConcatStrings Box21 + set Box21.In3 " 0 0" + +new std:MagicBox Box22 + +new std:MagicBox Box23 + +new wx:ComboBox Box27 + set Box27.In "0 1 3" + + +connect Box02.Out Box01.In +connect Box03.DimSize Box02.Dimensions +connect Box03.ElementSpacing Box02.Spacing +connect Box03.ElementType Box02.OutputFormat +connect Box04.Out Box03.FileName +connect Box04.Out Box05.FileName +connect Box01.Point Box06.In +connect Box06.Out Box07.In2 +connect Box07.Out Box08.Origin +connect Box02.Out Box08.ImageFix +connect Box05.Out Box08.ImageMove +connect Box01.BoxChange Box08.BoxExecute +connect Box06.Out Box05.Slice +connect Box04.Out Box12.FileName +connect Box01.Point Box13.In +connect Box13.Out Box12.Slice +connect Box01.BoxChange Box14.BoxExecute +connect Box02.Out Box14.ImageFix +connect Box15.Out Box14.Origin +connect Box13.Out Box15.In2 +connect Box12.Out2 Box14.ImageMove +connect Box19.Out Box18.Slice +connect Box21.Out Box20.Origin +connect Box19.Out Box21.In2 +connect Box04.Out Box18.FileName +connect Box01.Point Box19.In +connect Box01.BoxChange Box20.BoxExecute +connect Box02.Out Box20.ImageFix +connect Box18.Out2 Box20.ImageMove +connect Box22.Out Box05.Type +connect Box22.Out Box12.Type +connect Box22.Out Box18.Type +connect Box27.OutString Box22.In + +# Complex input ports +input FileNale Box04.In1 " " +input typeMHDorSeek Box23.In " " + +# Complex output ports +output widget Box01.Widget " " +output wxvtkbaseview1 Box01.wxVtkBaseView1 " " +output render1 Box01.Renderer1 " " + + +endefine diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx index f058df7..f64909e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx @@ -55,31 +55,33 @@ bool manualInteractorWindowLevel::OnMouseMove() // virtual wxVTKRenderWindowInteractor *wxVTKiren; wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); wxVTKiren->GetEventPosition( tmpPx , tmpPy ); - double colorWin; double colorLev; - vtkImageData* imgrange = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData(); - - if(imgrange != NULL){ + if(imgrange != NULL) + { double* scalarrange = imgrange->GetScalarRange(); - double scalarr = scalarrange[1] - scalarrange[0]; + double scalarr; + if (scalarrange[1] == scalarrange[0]) + { + scalarr=scalarrange[1]; + if (scalarrange[1]==0) {scalarr=100;} + } else { + scalarr = scalarrange[1] - scalarrange[0]; + } //std::cout<<"scalar r="<GetSize(&w, &h); - double dw=w,dh=h; double dx = (scalarr*( _backPx - tmpPx ))/dw; double dy = (scalarr*( _backPy - tmpPy ))/dh; - //colorWin=_backWindow - (scalarr)*( _backPx - tmpPx ); colorWin=_backWindow - dx; colorLev=_backLevel + dy; - }else{ + } else { colorWin=_backWindow - 2*( _backPx - tmpPx ); colorLev=_backLevel + 2*( _backPy - tmpPy ); } - if (colorWin<0) { colorWin=0; @@ -88,35 +90,26 @@ bool manualInteractorWindowLevel::OnMouseMove() // virtual { colorWin=100000; } - //EED 2 Nov 2012 This lets see negative values with the interaction of Window-Level Color // if (colorLev<0) // { // colorLev=0; -// } - +// } if (colorLev>100000) { colorLev=100000; } - wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView(); vtkBaseData *vtkbasedata = wxvtk2Dbaseview->GetVtkBaseData(); - //EED Borrame // vtkImageViewer2 *vtkimageviewer2 = wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2(); // vtkimageviewer2->SetColorWindow(colorWin); // vtkimageviewer2->SetColorLevel(colorLev); - vtkbasedata->SetColorWindow(colorWin); - vtkbasedata->SetColorLevel(colorLev); - + vtkbasedata->SetColorLevel(colorLev); this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); - // vtkimageviewer2->Render(); } - - return true; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx index 8566966..7aed68e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx @@ -23,11 +23,8 @@ # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ */ - #include "vtkBaseData.h" - - //------------------------------------------------------------------- vtkBaseData::vtkBaseData() { @@ -35,6 +32,8 @@ vtkBaseData::vtkBaseData() _t = 0; _marImageData = 0; _interpolate = true; + _fixAxis2D = false; + _opacityAxis = 0.5; _observable = vtkObject::New(); } @@ -210,3 +209,26 @@ void vtkBaseData::SetInterpolate(bool value) _interpolate = value; } +//------------------------------------------------------------------- +bool vtkBaseData::GetFixAxis2D() +{ + return _fixAxis2D; +} + +//------------------------------------------------------------------- +void vtkBaseData::SetFixAxis2D(bool value) +{ + _fixAxis2D = value; +} + +//------------------------------------------------------------------- +double vtkBaseData::GetOpacityAxis() +{ + return _opacityAxis; +} + +//------------------------------------------------------------------- +void vtkBaseData::SetOpacityAxis(double value) +{ + _opacityAxis = value; +} diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h index 09e36bd..6870e01 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h @@ -42,10 +42,8 @@ public: virtual void Configure(); double GetZ(); void SetZ(double z); - int GetT(); void SetT(double t); - void SetColorWindow(double colorWindow); void SetColorLevel(double colorLevel); double GetColorWindow(); @@ -53,6 +51,10 @@ public: void AddObserver(int eventNumber, vtkCommand *observer); bool GetInterpolate(); void SetInterpolate(bool value); + bool GetFixAxis2D(); + void SetFixAxis2D(bool value); + double GetOpacityAxis(); + void SetOpacityAxis(double value); protected: marImageData *_marImageData; @@ -61,6 +63,8 @@ protected: double _colorWindow; double _colorLevel; bool _interpolate; + bool _fixAxis2D; + double _opacityAxis; vtkObject* _observable; private: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx index f39e637..479db77 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx @@ -48,25 +48,28 @@ void vtkImageViewer2_XYZ::SetExtentDimension(int x1,int x2, int y1,int y2, int z1,int z2) { - _x1=x1; - _x2=x2; - _y1=y1; - _y2=y2; - _z1=z1; - _z2=z2; + _x1 = x1; + _x2 = x2; + _y1 = y1; + _y2 = y2; + _z1 = z1; + _z2 = z2; } + //------------------------------------------------------------------- void vtkImageViewer2_XYZ::SetXSlice(int slice) { vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor(); imageActor->SetDisplayExtent(slice, slice, _y1, _y2, _z1, _z2 ); } + //------------------------------------------------------------------- void vtkImageViewer2_XYZ::SetYSlice(int slice) { vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor(); imageActor->SetDisplayExtent(_x1, _x2, slice, slice, _z1, _z2 ); } + //------------------------------------------------------------------- void vtkImageViewer2_XYZ::SetZSlice(int slice) { @@ -77,8 +80,6 @@ void vtkImageViewer2_XYZ::SetZSlice(int slice) #else _vtkimageviewer2->SetZSlice( slice ); #endif - - } //------------------------------------------------------------------- int vtkImageViewer2_XYZ::GetXSlice() @@ -86,32 +87,32 @@ int vtkImageViewer2_XYZ::GetXSlice() vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor(); return imageActor->GetDisplayExtent()[0]; } + //------------------------------------------------------------------- int vtkImageViewer2_XYZ::GetYSlice() { vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor(); return imageActor->GetDisplayExtent()[2]; } + //------------------------------------------------------------------- int vtkImageViewer2_XYZ::GetZSlice() { - int result; #if (VTK_MAJOR_VERSION >= 5) result= _vtkimageviewer2->GetSlice( ); #else result= _vtkimageviewer2->GetZSlice( ); -#endif - - +#endif return result; } + //------------------------------------------------------------------- vtkImageViewer2 *vtkImageViewer2_XYZ::GetVtkImageViewer2() { return _vtkimageviewer2; } - +//------------------------------------------------------------------- void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable){ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h index fe9123c..82acd44 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h @@ -39,7 +39,6 @@ class creaMaracasVisu_EXPORT vtkImageViewer2_XYZ{ public: vtkImageViewer2_XYZ(); ~vtkImageViewer2_XYZ(); - void SetExtentDimension(int x1,int x2, int y1,int y2, int z1,int z2); void SetXSlice(int slice); void SetYSlice(int slice); @@ -47,19 +46,13 @@ public: int GetXSlice(); int GetYSlice(); int GetZSlice(); - - void setColorTransferFunction(vtkColorTransferFunction* colortable); - vtkImageViewer2 *GetVtkImageViewer2(); private: int _x1,_x2,_y1,_y2,_z1,_z2; vtkImageViewer2 *_vtkimageviewer2; vtkColorTransferFunction* _colortable; - - -protected: - +protected: }; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx index 242c9bd..45e4f38 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx @@ -34,7 +34,6 @@ vtkMPR3DDataViewer::vtkMPR3DDataViewer() _visiblePosition[2]=false; _ctfun = NULL; _vtkmprbasedata = NULL; - _ctfun = NULL; _saggitalColors = NULL; _saggital = NULL; @@ -142,9 +141,10 @@ std::vector* vtkMPR3DDataViewer::GetctFunVectorBlue() //------------------------------------------------------------------- void vtkMPR3DDataViewer::SetImage() { - _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() ); - _axialColors->SetInput( _vtkmprbasedata->GetImageData() ); - _coronalColors->SetInput( _vtkmprbasedata->GetImageData() ); + _saggitalColors -> SetInput( _vtkmprbasedata->GetImageData() ); + _axialColors -> SetInput( _vtkmprbasedata->GetImageData() ); + _coronalColors -> SetInput( _vtkmprbasedata->GetImageData() ); + _outlineData -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() ); } //------------------------------------------------------------------- @@ -175,10 +175,8 @@ void vtkMPR3DDataViewer::Configure() _satLut->SetValueRange (1, 1); */ - double range[2]; double delta; - if(_vtkmprbasedata->GetImageData()) { _vtkmprbasedata->GetImageData()->Update(); @@ -270,12 +268,8 @@ void vtkMPR3DDataViewer::Configure() } _saggitalColors->RemoveAllInputs(); _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() ); - // _saggitalColors->SetLookupTable(_bwLut); - _saggitalColors->SetLookupTable(_ctfun); - - if(_saggital==NULL) { _saggital = vtkImageActor::New(); @@ -283,22 +277,17 @@ void vtkMPR3DDataViewer::Configure() } //_saggitalColors->Update(); - - // Create the second (axial) plane of the three planes. We use the // same approach as before except that the extent differs. - if(_axialColors==NULL) { _axialColors = vtkImageMapToColors::New(); } - _axialColors->RemoveAllInputs(); _axialColors->SetInput( _vtkmprbasedata->GetImageData() ); // _axialColors->SetLookupTable(_hueLut); _axialColors->SetLookupTable(_ctfun); - if(_axial==NULL) { _axial = vtkImageActor::New(); @@ -306,8 +295,6 @@ void vtkMPR3DDataViewer::Configure() } //_axialColors->Update(); - - // Create the third (coronal) plane of the three planes. We use // the same approach as before except that the extent differs. if(_coronalColors==NULL) @@ -318,15 +305,12 @@ void vtkMPR3DDataViewer::Configure() _coronalColors->SetInput( _vtkmprbasedata->GetImageData() ); // _coronalColors->SetLookupTable(_satLut); _coronalColors->SetLookupTable(_ctfun); - if(_coronal==NULL) { _coronal = vtkImageActor::New(); _coronal->SetInput(_coronalColors->GetOutput()); } - - // An outline provides context around the data. // if(_outlineData==NULL) @@ -354,7 +338,6 @@ void vtkMPR3DDataViewer::Configure() _outline->GetProperty()->SetColor(0,0,0); } } - //int ext[6]; //_vtkmprbasedata->GetImageData()->GetExtent(ext); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx index bd26d12..af726f1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx @@ -46,7 +46,6 @@ wxVtk2DBaseView::~wxVtk2DBaseView() { delete _vtkIinfoTextImage; } - if (_imageViewer2XYZ!=NULL) { delete _imageViewer2XYZ; @@ -61,19 +60,17 @@ void wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel(double &X,double & // GetVtkBaseData()->GetImageData()->GetSpacing(spc); //JCP 04/08/10 W/O Image this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc); vtkImageData* image = this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput(); - if(image){ + if(image) + { image->GetSpacing(spc); }else{ spc[0] = 1; spc[1] = 1; spc[2] = 1; } - - X = X / spc[0]; Y = Y / spc[1]; Z = Z / spc[2]; - } //------------------------------------------------------------------- @@ -104,10 +101,10 @@ void wxVtk2DBaseView::ResetView() double spx = 0,spy = 0,spz = 0; int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1; wxVtkBaseView::Configure(); - wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor(); vtkImageData *imageData = GetVtkBaseData()->GetImageData(); - if(imageData){ + if(imageData) + { imageData->UpdateInformation(); imageData->SetUpdateExtent( imageData->GetWholeExtent()); imageData->Update(); @@ -115,7 +112,6 @@ void wxVtk2DBaseView::ResetView() imageData->GetSpacing (spx,spy,spz); imageData->GetExtent (x1,x2,y1,y2,z1,z2); } - _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2); _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren ); @@ -149,10 +145,16 @@ void wxVtk2DBaseView::ResetView() //------------------------------------------------------------------- void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData) { + int ext[6]; + imageData->GetWholeExtent(ext); + _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] ); if (_imageViewer2XYZ!=NULL) { _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData ); } // if _imageViewer2XYZ + + GetRenderer()->GetActiveCamera()->SetClippingRange(0.01, 1000000); + } //------------------------------------------------------------------- @@ -236,7 +238,7 @@ void wxVtk2DBaseView::Configure(bool okimage) //EED 21 mars 2012 FLIP problem ..PLOP.. // XY - camera->SetViewUp ( spx*0 , -spy*1 , spz*0 ); + camera->SetViewUp ( spx*0 , -spy*1 , spz*0 ); camera->SetPosition ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000 ); camera->SetFocalPoint ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0 ); /* diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index 803bea1..69a58bb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -131,7 +131,8 @@ void wxVtkMPR2DView::Configure() // Axe B - if(_lineBActor==NULL){ + if(_lineBActor==NULL) + { _lineBActor = vtkActor::New(); _lineBActor->GetProperty()->SetDiffuseColor(1,0,0); _lineBActor->GetProperty()->SetLineWidth(0.5); @@ -155,7 +156,8 @@ void wxVtkMPR2DView::Configure() linesB->Delete(); //do not delete lines ?? _lineBMapper->SetInput(_pdB); _lineBMapper->ImmediateModeRenderingOn(); - if(_imageViewer2XYZ){ + if(_imageViewer2XYZ) + { _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor ); _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor ); vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera(); @@ -163,21 +165,22 @@ void wxVtkMPR2DView::Configure() //EED 17Avril2009 //EED 21 mars 2012 FLIP problem ..PLOP.. - if (_direction==0) { // YZ + if (_direction==0) + { // YZ camera->SetViewUp ( 0 , 0 , 1 ); 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) { // XZ + 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) { // XY + 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 ); @@ -226,9 +229,8 @@ void wxVtkMPR2DView::SetVisibleAxis(bool ok) { _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor ); _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor ); - } - - } + } // if visible + } // ok } //------------------------------------------------------------------- @@ -236,17 +238,15 @@ void wxVtkMPR2DView::Refresh() { //wxVtk2DBaseView::Refresh(); int x1 = 0,x2 = 0,y1 = 0,y2 = 0,z1 = 0,z2 = 0; - //EED 02/08/2013 // int x = 0, y = 0, z = 0; - double x = 0, y = 0, z = 0; - - int xx = 0, yy = 0, zz = 0; + double x = 0, y = 0, z = 0; + int xx = 0, yy = 0, zz = 0; double *spc = 0; double *origin = 0; - double xx1,yy1,zz1,xx2,yy2,zz2; - + bool fixAxis2D; + double opacityAxis; vtkImageData* img = GetVtkmprbasedata()->GetImageData(); if(img!=NULL) { @@ -259,39 +259,36 @@ void wxVtkMPR2DView::Refresh() y2 += origin[1]; z1 += origin[2]; z2 += origin[2]; - xx1 = x1*spc[0]; yy1 = y1*spc[1]; zz1 = z1*spc[2]; - xx2 = x2*spc[0]; yy2 = y2*spc[1]; zz2 = z2*spc[2]; - - x1 = (int)(x1*spc[0]); - y1 = (int)(y1*spc[1]); - z1 = (int)(z1*spc[2]); - + x1 = (int)(x1*spc[0]); + y1 = (int)(y1*spc[1]); + z1 = (int)(z1*spc[2]); x2 = (int)(x2*spc[0]); y2 = (int)(y2*spc[1]); z2 = (int)(z2*spc[2]); - - xx = (int)(GetVtkmprbasedata()->GetX()); - yy = (int)(GetVtkmprbasedata()->GetY()); - zz = (int)(GetVtkmprbasedata()->GetZ()); - + xx = (int)(GetVtkmprbasedata()->GetX()); + yy = (int)(GetVtkmprbasedata()->GetY()); + zz = (int)(GetVtkmprbasedata()->GetZ()); //EED 02/08/2013 // x = round(xx*spc[0]); // y = round(yy*spc[1]); // z = round(zz*spc[2]); - - x = xx*spc[0]; - y = yy*spc[1]; - z = zz*spc[2]; - - if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) + x = xx*spc[0]; + y = yy*spc[1]; + z = zz*spc[2]; + fixAxis2D = GetVtkmprbasedata()->GetFixAxis2D(); + opacityAxis = GetVtkmprbasedata()->GetOpacityAxis(); + if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ) || (fixAxis2D!=_backFixAxis2D) || (opacityAxis!=_backOpacityAxis)) { - + double position[3]; + double focalpoint[3]; + GetRenderer()->GetActiveCamera()->GetPosition(position); + GetRenderer()->GetActiveCamera()->GetFocalPoint(focalpoint); if (_direction==0) { // YZ if(_imageViewer2XYZ) { @@ -306,6 +303,10 @@ void wxVtkMPR2DView::Refresh() _ptsA->SetPoint(1, xx2, yy2 , z ); _ptsB->SetPoint(0, xx2, y , zz1); _ptsB->SetPoint(1, xx2, y , zz2); + position[1] = y; + position[2] = z; + focalpoint[1] = y; + focalpoint[2] = z; } if (_direction==1) { // XZ if(_imageViewer2XYZ) @@ -321,6 +322,10 @@ void wxVtkMPR2DView::Refresh() _ptsA->SetPoint(1, xx2 , y1 , z ); _ptsB->SetPoint(0, x , y1 , zz1); _ptsB->SetPoint(1, x , y1 , zz2); + position[0] = x; + position[2] = z; + focalpoint[0] = x; + focalpoint[2] = z; } if (_direction==2) { // XY if(_imageViewer2XYZ) @@ -338,17 +343,27 @@ void wxVtkMPR2DView::Refresh() //_ptsA->SetPoint(1, x2 , y , z2 ); //_ptsB->SetPoint(0, x , y1, z2 ); //_ptsB->SetPoint(1, x , y2, z2 ); - _ptsA->SetPoint(0, xx1 , y , z1 ); _ptsA->SetPoint(1, xx2 , y , z1 ); _ptsB->SetPoint(0, x , yy1, z1 ); _ptsB->SetPoint(1, x , yy2, z1 ); - - + position[0] = x; + position[1] = y; + focalpoint[0] = x; + focalpoint[1] = y; } // if back - _backX=xx; - _backY=yy; - _backZ=zz; + if (fixAxis2D == true) + { + GetRenderer()->GetActiveCamera()->SetPosition(position); + GetRenderer()->GetActiveCamera()->SetFocalPoint(focalpoint); + } // if GetFixAxis2D + _lineAActor->GetProperty()->SetOpacity( opacityAxis ); + _lineBActor->GetProperty()->SetOpacity( opacityAxis ); + _backX = xx; + _backY = yy; + _backZ = zz; + _backFixAxis2D = fixAxis2D; + _backOpacityAxis= opacityAxis; } // if image //EED 2016/02/19 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h index 11e0030..aea0d6f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h @@ -47,7 +47,6 @@ public: vtkMPRBaseData *GetVtkmprbasedata(); virtual int GetActualSlice(); virtual void SetActualSlice(int slice); - bool IfMouseTouchX(double x, double y, double z); bool IfMouseTouchY(double x, double y, double z); bool IfMouseTouchZ(double x, double y, double z); @@ -56,20 +55,16 @@ public: void MoveZ(double x, double y, double z); void ChangeAxisColor(double x, double y, double z); virtual void TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2); - void SetVisibleAxis(bool ok); virtual int GetDirection(); - - private: - int _backX; int _backY; int _backZ; - + bool _backFixAxis2D; + double _backOpacityAxis; bool _visibleAxis; - int _direction; vtkPoints *_ptsA; vtkActor *_lineAActor; @@ -83,5 +78,4 @@ private: vtkInteractorStyleMPRView *_interactorstylemprview; }; - #endif /*WXVTKMPR2DVIEW_H_*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx index 1d9ff30..69ffc56 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx @@ -80,19 +80,15 @@ class vtkWindowLevelImagePlaneWidgetCallback : public vtkCommand _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xyzv[1]); _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xyzv[2]); } else { - - vtkImageData *image = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); double spc[3]; if(image) { image->GetSpacing(spc); } - double normal[3]; slicePosition = ipw->GetSlicePosition(); ipw->GetNormal(normal); - // FreePlaneX if ((normal[0]==1)&&(normal[1]==0)&&(normal[2]==0)) { @@ -110,28 +106,20 @@ class vtkWindowLevelImagePlaneWidgetCallback : public vtkCommand } }// ipw->GetCursorDataStatus }// ev - if (needRefresh) { vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView(); isbv->SetParent_refresh_waiting(); isbv->EvaluateToRefresh(); } - } // Execute - vtkWindowLevelImagePlaneWidgetCallback(){} wxVtkMPR3DView *_wxvtkmpr3Dview; }; - - //------------------------------------------------------------------- //------------------------------------------------------------------- //------------------------------------------------------------------- - - - wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview ) { _wxvtk3Dbaseview = wxvtk3Dbaseview; @@ -143,7 +131,6 @@ wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview ) _vtkplane = NULL; _probe = NULL; _contourMapper = NULL; - _planeWidgetX = NULL; _planeWidgetY = NULL; _planeWidgetZ = NULL; @@ -151,27 +138,23 @@ wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview ) //Free Planes } - //------------------------------------------------------------------- wxVtkMPR3DView::~wxVtkMPR3DView() { VisiblePointWidget( false ); VisiblePlaneWidget( false ); - if(_pointWidget!=NULL){ _pointWidget->Delete(); } if(_planeWidget!=NULL){ _planeWidget->Delete(); } - if(_vtkplane!=NULL){ _vtkplane->Delete(); _probe->Delete(); _contourMapper->Delete(); _contourPlaneActor->Delete(); } - } //------------------------------------------------------------------- @@ -179,43 +162,29 @@ void wxVtkMPR3DView::RemoveActor(vtkActor* actor) { _wxvtk3Dbaseview->GetRenderer()->RemoveActor(actor); } - - - //------------------------------------------------------------------- void wxVtkMPR3DView::Configure() { vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); - _wxvtk3Dbaseview->Configure(); _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel(); - //EED 27 Mai 2009 // _wxvtk3Dbaseview->GetRenderer()->Clear(); - // Actors are added to the renderer. vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor(); - - _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor ); - // _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(0) ); // _saggital // _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(1) ); // _axial // _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(2) ); // _coronal - - - // vtkPointWidget //if(_myCallback!=NULL){ //_myCallback->Delete(); - //} vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New(); _myCallback->SetWxVtkMPR3DView(this); - - if(imageData){ - if(_pointWidget==NULL){ + if(_pointWidget==NULL) + { _pointWidget = vtkPointWidget::New(); } _pointWidget->SetInput( imageData ); @@ -223,57 +192,40 @@ void wxVtkMPR3DView::Configure() _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); _pointWidget->AllOff(); _pointWidget->PlaceWidget(); - _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback); - if(_planeWidget==NULL) { _planeWidget = vtkPlaneWidget::New(); } _planeWidget->SetInput( imageData ); - _myCallback->SetVtkPlaneWidget(_planeWidget); - _planeWidget->NormalToXAxisOn(); _planeWidget->SetResolution(50); _planeWidget->SetRepresentationToOutline(); - int dim[3]; - imageData->GetDimensions(dim); int px=(dim[0]/2); int py=(dim[1]/2); int pz=(dim[2]/2); int dd=20; _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd ); - if(_vtkplane==NULL){ _vtkplane = vtkPolyData::New(); - _probe = vtkProbeFilter::New(); _probe->SetInput(_vtkplane); - _contourMapper = vtkPolyDataMapper::New(); - _contourMapper->SetInput( _probe->GetPolyDataOutput() ); - _contourPlaneActor = vtkActor::New(); _contourPlaneActor->SetMapper(_contourMapper); - _contourPlaneActor->VisibilityOff(); - _planeWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); _planeWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback); - _planeWidget->Off(); _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor ); - } - _planeWidget->GetPolyData(_vtkplane); _probe->SetSource( imageData ); _contourMapper->SetScalarRange( imageData->GetScalarRange() ); - ConfigureFreePlanes(); } @@ -308,26 +260,21 @@ void wxVtkMPR3DView::Configure() // render window (expressed in pixels). _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 ); //EED 23oct2010 _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400); - } //------------------------------------------------------------------- void wxVtkMPR3DView::ConfigureFreePlanes() { - // The shared picker enables us to use 3 planes at one time // and gets the picking order right vtkCellPicker* picker = vtkCellPicker::New(); picker->SetTolerance(0.005); - // The 3 image plane widgets _planeWidgetX = GetPlaneWidget('x', 1, 0, 0, picker); _planeWidgetY = GetPlaneWidget('y', 1, 1, 0, picker); _planeWidgetZ = GetPlaneWidget('z', 0, 0, 1, picker); - _planeWidgetY->SetLookupTable(_planeWidgetX->GetLookupTable()); _planeWidgetZ->SetLookupTable(_planeWidgetX->GetLookupTable()); - picker->UnRegister(NULL); // ColorWindow ColorLevel Callback @@ -685,17 +632,13 @@ void wxVtkMPR3DView::VisiblePlaneWidget( bool visible ) //CPR: Method added 30 Nov 2009 void wxVtkMPR3DView::showOutlineActor(bool value) { - vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor(); if(value == true) { _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor ); - } - else - { + } else { _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor ); } - } //------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h index a46afe6..c1a639f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h @@ -47,36 +47,26 @@ public: void VisibleImageActor(int idPosition, bool visible); void VisiblePointWidget( bool visible ); void VisiblePlaneWidget( bool visible ); - void SetVisibleTissue(int idTissue, bool visible); bool GetVisibleTissue(int idTissue); virtual void Refresh(); virtual void RefreshView(); virtual void Configure(); void SetImage(); - void SetBackGroundType(int type); void SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer ); wxPanel* CreateControlPanel(wxWindow *parent, bool align); - vtkMPR3DDataViewer* GetVtkMPR3DDataViewer(); wxVtk3DBaseView* GetWxvtk3Dbaseview() throw (char*); - void InitOrientationPointWidget(); void showOutlineActor(bool value); - // EED 25 Janvier 2007 testLoic void TestLoic1(); void TestLoic2(); - - void RemoveActor(vtkActor* actor); - + void RemoveActor(vtkActor* actor); //EED 27/05/2013 // void ResetCamera(int *ext=NULL,double* spc=NULL); - void setColorTransferFunction(vtkColorTransferFunction* colortable); - - //Free planes //------------------------------------------------------------------- void ConfigureFreePlanes(); @@ -84,11 +74,8 @@ public: void FreePlaneVisible(int plane, bool ok); void FreePlaneInteraction(bool ok); void SetFreePlanesOrtho(); - void SetColorWindow(double colorWindow); void SetColorLevel(double colorLevel); - - private: wxVtk3DBaseView *_wxvtk3Dbaseview; vtkMPR3DDataViewer *_vtkmpr3Ddataviewer; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx index 790d3bc..dd182d5 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx @@ -60,7 +60,10 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV _ckBoxZ = new wxCheckBox(panel,-1,_T("Z ")); _positionZ = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS); - _ckBoxXYZ = new wxCheckBox(panel,-1,_T("XYZ axis ")); + _ckBoxXYZ = new wxCheckBox(panel,-1,_T("3D Axis ")); + _ckBoxFixAxis2D = new wxCheckBox(panel,-1,_T("2D Fix Axis")); + _opacityAxis = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS); + _ckBoxPlane = new wxCheckBox(panel,-1,_T("Plane")); ////EED 05Nov2012 _ckBox_BW_Color_Plane = new wxCheckBox(panel,-1,_T("GL/Color")); wxButton *btnColorTable = new wxButton (panel, -1, _T("Color table") ); @@ -108,32 +111,28 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV _cbStereo->Append(_T(" * STEREO ANAGLYPH")); _cbStereo->Append(_T(" STEREO CHECKERBOARD")); _cbStereo->Select(0); + + Connect(_ckBoxX->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX ); + Connect(_positionX->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionX ); + Connect(_ckBoxY->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY ); + Connect(_positionY->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionY ); + Connect(_ckBoxZ->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ ); + Connect(_positionZ->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionZ ); - - - - Connect(_ckBoxX->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX ); - Connect(_positionX->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionX ); - Connect(_ckBoxY->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY ); - Connect(_positionY->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionY ); - Connect(_ckBoxZ->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ ); - Connect(_positionZ->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionZ ); - - Connect(btnColorTable->GetId() , wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnEditColorTable ); - Connect(_ckBoxXYZ->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ ); - Connect(_ckBoxPlane->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisiblePlane ); -////EED 05Nov2012 Connect(_ckBox_BW_Color_Plane->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::On_BW_Color_Plane ); - - Connect(_ckFreePlaneX->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX ); - Connect(_ckFreePlaneY->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY ); - Connect(_ckFreePlaneZ->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ ); - Connect(btnFreePlanesOrtho->GetId() , wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho ); - Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction ); - Connect(_cbStereo->GetId() , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo ); - Connect(_ckBoxOutline->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline ); - Connect(_ckBoxBackGroundBlack->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack ); - Connect(_ckBoxInterpolate->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate ); - + Connect(btnColorTable->GetId() , wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnEditColorTable ); + Connect(_ckBoxXYZ->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ ); + Connect(_ckBoxPlane->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisiblePlane ); + Connect(_ckFreePlaneX->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX); + Connect(_ckFreePlaneY->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY); + Connect(_ckFreePlaneZ->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ); + Connect(btnFreePlanesOrtho->GetId() , wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho ); + Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction ); + Connect(_cbStereo->GetId() , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo ); + Connect(_ckBoxOutline->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline ); + Connect(_ckBoxBackGroundBlack->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack ); + Connect(_ckBoxInterpolate->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate ); + Connect(_ckBoxFixAxis2D->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFixAxis2D ); + Connect(_opacityAxis->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOpacityAxis ); wxFlexGridSizer *sizer; @@ -142,6 +141,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV //CPR: If-else statements added 30 Nov 2009 wxFlexGridSizer *sizerH4; + wxFlexGridSizer *sizerH4a; wxFlexGridSizer *sizerH5; wxFlexGridSizer *sizerH6; @@ -149,50 +149,58 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV { sizer = new wxFlexGridSizer(4); sizerH4 = new wxFlexGridSizer(3); + sizerH4a = new wxFlexGridSizer(3); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH4->Add( new wxStaticText(panel, -1,_T("GL")) , 1, wxALL|wxEXPAND, 0); - sizerH4->Add( new wxStaticText(panel, -1,_T("Color ")) , 1, wxALL|wxEXPAND, 0); - - sizerH4->Add( _positionX ,1,wxGROW , 0 ); - sizerH4->Add( _ckFreePlaneX, 1, wxALL|wxEXPAND, 0); - sizerH4->Add( _ckBoxX ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 ); - - sizerH4->Add( _positionY ,1,wxGROW, 0 ); - sizerH4->Add( _ckFreePlaneY, 1, wxALL|wxEXPAND, 0); - sizerH4->Add( _ckBoxY ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 ); - - sizerH4->Add( _positionZ ,1,wxGROW, 0 ); - sizerH4->Add( _ckFreePlaneZ, 1, wxALL|wxEXPAND, 0); - sizerH4->Add( _ckBoxZ ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 ); + sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( new wxStaticText(panel, -1,_T("GL")) ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( new wxStaticText(panel, -1,_T("Color ")),1, wxALL|wxEXPAND , 0); + sizerH4->Add( _positionX ,1, wxGROW , 0); + sizerH4->Add( _ckFreePlaneX ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( _ckBoxX ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH4->Add( _positionY ,1, wxGROW , 0); + sizerH4->Add( _ckFreePlaneY ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( _ckBoxY ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH4->Add( _positionZ ,1, wxGROW , 0); + sizerH4->Add( _ckFreePlaneZ ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( _ckBoxZ ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); //EED 2016/02/19 - sizerH4->Add( _ckBoxInterpolate , 1, wxALL|wxEXPAND, 0); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - - + sizerH4->Add( _ckBoxInterpolate ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); +// sizerH4->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0); +// sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); +// sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); + +// sizerH4a->Add( new wxStaticText(panel, -1,_T("Axis 2D:")),1, wxALL|wxEXPAND , 0); + sizerH4a->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0); + sizerH4a->Add( _ckBoxFixAxis2D ,1, wxALL|wxEXPAND , 0); + sizerH4a->Add( _opacityAxis ,1, wxALL|wxEXPAND , 0); + + sizerH4->Add( sizerH4a ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); + sizerH5 = new wxFlexGridSizer(1); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( _ckBoxXYZ , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); -////EED 05Nov2012 sizerH5->Add( _ckBox_BW_Color_Plane , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( btnFreePlanesOrtho , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 ); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( btnColorTable , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 ); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH5->Add( _cbStereo, 1, wxALL|wxEXPAND, 0); + sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); +////EED 05Nov2012 sizerH5->Add( _ckBox_BW_Color_Plane , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( btnFreePlanesOrtho , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( btnColorTable , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( _cbStereo , 1, wxALL|wxEXPAND , 0); sizerH6 = new wxFlexGridSizer(1); - sizerH6->Add( _ckBoxOutline , 1, wxALL|wxEXPAND, 0); - sizerH6->Add( _ckBoxBackGroundBlack , 1, wxALL|wxEXPAND, 0); + sizerH6->Add( _ckBoxOutline , 1, wxALL|wxEXPAND , 0); + sizerH6->Add( _ckBoxBackGroundBlack , 1, wxALL|wxEXPAND , 0); - sizer->Add( sizerH4, 1, wxALL|wxGROW, 2); + sizer->Add( sizerH4 , 1, wxALL|wxGROW, 2); sizer->Add( sizerH5, 1, wxALL|wxEXPAND,2); sizer->Add( sizerH6, 1, wxALL|wxEXPAND,2); @@ -711,12 +719,27 @@ void wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack(wxCommandEvent& event) void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event) { _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetInterpolate( _ckBoxInterpolate->GetValue() ); - _wxvtkmpr3Dview->Refresh(); + wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh + _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1); +} +//------------------------------------------------------------------- +void wxVtkMPR3DViewCntrlPanel::OnFixAxis2D(wxCommandEvent& event) +{ + _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetFixAxis2D( _ckBoxFixAxis2D->GetValue() ); + _wxvtkmpr3Dview->Refresh(); wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1); +} +//------------------------------------------------------------------- +void wxVtkMPR3DViewCntrlPanel::OnOpacityAxis(wxCommandEvent& event) +{ + _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetOpacityAxis( _opacityAxis->GetValue()/100.0 ); + _wxvtkmpr3Dview->Refresh(); + wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh + _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.h index b3f971d..c38439e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.h @@ -45,9 +45,7 @@ public: void OnPositionZ(wxScrollEvent& event); void OnVisibleAxisXYZ(wxCommandEvent& event); void OnVisiblePlane(wxCommandEvent& event); - void OnEditColorTable(wxCommandEvent& event); -////EED 05Nov2012 void On_BW_Color_Plane(wxCommandEvent& event); - + void OnEditColorTable(wxCommandEvent& event); void OnVisibleFreePlaneX(wxCommandEvent& event); void OnVisibleFreePlaneY(wxCommandEvent& event); void OnVisibleFreePlaneZ(wxCommandEvent& event); @@ -57,6 +55,8 @@ public: void OnOutline(wxCommandEvent& event); void OnBackGroundBlack(wxCommandEvent& event); void OnInterpolate(wxCommandEvent& event); + void OnFixAxis2D(wxCommandEvent& event); + void OnOpacityAxis(wxCommandEvent& event); virtual void Refresh(); @@ -100,6 +100,8 @@ private: ////EED 05Nov2012 wxCheckBox *_ckBox_BW_Color_Plane; wxCheckBox *_ckBoxXYZ; + wxCheckBox *_ckBoxFixAxis2D; + wxSlider *_opacityAxis; wxCheckBox *_ckBoxPlane; wxCheckBox *_ckFreePlaneX; -- 2.47.1