]> Creatis software - creaMaracasVisu.git/commitdiff
*** empty log message ***
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Thu, 14 May 2009 13:54:26 +0000 (13:54 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Thu, 14 May 2009 13:54:26 +0000 (13:54 +0000)
294 files changed:
lib/CMakeLists.txt
lib/maracasVisuLib/CMakeLists.txt
lib/maracasVisuLib/src/CMakeListsWorking.txt_CP [moved from lib/maracasVisuLib/src/CMakeListsWorking.txt with 100% similarity]
lib/maracasVisuLib/src/CP.txt [moved from lib/maracasVisuLib/src/CMakeLists.txt with 100% similarity]
lib/maracasVisuLib/src/interface/CMakeLists.txt_CP [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/include/MaracasDll.cpp [moved from lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.cpp with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/MaracasDll.h [moved from lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/StdAfx.cpp [moved from lib/maracasVisuLib/src/interface/wxWindows/StdAfx.cpp with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/StdAfx.h [moved from lib/maracasVisuLib/src/interface/wxWindows/StdAfx.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.h [moved from lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/marDictionary.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/marDictionary.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/marDictionary.h [moved from lib/maracasVisuLib/src/interface/wxWindows/marDictionary.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.h with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.h with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.cxx with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.cxx with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.h with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.cxx with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.h with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.cxx with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.h [moved from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.h with 96% similarity]
lib/maracasVisuLib/src/interface/wxWindows/manualContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/Copie de wxSTLWidget_03.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/Copie de wxSTLWidget_03.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/Copie de wxSTLWidget_03.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/Copie de wxSTLWidget_03.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/chart.cpp [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.cpp with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/chart.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.h with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.h with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.cxx_ [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.h_ [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.h with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget_2.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget_2.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanel_3_Widget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanel_3_Widget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageBrowserWdg.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageBrowserWdg.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.h with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.h with 97% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxParametersDialog.cpp [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.cpp with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxParametersDialog.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxPathologyWidget_01.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxPathologyWidget_01.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.h with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.h with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.h with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxReadingPriorityPanel.cpp [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.cpp with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxReadingPriorityPanel.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSTLWidget_02.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSTLWidget_02.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceMPR.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.cxx with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceMPR.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.h with 100% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.cxx [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.cxx with 99% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.h [moved from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.h with 98% similarity]
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerData.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerData.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerDataMhd.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerDataMhd.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewPanel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3D.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3D.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3DMHD.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3DMHD.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane_in_MPR.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane_in_MPR.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx
lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h
lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx
lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h
lib/maracasVisuLib/src/kernel/CMakeLists.txt_CP [moved from lib/maracasVisuLib/src/kernel/CMakeLists.txt with 100% similarity]
lib/maracasVisuLib/src/kernel/include/CMakeLists.txt [new file with mode: 0644]
lib/maracasVisuLib/src/kernel/include/axisExtractor.cxx [moved from lib/maracasVisuLib/src/kernel/axisExtractor.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/axisExtractor.h [moved from lib/maracasVisuLib/src/kernel/axisExtractor.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/axisExtractor02.cxx [moved from lib/maracasVisuLib/src/kernel/axisExtractor02.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/axisExtractor02.h [moved from lib/maracasVisuLib/src/kernel/axisExtractor02.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/carotidaBifurcacion.cxx [moved from lib/maracasVisuLib/src/kernel/carotidaBifurcacion.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/carotidaBifurcacion.h [moved from lib/maracasVisuLib/src/kernel/carotidaBifurcacion.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/curve.cxx [moved from lib/maracasVisuLib/src/kernel/curve.cxx with 99% similarity]
lib/maracasVisuLib/src/kernel/include/curve.hxx [moved from lib/maracasVisuLib/src/kernel/curve.hxx with 98% similarity]
lib/maracasVisuLib/src/kernel/include/gslobj.hxx [moved from lib/maracasVisuLib/src/kernel/gslobj.hxx with 99% similarity]
lib/maracasVisuLib/src/kernel/include/itkFM3D.cxx [moved from lib/maracasVisuLib/src/kernel/itkFM3D.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/itkFM3D.h [moved from lib/maracasVisuLib/src/kernel/itkFM3D.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/itkImageToVTKImageFilter.h [moved from lib/maracasVisuLib/src/kernel/itkImageToVTKImageFilter.h with 98% similarity]
lib/maracasVisuLib/src/kernel/include/itkVTKImageToImageFilter.h [moved from lib/maracasVisuLib/src/kernel/itkVTKImageToImageFilter.h with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marAxis.cpp [moved from lib/maracasVisuLib/src/kernel/marAxis.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marAxis.h [moved from lib/maracasVisuLib/src/kernel/marAxis.h with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marAxisCT.cpp [moved from lib/maracasVisuLib/src/kernel/marAxisCT.cpp with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marAxisCT.h [moved from lib/maracasVisuLib/src/kernel/marAxisCT.h with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp [moved from lib/maracasVisuLib/src/kernel/marAxisContours.cpp with 97% similarity]
lib/maracasVisuLib/src/kernel/include/marAxisContours.h [moved from lib/maracasVisuLib/src/kernel/marAxisContours.h with 96% similarity]
lib/maracasVisuLib/src/kernel/include/marContourVO.cpp [moved from lib/maracasVisuLib/src/kernel/marContourVO.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marContourVO.h [moved from lib/maracasVisuLib/src/kernel/marContourVO.h with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marExperiment.cpp [moved from lib/maracasVisuLib/src/kernel/marExperiment.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marExperiment.h [moved from lib/maracasVisuLib/src/kernel/marExperiment.h with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marExperimentCT.cpp [moved from lib/maracasVisuLib/src/kernel/marExperimentCT.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marExperimentCT.h [moved from lib/maracasVisuLib/src/kernel/marExperimentCT.h with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marInterface.cpp [moved from lib/maracasVisuLib/src/kernel/marInterface.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marInterface.h [moved from lib/maracasVisuLib/src/kernel/marInterface.h with 97% similarity]
lib/maracasVisuLib/src/kernel/include/marInterfaceCT.cpp [moved from lib/maracasVisuLib/src/kernel/marInterfaceCT.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marInterfaceCT.h [moved from lib/maracasVisuLib/src/kernel/marInterfaceCT.h with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marIsocontour.cpp [moved from lib/maracasVisuLib/src/kernel/marIsocontour.cpp with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marIsocontour.h [moved from lib/maracasVisuLib/src/kernel/marIsocontour.h with 96% similarity]
lib/maracasVisuLib/src/kernel/include/marKVolume.cpp [moved from lib/maracasVisuLib/src/kernel/marKVolume.cpp with 97% similarity]
lib/maracasVisuLib/src/kernel/include/marKVolume.h [moved from lib/maracasVisuLib/src/kernel/marKVolume.h with 93% similarity]
lib/maracasVisuLib/src/kernel/include/marLine.cpp [moved from lib/maracasVisuLib/src/kernel/marLine.cpp with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marLine.h [moved from lib/maracasVisuLib/src/kernel/marLine.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marMathConst.h [moved from lib/maracasVisuLib/src/kernel/marMathConst.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marMatrix.cpp [moved from lib/maracasVisuLib/src/kernel/marMatrix.cpp with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marMatrix.h [moved from lib/maracasVisuLib/src/kernel/marMatrix.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marPoint.cpp [moved from lib/maracasVisuLib/src/kernel/marPoint.cpp with 98% similarity]
lib/maracasVisuLib/src/kernel/include/marPoint.h [moved from lib/maracasVisuLib/src/kernel/marPoint.h with 96% similarity]
lib/maracasVisuLib/src/kernel/include/marSimpleDicom.cpp [moved from lib/maracasVisuLib/src/kernel/marSimpleDicom.cpp with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marSimpleDicom.h [moved from lib/maracasVisuLib/src/kernel/marSimpleDicom.h with 99% similarity]
lib/maracasVisuLib/src/kernel/include/marUtils.cpp [moved from lib/maracasVisuLib/src/kernel/marUtils.cpp with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marUtils.h [moved from lib/maracasVisuLib/src/kernel/marUtils.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marVector.cpp [moved from lib/maracasVisuLib/src/kernel/marVector.cpp with 100% similarity]
lib/maracasVisuLib/src/kernel/include/marVector.h [moved from lib/maracasVisuLib/src/kernel/marVector.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/matrix.cxx [moved from lib/maracasVisuLib/src/kernel/matrix.cxx with 99% similarity]
lib/maracasVisuLib/src/kernel/include/vector.cxx [moved from lib/maracasVisuLib/src/kernel/vector.cxx with 99% similarity]
lib/maracasVisuLib/src/kernel/include/vtkDijkstraImageData.cxx [moved from lib/maracasVisuLib/src/kernel/vtkDijkstraImageData.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkDijkstraImageData.h [moved from lib/maracasVisuLib/src/kernel/vtkDijkstraImageData.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkJoiner.cxx [moved from lib/maracasVisuLib/src/kernel/vtkJoiner.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkJoiner.h [moved from lib/maracasVisuLib/src/kernel/vtkJoiner.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkOtsu.cxx [moved from lib/maracasVisuLib/src/kernel/vtkOtsu.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkOtsu.h [moved from lib/maracasVisuLib/src/kernel/vtkOtsu.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkOtsuImageData.cxx [moved from lib/maracasVisuLib/src/kernel/vtkOtsuImageData.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkOtsuImageData.h [moved from lib/maracasVisuLib/src/kernel/vtkOtsuImageData.h with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkOtsuSphereSource.cxx [moved from lib/maracasVisuLib/src/kernel/vtkOtsuSphereSource.cxx with 100% similarity]
lib/maracasVisuLib/src/kernel/include/vtkOtsuSphereSource.h [moved from lib/maracasVisuLib/src/kernel/vtkOtsuSphereSource.h with 100% similarity]
lib/maracasVisuLib/src/kernel/itkImageToVTKImageFilter.txx
lib/maracasVisuLib/src/kernel/itkVTKImageToImageFilter.txx
lib/maracasVisuLib/src/kernel/marDynData.cpp
lib/maracasVisuLib/src/kernel/marDynData.h
lib/maracasVisuLib/src/kernel/marObject.cpp
lib/maracasVisuLib/src/kernel/marObject.h
lib/maracasVisuLib/src/kernel/marParameters.cpp
lib/maracasVisuLib/src/kernel/marParameters.h
lib/maracasVisuLib/src/kernel/marTypes.h
lib/maracasVisuLib/src/kernel/volume.cxx
lib/maracasVisuLib/src/kernel/volume.hxx

index d134e4a2265d44705332472207d2fea20555fdc9..fd55a3fa512ee4d79e708e62f228af08672e49ad 100644 (file)
@@ -1,3 +1,3 @@
 # Add a SUBDIRS command for each of your libraries
 SUBDIRS(maracasVisuLib)
-SUBDIRS(doxygen)
+#SUBDIRS(doxygen)
index df1664281d63e6882810a6fbfe558c71b9f5123c..b5ab09f7df47aabe0a9c36270f4623f124946431 100644 (file)
@@ -1,5 +1,7 @@
 #----------------------------------------------------------------------------
 # SET THE NAME OF YOUR LIBRARY
+
+
 SET ( LIBRARY_NAME   creaMaracasVisu  )
 #----------------------------------------------------------------------------
 
@@ -44,70 +46,91 @@ IF ( BUILD_${LIBRARY_NAME} )
   # EITHER LIST ALL .h IN CURRENT DIR USING NEXT LINE:
   #FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h")
   # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
+  
+  FILE(GLOB ${LIBRARY_NAME}_HEADERS_WXWIN "src/interface/wxWindows/*.h")
+  FILE(GLOB ${LIBRARY_NAME}_SOURCES_WXWIN src/interface/wxWindows/*.cxx src/interface/wxWindows/*.cpp src/interface/wxWindows/*.cc)
+  
+  FILE(GLOB ${LIBRARY_NAME}_HEADERS_CONTOUR "src/interface/wxWindows/Contour/*.h")
+  FILE(GLOB ${LIBRARY_NAME}_SOURCES_CONTOUR src/interface/wxWindows/Contour/*.cxx src/interface/wxWindows/Contour/*.cpp src/interface/wxWindows/Contour/*.cc)
+  
+  FILE(GLOB ${LIBRARY_NAME}_HEADERS_WIDGETS "src/interface/wxWindows/widgets/*.h")
+  FILE(GLOB ${LIBRARY_NAME}_SOURCES_WIDGETS src/interface/wxWindows/widgets/*.cxx src/interface/wxWindows/widgets/*.cpp src/interface/wxWindows/widgets/*.cc)
+  
+  FILE(GLOB ${LIBRARY_NAME}_HEADERS_PPLOTTER "src/interface/wxWindows/widgets/pPlotter/*.h")
+  FILE(GLOB ${LIBRARY_NAME}_SOURCES_PPLOTTER src/interface/wxWindows/widgets/pPlotter/*.cxx src/interface/wxWindows/widgets/pPlotter/*.cpp src/interface/wxWindows/widgets/pPlotter/*.cc)
+  
+  FILE(GLOB ${LIBRARY_NAME}_HEADERS_KERNEL "src/kernel/*.h")
+  FILE(GLOB ${LIBRARY_NAME}_SOURCES_KERNEL src/kernel/*.cxx src/kernel/*.cpp src/kernel/*.cc)
+  
+    
   SET ( ${LIBRARY_NAME}_HEADERS
-       src/interface/wxWindows/manualContour.h
-       src/interface/wxWindows/Contour/ContourCrownWidget.h
-       src/interface/wxWindows/Contour/ContourExtractData.h
-       src/interface/wxWindows/Contour/ContourVOIWidget.h  
-    src/interface/wxWindows/Contour/Propagation.h
-    src/interface/wxWindows/Contour/ExtractControlPoints2D.h
-    src/interface/wxWindows/Contour/AutoControlPoints.h
-    src/interface/wxWindows/Contour/ContourPropagation.h
-    src/interface/wxWindows/Contour/contoursIntersection.h
-    src/interface/wxWindows/Contour/vectorFunctions.h
+       #src/interface/wxWindows/manualContour.h
+       #src/interface/wxWindows/wxMaracasMPR.h
+       #src/interface/wxWindows/wxMaracas_ManualTree_MPR.h
+       ${${LIBRARY_NAME}_HEADERS_WXWIN}        
+       #src/interface/wxWindows/Contour/AutoControlPoints.h
+       #src/interface/wxWindows/Contour/ContourCrownWidget.h
+       #src/interface/wxWindows/Contour/ContourExtractData.h
+       #src/interface/wxWindows/Contour/ContourPropagation.h
+       #src/interface/wxWindows/Contour/contoursIntersection.h
+       #src/interface/wxWindows/Contour/ContourVOIWidget.h
+       #src/interface/wxWindows/Contour/ExtractControlPoints2D.h  
+    #src/interface/wxWindows/Contour/Propagation.h
+    #src/interface/wxWindows/Contour/vectorFunctions.h
+    ${${LIBRARY_NAME}_HEADERS_CONTOUR}    
 ##    src/interface/wxWindows/wxMaracasImageBrowser02.h
 ##    src/interface/wxWindows/widgets/wxReadingPriorityPanel.h
-    src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h
-    src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.h
-    src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h
-    src/interface/wxWindows/widgets/vtkClosePolyData.h
-    src/interface/wxWindows/wxMaracasMPR.h
-    src/interface/wxWindows/widgets/wxMPRWidget.h
-    src/interface/wxWindows/widgets/wxMPRBaseData.h
-    src/interface/wxWindows/widgets/wxVtkBaseView.h
-    src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h 
-    src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h
-       
-       src/interface/wxWindows/widgets/wxMaracasIRMView.h
-       src/interface/wxWindows/widgets/wxMaracasIRMViewManager.h
-       
-    src/interface/wxWindows/wxMaracas_ManualTree_MPR.h
-    src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h
-    src/interface/wxWindows/widgets/ContourView.h
-    src/interface/wxWindows/widgets/PointView.h
-    src/interface/wxWindows/widgets/LineView.h
-    src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h
-    src/interface/wxWindows/widgets/pPlotter/HistogramDialog.h
-    src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h
-    src/interface/wxWindows/widgets/pPlotter/pHistogram.h
-    src/interface/wxWindows/widgets/pPlotter/mBarRange.h
-    src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.h
-    src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.h
-    src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.h
-    src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.h
-    src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.h
-    src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.h
-    src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.h
-    src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.h
-    src/interface/wxWindows/widgets/pPlotter/pColorBar.h
-    src/interface/wxWindows/widgets/pPlotter/pFigure.h
-    src/interface/wxWindows/widgets/pPlotter/pColorPoint.h
-    src/interface/wxWindows/widgets/pPlotter/pPlotter.h
-    src/interface/wxWindows/widgets/pPlotter/mathplot.h
-    src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.h
-    src/interface/wxWindows/widgets/pPlotter/Histogram.h
-       src/interface/wxWindows/widgets/wxSTLWidget_03.h
+    #src/interface/wxWindows/widgets/ContourView.h
+    #src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h
+    #src/interface/wxWindows/widgets/LineView.h
+    #src/interface/wxWindows/widgets/PointView.h
+    #src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h
+    #src/interface/wxWindows/widgets/vtkClosePolyData.h        
+    #src/interface/wxWindows/widgets/wxMaracasIRMView.h
+       #src/interface/wxWindows/widgets/wxMaracasIRMViewManager.h      
+    #src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h 
+    #src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h        
+    #src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h    
+    #src/interface/wxWindows/widgets/wxMPRBaseData.h
+    #src/interface/wxWindows/widgets/wxMPRWidget.h    
+    #src/interface/wxWindows/widgets/wxSTLWidget_03.h    
+    #src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h
+    #src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.h
+    #src/interface/wxWindows/widgets/wxVtkBaseView.h
+    ${${LIBRARY_NAME}_HEADERS_WIDGETS}    
+    #src/interface/wxWindows/widgets/pPlotter/Histogram.h
+    #src/interface/wxWindows/widgets/pPlotter/HistogramDialog.h
+    #src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h
+    #src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.h
+    #src/interface/wxWindows/widgets/pPlotter/mBarRange.h
+    #src/interface/wxWindows/widgets/pPlotter/mathplot.h
+    #src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.h
+    #src/interface/wxWindows/widgets/pPlotter/pColorBar.h
+    #src/interface/wxWindows/widgets/pPlotter/pColorPoint.h
+    #src/interface/wxWindows/widgets/pPlotter/pFigure.h
+    #src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.h
+    #src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.h
+    #src/interface/wxWindows/widgets/pPlotter/pHistogram.h    
+    #src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.h
+    #src/interface/wxWindows/widgets/pPlotter/pPlotter.h
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.h
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.h
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.h    
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.h
+    ${${LIBRARY_NAME}_HEADERS_PPLOTTER}
+    
     include/matrix.h
-    src/kernel/marImageData.h
-    src/kernel/marDicomBase.h
-  #  src/kernel/marGdcmDicom.h
-    src/kernel/marObject.h
-    src/kernel/volume.hxx
-    src/kernel/marTypes.h
-    src/kernel/marParameters.h
-    src/kernel/marDynData.h
-    src/kernel/creaMaracasVisu_EXPORT.h 
-       src/kernel/vtkSTLExtractor.h
+    
+    #src/kernel/marImageData.h
+    #src/kernel/marDicomBase.h  
+    #src/kernel/marObject.h
+    #src/kernel/volume.hxx
+    #src/kernel/marTypes.h
+    #src/kernel/marParameters.h
+    #src/kernel/marDynData.h
+    #src/kernel/creaMaracasVisu_EXPORT.h 
+       #src/kernel/vtkSTLExtractor.h
+       ${${LIBRARY_NAME}_HEADERS_KERNEL}
   )
   #----------------------------------------------------------------------------
 
@@ -116,70 +139,73 @@ IF ( BUILD_${LIBRARY_NAME} )
   # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
   #FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc)
   # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
+  
   SET ( ${LIBRARY_NAME}_SOURCES 
-       src/interface/wxWindows/manualContour.cpp
-       src/interface/wxWindows/Contour/ContourCrownWidget.cxx
-       src/interface/wxWindows/Contour/ContourExtractData.cxx
-    src/interface/wxWindows/Contour/ContourVOIWidget.cxx
-    src/interface/wxWindows/Contour/Propagation.cxx
-    src/interface/wxWindows/Contour/ExtractControlPoints2D.cxx
-    src/interface/wxWindows/Contour/AutoControlPoints.cxx
-    src/interface/wxWindows/Contour/ContourPropagation.cxx
-    src/interface/wxWindows/Contour/contoursIntersection.cxx
-    src/interface/wxWindows/Contour/vectorFunctions.cxx
+       #src/interface/wxWindows/manualContour.cpp
+       #src/interface/wxWindows/wxMaracasMPR.cxx
+       #src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx   
+       ${${LIBRARY_NAME}_SOURCES_WXWIN}        
+       #src/interface/wxWindows/Contour/AutoControlPoints.cxx  
+       #src/interface/wxWindows/Contour/ContourCrownWidget.cxx 
+       #src/interface/wxWindows/Contour/ContourExtractData.cxx
+       #src/interface/wxWindows/Contour/ContourPropagation.cxx
+       #src/interface/wxWindows/Contour/contoursIntersection.cxx       
+    #src/interface/wxWindows/Contour/ContourVOIWidget.cxx    
+    #src/interface/wxWindows/Contour/ExtractControlPoints2D.cxx
+    #src/interface/wxWindows/Contour/Propagation.cxx    
+    #src/interface/wxWindows/Contour/vectorFunctions.cxx
+    ${${LIBRARY_NAME}_SOURCES_CONTOUR}
 #    src/interface/wxWindows/wxMaracasImageBrowser02.cxx
 #    src/interface/wxWindows/widgets/wxReadingPriorityPanel.cpp
+    #src/interface/wxWindows/widgets/ContourView.cxx
+    #src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx
+    #src/interface/wxWindows/widgets/LineView.cxx
+    #src/interface/wxWindows/widgets/PointView.cxx    
+    #src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx
+    #src/interface/wxWindows/widgets/vtkClosePolyData.cxx
+    #src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx
+    #src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
+    #src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx
+       #src/interface/wxWindows/widgets/wxMaracasIRMView.cxx
+       #src/interface/wxWindows/widgets/wxMaracasIRMViewManager.cxx
+       #src/interface/wxWindows/widgets/wxMPRWidget.cxx
+    #src/interface/wxWindows/widgets/wxMPRBaseData.cxx 
+    #src/interface/wxWindows/widgets/wxSTLWidget_03.cxx
+    #src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx
+    #src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.cxx    
+    #src/interface/wxWindows/widgets/wxVtkBaseView.cxx
+    ${${LIBRARY_NAME}_SOURCES_WIDGETS}
+    #src/interface/wxWindows/widgets/pPlotter/Histogram.cxx
+    #src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx
+    #src/interface/wxWindows/widgets/pPlotter/HistogramWidget.cxx
+    #src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx
+    #src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx
+    #src/interface/wxWindows/widgets/pPlotter/mathplot.cxx
+    #src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pColorBar.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pColorPoint.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pFigure.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx    
+    #src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pPlotter.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.cxx
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.cxx    
+    #src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx
+    ${${LIBRARY_NAME}_SOURCES_PPLOTTER}
        
-       src/interface/wxWindows/widgets/wxMaracasIRMView.cxx
-       src/interface/wxWindows/widgets/wxMaracasIRMViewManager.cxx
-       
-    src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx
-    src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.cxx
-    src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx
-    src/interface/wxWindows/widgets/vtkClosePolyData.cxx
-    src/interface/wxWindows/wxMaracasMPR.cxx
-    src/interface/wxWindows/widgets/wxMPRWidget.cxx
-    src/interface/wxWindows/widgets/wxMPRBaseData.cxx
-    src/interface/wxWindows/widgets/wxVtkBaseView.cxx
-    src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
-    src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx
-    src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx
-    src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx
-    src/interface/wxWindows/res/wxInterface.rc
-    src/interface/wxWindows/widgets/ContourView.cxx
-    src/interface/wxWindows/widgets/PointView.cxx
-    src/interface/wxWindows/widgets/LineView.cxx
-    src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx
-#####pPlotter classes
-    src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx
-    src/interface/wxWindows/widgets/pPlotter/HistogramWidget.cxx
-    src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx
-    src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx
-    src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.cxx
-    src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx
-    src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.cxx
-    src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.cxx
-    src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx
-    src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.cxx
-    src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.cxx
-    src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.cxx
-    src/interface/wxWindows/widgets/pPlotter/pColorBar.cxx
-    src/interface/wxWindows/widgets/pPlotter/pFigure.cxx
-    src/interface/wxWindows/widgets/pPlotter/pColorPoint.cxx
-    src/interface/wxWindows/widgets/pPlotter/pPlotter.cxx
-    src/interface/wxWindows/widgets/pPlotter/mathplot.cxx
-    src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.cxx
-    src/interface/wxWindows/widgets/pPlotter/Histogram.cxx
-       src/interface/wxWindows/widgets/wxSTLWidget_03.cxx
 ###
-       src/kernel/marImageData.cpp
-       src/kernel/marDicomBase.cpp
+       #src/kernel/marImageData.cpp
+       #src/kernel/marDicomBase.cpp
 #      src/kernel/marGdcmDicom.cpp
-       src/kernel/marObject.cpp
-       src/kernel/volume.cxx
-       src/kernel/marParameters.cpp
-       src/kernel/marDynData.cpp       
-       src/kernel/vtkSTLExtractor.cpp
+       #src/kernel/marObject.cpp
+       #src/kernel/volume.cxx
+       #src/kernel/marParameters.cpp
+       #src/kernel/marDynData.cpp      
+       #src/kernel/vtkSTLExtractor.cpp
+       ${${LIBRARY_NAME}_SOURCES_KERNEL}
   )
   #----------------------------------------------------------------------------
 #jhcl-Start===========================================================================
@@ -223,8 +249,8 @@ IF ( BUILD_${LIBRARY_NAME} )
 
 
   
-  # CREATE THE TARGET
-  ADD_LIBRARY(${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
+  # CREATE THE TARGET  
+  ADD_LIBRARY (${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
 
   # LINK
   TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES})
diff --git a/lib/maracasVisuLib/src/interface/CMakeLists.txt_CP b/lib/maracasVisuLib/src/interface/CMakeLists.txt_CP
new file mode 100644 (file)
index 0000000..be0a96d
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS(wxWindows)
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.cxx
index 98937b632e1d4ed2b8a706f924a2fe000f006ce9..72b4bcb038415ab10f2af486df4c08c24217cabe 100644 (file)
@@ -4,7 +4,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: manualContourContainer.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:09 $
+ Date:      $Date: 2009/05/14 13:54:54 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.h
index 2d2754988d133a0c6b87412bf0d32172281ca1f2..25071c1690634b957c1dbab30e77133fa432d645 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: manualContourContainer.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.cxx
index 46e3e49abe21c4f5267b1f57f380fd26ce2fb239..78c539fc4e046c8012cba11be06207079400b9f5 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas3DBrowser.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.h
index 64fa2084ddb297b8e8d7900facefc5a35b8f7a2c..ebba711220a8ae4897d485f227c7f291ec40076f 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas3DBrowser.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.cxx
index ac6979e5dc59961b746e830530baf0c0ade0a994..3787a8b0ab9609c14910551a6d0312c007ac613b 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxMaracasApp.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:09 $
+ Date:      $Date: 2009/05/14 13:54:54 $
  Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.h
index 927fd29fb5b6e66c342088ba481e562bb456d53d..4a0d90c5ed34222c35cc6490de5aa89f10738459 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasApp.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.cxx
index 91ba1f1c8e09c791d85c401f509f474667568ba4..8f58704c1606a3494c57a30d0112c37ac478138a 100644 (file)
@@ -3,8 +3,8 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxMaracasApp02.cxx,v $
  Language:  C++
- Date:      $Date: 2008/11/21 17:24:42 $
- Version:   $Revision: 1.2 $
+ Date:      $Date: 2009/05/14 13:54:54 $
+ Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
   License:
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.h
index 0f9dc7325827347cd92862686ddef3b57fe7a11f..13a5471a4ce05fc17225a090c5eecd2eb5163846 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasApp02.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.cxx
index 961730fae79a9b7b214b1ba40c59e085c5f9dcd3..2cc37ebade9c2b93f5ff1b7b0f96878c272a1164 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasEmptyPanel.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.h
index 0c4d81399d90180031d7cedd72987b5456b276b0..c778c2d3ff5340aef6b96b138578dcec64ce21b4 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasEmptyPanel.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.cxx
index c8ae24bf7a2b3208ffeb2cbdb8df9f78e875b5d8..50f1bb9bdc28d9b17190d2ee5436b1f1097671d7 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasEmptyPanel_2.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.h
index bae9bb95ba0f01eea54dc87eb3e28fe61cc843c6..bbf89c68edbee3ac316a37fff1d4384ac37a2259 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasEmptyPanel_2.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:09 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.cxx
index 374426bdbced57f110b32e82719152141b47c46d..27b3afac5bd1d079252c0734a98a2490443e686c 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxMaracasFrame.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:10 $
+ Date:      $Date: 2009/05/14 13:54:54 $
  Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.h
index ef4520ea8c47ff024479551aefef62432aa720a5..0b2b743209d6722d124dcefca5ca20a631eb0b42 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasFrame.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.cxx
index 3b5951b83825825cafb35456cea4fd79eef4856c..f7d546c507ab376efd905e77cd1907de6e9f1e52 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasHelpDialog.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.h
index c4260f2868e1b066b2392da6c60873d35fb79c1e..db5659009385cdf413c81cf7bc28d155a359640f 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasHelpDialog.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.cxx
index 4c11e33911643eac40938e16e4c58006e6431540..93485a319e45b834eee8ade8b125c4ed90adfbb2 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasImageBrowser.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.h
index ee818f63fa523482281c7074fdbe425ddd2d5f8e..3328a458b0084c52c7d060757ebf4de46abe1804 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasImageBrowser.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.cxx
index d3d91983a0e0950274d75950a60122be9cc287e7..eef3c87d1c3978c2877278133e748fd49b417402 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasImageBrowser02.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/21 14:15:17 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2009/05/14 13:54:54 $
+  Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
   License:
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.h
index 09a650a9b4262db012ebac722f5811b9976481d2..063872662f55f3be8cb14712adf954356ad9e3f0 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasImageBrowser02.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.cxx
index 51f194f5e13a778c0958c2e1150cd7c6e99c35cb..09abbf008208a762a955d970df67bcc0a03b66e9 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxMaracasParametersDialog.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:10 $
+ Date:      $Date: 2009/05/14 13:54:54 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.h
index 57f9895bdd0650bd4a23c202602a71db8dfa5c5d..6055f804f5b022dd7d6e9987c3486ef7b138385c 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasParametersDialog.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.cxx
index e07946eb1268ff7f9540bb4fa092e8644fb6bfcb..6509a0e0d83952be134405233e0f4ecc834a4c01 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasPathology_01.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.h
index fc347fc003a18868a4179c19845c2c4195d15240..4aad3634d3b26c4dd86c6b635777dbd1b9a1301d 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasPathology_01.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:10 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.cxx
index 35b6bf47e93a71dbd0d5bbac525df8824be2c849..4b83a0f2f2968f09e4cac43396aa7acccbb65593 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasProcessingCT.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.h
index cdc29ed53384949d685f9430cba7997abad99242..0710bd3805c4f378d09c39bf1104e8e73cf0d5a2 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasProcessingCT.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.cxx
index 2bbc8c3a24d21cf6c13a2cec1ec59d8b72f180cd..9372e82af0d134e44500df06c83385637a5d2588 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasQuantification.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.h
index b54c73ff6a07eadccbb75a883e672e571d36bb49..6bc6fea216ec011d162bede1e092a875c0da3b13 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasQuantification.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.cxx
index 5c944ef793b2fa5c552bc5dba798c25541da2abe..f1687588b722e5f7c5f0346d46d716502c4e6174 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasQuantificationCT.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.h
index eb368d745231dc9d1ecb4da7e53d7cc5c627915b..c6fa2b410f58ffdcb4a6b5ce04d6a8d73589bc07 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasQuantificationCT.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.cxx
index 7cee607955879f21a4957e9407937df3eba48777..f01f3f48c74275f6fd946357299749a6018c1ab1 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualContour_Panel.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.h
index 106a8146530b4585484bae311e8aaaebe8d149e3..fe955a21156c211bbbb2ff0a3a2973e8acea5f8f 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualContour_Panel.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.cxx
index 21d2f0d81e32b304d0d9eec929249eb4b43861df..9c072935f97b2abc31066536470d56e57ac70614 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualSegmentation_MPR.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.h
index d50cca596b6921aa8ddb5811319fed0b524ded36..3cd9992251ce0894c15cc14b5f7f086c1f0196f3 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualSegmentation_MPR.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.cxx
index 53ab434143276af080721c86ee4d2f1bf2da08b4..eb014d8791388c96d837731dbb9827bcb0215f7e 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualTree_MPRDlg.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.h
index 4b077c1871db6b91e176ee6e8e61405d1d02f55f..b87e1d57def4599cfef490a4cc8c07945b3bbaf4 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualTree_MPRDlg.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.cxx
index bb766c24796629a8f92eec977714e9c0e9d570a0..a9683b8dbb31a79b17d121be25ae68512b4c9309 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_SegmentationFM3D.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.h
rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.h
index 1a484bec45f00a1b342662fe01d4ff03e170d842..e7452fd9284402d39a97f04fb3ca759edd48eaf1 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_SegmentationFM3D.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
+  Date:      $Date: 2009/05/14 13:54:54 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
index 2f3f7783060d50b83e39edfa8f1004ddeed20fc3..7b43bbe0963c8b362f4657c170fc01b3cdb03704 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "wxVTKRenderWindowInteractor.h"
 
-
+#include "InteractorStyleMaracas.h"
 //--
 
 #include <vector>
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx
new file mode 100644 (file)
index 0000000..dc80df2
--- /dev/null
@@ -0,0 +1,121 @@
+
+#include "InteractorStyleMaracas.h"
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+InteractorStyleMaracas::InteractorStyleMaracas()
+{
+       _active                                         = true;
+       _vtkInteractorStyleBaseView     = NULL;
+}
+//---------------------------------------------------------------------------
+InteractorStyleMaracas::~InteractorStyleMaracas()
+{
+}
+
+// ----------------------------------------------------------------------------
+InteractorStyleMaracas * InteractorStyleMaracas :: Clone()  // virtual 
+{
+       InteractorStyleMaracas * clone = new InteractorStyleMaracas();
+       CopyAttributesTo(clone);
+       return clone;
+}
+
+// ---------------------------------------------------------------------------
+
+void InteractorStyleMaracas::CopyAttributesTo( InteractorStyleMaracas * cloneObject)
+{
+       // Fathers object
+       //<FATHERCLASS>::CopyAttributesTo(cloneObject);
+
+       cloneObject->SetActive(  this->GetActive() );
+}
+
+
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnChar()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnMouseMove()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnLeftButtonDown()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnLeftButtonUp()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool  InteractorStyleMaracas::OnLeftDClick()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnMiddleButtonDown() 
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnMiddleButtonUp()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnMiddleDClick()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnRightButtonDown()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnRightButtonUp()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnRightDClick()
+{
+       return true;
+}
+//---------------------------------------------------------------------------
+bool InteractorStyleMaracas::OnMouseWheel()
+{
+       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/InteractorStyleMaracas.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.h
new file mode 100644 (file)
index 0000000..9931956
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef INTERACTORSTYLEMARACAS_H_
+#define INTERACTORSTYLEMARACAS_H_
+
+
+#include "marTypes.h"
+//------------------------------------------------------------------
+
+#include "vtkInteractorStyleBaseView.h"
+
+//class vtkInteractorStyleBaseView;
+
+
+class creaMaracasVisu_EXPORT InteractorStyleMaracas 
+{
+public:
+       InteractorStyleMaracas();
+       virtual ~InteractorStyleMaracas();
+
+       virtual InteractorStyleMaracas * Clone();
+       void CopyAttributesTo( InteractorStyleMaracas *cloneObject );
+
+
+       virtual bool  OnChar();
+       virtual bool  OnMouseMove();
+       virtual bool  OnLeftButtonDown(); 
+       virtual bool  OnLeftButtonUp();
+       virtual bool  OnMiddleButtonDown(); 
+       virtual bool  OnMiddleButtonUp();
+       virtual bool  OnRightButtonDown();
+       virtual bool  OnRightButtonUp();
+
+       virtual bool  OnLeftDClick();
+       virtual bool  OnRightDClick();   
+       virtual bool  OnMiddleDClick();  
+       virtual bool  OnMouseWheel();    
+
+       void  SetVtkInteractorStyleBaseView(vtkInteractorStyleBaseView* _vtkInteractorStyleBaseView);   
+       void  RemoveVtkInteractorStyleBaseView();
+       
+       void SetActive(bool active);
+       bool GetActive();
+
+protected:
+       
+       vtkInteractorStyleBaseView* _vtkInteractorStyleBaseView;         
+       //vtkInteractorStyleImage* _vtkInteractorStyleBaseView;
+       
+private:
+       bool                                            _active;
+};
+
+#endif /*INTERACTORSTYLEMARACAS_H_*/
index 39b7e90e36e4d64bbf370936cf09ab74d6b2d573..08006387ad8f334ba482745a150300a346f6c0aa 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: InterfaceVtkPanelWidgets.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:40 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:34 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
index f4f5c3bf76e53c9b5c04ca2ebfb3d390cf348e26..9c8f9df2ea570cf5190967373d8dafe5b7b9b361 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: InterfaceVtkPanelWidgets.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/14 15:57:07 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:34 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
index 1cd27c580dbcef8a7dfcdbe80e897f96c8babe3c..9f3af996df7db71253da9c2e843fa9df715b1afc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: UtilVtk3DGeometriSelection.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:34 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
index 19209df1b0d7042d71c4f285fc4849aaafccc8a2..85d56a752b893d61f605a8526857855f3a008fb9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: UtilVtk3DGeometriSelection.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:34 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx
new file mode 100644 (file)
index 0000000..b1a9022
--- /dev/null
@@ -0,0 +1,34 @@
+
+#include "boxSurfaceObserver.h"
+#include "vtkBoxWidget.h"
+
+void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* calldata) {  // virtual
+       vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
+       boxwidget->GetPlanes(_planes);
+
+       if ( _vtkVolumeRayCastMapper != NULL )
+       {
+               _vtkVolumeRayCastMapper->RemoveAllClippingPlanes();
+//             vtkPlanes *planes = vtkPlanes::New();
+//             boxwidget->GetPlanes(planes);
+//             _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
+               _vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
+       }
+
+//     _actor->VisibilityOn();
+
+}
+//-------------------------------------------------------------------
+void boxSurfaceObserver::SetPlanes(vtkPlanes *planes){
+       _planes = planes;
+}
+//-------------------------------------------------------------------
+void boxSurfaceObserver::SetActor(vtkProp *actor){
+       _actor = actor;
+}
+
+//-------------------------------------------------------------------
+void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
+{
+       _vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.h
new file mode 100644 (file)
index 0000000..e67b5be
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef BOXSURFACEOBSERVER_H_
+#define BOXSURFACEOBSERVER_H_
+
+#include "vtkPlanes.h"
+#include "vtkProp.h"
+#include "vtkVolumeRayCastMapper.h"
+#include "vtkObject.h"
+#include "vtkCommand.h"
+
+
+// Callback for the interaction
+class boxSurfaceObserver : public vtkCommand
+{
+       public:
+               vtkPlanes                                       *_planes;
+               vtkProp                                         *_actor;
+               vtkVolumeRayCastMapper          *_vtkVolumeRayCastMapper;
+
+               boxSurfaceObserver() 
+               {  
+                       _vtkVolumeRayCastMapper = NULL;
+               }
+
+               virtual char const *GetClassName() const { return "boxSurfaceObserver";}
+
+               static boxSurfaceObserver *New(){
+                               boxSurfaceObserver * result;
+                               result = new boxSurfaceObserver();
+                       return result;
+               }
+
+               virtual void Execute(vtkObject *wdg, unsigned long eventId, void* calldata) ;
+               void SetPlanes(vtkPlanes *planes);
+               void SetActor(vtkProp *actor);
+               void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
+};
+
+
+
+#endif /*BOXSURFACEOBSERVER_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.cxx
new file mode 100644 (file)
index 0000000..cf3696c
--- /dev/null
@@ -0,0 +1,41 @@
+
+#include "figureCuttingCubeModel.h"
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+figureCuttingCubeModel::figureCuttingCubeModel()
+{
+}
+//----------------------------------------------------------------------------
+figureCuttingCubeModel::~figureCuttingCubeModel()  // virtual
+{
+}
+//----------------------------------------------------------------------------
+bool figureCuttingCubeModel::IfPointInside(double x, double y, double z) // virtual
+{
+       double in[4],out[4];
+       in[0]=x;
+       in[1]=y;
+       in[2]=z;
+       in[3]=1;
+       _inversModel->MultiplyPoint (in, out);
+
+       bool result=false;
+       if ((out[0]>-0.5) && (out[0]<0.5) && (out[1]>-0.5) && (out[1]<0.5)  && (out[2]>-0.5) && (out[2]<0.5)  )
+       {
+               result=true;
+       }
+       return result;
+}
+//----------------------------------------------------------------------------
+double figureCuttingCubeModel::GetTheoricVolume() // virtual
+{
+       return _sx * _sy * _sz;
+}
+
+//----------------------------------------------------------------------------
+char *figureCuttingCubeModel::GetName() // virtual
+{
+       return "Cube";
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.h
new file mode 100644 (file)
index 0000000..0811bde
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef FIGURECUTTINGCUBEMODEL_H_
+#define FIGURECUTTINGCUBEMODEL_H_
+
+#include "figureCuttingModel.h"
+
+
+class figureCuttingCubeModel : public figureCuttingModel
+{
+public:
+       figureCuttingCubeModel();
+       virtual ~figureCuttingCubeModel();
+       virtual bool    IfPointInside(double x, double y, double z);
+       virtual double  GetTheoricVolume();
+       virtual char *GetName();
+private:
+protected:
+};
+
+#endif /*FIGURECUTTINGCUBEMODEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.cxx
new file mode 100644 (file)
index 0000000..036e596
--- /dev/null
@@ -0,0 +1,39 @@
+
+#include "figureCuttingCylinderModel.h"
+
+figureCuttingCylinderModel::figureCuttingCylinderModel()
+{
+}
+//----------------------------------------------------------------------------
+figureCuttingCylinderModel::~figureCuttingCylinderModel()  // virtual
+{
+}
+//----------------------------------------------------------------------------
+bool figureCuttingCylinderModel::IfPointInside(double x, double y, double z) // virtual
+{
+       double in[4],out[4];
+       in[0]=x;
+       in[1]=y;
+       in[2]=z;
+       in[3]=1;
+       _inversModel->MultiplyPoint (in, out);
+
+       bool result=false;
+       if ((sqrt( out[0]*out[0] + out[2]*out[2] )<0.5 )  && (out[1]>-0.5) && (out[1]<0.5)  )
+       {
+               result=true;
+       }
+       return result;
+}
+//----------------------------------------------------------------------------
+double figureCuttingCylinderModel::GetTheoricVolume() // virtual
+{
+       double piTMP=3.14159265;
+       return piTMP*(_sx/2)*(_sz/2)*_sy;
+}
+//----------------------------------------------------------------------------
+char *figureCuttingCylinderModel::GetName() // virtual
+{
+       return "Cylinder";
+}
+//----------------------------------------------------------------------------
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.h
new file mode 100644 (file)
index 0000000..d6e9eda
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef FIGURECUTTINGCYLINDERMODEL_H_
+#define FIGURECUTTINGCYLINDERMODEL_H_
+
+#include "figureCuttingModel.h"
+
+class figureCuttingCylinderModel : public figureCuttingModel
+{
+public:
+       figureCuttingCylinderModel();
+       virtual ~figureCuttingCylinderModel();
+       virtual bool    IfPointInside(double x, double y, double z);
+       virtual double  GetTheoricVolume();
+       virtual char *GetName();
+private:
+protected:
+};
+
+#endif /*FIGURECUTTINGCYLINDERMODEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.cxx
new file mode 100644 (file)
index 0000000..1640461
--- /dev/null
@@ -0,0 +1,152 @@
+
+#include "figureCuttingModel.h"
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+figureCuttingModel::figureCuttingModel()
+{
+       _inversModel    = vtkTransform::New();
+       _matrixModel    = vtkTransform::New();
+       _matrixVisual   = vtkTransform::New();
+
+       _spcX=1;
+       _spcY=1;
+       _spcZ=1;
+}
+//----------------------------------------------------------------------------
+figureCuttingModel::~figureCuttingModel() // virtual
+{
+       _inversModel->Delete();
+}
+//----------------------------------------------------------------------------
+void figureCuttingModel::SetPosition(double x,double y, double z)
+{
+       _px=x;
+       _py=y;
+       _pz=z;
+}
+//----------------------------------------------------------------------------
+void figureCuttingModel::SetScale(double sx,double sy, double sz)
+{
+       _sx=sx;
+       _sy=sy;
+       _sz=sz;
+}
+//----------------------------------------------------------------------------
+void figureCuttingModel::SetRotation(double alfa,double beta, double teta)
+{
+       _alfa=alfa;
+       _beta=beta;
+       _teta=teta;
+}
+
+//----------------------------------------------------------------------------
+void figureCuttingModel::CalculeMatrix()
+{
+       _matrixModel->Identity();
+       _matrixModel->Translate(_px,_py,_pz);
+       _matrixModel->RotateY(_beta);
+       _matrixModel->RotateX(_alfa);
+       _matrixModel->RotateY(_teta);
+       _matrixModel->Scale(_sx,_sy,_sz);
+
+       _matrixVisual->Identity();
+       _matrixVisual->Translate( _px*_spcX  ,  _py*_spcY  ,  _pz*_spcZ  );
+       _matrixVisual->RotateY(_beta);
+       _matrixVisual->RotateX(_alfa);
+       _matrixVisual->RotateY(_teta);
+       _matrixVisual->Scale( _sx*_spcX  ,  _sy*_spcY  ,  _sz*_spcZ  );
+
+}
+
+
+//----------------------------------------------------------------------------
+void figureCuttingModel::CalculeInversMatrix()
+{
+       _inversModel->Identity ();
+       _inversModel->Concatenate ( _matrixModel );
+       _inversModel->Inverse();
+}
+//----------------------------------------------------------------------------
+bool figureCuttingModel::IfPointInside(double x, double y, double z) // virtual
+{
+       return true;
+}
+
+//----------------------------------------------------------------------------
+vtkTransform *figureCuttingModel::GetVtkTransform()
+{
+       return _matrixVisual;
+}
+
+//----------------------------------------------------------------------------
+//void figureCuttingModel::SetVtkTransform(vtkTransform *matrix)
+//{
+//     _matrixModel = matrix;
+//}
+
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetTheoricVolume() // virtual
+{
+       return 0;
+}
+
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetPositionX()
+{
+       return _px;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetPositionY()
+{
+       return _py;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetPositionZ()
+{
+       return _pz;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetScaleX()
+{
+       return _sx;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetScaleY()
+{
+       return _sy;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetScaleZ()
+{
+       return _sz;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetAngleAlfa()
+{
+       return _alfa;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetAngleBeta()
+{
+       return _beta;
+}
+//----------------------------------------------------------------------------
+double figureCuttingModel::GetAngleTeta()
+{
+       return _teta;
+}
+//----------------------------------------------------------------------------
+char *figureCuttingModel::GetName() // virtual
+{
+       return "--";
+}
+
+//----------------------------------------------------------------------------
+void figureCuttingModel::SetSpacing(double spcX,double spcY, double spcZ)
+{
+       _spcX = spcX;
+       _spcY = spcY;
+       _spcZ = spcZ;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.h
new file mode 100644 (file)
index 0000000..96cf5a0
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef FIGURECUTTINGMODEL_H_
+#define FIGURECUTTINGMODEL_H_
+
+#include "vtkTransform.h"
+
+class figureCuttingModel
+{
+public:
+       figureCuttingModel();
+       virtual ~figureCuttingModel();
+
+       void                    SetPosition(double x,double y, double z);
+       double                  GetPositionX();
+       double                  GetPositionY();
+       double                  GetPositionZ();
+
+       void                    SetScale(double sx,double sy, double sz);
+       double                  GetScaleX();
+       double                  GetScaleY();
+       double                  GetScaleZ();
+
+       void                    SetRotation(double alfa,double beta, double teta);
+       double                  GetAngleAlfa();
+       double                  GetAngleBeta();
+       double                  GetAngleTeta();
+
+       void                    SetSpacing(double spcX,double spcY, double spcZ);
+
+       void                    CalculeMatrix();
+       void                    CalculeInversMatrix();
+       virtual bool    IfPointInside(double x, double y, double z);
+       vtkTransform    *GetVtkTransform();
+//     void                    SetVtkTransform(vtkTransform *matrix);
+       virtual double  GetTheoricVolume();
+       virtual                 char *GetName();
+
+private:
+       double                  _px;
+       double                  _py;
+       double                  _pz;
+       double                  _alfa;
+       double                  _beta;
+       double                  _teta;
+       double                  _spcX;
+       double                  _spcY;
+       double                  _spcZ;
+protected:
+       double                  _sx;
+       double                  _sy;
+       double                  _sz;
+       vtkTransform    *_inversModel;
+       vtkTransform    *_matrixModel;
+       vtkTransform    *_matrixVisual;
+
+};
+
+#endif /*FIGURECUTTINGMODEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.cxx
new file mode 100644 (file)
index 0000000..0dcd603
--- /dev/null
@@ -0,0 +1,40 @@
+#include "figureCuttingSphereModel.h"
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+figureCuttingSphereModel::figureCuttingSphereModel()
+{
+}
+//----------------------------------------------------------------------------
+figureCuttingSphereModel::~figureCuttingSphereModel() // virtual
+{
+}
+//----------------------------------------------------------------------------
+bool figureCuttingSphereModel::IfPointInside(double x, double y, double z) // virtual
+{
+       double in[4],out[4];
+       in[0]=x;
+       in[1]=y;
+       in[2]=z;
+       in[3]=1;
+       _inversModel->MultiplyPoint (in, out);
+
+       bool result=false;
+       if (sqrt( out[0]*out[0] + out[1]*out[1] + out[2]*out[2] )<0.5 )
+       {
+               result=true;
+       }
+       return result;
+}
+//----------------------------------------------------------------------------
+double figureCuttingSphereModel::GetTheoricVolume() // virtual
+{
+       double piTMP=3.14159265;
+       return (4.0/3.0) * piTMP * (_sx/2)*(_sy/2)*(_sz/2);
+}
+//----------------------------------------------------------------------------
+char *figureCuttingSphereModel::GetName() // virtual
+{
+       return "Sphere";
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.h
new file mode 100644 (file)
index 0000000..1a71283
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef FIGURECUTTINGSPHEREMODEL_H_
+#define FIGURECUTTINGSPHEREMODEL_H_
+
+#include "figureCuttingModel.h"
+
+class figureCuttingSphereModel : public figureCuttingModel
+{
+public:
+       figureCuttingSphereModel();
+       virtual ~figureCuttingSphereModel();
+       virtual bool IfPointInside(double x, double y, double z);
+       virtual double  GetTheoricVolume();
+       virtual char *GetName();
+private:
+protected:
+};
+
+#endif /*FIGURECUTTINGSPHEREMODEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.cxx
new file mode 100644 (file)
index 0000000..b0cb453
--- /dev/null
@@ -0,0 +1,9 @@
+
+#include "idAlBeRa.h"
+
+idAlBeRa::idAlBeRa(int id, double radio,int deltavoxel)
+{
+       _id                     = id;
+       _radio          = radio;
+       _deltavoxel = deltavoxel;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.h
new file mode 100644 (file)
index 0000000..9c616d5
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef IDALBERA_H_
+#define IDALBERA_H_
+
+class idAlBeRa
+{
+public:
+       int             _id;
+       double  _radio;
+       int             _deltavoxel;
+       idAlBeRa(int id, double radio,int deltavoxel);
+};
+
+#endif /*IDALBERA_H_*/
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.cxx
index 31896215828c5993c060a90db0742e71266ee95e..66256f2630ddd29b261f6dbc6aeee5e2d7954d97 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk2DQuantSliceWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.h
index 1ea8024a6369b21eb40dd2c86261f7d0e43d789f..986ae7df1ff9c440f67ea4715c345b93beca79a3 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk2DQuantSliceWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.cxx
index 03278f4e58119969915baacd0359d3a8b16cfc53..4aa26b7e4aa92621c1fe3201c6f43b69ecace109 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk3DQuantSurfaceWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.h
index c871c1d72bbd4a634da69707a8855f4430b338c0..497793063466bcaf65bb699031fdc3a2ed3e6961 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk3DQuantSurfaceWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.cxx
index 0acfb7dd33ad06b0336dc08f134ca1c0c832e894..845699bbee79bf056d09c4eb74aa1231a6685691 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk3DSurfaceSTLWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.h
index 1b5eb98f07f491d1e08ce3bef507915c2b30652b..fd3b4fd62a55ed35df1de769de866bf3ebc1db7a 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk3DSurfaceSTLWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.cxx
index 103aaa70be0d8cd4a7ba07a0c573df515180685a..f62c3e83bfa3dc774213663af32d326503c04e3c 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk3DSurfaceWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.h
index 06f663a90784a5acfdc739973aeb336a7bd8bb0f..b58ef211459a3b3f9f81212dcb29dfc71dd3b832 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtk3DSurfaceWidget.h,v $
   Language:  C++
-  Date:      $Date: 2009/03/24 10:49:21 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2009/05/14 13:54:57 $
+  Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
   License:
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.cxx
index 9efc45156e328bd068df7062109b583b7a0964ec..2ce653e75f8d1eb52ce17ac1d1e40ba96fd46e3c 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtkImagePolyDataSeedConnectivity.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.h
index a200c248cb310e0b0ca592026e71d1a87273fd57..7de29d45631715f4c898f785f407049ceb97f67a 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vtkImagePolyDataSeedConnectivity.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.cxx_ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.cxx_
new file mode 100644 (file)
index 0000000..df4cad2
--- /dev/null
@@ -0,0 +1,90 @@
+
+#include "vtkImageViewer2_XYZ.h"
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+vtkImageViewer2_XYZ::vtkImageViewer2_XYZ()
+{
+       _vtkimageviewer2=  vtkImageViewer2::New();
+}
+//-------------------------------------------------------------------
+vtkImageViewer2_XYZ::~vtkImageViewer2_XYZ()
+{
+       _vtkimageviewer2->Delete();
+}
+//-------------------------------------------------------------------
+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;
+}
+//-------------------------------------------------------------------
+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)
+{
+#if (VTK_MAJOR_VERSION >= 5)
+//             _vtkimageviewer2->SetSlice( slice );
+       vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
+       imageActor->SetDisplayExtent(_x1, _x2, _y1, _y2, slice, slice );  
+#else
+               _vtkimageviewer2->SetZSlice( slice );
+#endif
+
+
+}
+//-------------------------------------------------------------------
+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
+
+       
+       return result;
+}
+//-------------------------------------------------------------------
+vtkImageViewer2 *vtkImageViewer2_XYZ::GetVtkImageViewer2()
+{
+       return _vtkimageviewer2;
+}
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.h_ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.h_
new file mode 100644 (file)
index 0000000..496d2ba
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef VTKIMAGEVIEWER2_XYZ_H_
+#define VTKIMAGEVIEWER2_XYZ_H_
+
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+
+
+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);
+       void                    SetZSlice(int slice);
+       int                             GetXSlice();
+       int                             GetYSlice();
+       int                             GetZSlice();
+       vtkImageViewer2 *GetVtkImageViewer2();
+
+private:
+       int     _x1,_x2,_y1,_y2,_z1,_z2;
+       vtkImageViewer2 *_vtkimageviewer2;
+protected:     
+};
+
+
+#endif /*VTKIMAGEVIEWER2_XYZ_H_*/
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.cxx
index a5698ab10e9ee0fc3bf6232cc39fb2ff91da46fd..01d92b24eeb44abcd3f9eb454b7e2ebbe046d7a9 100644 (file)
@@ -3,7 +3,7 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: vtkInteractorStyleCutter.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.h
index cc6d92aaf8dc9dd50d1258a5527361365f49eb9d..12a97e2152f3c975369f07b56ff6ebedcbb99dac 100644 (file)
@@ -3,7 +3,7 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: vtkInteractorStyleCutter.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.cxx
index 39ce6e6a49bcc9fead00ae9ee5e83086be003e58..f825f723ce498e7ee3451a227af2a1649334753a 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxChart.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.h
index 1d0317a790e0ff9d1a37e0140165463097511429..e6475c7db615aaf5d725ab4f4bc36d172fee3689 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxChart.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.cxx
index fa75faca8053d3b8e188fcbd94a4ac4d8472dd40..bfed25d066d9e0007338dea5112111e1409dde10 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxImageViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.h
index c01f915754bd3456b4678452987d96676b517d76..99a756110e876e8983e2b858243b997f00c07ae3 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxImageViewerWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.cxx
index 78ad74f0391ddd51b03ab91e2588640e1ce61d85..c74786f50392b7a899ec3bbab7852aa7eab30968 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxManualRegistration3D.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.h
index 1803eb69f8f9893768eb4249d73ada640e693419..d1b5211a1aed5a250633a0892431de33938a13f1 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxManualRegistration3D.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.cxx
index c242b36dda24521ebdf85286718ff701a6a99614..22cf76eb8354d642c097b040b40090615ad635ea 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxManualSegmentation_MPRWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.h
index ee25c06ddb963b5d4921e109e135b539024fd199..54fc60c938bd895ace1cafa94013db75a248a5c2 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxManualSegmentation_MPRWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.cxx
index d16b85ac74f4d50283237e81f72270a976ee1c15..b8a0a1f2d61006b9db3913ac6b22cbf1bae33edb 100644 (file)
@@ -5,7 +5,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxQuantificationWidget.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:43 $
+ Date:      $Date: 2009/05/14 13:54:57 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.h
index 1054f8a1a21714368692d6b41503e26ec2ef5dd6..9f648ebe20a5cb80cb8f03f04906b3dc870858f9 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxQuantificationWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.cxx
index d921c889ef54f3f95ec0e0e90894d97f7c18c715..0b36284bba94857db4377e2162baf7206e4a3518 100644 (file)
@@ -5,7 +5,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxQuantificationWidgetCT.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:43 $
+ Date:      $Date: 2009/05/14 13:54:57 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.h
index 871c9684fb99b181f5e9d6e064862de05040fe02..f8279e46e682173c2b8c5e9809296595d7df89fd 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxQuantificationWidgetCT.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.cxx
index 2b0d35e78d2d772efde3a85bf4a155c6a3b10be9..4aedb0693a36e7b511e775a747897fbf37feb81f 100644 (file)
@@ -5,7 +5,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: wxQuantificationWidget_base.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:43 $
+ Date:      $Date: 2009/05/14 13:54:57 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.h
index 5c2add72aa87fc084f405fa866fc42fc9b0ccffe..907d9471dc5e47ce675ba014e433ebc0575bfbda 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxQuantificationWidget_base.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.cxx
index dd486e17c1031c546ec5c20fffd162ff0e751633..23b93a4757df99a4ffe21c9dde3fce8cbff4e516 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxSegmentationFM3DWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.h
index bad33f96792844db626063a36b13ed06374e710f..6e631ff66f7e31159109ac3c034c9bff156c1756 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxSegmentationFM3DWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.cxx
index 607379232c6cb2af879116190194a6bb1bb8ddd4..cf4d8589ce9b1897e5470736b306881442794c93 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxSurfaceSTLWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.h
index 022895191335397160f6fc4c7f7689b51059778f..ea5a22f3131f950f21f96da2047d515150f8a612 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxSurfaceSTLWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.cxx
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.cxx
index 99ac24664755e9f43ee9c08a95988ce5eb13fe99..ef497f60d8b2f7beceec05ddaeafd7ba7617439f 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxSurfaceWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:57 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.h
rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.h
index ea88224054bc2a30ba964f6711ee6aff2cf23dd7..ce04f74f7110fb6ebb6201e00cc1f9165bc4acee 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxSurfaceWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:43 $
+  Date:      $Date: 2009/05/14 13:54:58 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx
new file mode 100644 (file)
index 0000000..0be3029
--- /dev/null
@@ -0,0 +1,90 @@
+
+#include "manualInteractorWindowLevel.h"
+#include "wxVtk2DBaseView.h"
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+manualInteractorWindowLevel::manualInteractorWindowLevel()
+{
+       _stateWindowLevel       =       false;
+       _backPx                         =       0;
+       _backPy                         =       0;
+       _backWindow                     =       -1;
+       _backLevel                      =       -1;
+}
+
+//-------------------------------------------------------------------
+
+manualInteractorWindowLevel::~manualInteractorWindowLevel()
+{
+}
+
+//-------------------------------------------------------------------
+
+bool manualInteractorWindowLevel::OnMouseMove()                        // virtual 
+{
+
+       if (_stateWindowLevel==true)
+       {
+               int tmpPx,tmpPy;
+               wxVTKRenderWindowInteractor *wxVTKiren;
+               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+               wxVTKiren->GetEventPosition( tmpPx , tmpPy );
+               int colorWin=_backWindow - 2*( _backPx - tmpPx );
+               int colorLev=_backLevel  + 2*( _backPy - tmpPy );       
+
+               if (colorWin<0)
+               { 
+                       colorWin=0;
+               }
+               if (colorWin>100000)
+               { 
+                       colorWin=100000;
+               }       
+
+               if (colorLev<0)
+               { 
+                       colorLev=0;
+               }
+               if (colorLev>100000)
+               { 
+                       colorLev=100000;
+               }
+               vtkImageViewer2 *vtkimageviewer2;
+               vtkimageviewer2=((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2();
+               vtkimageviewer2->SetColorWindow(colorWin);
+               vtkimageviewer2->SetColorLevel(colorLev);
+//             vtkimageviewer2->Render();
+       }
+       return true;
+}
+
+//-------------------------------------------------------------------
+
+bool manualInteractorWindowLevel::OnMiddleButtonDown() // virtual 
+{
+       if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
+               (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){
+
+               _stateWindowLevel       = true;
+               wxVTKRenderWindowInteractor *wxVTKiren;
+               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+               wxVTKiren->GetEventPosition( _backPx , _backPy );
+
+               _backWindow = (int)(((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow());
+               _backLevel  = (int)(((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorLevel());
+       }
+       return true;
+}
+
+//-------------------------------------------------------------------
+
+bool manualInteractorWindowLevel::OnMiddleButtonUp()           // virtual
+{
+       if (_stateWindowLevel==true)
+       {
+               _stateWindowLevel=false;
+       }
+       return true;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.h
new file mode 100644 (file)
index 0000000..c095094
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef MANUALINTERACTORWINDOWLEVEL_H_
+#define MANUALINTERACTORWINDOWLEVEL_H_
+
+#include "InteractorStyleMaracas.h"
+
+class creaMaracasVisu_EXPORT manualInteractorWindowLevel : public InteractorStyleMaracas {
+public:
+       manualInteractorWindowLevel();
+       virtual ~manualInteractorWindowLevel();
+protected:
+
+       bool    _stateWindowLevel;
+       int             _backPx;
+       int             _backPy;
+       int             _backWindow;
+       int             _backLevel;
+
+       virtual bool  OnMouseMove();
+       virtual bool  OnMiddleButtonDown(); 
+       virtual bool  OnMiddleButtonUp();
+};
+
+
+
+#endif /*MANUALINTERACTORWINDOWLEVEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.cxx
new file mode 100644 (file)
index 0000000..4c07bdf
--- /dev/null
@@ -0,0 +1,203 @@
+
+#include "manualViewPerpPlaneContour.h"
+
+#include "vtkPlane2DView.h"
+
+manualViewPerpPlaneContour::manualViewPerpPlaneContour()
+{
+}
+// ----------------------------------------------------------------------------
+manualViewPerpPlaneContour::~manualViewPerpPlaneContour()
+{
+}
+
+
+// ----------------------------------------------------------------------------
+manualViewPerpPlaneContour * manualViewPerpPlaneContour :: Clone()
+{
+       manualViewPerpPlaneContour * clone = new manualViewPerpPlaneContour();
+       CopyAttributesTo(clone);
+       return clone;
+}
+
+// ---------------------------------------------------------------------------
+
+void manualViewPerpPlaneContour::CopyAttributesTo( manualViewPerpPlaneContour * cloneObject)
+{
+       // Fathers object
+       manualViewContour::CopyAttributesTo(cloneObject);
+}
+
+
+
+
+// ----------------------------------------------------------------------------
+void manualViewPerpPlaneContour::UpdateViewPoint(int id)
+{  // virtual
+       double x,y,z;
+       manualPoint *mp = _manContModel->GetManualPoint(id);
+       x = mp->GetX();
+       y = mp->GetY();
+       z = mp->GetZ();
+       FilterCordinateXYZ(x,y,z);
+
+       _lstViewPoints[id]->SetPositionXY( x , y ,GetRange(), z );
+       if ((z>=-1) && (z<=1))
+       {
+               _lstViewPoints[id]->GetVtkActor()->VisibilityOn();
+       } else {
+               _lstViewPoints[id]->GetVtkActor()->VisibilityOff();
+       }
+}
+// ----------------------------------------------------------------------------
+void manualViewPerpPlaneContour::FilterCordinateXYZ (double &x, double &y, double &z)
+{
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
+       vtkMPRBaseData *vtkmprbasedata = vtkplane2Dview->GetVtkmprbasedata();
+       vtkTransform *transf1 = vtkTransform::New();
+       vtkTransform *transf2 = vtkmprbasedata->GetTransformOrientation();
+       transf1->SetMatrix( transf2->GetMatrix() ); 
+       transf1->Inverse();
+
+       double in[4], out[4];
+       double center = vtkplane2Dview->GetImgSize() / 2;
+
+       in[0] = x - vtkmprbasedata->GetX();
+       in[1] = y - vtkmprbasedata->GetY();
+       in[2] = z - vtkmprbasedata->GetZ();
+       in[3] = 0;
+
+       transf1->MultiplyPoint(in,out);
+       z = out[0];
+       x = out[1]+center;
+       y = out[2]+center;
+
+       double spc[3];
+       this->GetWxVtkBaseView()->GetSpacing(spc);
+       x = x / spc[0];
+       y = y / spc[1];
+       z = z / spc[2];
+
+       transf1->Delete();
+}
+
+// ----------------------------------------------------------------------------
+void manualViewPerpPlaneContour::TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type )
+{
+       Z = 0;
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
+       vtkplane2Dview->TransfromeCoordViewWorld2(X,Y,Z);
+}
+
+
+// ----------------------------------------------------------------------------
+void manualViewPerpPlaneContour::RefreshContour() // virtual
+{
+//     manualViewContour::RefreshContour();
+
+       double pp1[3];
+       double pp2[3];
+       double u;
+               
+// JSTG 25-02-08 ----------------------------------------------------------
+//             tt;
+//--------------------------------------------------------
+
+       double pp[3];
+       double ppB[3];
+       double ppC[3];
+       ppB[0] = 999999;
+       double dist,distMin = 99999999;
+
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
+       double center = vtkplane2Dview->GetImgSize() / 2;
+
+       int i,np,nps;
+       np              = GetNumberOfPoints( );
+
+//JSTG 25-02-08 ------------------------------------------
+       //double t,delta;
+    //nps              = GetNumberOfPointsSpline(); 
+       nps = _manContModel->GetNumberOfPointsSpline();
+       //delta = ( double ) ( np  ) / ( double ) ( nps-1  );
+       _manContModel->UpdateSpline();
+//--------------------------------------------------------
+
+       if ( np >= 2 )
+       {
+               for( i = 0; i < nps; i++ ) 
+               {
+// JSTG 25-02-08 ----------------------------------------------------------
+                       //t     = delta * (double)i ;
+                       //tt    = delta * (double)(i+1) ;
+                       //_manContModel->GetSplinePoint(t ,pp1[0],pp1[1],pp1[2]);
+                       //_manContModel->GetSplinePoint(tt,pp2[0],pp2[1],pp2[2]);
+                       _manContModel->GetSpline_i_Point(i ,&pp1[0],&pp1[1],&pp1[2]);
+                       _manContModel->GetSpline_i_Point(i+1,&pp2[0],&pp2[1],&pp2[2]);
+//--------------------------------------------------------------------------
+                       FilterCordinateXYZ(pp1[0],pp1[1],pp1[2]);
+                       FilterCordinateXYZ(pp2[0],pp2[1],pp2[2]);
+                       if (pp2[2]*pp1[2]<=0)
+                       {
+                               if (pp1[2]-pp2[2]!=0) { 
+                                       u = -pp2[2] / (pp1[2]-pp2[2]);
+                               } else  {
+                                       u=9999999;
+                               }
+                               pp[0]    = ( pp1[0]-pp2[0] )*u + pp2[0];
+                               pp[1]    = ( pp1[1]-pp2[1] )*u + pp2[1];
+                               pp[2]    = ( pp1[2]-pp2[2] )*u + pp2[2];
+                               ppC[0] = pp[0] - center;
+                               ppC[1] = pp[1] - center;
+                               ppC[2] = pp[2] ;
+                               dist = sqrt( ppC[0]*ppC[0] + ppC[1]*ppC[1] + ppC[2]*ppC[2] );
+                               if (dist<distMin)
+                               {
+                                       distMin=dist;
+                                       ppB[0] = pp[0];
+                                       ppB[1] = pp[1];
+                                       ppB[2] = pp[2];
+                               }
+                       }
+
+               }// for 
+       } else {
+                       _pts->SetPoint(0, 0 , 0 , 0);   
+                       _pts->SetPoint(1, 0 , 0 , 0);   
+       } // if
+
+//EED 27 sep 2006
+       ppB[0]=ppB[0]*_spc[0];
+       ppB[1]=ppB[1]*_spc[1];
+
+       _pts->SetPoint( 0, ppB[0]   , ppB[1]+1 , 1 );   
+       _pts->SetPoint( 1, ppB[0]   , ppB[1]-1 , 1 );   
+       _pts->SetPoint( 2, ppB[0]   , ppB[1]   , 1 );   
+       _pts->SetPoint( 3, ppB[0]-1 , ppB[1]   , 1 );   
+       _pts->SetPoint( 4, ppB[0]+1 , ppB[1]   , 1 );   
+
+
+       for( i = 5; i < nps; i++ ) 
+       {
+               _pts->SetPoint( i, ppB[0] , ppB[1] , 1 );       
+       }
+
+}
+
+//---------------------------------------------------------------------------
+bool manualViewPerpPlaneContour::ifTouchContour( int x, int y, int z)
+{
+       bool ok=false;
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
+       double X=x;
+       double Y=y;
+       double Z=z;
+       vtkplane2Dview->TransfromeCoordScreenToWorld(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)
+       {
+               ok = true;
+       }
+       return ok;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.h
new file mode 100644 (file)
index 0000000..232c3da
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef MANUALVIEWPERPPLANECONTOUR_H_
+#define MANUALVIEWPERPPLANECONTOUR_H_
+
+#include "manualContour.h"
+
+class manualViewPerpPlaneContour : public manualViewContour
+{
+public:
+       manualViewPerpPlaneContour();
+       ~manualViewPerpPlaneContour();
+       virtual manualViewPerpPlaneContour * Clone();
+       void CopyAttributesTo( manualViewPerpPlaneContour *cloneObject );
+
+       virtual void UpdateViewPoint(int id);
+       virtual void RefreshContour();
+       virtual void TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type );
+       virtual bool ifTouchContour( int x, int y, int z);
+
+protected:
+private:
+       void FilterCordinateXYZ (double &x, double &y, double &z);
+};
+
+#endif /*MANUALVIEWPERPPLANECONTOUR_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h
new file mode 100644 (file)
index 0000000..93ddbf3
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef VTKBASEDATA_H_
+#define VTKBASEDATA_H_
+
+class creaMaracasVisu_EXPORT vtkBaseData {
+public:
+       vtkBaseData();
+       virtual ~vtkBaseData();
+       vtkImageData*   GetImageData();
+       marImageData*   GetMarImageData();
+                       void    SetMarImageData(marImageData *marimagedata);
+       virtual void    Configure();
+       double                  GetZ();
+       void                    SetZ(double z);
+
+       int                             GetT();
+       void                    SetT(double t);
+
+protected:
+       marImageData    *_marImageData;
+       double                  _z;
+       int                             _t;
+};
+
+#endif /*VTKBASEDATA_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h
new file mode 100644 (file)
index 0000000..8620269
--- /dev/null
@@ -0,0 +1,118 @@
+#ifndef VTKCLIPPING3DDATAVIEWER_H_
+#define VTKCLIPPING3DDATAVIEWER_H_
+
+#include "wxMPRBaseData.h"
+
+class vtkClipping3DDataViewer {
+public:
+       //----------------------
+       //Constructo-Destructor
+       //----------------------
+       vtkClipping3DDataViewer();
+       virtual ~vtkClipping3DDataViewer();
+
+//     vtkImageActor*                  GetImageActor(int id);
+       vtkActor*                               GetOutlineActor();
+       vtkClipPolyData*                GetTissueClipper(int id);
+       vtkPolyDataMapper*              GetTissueMapper(int id);
+       vtkPlanes*                              GetTissuePlanes(int id);
+       vtkStripper*                    GetTissueStripper(int id);
+//     vtkGlyph3D*                             GetGlyph(int id);
+       vtkLODActor*                    GetMaceActor(int id);
+
+       vtkMarchingCubes                *GetMCubes(int idTissue);
+
+       virtual void                    Refresh();
+                       void                    RefreshSurface();
+
+       virtual void                    Configure();
+       void                                    Configure_Tissue();
+       void                                    Configure_Volume();
+
+       void                                    SetIsovalue(int idTissue, int isoValue);
+       double                                  GetIsovalue(int idTissue);
+
+       vtkVolume                               *GetVolumeActor();
+       vtkVolumeRayCastMapper  *GetVolumeMapper();
+       vtkPlanes                               *GetVolumePlanes();
+
+       void                                    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
+       vtkMPRBaseData*                 GetVtkMPRBaseData();
+
+       vtkActor                                *GetTissueActor(int id);
+       void                                    SetVisibleTissue(int idTissue, bool visible);
+       bool                                    GetVisibleTissue(int idTissue);
+       bool                                    GetVisibleVolume();
+       void                                    SetVisibleVolume(bool visibleVolume);
+
+       void                                    SetRepresentationType(int idTissue, bool representationType);
+       bool                                    GetRepresentationType(int idTissue);
+
+       boxSurfaceObserver              *GetObserverS(int idObserverS);
+       boxSurfaceObserver              *GetObserverV();
+
+       //void                                  ReadVolumeFunctions(char *namefile); 
+       void                                    ReadVolumeFunctions(); 
+       void                                    ReadMeshVTK(char *namefile); 
+
+
+       //-------------------
+       //Getters Vectors
+       //-------------------
+
+       std::vector<double>*                                    GetGreyValuesTransferenceFVector();
+       std::vector<double>*                                    GetIntensityValuesTransferenceFVector();
+       std::vector<double>*                                    GetRedColorsOfColorTransferenceFVector();
+       std::vector<double>*                                    GetGreenColorsOfColorTransferenceFVector();
+       std::vector<double>*                                    GetBlueColorsOfColorTransferenceFVector();
+       std::vector<double>*                                    GetGreyValueColorsOfColorTransferenceFVector();
+
+       //--------------------------------------
+       //Getters transference function
+       //and color of the transference function
+       //---------------------------------------
+       vtkPiecewiseFunction                            *GetTransferencefunction();
+       vtkColorTransferFunction                        *GetColorTransferenceFunction();
+
+
+
+private:
+       
+       vtkMarchingCubes                                        *_mCubes[ VTKMPRDATA_MAXTISSUE ];
+       vtkStripper                                                     *_tissueStripper[ VTKMPRDATA_MAXTISSUE ];
+       vtkPolyDataMapper                                       *_tissueMapper[ VTKMPRDATA_MAXTISSUE ];
+       vtkPlanes                                                       *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
+       vtkClipPolyData                                         *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
+
+       // outline
+       vtkOutlineFilter                                        *_outlineData;
+       vtkPolyDataMapper                                       *_mapOutline;
+       vtkActor                                                        *_outline;
+
+       /// Volume
+       vtkPiecewiseFunction                            *_tfun;
+       vtkColorTransferFunction                        *_ctfun;
+       vtkVolumeRayCastCompositeFunction       *_compositeFunction;
+       vtkPlanes                                                       *_volumePlanes;
+       vtkVolumeRayCastMapper                          *_volumeMapper;
+       vtkVolumeProperty                                       *_volumeProperty;
+       vtkVolume                                                       *_newvol;
+
+       vtkMPRBaseData                                          *_vtkmprbasedata;
+
+       bool                                                            _visibleVolume;
+       bool                                                            _representationType[VTKMPRDATA_MAXTISSUE];
+       bool                                                            _visibleTissue[VTKMPRDATA_MAXTISSUE];
+       vtkActor                                                        *_tissue[VTKMPRDATA_MAXTISSUE];
+       boxSurfaceObserver                                      *_observerV;
+       boxSurfaceObserver                                      *_observerS[VTKMPRDATA_MAXTISSUE];
+
+       std::vector<double>                                     greyValuesTransferenceFVector;
+       std::vector<double>                                     intensityValuesTransferenceFVector;
+       std::vector<double>                                     redColorsOfColorTransferenceFVector;
+       std::vector<double>                                     greenColorsOfColorTransferenceFVector;
+       std::vector<double>                                     blueColorsOfColorTransferenceFVector;
+       std::vector<double>                                     greyValueColorsOfColorTransferenceFVector;
+};
+
+#endif /*VTKCLIPPING3DDATAVIEWER_H_*/
index 82f6591a103ac4677b9f5ecd925568836e8cc498..e369dbfbedeb8edc30924fc9b0b25e53bc30b71d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: vtkClosePolyData.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:34 $
+  Version:   $Revision: 1.2 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
   All rights reserved.
@@ -26,7 +26,7 @@
 #include "vtkAppendPolyData.h"
 #include "vtkCleanPolyData.h"
 
-vtkCxxRevisionMacro(vtkClosePolyData, "$Revision: 1.1 $");
+vtkCxxRevisionMacro(vtkClosePolyData, "$Revision: 1.2 $");
 vtkStandardNewMacro(vtkClosePolyData);
 
 //----------------------------------------------------------------------------
index d7ca0fe60eff55549291174b2886bd739a170291..c6623fdeca71ab710820d27ecf54d7c0995651d0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: vtkClosePolyData.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:41 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:34 $
+  Version:   $Revision: 1.2 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
   All rights reserved.
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx
new file mode 100644 (file)
index 0000000..875a817
--- /dev/null
@@ -0,0 +1,83 @@
+#include "vtkImageViewer2_XYZ.h"
+
+#include "vtkImageActor.h"
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+vtkImageViewer2_XYZ::vtkImageViewer2_XYZ()
+{
+       _vtkimageviewer2=  vtkImageViewer2::New();
+}
+//-------------------------------------------------------------------
+vtkImageViewer2_XYZ::~vtkImageViewer2_XYZ()
+{
+       //_vtkimageviewer2->Delete();
+}
+//-------------------------------------------------------------------
+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;
+}
+//-------------------------------------------------------------------
+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)
+{
+#if (VTK_MAJOR_VERSION >= 5)
+//             _vtkimageviewer2->SetSlice( slice );
+       vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
+       imageActor->SetDisplayExtent(_x1, _x2, _y1, _y2, slice, slice );  
+#else
+               _vtkimageviewer2->SetZSlice( slice );
+#endif
+
+
+}
+//-------------------------------------------------------------------
+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
+
+       
+       return result;
+}
+//-------------------------------------------------------------------
+vtkImageViewer2 *vtkImageViewer2_XYZ::GetVtkImageViewer2()
+{
+       return _vtkimageviewer2;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h
new file mode 100644 (file)
index 0000000..ebac223
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef VTKIMAGEVIEWER2_XYZ_H_
+#define VTKIMAGEVIEWER2_XYZ_H_
+
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+#include "marTypes.h"
+#include "vtkImageViewer2.h"
+
+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);
+       void                    SetZSlice(int slice);
+       int                             GetXSlice();
+       int                             GetYSlice();
+       int                             GetZSlice();
+       vtkImageViewer2 *GetVtkImageViewer2();
+
+private:
+       int     _x1,_x2,_y1,_y2,_z1,_z2;
+       vtkImageViewer2 *_vtkimageviewer2;
+protected:     
+};
+
+
+#endif /*VTKIMAGEVIEWER2_XYZ_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx
new file mode 100644 (file)
index 0000000..e3a3957
--- /dev/null
@@ -0,0 +1,306 @@
+#include "vtkInfoTextImage.h"
+
+#include "vtkTextProperty.h"
+#include <vtkImageMapToWindowLevelColors.h>
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+vtkInfoTextImage::vtkInfoTextImage()
+{
+       _vtkText_WindowLevel    = NULL;
+       _vtkText_ColorLevel             = NULL;
+       _vtkText_position               = NULL;
+       _vtkText_pixelIntensity = NULL;
+       _marimagedata                   = NULL;
+}
+
+//-------------------------------------------------------------------
+
+vtkInfoTextImage::~vtkInfoTextImage()
+{
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::Configure()
+{
+       _vtkText_WindowLevel    = Create_Text_Label( 10 , 55 );
+       _vtkText_ColorLevel             = Create_Text_Label( 10 , 40 );
+       _vtkText_position               = Create_Text_Label( 10 , 25 );
+       _vtkText_pixelIntensity = Create_Text_Label( 10 , 10 );
+}
+
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::SetMarImageData(marImageData *marimagedata)
+{
+       _marimagedata=marimagedata;
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview)
+{
+       _wxvtk2Dbaseview=wxvtk2Dbaseview;
+}
+
+//-------------------------------------------------------------------
+
+vtkTextActor *vtkInfoTextImage::Create_Text_Label(int px, int py )
+{
+       // Text Window Level
+       vtkTextActor *textActor = vtkTextActor::New();
+       textActor->SetDisplayPosition(px, py);
+       textActor->SetInput("0");
+
+       // Set coordinates to match the old vtkScaledTextActor default value
+       textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
+       textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
+
+       vtkTextProperty *tprop = textActor->GetTextProperty();
+       tprop->SetFontSize(14);
+       tprop->SetFontFamilyToArial();
+       tprop->SetColor(1, 1, 0);
+       _wxvtk2Dbaseview->GetRenderer()->AddActor2D(textActor);
+
+       return textActor;
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::PutWindowLevel()
+{
+       int value = (int)( _wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->GetWindow() );
+       char zTzxt[20];
+       char resultText[50];
+
+       strcpy(resultText,"w:");
+
+
+       //ltoa ( (long)value , zTzxt , 10 );
+       sprintf(zTzxt,"%d",value);
+
+       strcat(resultText,zTzxt);
+       _vtkText_WindowLevel            -> SetInput(resultText);
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::PutColorLevel()
+{
+       int value = (int)(_wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->GetLevel());
+       char zTzxt[20];
+       char resultText[50];
+
+       strcpy(resultText,"c:");
+
+//     itoa (value,zTzxt,10);
+       sprintf(zTzxt,"%d",value);
+
+       strcat(resultText,zTzxt);
+       _vtkText_ColorLevel             -> SetInput(resultText);
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::PutPosition(int xx,int yy, int zz)
+{
+
+//EEDx7
+//     double spa[3];
+//     _imagedata->GetSpacing(spa);
+//     xx=xx*(1/spa[0]);
+//     yy=yy*(1/spa[1]);
+
+
+       char zTzxt[50];
+       char resultText[50];
+       strcpy(resultText,"p: ");
+//     itoa ((int)xx,zTzxt,10);
+       sprintf(zTzxt,"%d",xx);
+
+       strcat(resultText,zTzxt);
+       strcat(resultText," , ");
+
+//     itoa ((int)yy,zTzxt,10);
+       sprintf(zTzxt,"%d",yy);
+
+       strcat(resultText,zTzxt);
+       strcat(resultText," , ");
+
+//     itoa ((int)zz,zTzxt,10);
+       sprintf(zTzxt,"%d",zz);
+
+       strcat(resultText,zTzxt);
+
+
+       
+       int nX = _marimagedata->GetXOriginal(xx);
+       int nY = _marimagedata->GetYOriginal(yy);
+       int nZ = _marimagedata->GetZOriginal(zz);
+
+       strcat(resultText,"   (");
+//     ltoa ((int)nX,zTzxt,10);
+       sprintf(zTzxt,"%d",nX);
+
+       strcat(resultText,zTzxt);
+       strcat(resultText,",");
+
+//     ltoa ((int)nY,zTzxt,10);
+       sprintf(zTzxt,"%d",nY);
+
+       strcat(resultText,zTzxt);
+       strcat(resultText,",");
+
+//     ltoa ((int)nZ,zTzxt,10);
+       sprintf(zTzxt,"%d",nZ);
+
+       strcat(resultText,zTzxt);
+       strcat(resultText,")");
+
+
+
+
+       _vtkText_position               -> SetInput(resultText);
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImage::PutPixelIntensity(int xx, int yy, int zz)
+{
+
+//EEDx2
+       bool ok=true;
+
+       int dim[3];
+       double spa[3];
+       vtkImageData *imagedata = _marimagedata->GetImageData();
+       imagedata->GetDimensions(dim);
+       imagedata->GetSpacing(spa);
+
+// EEDx7
+//     xx=xx*(1/spa[0]);
+//     yy=yy*(1/spa[1]);
+//     zz=xx*spa[2];
+
+       if ( (xx<0) || (xx>=dim[0]) || (yy<0) || (yy>=dim[1]) || (zz<0) || (zz>=dim[2]) )
+       {
+               ok=false;
+       }
+
+       
+       char zTzxt[20];
+       char resultText[50];
+       strcpy(resultText,"GL: ");
+       if (ok==true) 
+       {
+               if (imagedata->GetScalarType()==VTK_BIT)
+               {
+                       char *pOrg=(char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       if(*pOrg==0)
+                       {
+                               sprintf(zTzxt,"%d",0);
+                       }
+                       else
+                       {
+                               sprintf(zTzxt,"%d",1);
+                       }
+               }
+       
+               if (imagedata->GetScalarType()==VTK_CHAR)
+               {
+                       char *pOrg=(char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       int tmp=*pOrg;
+                       sprintf(zTzxt,"%d",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_SIGNED_CHAR)
+               {
+                       signed char *pOrg=(signed char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       int tmp=*pOrg;
+                       sprintf(zTzxt,"%d",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_UNSIGNED_CHAR)
+               {
+                       unsigned char *pOrg=(unsigned char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       int tmp=*pOrg;
+                       sprintf(zTzxt,"%d",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_SHORT)
+               {
+                       short *pOrg=(short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       int tmp=*pOrg;
+                       sprintf(zTzxt,"%d",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_UNSIGNED_SHORT)
+               {
+                       unsigned short *pOrg=(unsigned short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       int tmp=*pOrg;
+                       sprintf(zTzxt,"%d",tmp);
+               }
+       
+               if (imagedata->GetScalarType()==VTK_INT)
+               {
+                       int *pOrg=(int*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       sprintf(zTzxt,"%d",*pOrg);
+               }
+
+               if (imagedata->GetScalarType()==VTK_UNSIGNED_INT)
+               {
+                       unsigned int *pOrg=(unsigned int*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       int tmp=*pOrg;
+                       sprintf(zTzxt,"%d",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_LONG)
+               {
+                       long *pOrg=(long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       double tmp=*pOrg;
+                       sprintf(zTzxt,"%3.2f",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_UNSIGNED_LONG)
+               {
+                       unsigned long *pOrg=(unsigned long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       double tmp=*pOrg;
+                       sprintf(zTzxt,"%3.2f",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_FLOAT)
+               {
+                       long *pOrg=(long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       double tmp=*pOrg;
+                       sprintf(zTzxt,"%3.2f",tmp);
+               }
+
+               if (imagedata->GetScalarType()==VTK_DOUBLE)
+               {
+                       double *pOrg=(double*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+       //              itoa (*pOrg,zTzxt,10);
+                       double tmp=*pOrg;
+                       sprintf(zTzxt,"%3.2f",tmp);
+               }
+       } 
+       else 
+       {
+               strcpy(zTzxt,"---");
+       }
+       strcat(resultText,zTzxt);
+       _vtkText_pixelIntensity -> SetInput(resultText);
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.h
new file mode 100644 (file)
index 0000000..fb50e35
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef VTKINFOTEXTIMAGE_H_
+#define VTKINFOTEXTIMAGE_H_
+
+
+#include "wxVtk2DBaseView.h"
+
+class vtkInfoTextImage{
+public:
+       vtkInfoTextImage();
+       ~vtkInfoTextImage();
+       void SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview);
+       void SetMarImageData(marImageData *marimagedata);
+       void Configure();
+       void PutPixelIntensity(int x, int y, int z);
+       void PutPosition(int x, int y, int z);
+       void PutColorLevel();
+       void PutWindowLevel();
+
+
+protected:
+private:
+
+       marImageData    *_marimagedata;
+       wxVtk2DBaseView *_wxvtk2Dbaseview;
+       vtkTextActor    *_vtkText_WindowLevel;
+       vtkTextActor    *_vtkText_ColorLevel;
+       vtkTextActor    *_vtkText_position;
+       vtkTextActor    *_vtkText_pixelIntensity;
+
+       vtkTextActor    *Create_Text_Label(int px, int py);
+};
+
+
+#endif /*VTKINFOTEXTIMAGE_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx
new file mode 100644 (file)
index 0000000..e65ece5
--- /dev/null
@@ -0,0 +1,54 @@
+#include "vtkInfoTextImageInteractor.h"
+
+#include "wxVtk2DBaseView.h"
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+vtkInfoTextImageInteractor::vtkInfoTextImageInteractor()
+{
+}
+
+//-------------------------------------------------------------------
+vtkInfoTextImageInteractor::~vtkInfoTextImageInteractor()
+{
+}
+
+//-------------------------------------------------------------------
+
+void vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(vtkInfoTextImage *vtkinfotextimage)
+{
+       _vtkinfotextimage       = vtkinfotextimage;
+}
+
+//-------------------------------------------------------------------
+bool vtkInfoTextImageInteractor::OnMouseMove()
+{
+       int X,Y;
+       wxVTKRenderWindowInteractor *wxVTKiren;
+       wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+       wxVTKiren->GetEventPosition(X,Y);
+
+       /*JCP 14/05/2009
+        * int z = (int)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetVtkBaseData()->GetZ());*/
+       
+       int z = (int)((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ();
+       double xx=X,yy=Y,zz=z;
+       _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransfromeCoordScreenToWorld(xx,yy,zz);
+
+       
+       GetVtkInfoTextImage()->PutWindowLevel();
+       GetVtkInfoTextImage()->PutColorLevel();
+       GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
+       GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
+
+       this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
+       return true;
+}
+
+//-------------------------------------------------------------------
+vtkInfoTextImage *vtkInfoTextImageInteractor::GetVtkInfoTextImage()
+{
+       return _vtkinfotextimage;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.h
new file mode 100644 (file)
index 0000000..8a27075
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef VTKINFOTEXTIMAGEINTERACTOR_H_
+#define VTKINFOTEXTIMAGEINTERACTOR_H_
+
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+#include "vtkInfoTextImage.h"
+#include "InteractorStyleMaracas.h"
+
+class vtkInfoTextImageInteractor : public InteractorStyleMaracas{
+public:
+       vtkInfoTextImageInteractor();
+       virtual ~vtkInfoTextImageInteractor();
+       void SetModelVtkInfoTextImage(vtkInfoTextImage *vtkinfotextimage);
+       vtkInfoTextImage *GetVtkInfoTextImage();
+
+protected:
+
+       virtual bool  OnMouseMove();
+
+private:
+       vtkInfoTextImage        *_vtkinfotextimage; 
+};
+
+
+#endif /*VTKINFOTEXTIMAGEINTERACTOR_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx
new file mode 100644 (file)
index 0000000..fb4e836
--- /dev/null
@@ -0,0 +1,35 @@
+#include "vtkInfoTextImageInteractorPlane2D.h"
+
+#include "vtkPlane2DView.h"
+#include "wxVtk2DBaseView.h"
+
+vtkInfoTextImageInteractorPlane2D::vtkInfoTextImageInteractorPlane2D()
+{
+}
+//-------------------------------------------------------------------
+vtkInfoTextImageInteractorPlane2D::~vtkInfoTextImageInteractorPlane2D()
+{
+}
+//-------------------------------------------------------------------
+bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
+{
+       int X,Y;
+       wxVTKRenderWindowInteractor *wxVTKiren;
+       wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+       wxVTKiren->GetEventPosition(X,Y);
+
+       int z = (int) ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ();
+       double xx=X,yy=Y,zz=z;
+
+// --> dif
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
+       vtkplane2Dview->TransfromeCoordViewWorld2(xx,yy,zz);
+
+       GetVtkInfoTextImage()->PutWindowLevel();
+       GetVtkInfoTextImage()->PutColorLevel();
+       GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
+       GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
+
+       this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
+       return true;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.h
new file mode 100644 (file)
index 0000000..5c5172e
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef VTKINFOTEXTIMAGEINTERACTORPLANE2D_H_
+#define VTKINFOTEXTIMAGEINTERACTORPLANE2D_H_
+
+#include "vtkInfoTextImageInteractor.h"
+
+class vtkInfoTextImageInteractorPlane2D : public vtkInfoTextImageInteractor{
+public:
+       vtkInfoTextImageInteractorPlane2D();
+       ~vtkInfoTextImageInteractorPlane2D();
+
+protected:
+
+       virtual bool  OnMouseMove();
+
+private:
+};
+
+#endif /*VTKINFOTEXTIMAGEINTERACTORPLANE2D_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx
new file mode 100644 (file)
index 0000000..9dae456
--- /dev/null
@@ -0,0 +1,60 @@
+
+#include "vtkInteractorScrollZ.h"
+#include "wxVtk2DBaseView.h"
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+vtkInteractorScrollZ::vtkInteractorScrollZ()
+{
+       _stateFordware=false;
+}
+//---------------------------------------------------------------------------
+vtkInteractorScrollZ::~vtkInteractorScrollZ()
+{
+}
+//---------------------------------------------------------------------------
+bool vtkInteractorScrollZ::OnRightButtonDown()
+{    
+       vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
+       if ((interactor->GetControlKey()==0) && (interactor->GetShiftKey()==0) ){
+               _stateFordware  = true;
+               _fordwareX      = interactor->GetEventPosition()[0];
+               _fordwareY      = interactor->GetEventPosition()[1];
+               /*JCP 14/05/2009
+               _sliceZ         = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetActualSlice();
+               */
+               _sliceZ         = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetActualSlice();
+       }
+       return true;
+}
+//---------------------------------------------------------------------------
+bool vtkInteractorScrollZ::OnRightButtonUp() 
+{
+       _stateFordware=false;
+       return true;
+}
+//---------------------------------------------------------------------------
+bool vtkInteractorScrollZ::OnMouseMove () 
+{
+       if (_stateFordware==true){
+           //int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];  // JPRx
+        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+               int delta = (_fordwareY - fy)/3;
+               /*JCP 14/05/2009
+               _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->SetActualSlice( _sliceZ + delta);
+               */
+               ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->SetActualSlice( _sliceZ + delta);
+
+               this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+
+       //      wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
+       //      _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
+
+               //_wxvtk2Dbaseview->Refresh();
+       } 
+       return true;
+}
+
+
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.h
new file mode 100644 (file)
index 0000000..7032827
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef VTKINTERACTORSCROLLZ_H_
+#define VTKINTERACTORSCROLLZ_H_
+
+#include "InteractorStyleMaracas.h"
+
+class vtkInteractorScrollZ : public InteractorStyleMaracas {
+public:
+       vtkInteractorScrollZ();
+       virtual ~vtkInteractorScrollZ();
+
+       virtual bool  OnMouseMove();
+       virtual bool  OnRightButtonDown();
+       virtual bool  OnRightButtonUp();
+
+
+
+protected:
+               bool                    _stateFordware;
+           int                         _fordwareX;
+        int                            _fordwareY;
+               int                             _sliceZ;
+
+private:
+
+};
+
+
+#endif /*VTKINTERACTORSCROLLZ_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx
new file mode 100644 (file)
index 0000000..ab60541
--- /dev/null
@@ -0,0 +1,116 @@
+#include "vtkInteractorStyle3DView.h"
+#include "matrix.h"
+#include "vtkPointPicker.h"
+#include "UtilVtk3DGeometriSelection.h"
+
+vtkInteractorStyle3DView::vtkInteractorStyle3DView()
+{
+}
+//---------------------------------------------------------------------------
+vtkInteractorStyle3DView::~vtkInteractorStyle3DView()
+{
+}
+//---------------------------------------------------------------------------
+bool vtkInteractorStyle3DView::OnLeftDClick()
+{
+       SelectMarchibCubePoint();
+       return true;
+}
+//---------------------------------------------------------------------------
+bool vtkInteractorStyle3DView::SelectMarchibCubePoint()
+{
+       bool ok=false;
+    gtm::TVector< double > pO( 3 ), pF( 3 ), pp( 3 ), cp( 3 );
+    gtm::TVector< double > xc( 3 );
+    gtm::TVector< double > x1( 3 ), n1( 3 );
+    gtm::TVector< double > x2( 3 ), n2( 3 );
+
+       double pickPoint[ 3 ], cameraPos[ 3 ];
+       int eventrwi[2];
+       vtkPointPicker* picker = vtkPointPicker::New( );        
+       eventrwi[0]= _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       eventrwi[1]= _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+       vtkRenderer *pRenderer = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetRenderer();
+       picker->Pick( eventrwi[0], eventrwi[1], 0.0, pRenderer );
+       pRenderer->GetActiveCamera( )->GetPosition( cameraPos );
+       picker->GetPickPosition( pickPoint );
+       picker->Delete( );
+
+       pp( 0 ) = pickPoint[ 0 ]; pp( 1 ) = pickPoint[ 1 ]; pp( 2 ) = pickPoint[ 2 ];
+    cp( 0 ) = cameraPos[ 0 ]; cp( 1 ) = cameraPos[ 1 ]; cp( 2 ) = cameraPos[ 2 ];
+
+
+//EED 27 sep 2006  (1/2)
+//     wxVtkMPR3DView *wxvtkmpr3Dview = (wxVtkMPR3DView *)_vtkInteractorStyleBaseView->GetWxVtk3DBaseView();
+//     double spc[3];
+//     wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetSpacing(spc);
+
+
+       vtkImageData *imageData = GetWxVtkMPR3DView()->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+       int dim[3];
+       double spc[3];
+       imageData->GetDimensions(dim);
+       imageData->GetSpacing(spc);
+
+
+       vtkMarchingCubes *mcubes = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetMCubes(0);
+       
+
+       UtilVtk3DGeometriSelection utilVtk3DGeometriSelection;
+       utilVtk3DGeometriSelection.SetDimentions(dim[0],dim[1],dim[2]);
+
+       utilVtk3DGeometriSelection.SetMarchingCube(mcubes);
+
+    double fac;
+    fac = GTM_MAX( dim[0], dim[2] );
+
+
+    if( utilVtk3DGeometriSelection.FindCubePointsFromPoints(
+      pO.GetAnsiRef( ), pF.GetAnsiRef( ),
+      pp.GetAnsiRef( ), cp.GetAnsiRef( ) )  ) 
+       {
+
+               if( utilVtk3DGeometriSelection.GetPointAndNormalIntersection(
+                           x1.GetAnsiRef( ), n1.GetAnsiRef( ),
+                               pO.GetAnsiRef( ), pF.GetAnsiRef( ) ) ) 
+               {
+                   if( utilVtk3DGeometriSelection.GetPointAndNormalIntersection(
+                             x2.GetAnsiRef( ), n2.GetAnsiRef( ),
+                                ( x1 - n1 ).GetAnsiRef( ), ( x1 - ( n1 * fac ) ).GetAnsiRef( )   ) ) 
+                       {
+                               xc = ( x2 + x1 ) * 0.5;
+//EED 27 sep 2006  (2/2)
+                               this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX(xc(0)/spc[0]);
+                               this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xc(1)/spc[1]);
+                               this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xc(2)/spc[2]);
+                               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+                               this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+                               ok=true;
+                       }
+               }
+       }
+
+
+       return ok;
+}
+//-------------------------------------------------------------------
+void vtkInteractorStyle3DView::SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview )
+{
+       _wxvtkmpr3Dview = wxvtkmpr3Dview;
+}
+//-------------------------------------------------------------------
+wxVtkMPR3DView *vtkInteractorStyle3DView::GetWxVtkMPR3DView()
+{
+       return _wxvtkmpr3Dview;
+}
+//-------------------------------------------------------------------
+wxVtkClipping3DView *vtkInteractorStyle3DView::GetWxVtkClipping3DView()
+{
+       return _wxvtkclipping3Dview;
+}
+//-------------------------------------------------------------------
+void vtkInteractorStyle3DView::SetWxVtkClipping3DView( wxVtkClipping3DView *wxvtkclipping3Dview)
+{
+       _wxvtkclipping3Dview = wxvtkclipping3Dview;
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.h
new file mode 100644 (file)
index 0000000..ed8e78f
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef VTKINTERACTORSTYLE3DVIEW_H_
+#define VTKINTERACTORSTYLE3DVIEW_H_
+
+#include "InteractorStyleMaracas.h"
+#include "wxVtkMPR3DView.h"
+#include "wxVtkClipping3DView.h"
+
+class vtkInteractorStyle3DView : public InteractorStyleMaracas
+{
+public:
+       vtkInteractorStyle3DView();
+       ~vtkInteractorStyle3DView();
+
+       virtual bool                    OnLeftDClick();
+       bool                                    SelectMarchibCubePoint();
+
+
+       wxVtkMPR3DView                  *GetWxVtkMPR3DView();
+       void                                    SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
+
+       wxVtkClipping3DView             *GetWxVtkClipping3DView();
+       void                                    SetWxVtkClipping3DView( wxVtkClipping3DView *wxvtkclipping3Dview);
+
+protected:
+private:
+       wxVtkMPR3DView                  *_wxvtkmpr3Dview;
+       wxVtkClipping3DView             *_wxvtkclipping3Dview;
+};
+
+
+#endif /*VTKINTERACTORSTYLE3DVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx
new file mode 100644 (file)
index 0000000..f68e2af
--- /dev/null
@@ -0,0 +1,338 @@
+#include "vtkInteractorStyleBaseView.h"
+
+#include "wxVtk3DBaseView.h"
+#include "wxVtk2DBaseView.h"
+
+#include "vtkObjectFactory.h"
+
+#include "InteractorStyleMaracas.h"
+
+vtkStandardNewMacro(vtkInteractorStyleBaseView);
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+vtkInteractorStyleBaseView::vtkInteractorStyleBaseView()
+{
+       _refresh_waiting                = false;
+       _parent_refresh_waiting = false;
+       _blockRefresh                   = false;
+}
+//---------------------------------------------------------------------------
+vtkInteractorStyleBaseView::~vtkInteractorStyleBaseView()
+{
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnMouseMove() // virtual 
+{
+       CallLstInteractorStyleMaracas(3);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnLeftButtonDown()  // virtual 
+{
+       CallLstInteractorStyleMaracas(4);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnLeftButtonUp() // virtual 
+{
+       CallLstInteractorStyleMaracas(5);
+}
+
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnLeftDClick()  // virtual
+{
+       CallLstInteractorStyleMaracas( 11 );
+}
+
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnMiddleButtonDown()  // virtual 
+{
+       CallLstInteractorStyleMaracas(6);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnMiddleButtonUp() // virtual 
+{
+       CallLstInteractorStyleMaracas(7);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnMiddleDClick()  // virtual
+{
+       CallLstInteractorStyleMaracas( 13 );
+}
+
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnRightButtonDown() // virtual 
+{
+       CallLstInteractorStyleMaracas(1);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnRightButtonUp() // virtual 
+{
+       CallLstInteractorStyleMaracas(2);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnRightDClick()  // virtual
+{
+       CallLstInteractorStyleMaracas( 12 );
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::OnMouseWheel()  // virtual
+{
+       CallLstInteractorStyleMaracas( 14 );
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas)
+{
+       interactorStyleMaracas->SetVtkInteractorStyleBaseView(this);
+       _lstInteractorStyleMaracas.push_back(interactorStyleMaracas);
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas)
+{
+       interactorStyleMaracas->RemoveVtkInteractorStyleBaseView();
+       int i, size = _lstInteractorStyleMaracas.size();
+       std::vector< InteractorStyleMaracas* >::iterator iter = _lstInteractorStyleMaracas.begin();
+       bool removed = false;
+       for (i=0; !removed && i<size; i++)
+       {
+               if ( _lstInteractorStyleMaracas[i] == interactorStyleMaracas )
+               {
+                       _lstInteractorStyleMaracas.erase(iter);
+                       removed = true;
+               }
+               iter++;
+       }               
+}
+//---------------------------------------------------------------------------
+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();
+
+//EED Borrame
+//FILE *ff = fopen("c:/temp/wxVtkBaseView_SceneManagerStadistics.txt","a+");
+//fprintf(ff,"EED vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas \n" );
+//for (i=0;i<size;i++)
+//{
+//fprintf(ff,"    %p\n" , _lstInteractorStyleMaracas[i] );
+//}
+//fclose(ff);
+
+
+
+       for (i=0;i<size;i++)
+       {
+               intStyMar = _lstInteractorStyleMaracas[i];
+               if (intStyMar->GetActive()==true){
+                       if (type ==1)
+                       {  // OnRightButtonDown
+                               if (intStyMar->OnRightButtonDown()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type ==2)
+                       {  // OnRightButtonUp
+                               if (intStyMar->OnRightButtonUp()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==3)
+                       {  // OnMouseMouve
+                               if (intStyMar->OnMouseMove()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==4)
+                       {  // OnLeftButtonDown
+                               if (intStyMar->OnLeftButtonDown()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==5)
+                       {  // OnLeftButtonUp
+                               if (intStyMar->OnLeftButtonUp()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==6)
+                       {  // OnMiddleButtonDown
+                               if (intStyMar->OnMiddleButtonDown()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==7)
+                       {  // OnMiddleButtonUp
+                               if (intStyMar->OnMiddleButtonUp()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==10)
+                       {  // OnMiddleButtonUp
+                               if (intStyMar->OnChar()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==11)
+                       {  // OnLeftDClick
+                               if (intStyMar->OnLeftDClick()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==12)
+                       {  // OnRightDClick
+                               if (intStyMar->OnRightDClick()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==13)
+                       {  // OnMiddleDClick
+                               if (intStyMar-> OnMiddleDClick()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==14)
+                       {  // OnMouseWheel
+                               if (intStyMar->OnMouseWheel()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+               } // if active
+       } // for
+
+       EvaluateToRefresh();
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView::OnChar()  // virtual 
+{    
+//     char a=GetInteractor()->GetKeyCode();
+       CallLstInteractorStyleMaracas(10);
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::TransformCoordinate(double &X, double &Y, double &Z)
+{
+    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()
+{
+       return (wxVtk2DBaseView*)_wxvtkbaseview;
+}
+//---------------------------------------------------------------------------
+wxVtk3DBaseView* vtkInteractorStyleBaseView::GetWxVtk3DBaseView()
+{
+       return (wxVtk3DBaseView*)_wxvtkbaseview;
+}JCP 13/05/2009*/
+wxVtkBaseView* vtkInteractorStyleBaseView::GetWxVtk2DBaseView()
+{
+       return _wxvtkbaseview;
+}
+//---------------------------------------------------------------------------
+wxVtkBaseView* vtkInteractorStyleBaseView::GetWxVtk3DBaseView()
+{
+       return _wxvtkbaseview;
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::SetActiveAllInteractors(bool ok)
+{
+       InteractorStyleMaracas *intStyMar;
+       int i,size=_lstInteractorStyleMaracas.size();
+       for (i=0;i<size;i++)
+       {
+               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()
+{
+       _parent_refresh_waiting=true;
+}
+//---------------------------------------------------------------------------
+bool vtkInteractorStyleBaseView::GetParent_refresh_waiting()
+{
+       return _parent_refresh_waiting;
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::EvaluateToRefresh()
+{
+
+       if  ( _blockRefresh==false )
+       {
+               if ( (_refresh_waiting==true) && (_parent_refresh_waiting==false))
+               {
+                       _refresh_waiting                = false;
+                       this->_wxvtkbaseview->Refresh();
+               }
+               if (_parent_refresh_waiting==true)
+               {
+                       _parent_refresh_waiting = false;
+                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+                       this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+               }
+       }
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::BlockRefresh()
+{
+       _blockRefresh=true;
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView::UnBlockRefresh()
+{
+       _blockRefresh=false;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.h
new file mode 100644 (file)
index 0000000..9eb157e
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef VTKINTERACTORSTYLEBASEVIEW_H_
+#define VTKINTERACTORSTYLEBASEVIEW_H_
+
+
+#include "wxVtkBaseView.h"
+
+
+//class InteractorStyleMaracas;
+//#include "InteractorStyleMaracas.h"
+class InteractorStyleMaracas;
+
+
+class creaMaracasVisu_EXPORT vtkInteractorStyleBaseView : public vtkInteractorStyleImage
+{
+public:
+       vtkInteractorStyleBaseView();
+       ~vtkInteractorStyleBaseView();
+       static vtkInteractorStyleBaseView *New();
+       virtual void  OnChar();
+       virtual void  OnMouseMove();
+       virtual void  OnLeftButtonDown(); 
+       virtual void  OnLeftButtonUp();
+       virtual void  OnMiddleButtonDown(); 
+       virtual void  OnMiddleButtonUp();
+       virtual void  OnRightButtonDown();
+       virtual void  OnRightButtonUp();
+
+       virtual void  OnLeftDClick();
+       virtual void  OnRightDClick();
+       virtual void  OnMiddleDClick();
+       virtual void  OnMouseWheel();
+
+       virtual void  TransformCoordinate(double &X, double &Y, double &Z);
+       
+       void  AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas);
+       void  RemoveInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas);
+       void  InsertInteractorStyleMaracas(int pos, InteractorStyleMaracas* interactorStyleMaracas);
+       void  CallLstInteractorStyleMaracas(int type);
+//JCP 13/05/2009
+       //wxVtk2DBaseView               *GetWxVtk2DBaseView();
+       //wxVtk3DBaseView               *GetWxVtk3DBaseView();
+       wxVtkBaseView   *GetWxVtk2DBaseView();
+       wxVtkBaseView   *GetWxVtk3DBaseView();
+//JCP 13/05/2009
+                       void            SetwxVtkBaseView(wxVtkBaseView *wxvtkbaseview);
+                       void            SetActiveAllInteractors(bool ok);
+
+                       void            SetRefresh_waiting();
+                       void            SetParent_refresh_waiting();
+
+                       bool            GetRefresh_waiting();
+                       bool            GetParent_refresh_waiting();
+
+
+                       void            EvaluateToRefresh();
+                       void            BlockRefresh();
+                       void            UnBlockRefresh();
+
+protected:
+               std::vector< InteractorStyleMaracas* >  _lstInteractorStyleMaracas;
+
+private:
+       bool                            _blockRefresh;
+       bool                            _refresh_waiting;
+       bool                            _parent_refresh_waiting;
+       wxVtkBaseView           *_wxvtkbaseview;
+};
+
+#endif /*VTKINTERACTORSTYLEBASEVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx
new file mode 100644 (file)
index 0000000..b33cd8e
--- /dev/null
@@ -0,0 +1,83 @@
+
+
+#include "vtkInteractorStyleBaseView2D.h"
+#include <vtkObjectFactory.h>
+
+vtkStandardNewMacro(vtkInteractorStyleBaseView2D);
+
+//---------------------------------------------------------------------------
+vtkInteractorStyleBaseView2D::vtkInteractorStyleBaseView2D()
+{
+       _manualinteractorwindowlevel= new manualInteractorWindowLevel();
+       AddInteractorStyleMaracas( _manualinteractorwindowlevel );
+
+       _vtkInteractorScrollZ = new vtkInteractorScrollZ();
+       AddInteractorStyleMaracas(_vtkInteractorScrollZ);
+       
+}
+//---------------------------------------------------------------------------
+vtkInteractorStyleBaseView2D::~vtkInteractorStyleBaseView2D()
+{
+}
+
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView2D::OnRightButtonDown()  // virtual
+{    
+       vtkInteractorStyleBaseView::OnRightButtonDown();
+
+       if ((GetInteractor()->GetControlKey()==1) && (GetInteractor()->GetShiftKey()==0) ){
+               this->vtkInteractorStyleImage::OnRightButtonDown();
+       }
+
+}
+
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView2D::OnRightButtonUp()  // virtual
+{
+       vtkInteractorStyleBaseView::OnRightButtonUp();
+       this->vtkInteractorStyleImage::OnRightButtonUp();
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView2D::OnMouseMove () // virtual
+{
+       vtkInteractorStyleBaseView::OnMouseMove();
+       this->vtkInteractorStyleImage::OnMouseMove();
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView2D::OnLeftButtonDown() // virtual
+{
+       vtkInteractorStyleBaseView::OnLeftButtonDown();
+
+       if ((GetInteractor()->GetControlKey()==0) && (GetInteractor()->GetShiftKey()==1) )
+       {
+               this->vtkInteractorStyleImage::OnLeftButtonDown();
+       }
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView2D::OnLeftButtonUp () // virtual
+{
+       vtkInteractorStyleBaseView::OnLeftButtonUp();
+
+       this->vtkInteractorStyleImage::OnLeftButtonUp();
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView2D::OnMiddleButtonDown () // virtual
+{
+       vtkInteractorStyleBaseView::OnMiddleButtonDown();
+
+       if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
+       {
+               this->vtkInteractorStyleImage::OnLeftButtonDown();
+       }
+}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView2D::OnMiddleButtonUp () // virtual
+{
+       vtkInteractorStyleBaseView::OnMiddleButtonUp();
+
+       if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
+       {
+               this->vtkInteractorStyleImage::OnLeftButtonUp();
+       }
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.h
new file mode 100644 (file)
index 0000000..1432c06
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef VTKINTERACTORSTYLEBASEVIEW2D_H_
+#define VTKINTERACTORSTYLEBASEVIEW2D_H_
+
+#include "vtkInteractorScrollZ.h"
+
+#include "manualInteractorWindowLevel.h"
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+
+class creaMaracasVisu_EXPORT vtkInteractorStyleBaseView2D : public vtkInteractorStyleBaseView{
+public:
+       vtkInteractorStyleBaseView2D();
+       ~vtkInteractorStyleBaseView2D();
+       static vtkInteractorStyleBaseView2D *New();
+       virtual void  OnMouseMove();
+       virtual void  OnLeftButtonDown(); 
+       virtual void  OnLeftButtonUp();
+       virtual void  OnMiddleButtonDown(); 
+       virtual void  OnMiddleButtonUp();
+       virtual void  OnRightButtonDown();
+       virtual void  OnRightButtonUp();
+
+
+protected:
+
+private:
+       manualInteractorWindowLevel             *_manualinteractorwindowlevel;
+       vtkInteractorScrollZ                    *_vtkInteractorScrollZ;
+
+};
+
+
+#endif /*VTKINTERACTORSTYLEBASEVIEW2D_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.cxx
new file mode 100644 (file)
index 0000000..0b2e7c2
--- /dev/null
@@ -0,0 +1,194 @@
+
+#include "vtkInteractorStyleBaseView3D.h"
+
+#include "vtkObjectFactory.h"
+
+vtkStandardNewMacro(vtkInteractorStyleBaseView3D);
+
+//---------------------------------------------------------------------------
+vtkInteractorStyleBaseView3D::vtkInteractorStyleBaseView3D(){
+}
+//---------------------------------------------------------------------------
+vtkInteractorStyleBaseView3D::~vtkInteractorStyleBaseView3D(){
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnRightButtonDown ()
+{    
+       vtkInteractorStyleBaseView::OnRightButtonDown();
+
+/*
+               if (GetInteractor()->GetControlKey()==1 ){
+                       this->vtkInteractorStyleTrackballCamera::OnRightButtonDown();
+               }
+*/
+  this->FindPokedRenderer(this->Interactor->GetEventPosition()[0], 
+                          this->Interactor->GetEventPosition()[1]);
+
+  if (this->CurrentRenderer == NULL)
+    {
+    return;
+    }
+
+  if (this->Interactor->GetControlKey()) {
+      this->StartDolly();
+  }
+
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnRightButtonUp () 
+{
+       vtkInteractorStyleBaseView::OnRightButtonUp();
+
+/*
+               if (GetInteractor()->GetControlKey()==1 ){
+                       this->vtkInteractorStyleTrackballCamera::OnRightButtonUp();
+               }
+*/
+
+               
+  switch (this->State) 
+    {
+    case VTKIS_DOLLY:
+      this->EndDolly();
+      break;
+    }
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnMouseMove () 
+{
+       vtkInteractorStyleBaseView::OnMouseMove();
+
+//             this->vtkInteractorStyleTrackballCamera::OnMouseMove();
+
+ // int x = this->Interactor->GetEventPosition()[0]; // JPRx
+ // int y = this->Interactor->GetEventPosition()[1]; // JPRx
+
+
+ // vtkRenderWindowInteractor *rwi = this->Interactor;
+
+ // int lx =  rwi->GetLastEventPosition()[0]; // JPRx
+ // int ly =  rwi->GetLastEventPosition()[1]; // JPRx
+ // int dx = rwi->GetEventPosition()[0] ; // JPRx
+ // int dy = rwi->GetEventPosition()[1] ; // JPRx
+
+
+  switch (this->State) 
+    {
+    case VTKIS_ROTATE:
+ //     this->FindPokedRenderer(x, y);
+      this->Rotate();
+ //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+      break;
+
+    case VTKIS_PAN:
+ //     this->FindPokedRenderer(x, y);
+      this->Pan();
+ //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+      break;
+
+    case VTKIS_DOLLY:
+ //     this->FindPokedRenderer(x, y);
+      this->Dolly();
+ //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+      break;
+
+    case VTKIS_SPIN:
+ //     this->FindPokedRenderer(x, y);
+      this->Spin();
+ //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+      break;
+    }
+
+
+
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnLeftButtonDown ()
+{
+       vtkInteractorStyleBaseView::OnLeftButtonDown();
+/*
+               if (GetInteractor()->GetControlKey()==1 ){
+                       this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
+               } else {
+                       this->vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
+               }
+*/
+
+
+  this->FindPokedRenderer(this->Interactor->GetEventPosition()[0], 
+                          this->Interactor->GetEventPosition()[1]);
+  if (this->CurrentRenderer == NULL)
+    {
+    return;
+    }
+
+  if (this->Interactor->GetControlKey()) {
+      this->StartPan();
+  } else {
+      this->StartRotate();
+  }
+
+ /* 
+  if (this->Interactor->GetShiftKey()) 
+    {
+    if (this->Interactor->GetControlKey()) 
+      {
+      this->StartDolly();
+      }
+    else 
+      {
+      this->StartPan();
+      }
+    } 
+  else 
+    {
+    if (this->Interactor->GetControlKey()) 
+      {
+      this->StartSpin();
+      }
+    else 
+      {
+      this->StartRotate();
+      }
+    }
+*/
+
+
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnLeftButtonUp () 
+{
+       vtkInteractorStyleBaseView::OnLeftButtonUp();
+
+/*
+               if (GetInteractor()->GetControlKey()==1 ){
+                       this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();
+               } else {
+                       this->vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
+               }
+*/
+  switch (this->State) 
+    {
+
+    case VTKIS_PAN:
+      this->EndPan();
+      break;
+
+    case VTKIS_ROTATE:
+      this->EndRotate();
+      break;
+    }
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnMiddleButtonDown () 
+{
+       vtkInteractorStyleBaseView::OnMiddleButtonDown();
+       //              this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
+}
+//---------------------------------------------------------------------------
+void  vtkInteractorStyleBaseView3D::OnMiddleButtonUp () 
+{
+       vtkInteractorStyleBaseView::OnMiddleButtonUp();
+
+       //              this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.h
new file mode 100644 (file)
index 0000000..672e0c1
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef VTKINTERACTORSTYLEBASEVIEW3D_H_
+#define VTKINTERACTORSTYLEBASEVIEW3D_H_
+
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+#include "vtkInteractorStyleBaseView.h" 
+
+class creaMaracasVisu_EXPORT vtkInteractorStyleBaseView3D : public vtkInteractorStyleBaseView {
+public:
+       vtkInteractorStyleBaseView3D();
+       ~vtkInteractorStyleBaseView3D();
+       static vtkInteractorStyleBaseView3D *New();
+
+       virtual void  OnMouseMove () ;
+       virtual void  OnLeftButtonDown (); 
+       virtual void  OnLeftButtonUp () ;
+       virtual void  OnMiddleButtonDown (); 
+       virtual void  OnMiddleButtonUp () ;
+       virtual void  OnRightButtonDown () ;
+       virtual void  OnRightButtonUp () ;
+
+private:
+
+};
+
+#endif /*VTKINTERACTORSTYLEBASEVIEW3D_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx
new file mode 100644 (file)
index 0000000..ef2a00a
--- /dev/null
@@ -0,0 +1,116 @@
+#include "vtkInteractorStyleMPRView.h"
+
+#include "wxVtkMPR2DView.h"
+
+vtkInteractorStyleMPRView::vtkInteractorStyleMPRView()
+{
+       _stateMoveAxisX = false;
+       _stateMoveAxisY = false;
+       _stateMoveAxisZ = false;
+}
+//---------------------------------------------------------------------------
+vtkInteractorStyleMPRView::~vtkInteractorStyleMPRView()
+{
+}
+
+
+//---------------------------------------------------------------------------
+bool  vtkInteractorStyleMPRView::OnLeftDClick () // virtual
+{
+       wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+       double x = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       double y = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+       double z = 1;
+       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
+       wxvtkmpr2Dview->MoveX(x,y,z);
+       wxvtkmpr2Dview->MoveY(x,y,z);
+       wxvtkmpr2Dview->MoveZ(x,y,z);
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+       wxCommandEvent newevent2(wxEVT_COMMAND_MENU_SELECTED,12122);  // Doble click
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
+
+       return true;
+}
+//---------------------------------------------------------------------------
+bool  vtkInteractorStyleMPRView::OnLeftButtonDown () 
+{
+       wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+       double x        = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       double y        = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+       double z        = 1;
+       //double xx     = x;  // JPRx
+       //double yy     = y;  // JPRx
+       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
+
+/*EED Borrame
+       if ((_xBack==xx) && (_yBack==yy))
+       {
+               wxvtkmpr2Dview->MoveX(x,y,z);
+               wxvtkmpr2Dview->MoveY(x,y,z);
+               wxvtkmpr2Dview->MoveZ(x,y,z);
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+               wxCommandEvent newevent2(wxEVT_COMMAND_MENU_SELECTED,12122);  // Doble click
+               wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
+       }
+
+       _xBack=xx;      
+       _yBack=yy;
+*/
+
+       _stateMoveAxisX = wxvtkmpr2Dview->IfMouseTouchX(x,y,z);
+       _stateMoveAxisY = wxvtkmpr2Dview->IfMouseTouchY(x,y,z);
+       _stateMoveAxisZ = wxvtkmpr2Dview->IfMouseTouchZ(x,y,z);
+
+       return true;
+}
+//---------------------------------------------------------------------------
+bool  vtkInteractorStyleMPRView::OnLeftButtonUp () 
+{
+       if (_stateMoveAxisX==true) 
+       {
+               _stateMoveAxisX=false;
+       }
+       if (_stateMoveAxisY==true) 
+       {
+               _stateMoveAxisY=false;
+       }
+       if (_stateMoveAxisZ==true) 
+       {
+               _stateMoveAxisZ=false;
+       }
+       return true;
+}
+//---------------------------------------------------------------------------
+bool  vtkInteractorStyleMPRView::OnMouseMove () 
+{
+       double x = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       double y = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+
+       double z=1;
+       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
+       wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+//     wxvtkmpr2Dview->TransfromeCoordViewWorld(x,y,z);            
+
+       wxvtkmpr2Dview->ChangeAxisColor(x,y,z);
+
+       if ((_stateMoveAxisX==true) || (_stateMoveAxisY==true)  || (_stateMoveAxisZ==true) )
+       {
+               if (_stateMoveAxisX==true) 
+               {
+                       wxvtkmpr2Dview-> MoveX(x,y,z);
+               }
+               if (_stateMoveAxisY==true) 
+               {
+                       wxvtkmpr2Dview->MoveY(x,y,z);
+               }
+               if (_stateMoveAxisZ==true) 
+               {
+                       wxvtkmpr2Dview->MoveZ(x,y,z);
+               }
+
+               this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+       }
+       return true;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.h
new file mode 100644 (file)
index 0000000..bac1d50
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef VTKINTERACTORSTYLEMPRVIEW_H_
+#define VTKINTERACTORSTYLEMPRVIEW_H_
+
+#include "InteractorStyleMaracas.h"
+
+class vtkInteractorStyleMPRView : public InteractorStyleMaracas
+{
+public:
+       vtkInteractorStyleMPRView();
+       ~vtkInteractorStyleMPRView();
+
+       virtual bool  OnMouseMove();
+       virtual bool  OnLeftButtonDown(); 
+       virtual bool  OnLeftButtonUp();
+       virtual bool  OnLeftDClick();
+
+protected:
+/*EED Borrame
+               double  _xBack;
+               double  _yBack;
+*/
+               bool    _stateMoveAxisX;
+               bool    _stateMoveAxisY;
+               bool    _stateMoveAxisZ;
+};
+
+#endif /*VTKINTERACTORSTYLEMPRVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.cxx
new file mode 100644 (file)
index 0000000..d755bca
--- /dev/null
@@ -0,0 +1,104 @@
+
+
+#include "vtkInteractorStylePlane2D.h"
+#include "vtkPlane2DView.h"
+
+vtkInteractorStylePlane2D::vtkInteractorStylePlane2D()
+{
+       _stateRotate=false;
+}
+//---------------------------------------------------------------------------
+vtkInteractorStylePlane2D::~vtkInteractorStylePlane2D()
+{
+}
+
+//---------------------------------------------------------------------------
+bool vtkInteractorStylePlane2D::GetStateRotate()
+{
+       return _stateRotate;
+}
+
+//---------------------------------------------------------------------------
+bool  vtkInteractorStylePlane2D::OnLeftButtonDown()  // vitual
+{
+       _stateRotate = true;
+       _fordwareX = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       _fordwareY = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+       vtkplane2Dview->RotationStart();
+
+       return true;
+}
+
+//---------------------------------------------------------------------------
+bool vtkInteractorStylePlane2D::OnLeftButtonUp() // virtual
+{
+       if (_stateRotate==true)
+       {
+               _stateRotate = false;
+               vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+               vtkplane2Dview->ResetBack();
+//             this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+       }
+
+       return true;
+}
+
+//---------------------------------------------------------------------------
+bool  vtkInteractorStylePlane2D::OnRightButtonUp()  // virtual
+{
+       if (_stateRotate==true){
+               //vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()); // JPRx
+
+// EED Borrame
+//             vtkplane2Dview->RotationEnd();
+
+               _stateRotate = false;
+       }
+
+       return true;
+}
+//---------------------------------------------------------------------------
+bool  vtkInteractorStylePlane2D::OnMouseMove () // virtual 
+{
+       bool ok_v, ok_ang;
+       if (_stateRotate==true){
+               ok_v=false;
+               ok_ang=false;
+               if (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==1)
+               {
+                       ok_v=true;
+               }
+               if (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==1)
+               {
+                       ok_ang=true;
+               }
+           int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+               vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+               vtkplane2Dview->RotationDrag( fx - _fordwareX , fy - _fordwareY , ok_v , ok_ang);
+               this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+       } 
+       return true;
+}
+//-------------------------------------------------------------------
+bool vtkInteractorStylePlane2D::OnLeftDClick() // virtual
+{
+       int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+       double xx=fx;
+       double yy=fy;
+       double zz=0;
+
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+       vtkMPRBaseData *vtkmprbasedata = vtkplane2Dview->GetVtkmprbasedata();
+
+       vtkplane2Dview->TransfromeCoordViewWorld2(xx,yy,zz);
+
+       vtkmprbasedata->SetX( xx );
+       vtkmprbasedata->SetY( yy );
+       vtkmprbasedata->SetZ( zz );
+       this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+
+       return true;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.h
new file mode 100644 (file)
index 0000000..3c13788
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef VTKINTERACTORSTYLEPLANE2D_H_
+#define VTKINTERACTORSTYLEPLANE2D_H_
+
+#include "InteractorStyleMaracas.h"
+
+class vtkInteractorStylePlane2D : public InteractorStyleMaracas 
+{
+public:
+       vtkInteractorStylePlane2D();
+       ~vtkInteractorStylePlane2D();
+       virtual bool  OnLeftButtonDown(); 
+       virtual bool  OnLeftButtonUp();
+       virtual bool  OnMouseMove(); 
+       virtual bool  OnRightButtonUp();
+       virtual bool  OnLeftDClick();
+                       bool  GetStateRotate();
+
+private:
+       bool    _stateRotate;
+
+       int     _fordwareX;
+       int     _fordwareY;
+};
+
+#endif /*VTKINTERACTORSTYLEPLANE2D_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx
new file mode 100644 (file)
index 0000000..de3d2b0
--- /dev/null
@@ -0,0 +1,128 @@
+
+#include "vtkInteractorStyleSphere.h"
+
+#include "wxSphereView.h"
+
+vtkInteractorStyleSphere::vtkInteractorStyleSphere()
+{
+       _stateRadio  = false;
+       _stateRotate = false;
+}
+
+//---------------------------------------------------------------------------
+
+vtkInteractorStyleSphere::~vtkInteractorStyleSphere()
+{
+}
+
+
+//---------------------------------------------------------------------------
+
+bool  vtkInteractorStyleSphere::OnRightButtonDown()
+{
+       if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) )
+       {
+               _stateRadio     = true;
+               //_fordwareX    = this->Interactor->GetEventPosition()[0];
+               _fordwareY      = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+
+               wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+
+               _radio = wxsphereview->GetRadio();
+       }
+
+       return true;
+}
+
+//---------------------------------------------------------------------------
+
+bool  vtkInteractorStyleSphere::OnRightButtonUp() 
+{
+       if (_stateRadio==true)
+       {
+               wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+               wxsphereview->SetDeltaVoxel(1);
+               double radio=wxsphereview->GetRadio();
+               wxsphereview->GetIdOfImage(radio+0.1);
+               wxsphereview->GetIdOfImage(radio+0.2);
+               wxsphereview->GetIdOfImage(radio-0.1);
+               wxsphereview->GetIdOfImage(radio-0.2);
+
+               wxsphereview->RefreshView();
+               _stateRadio = false;
+       }
+
+       return true;
+}
+//---------------------------------------------------------------------------
+
+bool vtkInteractorStyleSphere::OnLeftButtonDown()
+{
+       _stateRotate    = true;
+       _fordwareX              = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+       _fordwareY              = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+       return true;
+}
+
+
+//---------------------------------------------------------------------------
+
+bool  vtkInteractorStyleSphere::OnLeftButtonUp() 
+{
+       wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+       if (_stateRotate==true){
+               int fx  = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+               int fy  = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+
+               if ((_fordwareX==fx)&&(_fordwareY==fy)){
+                       double x=fx,y=fy,z=1;
+                       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
+                       wxsphereview->SetXYZtoParent(x,y);
+                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
+                       wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
+               } else {
+                       wxsphereview->RotationEnd();
+               }
+               wxsphereview->RefreshView();
+               _stateRotate = false;
+       }
+
+       return true;
+}
+
+
+//---------------------------------------------------------------------------
+
+bool  vtkInteractorStyleSphere::OnMouseMove () 
+{
+       wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
+       if (_stateRotate==true)
+       {
+               bool ok_v, ok_ang;
+               ok_v=false;
+               ok_ang=false;
+               if (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==1)
+               {
+                       ok_v = true;
+               }
+               if (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==1)
+               {
+                       ok_ang = true;
+               }
+           int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
+        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+               wxsphereview->RotationStart( fx - _fordwareX , -(fy - _fordwareY) , ok_v, ok_ang);
+               wxsphereview->RefreshView();
+       } 
+       if (_stateRadio==true)
+       {           
+               //int fx = this->Interactor->GetEventPosition()[0];
+        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
+               double dif=(fy-_fordwareY) / 10.0;
+               wxsphereview->SetRadio( _radio + dif );
+               wxsphereview->SetDeltaVoxel(3);
+               wxsphereview->RefreshView();
+       }
+
+       return true;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.h
new file mode 100644 (file)
index 0000000..3d55928
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef VTKINTERACTORSTYLESPHERE_H_
+#define VTKINTERACTORSTYLESPHERE_H_
+
+#include "InteractorStyleMaracas.h"
+
+class vtkInteractorStyleSphere : public InteractorStyleMaracas
+{
+public:
+       vtkInteractorStyleSphere();
+       ~vtkInteractorStyleSphere();
+       virtual bool  OnLeftButtonUp(); 
+       virtual bool  OnLeftButtonDown(); 
+       virtual bool  OnMouseMove(); 
+       virtual bool  OnRightButtonUp();
+       virtual bool  OnRightButtonDown();
+
+private:
+       bool    _stateRotate;
+       bool    _stateRadio;
+       int     _fordwareX;
+       int     _fordwareY;
+
+       double  _radio;
+};
+
+#endif /*VTKINTERACTORSTYLESPHERE_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.h
new file mode 100644 (file)
index 0000000..760e2c4
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef VTKMPR3DDATAVIEWER_H_
+#define VTKMPR3DDATAVIEWER_H_
+
+#include "wxMPRBaseData.h"
+
+class creaMaracasVisu_EXPORT vtkMPR3DDataViewer {
+public:
+       vtkMPR3DDataViewer();
+       virtual ~vtkMPR3DDataViewer();
+       vtkImageActor*                  GetImageActor(int id);
+       vtkActor*                               GetOutlineActor();
+       virtual void                    Refresh();
+       virtual void                    Configure();
+       void                                    SetVisiblePosition(int idPosition, bool visible);
+       bool                                    GetVisiblePosition(int idPosition);
+       vtkImageActor*                  GetvtkActor_saggital();
+       vtkImageActor*                  GetvtkActor_axial();
+       vtkImageActor*                  GetvtkActor_coronal();
+       void                                    SetPositionX(int pos);
+       void                                    SetPositionY(int pos);
+       void                                    SetPositionZ(int pos);
+       void                                    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
+       vtkMPRBaseData*                 GetVtkMPRBaseData();
+       
+       vtkColorTransferFunction   *GetvtkColorTransferFunction();
+       std::vector<double >       *GetctFunVectorPoint();
+       std::vector<double >       *GetctFunVectorRed();
+       std::vector<double >       *GetctFunVectorGreen();
+       std::vector<double >       *GetctFunVectorBlue();
+
+private:
+       
+       bool                                                            _visiblePosition[3];
+
+       // outline
+       vtkOutlineFilter                                        *_outlineData;
+       vtkPolyDataMapper                                       *_mapOutline;
+       vtkActor                                                        *_outline;
+
+       //
+       vtkColorTransferFunction                        *_ctfun;
+       std::vector<double>                                     _ctFunVectorPoint;
+       std::vector<double>                                     _ctFunVectorRed;
+       std::vector<double>                                     _ctFunVectorGreen;
+       std::vector<double>                                     _ctFunVectorBlue;
+
+//     vtkLookupTable                                          *_bwLut;
+//     vtkLookupTable                                          *_hueLut;
+//     vtkLookupTable                                          *_satLut;
+
+       vtkImageMapToColors                                     *_saggitalColors;
+       vtkImageActor                                           *_saggital;
+       vtkImageMapToColors                                     *_axialColors;
+       vtkImageActor                                           *_axial;
+       vtkImageMapToColors                                     *_coronalColors;
+       vtkImageActor                                           *_coronal;
+       vtkMPRBaseData                                          *_vtkmprbasedata;
+
+
+};
+
+#endif /*VTKMPR3DDATAVIEWER_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx
new file mode 100644 (file)
index 0000000..86e8fa3
--- /dev/null
@@ -0,0 +1,552 @@
+#include "vtkPlane2DView.h"
+
+#include "vtkCellArray.h"
+
+#include "vtkInteractorStyleBaseView2D.h"
+#include "vtkPointData.h"
+
+
+vtkPlane2DView::vtkPlane2DView( wxWindow *parent)
+: wxVtk2DBaseView(parent)
+{
+
+       _backX                                  =       -99999;
+       _backY                                  =       -99999;
+       _backZ                                  =       -99999;
+
+       _backOrient[0]                  =       -99999;
+       _backOrient[1]                  =       -99999;
+       _backOrient[2]                  =       -99999;
+       _backOrient[3]                  =       -99999;
+
+       _active                                 =   true;
+       _mip_visualization              =       true;
+       _mip_width                              =       2;
+
+    _transform1                                =       vtkTransform::New();
+    _transform2                                =       vtkTransform::New();
+       _transform1->Identity();
+       _transform2->Identity();
+
+       _sizeIma                                =       200;
+
+       _pSource                                =       NULL;
+       _3Dslices                               =       NULL;
+       _stPoints                               =       NULL;
+       _change                                 =       NULL;
+       _imageResult                    =       NULL;
+
+       // line horizontal
+    _pts                       = NULL;
+    _lineActor         = NULL;
+       _lineMapper             = NULL;
+       _pd                             = NULL;
+
+       _interactorstyleplane2D =       false;
+}
+//-------------------------------------------------------------------
+vtkPlane2DView::~vtkPlane2DView()
+{
+       ResetPlane();
+
+       // Horizontal Line
+    if (_pts           != NULL)        {       _pts                    -> Delete(); }
+    if (_lineActor     != NULL)        {       _lineActor              -> Delete(); }
+    if (_lineMapper    != NULL)        {       _lineMapper             -> Delete(); }
+    if (_pd                    != NULL)        {       _pd                             -> Delete(); }
+
+       _transform1             -> Delete();
+       _transform2             -> Delete();
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::ResetBack()
+{
+               _backX=-1;
+               _backY=-1;
+               _backZ=-1;
+               _backOrient[0]=-1;
+               _backOrient[1]=-1;
+               _backOrient[2]=-1;
+               _backOrient[3]=-1;
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::ResetPlane(){
+       if (_pSource    !=NULL) { _pSource      -> Delete();    }
+       if (_3Dslices   !=NULL) { _3Dslices     -> Delete();    }
+       if (_stPoints   !=NULL) { _stPoints     -> Delete();    }
+       if (_change             !=NULL) { _change       -> Delete();    }
+}
+//-------------------------------------------------------------------
+vtkMPRBaseData *vtkPlane2DView::GetVtkmprbasedata()
+{
+       return (vtkMPRBaseData*)GetVtkBaseData();
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::SetPSource(int sizeIma){
+       int dimIma      = sizeIma; 
+
+       double x = GetVtkmprbasedata()->GetX();
+       double y = GetVtkmprbasedata()->GetY();
+       double z = GetVtkmprbasedata()->GetZ();
+
+       double spc[3];
+       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
+       imagedata->GetSpacing(spc);
+       x=x*spc[0];
+       y=y*spc[1];
+       z=z*spc[2];
+
+
+       vtkMPRBaseData  *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData();
+       vtkTransform    *transform       = mprbasedata->GetTransformOrientation();
+
+       double in[3];  // temp
+       double pA[3];
+       double pB[3];
+       in[0]=1;                in[1]=0;                        in[2]=0;
+       transform->TransformPoint(in,_n);
+
+       in[0]=0;        in[1]=dimIma-1;         in[2] = 0;
+       transform->TransformPoint(in,pA);
+
+       in[0]=0;        in[1]=0;                in[2]=dimIma-1;
+       transform->TransformPoint(in,pB);
+
+    _pSource -> SetPoint1( pA  );
+    _pSource -> SetPoint2( pB  );
+
+       _pSource -> SetOrigin( 0        , 0             , 0             );
+    _pSource -> SetResolution( sizeIma-1 , sizeIma -1 );
+       _pSource -> Update();
+       _pSource -> SetCenter( x, y, z );
+    _pSource -> SetNormal( _n );
+    _pSource -> Update( );
+
+// EED Borrame
+//     transform->Delete();
+
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::ExtractPlane() 
+{
+
+       double x = GetVtkmprbasedata()->GetX();
+       double y = GetVtkmprbasedata()->GetY();
+       double z = GetVtkmprbasedata()->GetZ();
+
+       double spc[3];
+       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
+       imagedata->GetSpacing(spc);
+       x=x*spc[0];
+       y=y*spc[1];
+       z=z*spc[2];
+
+       vtkTransform *transform = GetVtkmprbasedata()->GetTransformOrientation();
+       double orientation[4];
+       transform->GetOrientationWXYZ(orientation);
+
+       bool okOrientation=true;
+       if ((orientation[0]!=_backOrient[0]) || (orientation[1]!=_backOrient[1]) ||
+               (orientation[2]!=_backOrient[2]) || (orientation[3]!=_backOrient[3]))
+       {
+               okOrientation=false;
+       }
+
+       bool okPosicion=true;
+       if ( (x!=_backX) || (y!=_backY) || (z!=_backZ) )
+       {
+               okPosicion=false;
+       }
+
+       if ((okPosicion==false) || (okOrientation==false) ) {
+               if (_active==true){
+
+                       bool ok = false;
+
+                       if ( _mip_visualization==true )
+                       {
+                               if (_interactorstyleplane2D!=NULL)
+                               {
+                                       if (_interactorstyleplane2D->GetStateRotate()==false )
+                                       {
+                                               ok=true;
+                                       }
+                               }
+                       }
+//                     ok=true;
+
+                       if (ok==true)
+                       {
+                               Extract_MIP_PlaneVTK();
+                       } else {
+                               Extract_One_PlaneVTK();
+                       } // ok
+
+               } // active
+               _backX=x;
+               _backY=y;
+               _backZ=z;
+               _backOrient[0]=orientation[0];
+               _backOrient[1]=orientation[1];
+               _backOrient[2]=orientation[2];
+               _backOrient[3]=orientation[3];
+       } //okPosition okOrientation
+}
+
+//-------------------------------------------------------------------
+
+void vtkPlane2DView::Extract_One_PlaneVTK()
+{
+       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
+       SetPSource(_sizeIma);
+       _3Dslices -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
+       _3Dslices -> SetSource( imagedata );
+       _3Dslices -> Update( );
+       _stPoints -> GetPointData( )->SetScalars(  _3Dslices->GetOutput()->GetPointData()->GetScalars()  );
+       _stPoints -> SetDimensions( _sizeIma, _sizeIma, 1 );
+       _stPoints -> SetScalarType( imagedata->GetScalarType() );
+       _stPoints -> SetScalarTypeToShort();
+       _stPoints -> Update();
+//     _change   -> SetInput( _stPoints );  
+//     _change   -> Update();    //important
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _stPoints );
+//     _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _change->GetOutput() );
+       //      vtkImageActor *imageActor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor();
+}
+
+//-------------------------------------------------------------------
+
+void vtkPlane2DView::Extract_MIP_PlaneVTK( /*double heightDefinition*/ )
+{
+
+       int mipWidth;
+       double sp;
+       int sizeWidth = (_mip_width*2)+1 ;
+       int deltaPixel;
+       int iWidth,itmp,tmpSizeWith;
+
+       double spc[3];
+       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
+       SetPSource(_sizeIma);
+       imagedata->GetSpacing(spc);
+
+       bool heightDefinition=false;
+       if (_mip_width<3)
+       {
+               heightDefinition=true;
+       }
+
+       if (heightDefinition==true)
+       {
+               mipWidth        =       _mip_width;
+               sp                      =       spc[0];
+               deltaPixel      =       1;
+       } else {
+               mipWidth        =       2;
+               tmpSizeWith =   (mipWidth*2) + 1;
+               sp                      =       (spc[0]*sizeWidth)/tmpSizeWith;
+               sizeWidth       =       tmpSizeWith;
+               deltaPixel      =       4;
+       }
+
+
+
+       std::vector< vtkProbeFilter* > slicesLST;
+
+       _pSource->Push( -mipWidth * sp );
+       _pSource->Update();
+
+       for ( iWidth=0 ; iWidth<sizeWidth ; iWidth++ )
+       {       
+               vtkProbeFilter *slice = vtkProbeFilter::New();
+               slice -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
+               slice -> SetSource( imagedata );
+               slice -> Update( );
+               slicesLST.push_back( slice );
+               _pSource->Push( sp );
+       }
+       
+       if (_imageResult ==NULL)
+       {
+               _imageResult = vtkImageData::New();
+               _imageResult -> SetDimensions(_sizeIma,_sizeIma,1);
+               _imageResult -> SetSpacing(1,1,1);
+               _imageResult -> SetScalarType( imagedata->GetScalarType() );
+               _imageResult -> SetExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
+               _imageResult -> SetWholeExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
+               _imageResult -> AllocateScalars();
+               _imageResult -> Update();
+       }
+
+       unsigned short *pTemp;
+       unsigned short *pResult;
+       pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); 
+
+       int iPixels , sizePixels = _sizeIma*_sizeIma;
+       for(iPixels=0 ; iPixels<sizePixels ; iPixels=iPixels+deltaPixel)
+       {
+
+               pTemp = (unsigned short*)slicesLST[0]->GetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0);
+
+               pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); 
+               pResult[iPixels] = pTemp[iPixels];
+
+               for (iWidth=1;iWidth<sizeWidth;iWidth++)
+               {
+                       pTemp = (unsigned short*)slicesLST[iWidth]->GetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0);
+
+                       if (pResult[iPixels]< pTemp[iPixels])
+                       {
+                               pResult[iPixels] = pTemp[iPixels];
+                       }
+               }
+
+               if (deltaPixel!=1)
+               {
+                       for (itmp=1;itmp<deltaPixel;itmp++)
+                       {
+                               pResult[iPixels+itmp] = pResult[iPixels];
+                       }
+               }
+
+       }
+
+       for (iWidth=0;iWidth<sizeWidth;iWidth++)
+       {       
+               slicesLST[iWidth]->Delete();
+       }
+
+       _imageResult->Modified();
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageResult );
+
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::Configure( )
+{
+       wxVtk2DBaseView::Configure(false);
+
+       HorizontalLine();
+// Borrame
+//     CircleLine();
+
+       _pSource         = vtkPlaneSource::New( );
+    _3Dslices   = vtkProbeFilter::New( ) ;
+       _stPoints        = vtkStructuredPoints::New( );
+       _change          = vtkImageChangeInformation::New();
+
+       wxVTKRenderWindowInteractor *iren               = GetWxVTKRenderWindowInteractor();
+       ExtractPlane();
+//     SetActive(false);
+       _imageViewer2XYZ -> GetVtkImageViewer2()        -> SetupInteractor ( iren );
+
+       SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+
+       _interactorstyleplane2D = new vtkInteractorStylePlane2D();
+       ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstyleplane2D );
+
+       vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
+       
+       camera->SetViewUp               (       0                       ,       1                               ,       0       );
+       camera->SetPosition             ((0+_sizeIma)/2 , (0+_sizeIma)/2        , 10000 ); 
+       
+       camera->SetFocalPoint   ((0+_sizeIma)/2 , (0+_sizeIma)/2        ,       0       ); 
+       camera->SetClippingRange(0.01, 100000);
+       camera->ComputeViewPlaneNormal();
+       camera->SetParallelScale( _sizeIma/3.0 );
+
+       // text information over the graphic window
+       _vtkInfoTextImage                                               = new vtkInfoTextImage();
+       _vtkInfoTextImageInteractorPlane2D              = new vtkInfoTextImageInteractorPlane2D();
+       _vtkInfoTextImage->SetWxVtk2DBaseView(this);
+       _vtkInfoTextImage->SetMarImageData(  GetVtkmprbasedata()->GetMarImageData() );
+       _vtkInfoTextImageInteractorPlane2D->SetModelVtkInfoTextImage(_vtkInfoTextImage);        
+       _vtkInfoTextImage->Configure();
+       ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkInfoTextImageInteractorPlane2D);
+
+
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::HorizontalLine()
+{
+// Axe Horizontal
+       _pts = vtkPoints::New();
+       _pts->SetNumberOfPoints(2);
+       _pts->SetPoint(0, -1000 , -1000 , -1000 );
+       _pts->SetPoint(1,  1000 ,  1000 ,  1000 );
+       vtkCellArray *lines = vtkCellArray::New();
+       lines->InsertNextCell(2);
+       lines->InsertCellPoint(0);
+       lines->InsertCellPoint(1);
+       _pd = vtkPolyData::New();
+    _pd->SetPoints( _pts );
+    _pd->SetLines( lines );
+       lines->Delete();  //do not delete lines ??
+       _lineActor                                      =       vtkActor::New();
+    _lineMapper                                        =       vtkPolyDataMapper::New();
+       _lineMapper->SetInput(_pd);
+       _lineMapper->ImmediateModeRenderingOn();
+       _lineActor->SetMapper(_lineMapper);
+       _lineActor->GetProperty()->BackfaceCullingOn();
+       _lineActor->GetProperty()->SetDiffuseColor(0,0,1);
+       _lineActor->GetProperty()->SetLineWidth(2);
+       _lineActor->GetProperty()->SetOpacity(0);
+    _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineActor );
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::RotationStart()
+{
+       vtkMPRBaseData  *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData();
+       vtkTransform    *transform       = mprbasedata->GetTransformOrientation();
+       _transform1->SetMatrix( transform->GetMatrix() );
+}
+//-------------------------------------------------------------------
+void vtkPlane2DView::RotationDrag(double vx, double vy, bool ok_v, bool ok_ang)
+{ 
+       if (ok_ang==false)
+       {
+               _ang =sqrt( vx*vx + vy*vy ) / 1.5;
+       }
+
+       if (ok_v==false){
+               _vxb=-vy;
+               _vyb=vx;
+       }
+       _transform2->Identity();
+       _transform2->RotateWXYZ(_ang,0,_vxb,_vyb);
+
+       vtkMPRBaseData  *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData();
+       vtkTransform *transform          =      vtkTransform::New();
+       transform->Identity();
+       transform->Concatenate(_transform1);
+       transform->Concatenate(_transform2);
+       mprbasedata->InitTransformOrientation(transform);
+       transform->Delete();
+
+       // Refresh Horizontal Line
+       _pts->SetPoint( 0 , (_sizeIma/2) - _vxb*2       , (_sizeIma/2) - _vyb*2 , 1 );
+       _pts->SetPoint( 1 , (_sizeIma/2) + _vxb*2       , (_sizeIma/2) + _vyb*2 , 1 );
+//     RefreshCircleLine();
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::Refresh(  )
+{
+       ExtractPlane();
+       wxVtkBaseView::Refresh();
+}
+//-------------------------------------------------------------------
+void vtkPlane2DView::SetImgSize( int imgSize )
+{
+       _sizeIma = imgSize;
+}
+//-------------------------------------------------------------------
+int vtkPlane2DView::GetImgSize()
+{
+       return _sizeIma;
+}
+//-------------------------------------------------------------------
+int    vtkPlane2DView::GetActualSlice()  // virtual 
+{
+       _cx = GetVtkmprbasedata()->GetX();
+       _cy = GetVtkmprbasedata()->GetY();
+       _cz = GetVtkmprbasedata()->GetZ();
+       return 0;
+}
+
+//-------------------------------------------------------------------
+
+bool vtkPlane2DView::GetMipVisualization()
+{
+       return _mip_visualization;
+}
+
+//-------------------------------------------------------------------
+int vtkPlane2DView::GetMipWidth()
+{
+       return _mip_width;
+}
+
+//-------------------------------------------------------------------
+void vtkPlane2DView::SetActualSlice(int slice)  // Virtual
+{
+       double dir=(double)slice/3.0;
+       GetVtkmprbasedata()->SetX( _cx + (_n[0]*dir) );
+       GetVtkmprbasedata()->SetY( _cy + (_n[1]*dir) );
+       GetVtkmprbasedata()->SetZ( _cz + (_n[2]*dir) );
+}
+//---------------------------------------------------------------------------
+vtkInteractorStylePlane2D      *vtkPlane2DView::GetInteractorstyleplane2D()
+{
+       return this->_interactorstyleplane2D;
+}
+//---------------------------------------------------------------------------
+void vtkPlane2DView::SetActive(bool active)
+{
+       _active = active;
+}
+
+//---------------------------------------------------------------------------
+
+void vtkPlane2DView::SetMipVisualization(bool ok)
+{
+       _mip_visualization=ok;
+}
+
+//---------------------------------------------------------------------------
+
+void vtkPlane2DView::SetMipWidth(int value)
+{
+       _mip_width=value;
+}
+
+//---------------------------------------------------------------------------
+void vtkPlane2DView::SetVisibleLine(bool ok)
+{
+       double opacity;
+       if (ok==true)
+       {
+               opacity=1;
+       } else {
+               opacity=0;
+       }
+       _lineActor->GetProperty()->SetOpacity(opacity);
+}
+// ----------------------------------------------------------------------------
+void vtkPlane2DView::TransfromeCoordViewWorld2(double &X, double &Y, double &Z)
+{
+       double spc[3];
+       GetVtkmprbasedata()->GetImageData()->GetSpacing(spc);
+
+       double xx = X;
+       double yy = Y;
+       double zz = 0;
+
+       TransfromeCoordScreenToWorld(xx,yy,zz);
+
+
+       vtkTransform *transf1 = vtkTransform::New();
+       transf1->Identity();
+       vtkTransform *transf2 = GetVtkmprbasedata()->GetTransformOrientation();
+       transf1->Concatenate(transf2->GetMatrix());
+       double in[4], out[4];
+       double center = GetImgSize() / 2;
+       in[0] = 0;
+       in[1] = xx - center;
+       in[2] = yy - center;
+       in[3] = 0;
+
+       transf1->MultiplyPoint(in,out);
+       transf1->Delete();
+
+       X = out[0] + GetVtkmprbasedata()->GetX() ;
+       Y = out[1] + GetVtkmprbasedata()->GetY() ;
+       Z = out[2] + GetVtkmprbasedata()->GetZ() ;
+
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.h
new file mode 100644 (file)
index 0000000..c178472
--- /dev/null
@@ -0,0 +1,100 @@
+#ifndef VTKPLANE2DVIEW_H_
+#define VTKPLANE2DVIEW_H_
+
+#include "vtkInteractorStylePlane2D.h"
+#include "vtkInfoTextImageInteractorPlane2D.h"
+#include "vtkInfoTextImage.h"
+
+#include "wxVtk2DBaseView.h"
+
+#include "vtkTransform.h"
+#include "vtkImageChangeInformation.h"
+#include "vtkStructuredPoints.h"
+#include "vtkPlaneSource.h"
+#include "vtkProbeFilter.h"
+
+class vtkPlane2DView : public wxVtk2DBaseView
+{
+public:
+       vtkPlane2DView(wxWindow *parent);
+       ~vtkPlane2DView();
+       void                    Configure();
+       void                    ExtractPlane();
+       int                             GetImgSize();
+       void                    SetImgSize( int imgSize );
+
+       void                    RotationStart();
+       void                    RotationDrag(double vx, double vy,  bool ok_v, bool ok_ang);
+
+       virtual int             GetActualSlice(); 
+       virtual void    SetActualSlice(int slice);
+
+       virtual void    Refresh( );
+
+       vtkMPRBaseData                          *GetVtkmprbasedata();
+       vtkInteractorStylePlane2D       *GetInteractorstyleplane2D();
+
+       void                    SetActive(bool active);
+       void                    SetVisibleLine(bool ok);
+
+       void                    TransfromeCoordViewWorld2(double &X, double &Y, double &Z);
+
+       int                             GetMipWidth();
+       void                    SetMipWidth(int value);
+       bool                    GetMipVisualization();
+       void                    SetMipVisualization(bool ok);
+
+       void                    ResetBack();
+
+private:
+       bool                    _active;
+       int                             _mip_width;
+       bool                    _mip_visualization;
+
+       double                  _backX;
+       double                  _backY;
+       double                  _backZ;
+       double                  _backOrient[4];
+
+       double                  _ang;
+       double                  _vxb;
+       double                  _vyb;
+       double                  _n[3];   // Normal
+
+       double                  _cx;
+       double                  _cy;
+       double                  _cz;
+
+       int                             _sizeIma;
+
+       vtkImageData *  _imageResult;
+
+       // Horizontal line
+       vtkPoints                                                       *_pts;
+       vtkActor                                                        *_lineActor;
+       vtkPolyDataMapper                                       *_lineMapper;
+    vtkPolyData                                                        *_pd;
+
+    vtkProbeFilter                                             *_3Dslices;
+       vtkPlaneSource                                          *_pSource;
+       vtkStructuredPoints                                     *_stPoints;
+    vtkImageChangeInformation                  *_change;
+       vtkTransform                                            *_transform1; 
+       vtkTransform                                            *_transform2; 
+
+       vtkInteractorStylePlane2D                       *_interactorstyleplane2D;
+
+       vtkInfoTextImage                                        *_vtkInfoTextImage;
+       vtkInfoTextImageInteractorPlane2D       *_vtkInfoTextImageInteractorPlane2D;
+
+
+       void SetPSource(int sizeIma);
+       void HorizontalLine();
+       void ResetPlane();
+       void Extract_One_PlaneVTK();
+       void Extract_MIP_PlaneVTK();
+
+protected:
+};
+
+#endif /*VTKPLANE2DVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.cxx
new file mode 100644 (file)
index 0000000..74c925d
--- /dev/null
@@ -0,0 +1,76 @@
+#include "vtkmyPWCallback_3DPointWidget.h"
+#include "vtkInteractorStyleBaseView.h"
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+void vtkmyPWCallback_3DPointWidget::Execute(vtkObject *caller, unsigned long, void*)
+{
+       double n[3];
+       double p[3];
+       double delta = 0.000000001;
+
+       vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
+
+       if (caller==_pointWidget)
+       {
+               _pointWidget->GetPosition(p);
+       }
+       if (caller==_planeWidget)
+       {
+               _planeWidget->GetCenter(p);
+               _planeWidget->GetNormal(n);
+               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetNormal(n[0],n[1],n[2]);
+       }
+
+       double spc[3];
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->GetSpacing(spc);
+       p[0]=p[0]/spc[0];
+       p[1]=p[1]/spc[1];
+       p[2]=p[2]/spc[2];
+
+       // Orientation change
+       if ( (fabs(n[0]-_backNormal[0])>delta) || (fabs(n[1]-_backNormal[1])>delta) || (fabs(n[2]-_backNormal[2])>delta) )
+       {
+               _backNormal[0] = n[0];
+               _backNormal[1] = n[1];
+               _backNormal[2] = n[2];
+               isbv->SetParent_refresh_waiting();
+       }
+
+       // ----------
+
+       double tx = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX();
+       double ty = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetY();
+       double tz = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetZ();
+
+       // Position Change
+       if ( (fabs(tx-p[0])>delta) || (fabs(ty-p[1])>delta) || (fabs(tz-p[2])>delta) )
+       {
+               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX( p[0] );
+               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( p[1] );
+               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( p[2] );
+               vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
+               isbv->BlockRefresh();
+               isbv->vtkInteractorStyleBaseView::OnLeftButtonDown();
+               isbv->SetParent_refresh_waiting();
+               isbv->vtkInteractorStyleBaseView::OnMouseMove();
+               isbv->UnBlockRefresh();
+       } 
+       isbv->EvaluateToRefresh();
+}
+//-------------------------------------------------------------------
+void vtkmyPWCallback_3DPointWidget::SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview )
+{
+       _wxvtkmpr3Dview=wxvtkmpr3Dview;
+}
+//-------------------------------------------------------------------
+void vtkmyPWCallback_3DPointWidget::SetVtkPointWidget( vtkPointWidget *pointWidget )
+{
+       _pointWidget=pointWidget;
+}
+//-------------------------------------------------------------------
+void vtkmyPWCallback_3DPointWidget::SetVtkPlaneWidget( vtkPlaneWidget *planeWidget )
+{
+       _planeWidget=planeWidget;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.h
new file mode 100644 (file)
index 0000000..0ca2551
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef VTKMYPWCALLBACK_3DPOINTWIDGET_H_
+#define VTKMYPWCALLBACK_3DPOINTWIDGET_H_
+
+//#include "wxVtkMPR3DView.h"
+#include "vtkPlaneWidget.h"
+#include "vtkCommand.h"
+#include "vtkPointWidget.h"
+
+#include "wxVtkMPR3DView.h"
+
+class vtkmyPWCallback_3DPointWidget : public vtkCommand
+{
+public:
+  static vtkmyPWCallback_3DPointWidget *New() 
+    { return new vtkmyPWCallback_3DPointWidget; }
+  virtual void Execute(vtkObject *caller, unsigned long, void*);
+  vtkmyPWCallback_3DPointWidget(){}
+  void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
+  void SetVtkPointWidget( vtkPointWidget *pointWidget );
+  void SetVtkPlaneWidget( vtkPlaneWidget *planeWidget );
+private:
+
+       double                                                  _backNormal[3];
+       vtkPlaneWidget                                  *_planeWidget;
+       vtkPointWidget                                  *_pointWidget;
+       wxVtkMPR3DView *_wxvtkmpr3Dview;
+};
+
+
+#endif /*VTKMYPWCALLBACK_3DPOINTWIDGET_H_*/
index a46feff5b49d41b2ac441a90eceff740b0c503f2..f3217a2e5b2f801419ea11328f6f542898987425 100644 (file)
@@ -341,6 +341,7 @@ void vtkMPR3DDataViewer::Refresh()
        int x = (int)(_vtkmprbasedata->GetX());
        int y = (int)(_vtkmprbasedata->GetY());
        int z = (int)(_vtkmprbasedata->GetZ());
+       std::cout<<" vtkMPR3DDataViewer::Refresh() x="<<x<<" y= "<<y<<" z= "<<z;
        SetPositionX( x );
        SetPositionY( y );
        SetPositionZ( z );
index 71beb886ac3e3832fed0b87a6835fdf7efffa171..13fc5f58647aa49dfa0828b3eb0b0fe7befeb9d5 100644 (file)
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 
-class creaMaracasVisu_EXPORT vtkBaseData {
-public:
-       vtkBaseData();
-       virtual ~vtkBaseData();
-       vtkImageData*   GetImageData();
-       marImageData*   GetMarImageData();
-                       void    SetMarImageData(marImageData *marimagedata);
-       virtual void    Configure();
-       double                  GetZ();
-       void                    SetZ(double z);
-
-       int                             GetT();
-       void                    SetT(double t);
-
-protected:
-       marImageData    *_marImageData;
-       double                  _z;
-       int                             _t;
-};
-
+#include "vtkBaseData.h"
+#include "boxSurfaceObserver.h"
 
 //------------------------------------------------------------------
 //------------------------------------------------------------------
@@ -103,61 +85,6 @@ private:
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 
-class creaMaracasVisu_EXPORT vtkMPR3DDataViewer {
-public:
-       vtkMPR3DDataViewer();
-       virtual ~vtkMPR3DDataViewer();
-       vtkImageActor*                  GetImageActor(int id);
-       vtkActor*                               GetOutlineActor();
-       virtual void                    Refresh();
-       virtual void                    Configure();
-       void                                    SetVisiblePosition(int idPosition, bool visible);
-       bool                                    GetVisiblePosition(int idPosition);
-       vtkImageActor*                  GetvtkActor_saggital();
-       vtkImageActor*                  GetvtkActor_axial();
-       vtkImageActor*                  GetvtkActor_coronal();
-       void                                    SetPositionX(int pos);
-       void                                    SetPositionY(int pos);
-       void                                    SetPositionZ(int pos);
-       void                                    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
-       vtkMPRBaseData*                 GetVtkMPRBaseData();
-       
-       vtkColorTransferFunction   *GetvtkColorTransferFunction();
-       std::vector<double >       *GetctFunVectorPoint();
-       std::vector<double >       *GetctFunVectorRed();
-       std::vector<double >       *GetctFunVectorGreen();
-       std::vector<double >       *GetctFunVectorBlue();
-
-private:
-       
-       bool                                                            _visiblePosition[3];
-
-       // outline
-       vtkOutlineFilter                                        *_outlineData;
-       vtkPolyDataMapper                                       *_mapOutline;
-       vtkActor                                                        *_outline;
-
-       //
-       vtkColorTransferFunction                        *_ctfun;
-       std::vector<double>                                     _ctFunVectorPoint;
-       std::vector<double>                                     _ctFunVectorRed;
-       std::vector<double>                                     _ctFunVectorGreen;
-       std::vector<double>                                     _ctFunVectorBlue;
-
-//     vtkLookupTable                                          *_bwLut;
-//     vtkLookupTable                                          *_hueLut;
-//     vtkLookupTable                                          *_satLut;
-
-       vtkImageMapToColors                                     *_saggitalColors;
-       vtkImageActor                                           *_saggital;
-       vtkImageMapToColors                                     *_axialColors;
-       vtkImageActor                                           *_axial;
-       vtkImageMapToColors                                     *_coronalColors;
-       vtkImageActor                                           *_coronal;
-       vtkMPRBaseData                                          *_vtkmprbasedata;
-
-
-};
 
 
 
@@ -193,150 +120,11 @@ private:
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 
-// Callback for the interaction
-class boxSurfaceObserver : public vtkCommand
-{
-       public:
-               vtkPlanes                                       *_planes;
-               vtkProp                                         *_actor;
-               vtkVolumeRayCastMapper          *_vtkVolumeRayCastMapper;
-
-               boxSurfaceObserver() 
-               {  
-                       _vtkVolumeRayCastMapper = NULL;
-               }
-
-               virtual char const *GetClassName() const { return "boxSurfaceObserver";}
-
-               static boxSurfaceObserver *New(){
-                               boxSurfaceObserver * result;
-                               result = new boxSurfaceObserver();
-                       return result;
-               }
-
-               virtual void Execute(vtkObject *wdg, unsigned long eventId, void* calldata) ;
-               void SetPlanes(vtkPlanes *planes);
-               void SetActor(vtkProp *actor);
-               void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
-};
-
-
 
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 
-class vtkClipping3DDataViewer {
-public:
-       //----------------------
-       //Constructo-Destructor
-       //----------------------
-       vtkClipping3DDataViewer();
-       virtual ~vtkClipping3DDataViewer();
-
-//     vtkImageActor*                  GetImageActor(int id);
-       vtkActor*                               GetOutlineActor();
-       vtkClipPolyData*                GetTissueClipper(int id);
-       vtkPolyDataMapper*              GetTissueMapper(int id);
-       vtkPlanes*                              GetTissuePlanes(int id);
-       vtkStripper*                    GetTissueStripper(int id);
-//     vtkGlyph3D*                             GetGlyph(int id);
-       vtkLODActor*                    GetMaceActor(int id);
-
-       vtkMarchingCubes                *GetMCubes(int idTissue);
-
-       virtual void                    Refresh();
-                       void                    RefreshSurface();
-
-       virtual void                    Configure();
-       void                                    Configure_Tissue();
-       void                                    Configure_Volume();
-
-       void                                    SetIsovalue(int idTissue, int isoValue);
-       double                                  GetIsovalue(int idTissue);
-
-       vtkVolume                               *GetVolumeActor();
-       vtkVolumeRayCastMapper  *GetVolumeMapper();
-       vtkPlanes                               *GetVolumePlanes();
-
-       void                                    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
-       vtkMPRBaseData*                 GetVtkMPRBaseData();
-
-       vtkActor                                *GetTissueActor(int id);
-       void                                    SetVisibleTissue(int idTissue, bool visible);
-       bool                                    GetVisibleTissue(int idTissue);
-       bool                                    GetVisibleVolume();
-       void                                    SetVisibleVolume(bool visibleVolume);
-
-       void                                    SetRepresentationType(int idTissue, bool representationType);
-       bool                                    GetRepresentationType(int idTissue);
-
-       boxSurfaceObserver              *GetObserverS(int idObserverS);
-       boxSurfaceObserver              *GetObserverV();
-
-       //void                                  ReadVolumeFunctions(char *namefile); 
-       void                                    ReadVolumeFunctions(); 
-       void                                    ReadMeshVTK(char *namefile); 
-
-
-       //-------------------
-       //Getters Vectors
-       //-------------------
-
-       std::vector<double>*                                    GetGreyValuesTransferenceFVector();
-       std::vector<double>*                                    GetIntensityValuesTransferenceFVector();
-       std::vector<double>*                                    GetRedColorsOfColorTransferenceFVector();
-       std::vector<double>*                                    GetGreenColorsOfColorTransferenceFVector();
-       std::vector<double>*                                    GetBlueColorsOfColorTransferenceFVector();
-       std::vector<double>*                                    GetGreyValueColorsOfColorTransferenceFVector();
-
-       //--------------------------------------
-       //Getters transference function
-       //and color of the transference function
-       //---------------------------------------
-       vtkPiecewiseFunction                            *GetTransferencefunction();
-       vtkColorTransferFunction                        *GetColorTransferenceFunction();
-
-
-
-private:
-       
-       vtkMarchingCubes                                        *_mCubes[ VTKMPRDATA_MAXTISSUE ];
-       vtkStripper                                                     *_tissueStripper[ VTKMPRDATA_MAXTISSUE ];
-       vtkPolyDataMapper                                       *_tissueMapper[ VTKMPRDATA_MAXTISSUE ];
-       vtkPlanes                                                       *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
-       vtkClipPolyData                                         *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
-
-       // outline
-       vtkOutlineFilter                                        *_outlineData;
-       vtkPolyDataMapper                                       *_mapOutline;
-       vtkActor                                                        *_outline;
-
-       /// Volume
-       vtkPiecewiseFunction                            *_tfun;
-       vtkColorTransferFunction                        *_ctfun;
-       vtkVolumeRayCastCompositeFunction       *_compositeFunction;
-       vtkPlanes                                                       *_volumePlanes;
-       vtkVolumeRayCastMapper                          *_volumeMapper;
-       vtkVolumeProperty                                       *_volumeProperty;
-       vtkVolume                                                       *_newvol;
-
-       vtkMPRBaseData                                          *_vtkmprbasedata;
-
-       bool                                                            _visibleVolume;
-       bool                                                            _representationType[VTKMPRDATA_MAXTISSUE];
-       bool                                                            _visibleTissue[VTKMPRDATA_MAXTISSUE];
-       vtkActor                                                        *_tissue[VTKMPRDATA_MAXTISSUE];
-       boxSurfaceObserver                                      *_observerV;
-       boxSurfaceObserver                                      *_observerS[VTKMPRDATA_MAXTISSUE];
-
-       std::vector<double>                                     greyValuesTransferenceFVector;
-       std::vector<double>                                     intensityValuesTransferenceFVector;
-       std::vector<double>                                     redColorsOfColorTransferenceFVector;
-       std::vector<double>                                     greenColorsOfColorTransferenceFVector;
-       std::vector<double>                                     blueColorsOfColorTransferenceFVector;
-       std::vector<double>                                     greyValueColorsOfColorTransferenceFVector;
-};
 
 
 #endif // __WX__MPR__BASE__DATA__H
index da7729e47a7eda21532fdae7353ea29d48eff3fb..8143f0e4c2867cb5a01f54e96ecb1ac7f6b879cf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMPRWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/07 15:35:46 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.14 $
 
   Copyright: (c) 2002, 2003
   License:
 
 #include "pPlotter/HistogramDialog.h"
 
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-idAlBeRa::idAlBeRa(int id, double radio,int deltavoxel)
-{
-       _id                     = id;
-       _radio          = radio;
-       _deltavoxel = deltavoxel;
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-vtkInteractorStyleSphere::vtkInteractorStyleSphere()
-{
-       _stateRadio  = false;
-       _stateRotate = false;
-}
-
-//---------------------------------------------------------------------------
-
-vtkInteractorStyleSphere::~vtkInteractorStyleSphere()
-{
-}
-
-
-//---------------------------------------------------------------------------
-
-bool  vtkInteractorStyleSphere::OnRightButtonDown()
-{
-       if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) )
-       {
-               _stateRadio     = true;
-               //_fordwareX    = this->Interactor->GetEventPosition()[0];
-               _fordwareY      = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-
-               wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-
-               _radio = wxsphereview->GetRadio();
-       }
-
-       return true;
-}
-
-//---------------------------------------------------------------------------
-
-bool  vtkInteractorStyleSphere::OnRightButtonUp() 
-{
-       if (_stateRadio==true)
-       {
-               wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-               wxsphereview->SetDeltaVoxel(1);
-               double radio=wxsphereview->GetRadio();
-               wxsphereview->GetIdOfImage(radio+0.1);
-               wxsphereview->GetIdOfImage(radio+0.2);
-               wxsphereview->GetIdOfImage(radio-0.1);
-               wxsphereview->GetIdOfImage(radio-0.2);
-
-               wxsphereview->RefreshView();
-               _stateRadio = false;
-       }
-
-       return true;
-}
-//---------------------------------------------------------------------------
-
-bool vtkInteractorStyleSphere::OnLeftButtonDown()
-{
-       _stateRotate    = true;
-       _fordwareX              = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       _fordwareY              = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-       return true;
-}
-
-
-//---------------------------------------------------------------------------
-
-bool  vtkInteractorStyleSphere::OnLeftButtonUp() 
-{
-       wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-       if (_stateRotate==true){
-               int fx  = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-               int fy  = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-
-               if ((_fordwareX==fx)&&(_fordwareY==fy)){
-                       double x=fx,y=fy,z=1;
-                       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
-                       wxsphereview->SetXYZtoParent(x,y);
-                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
-                       wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
-               } else {
-                       wxsphereview->RotationEnd();
-               }
-               wxsphereview->RefreshView();
-               _stateRotate = false;
-       }
-
-       return true;
-}
-
-
-//---------------------------------------------------------------------------
-
-bool  vtkInteractorStyleSphere::OnMouseMove () 
-{
-       wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-       if (_stateRotate==true)
-       {
-               bool ok_v, ok_ang;
-               ok_v=false;
-               ok_ang=false;
-               if (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==1)
-               {
-                       ok_v = true;
-               }
-               if (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==1)
-               {
-                       ok_ang = true;
-               }
-           int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-               wxsphereview->RotationStart( fx - _fordwareX , -(fy - _fordwareY) , ok_v, ok_ang);
-               wxsphereview->RefreshView();
-       } 
-       if (_stateRadio==true)
-       {           
-               //int fx = this->Interactor->GetEventPosition()[0];
-        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-               double dif=(fy-_fordwareY) / 10.0;
-               wxsphereview->SetRadio( _radio + dif );
-               wxsphereview->SetDeltaVoxel(3);
-               wxsphereview->RefreshView();
-       }
-
-       return true;
-}
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-wxSphereView::wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData )
-: wxVtk2DBaseView(parent)
-{
-       _delta                          =       1;
-       _vtkmprbasedata         =       vtkmprbasedata;
-       _imageDataOriginal      =       imageData;
-
-       _imageSphere            =       vtkImageData::New();
-       _imageSphere->SetDimensions (150,150,500);
-       _imageSphere->SetScalarTypeToUnsignedShort();
-       _imageSphere->AllocateScalars();   
-       _imageSphere->Update();   
-
-
-       vtkBaseData *vtkbasedata = new vtkBaseData();
-       vtkbasedata->SetMarImageData( new marImageData(_imageSphere) );
-       this->SetVtkBaseData(vtkbasedata);
-
-    _transform                 =       vtkTransform::New();
-    _transform1                        =       vtkTransform::New();
-    _transform2                        =       vtkTransform::New();
-       _transform ->Identity();
-       _transform1->Identity();
-       _transform2->Identity();
-
-       _radio=25;
-}
-
-//-------------------------------------------------------------------
-
-wxSphereView::~wxSphereView()
-{
-       _transform  -> Delete();
-       _transform1 -> Delete();
-       _transform2 -> Delete();
-       ResetlstId();
-}
-
-//----------------------------------------------------------------------------
-
-double wxSphereView::GetRadio()
-{
-       return _radio;
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::SetRadio(double radio)
-{
-       if (radio<0)
-       {
-               radio=0;
-       }
-       _radio=radio;
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::Configure()
-{
-       wxVtk2DBaseView::Configure();
-
-       _vtkinteractorstylesphere = new vtkInteractorStyleSphere();
-       GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _vtkinteractorstylesphere );
-       double points[4][3];
-
-// EED purify 12/sep/2006
-       int i,j;
-       for (i=0;i<4;i++)
-       {
-               for (j=0;j<3;j++)
-               {
-                       points[i][j]=0;
-               }
-       }
-
-       InitSphere(points);
-       DefineImageSphere();
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::RefreshPoint()
-{
-       double x        = _vtkmprbasedata->GetX() - _centerX;
-       double y        = _vtkmprbasedata->GetY() - _centerY;
-       double z        = _vtkmprbasedata->GetZ() - _centerZ;
-       double alpha= atan2(x,z);
-       double beta = atan2( y , sqrt(z*z+x*x) );
-
-       alpha           = alpha*180/3.1416;
-       beta            = beta*180/3.1416;
-
-       _transform1->Identity();
-       _transform1->RotateY(alpha);
-       _transform1->RotateX(-beta);
-
-       _radio= sqrt(x*x + y*y +z*z);
-
-       RefreshView();
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::RefreshView()
-{
-       DefineImageSphere();
-       wxVtk2DBaseView::Refresh();
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::RotationEnd()
-{
-       _transform1->RotateWXYZ(_ang,_vxb,_vyb,0);
-       _transform2->Identity();
-       SetDeltaVoxel(1);
-       ResetlstId();
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::RotationStart(double vx, double vy, bool ok_v, bool ok_ang)
-{
-       if (ok_ang==false)
-       {
-               _ang = -sqrt( vx*vx + vy*vy ) / 1.0;
-       }
-
-       if (ok_v==false){
-               _vxb=-vy;
-               _vyb=vx;
-       }
-
-       _transform2->Identity();
-       _transform2->RotateWXYZ(_ang,_vxb,_vyb,0);
-       SetDeltaVoxel(3);
-       ResetlstId();
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::GetPointSphere(double p[3],double r1,double angA,double angB)
-{
-       double in[3],out[3];
-       in[0]=0;   
-       in[1]=r1;   
-       in[2]=0;
-       vtkTransform *transform = vtkTransform::New();
-       transform->Identity();
-       transform->RotateX(angB);
-       transform->RotateZ(angA);
-       transform->TransformPoint(in,out);
-       p[0]=out[0];
-       p[1]=out[1];
-       p[2]=out[2];
-       transform->Delete(); 
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::RotatePointOverTheSphere( double pp[3], double p[3],double cc[3])
-{
-
-       double out[3];
-       _transform->TransformPoint(p,out);
-       pp[0] = out[0] + cc[0];
-       pp[1] = out[1] + cc[1];
-       pp[2] = out[2] + cc[2];
-
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image)
-{
-       double t;
-       double difX = pp2[0]-pp1[0];
-       double difY = pp2[1]-pp1[1];
-       double difZ = pp2[2]-pp1[2];
-
-       double  max             = 200;
-
-       int dimOrg[3];
-       int dimRes[3];
-       int z;
-       _imageDataOriginal->GetDimensions(dimOrg);              
-       image->GetDimensions(dimRes);           
-
-       int i;
-       double x1=pp1[0];
-       double y1=pp1[1];
-       double z1=pp1[2];
-       int xx=-1,yy=-1,zz=-1;
-
-       for (i=0;i<max;i++)
-       {
-               t  = i/max;
-               xx = (int) (x1+t*difX);
-               yy = (int) (y1+t*difY);
-               zz = (int) (z1+t*difZ);
-
-               z=i;
-               if ((xx>=0) && (xx<dimOrg[0]) && (yy>=0) && (yy<dimOrg[1]) && (zz>=0) && (zz<dimOrg[2]) &&
-                       (AngX>=0) && (AngX<dimRes[0]) && (AngY>=0) && (AngY<dimRes[1]) && (z>=0) && (z<dimRes[2]) )
-               {
-                       unsigned short *pOrg=(unsigned short*)_imageDataOriginal->GetScalarPointer (xx,yy,zz); 
-                       unsigned short *pRes=(unsigned short*)image->GetScalarPointer( (int)AngX , (int)AngY , z ); 
-                       *pRes=*pOrg;
-               }
-       }
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::ResetlstId()
-{
-       int i,size=_lstId.size();
-       for (i=size-1;i>=0;i--)
-       {
-               delete _lstId[i];
-       }
-       _lstId.clear();
-}
-
-//----------------------------------------------------------------------------
-
-int wxSphereView::GetIdOfImage(double radio)
-{
-       int id=0;
-       int dim[3];     
-       _imageSphere->GetDimensions(dim);       
-       int sizeMaxList = dim[2];
-       // Search in list >> alpha beta radio
-       int i,size=_lstId.size();
-       for (i=0; i<size;i++)
-       {
-               //idAlBeRa *tmp=_lstId[i]; // JPRx
-               if ((_lstId[i]->_radio==radio) && (_lstId[i]->_deltavoxel==_delta)) 
-               {
-                       return _lstId[i]->_id;
-               }
-       }
-       if (size>sizeMaxList)
-       {
-               delete _lstId[size-1];
-               _lstId.pop_back(); 
-       }
-       if (size!=0){
-               id=_lstId[0]->_id+1;
-               id = id % sizeMaxList;
-       } else {
-               id = 0;
-       }
-
-       FiltreImage(id,radio);
-       _lstId.insert(_lstId.begin(),1,new idAlBeRa(id,radio,_delta) ); 
-
-       return id;
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::DefineImageSphere()
-{
-       int id;
-       id=GetIdOfImage( _radio );
-       GetVtkBaseData()->SetZ( id );
-}
-
-
-//----------------------------------------------------------------------------
-void wxSphereView::SetDeltaVoxel(int delta)
-{
-       _delta=delta;
-}
-
-//----------------------------------------------------------------------------
-void wxSphereView::SetVoxel(double i, double j, int delta,double id,  unsigned short gris)
-{
-       int ii,jj,delta2;
-       unsigned short *pRes;
-       int dimRes[3];
-       _imageSphere->GetDimensions(dimRes);
-
-       delta2=delta-1;
-       for ( ii=(int)(i-delta2) ; ii<=(int)(i+delta2) ; ii++ )
-       {
-               for ( jj=(int)(j-delta2) ; jj<=(int)(j+delta2) ; jj++ )
-               {
-                       if ( (ii>=0)&&(ii<dimRes[0]) &&  
-                                (jj>=0)&&(jj<dimRes[1]) )
-                       {
-                               pRes = (unsigned short*)_imageSphere->GetScalarPointer( ii , jj , (int)id );
-                               *pRes=gris;
-                       }
-               }
-       }
-
-}
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::SetXYZtoParent(double i, double j)
-{
-
-       double factor = 0.75;
-       double radio2   = _radio*_radio;
-       double pxx,pyy,d2x,d2y;
-       double cc[3],p[3],pp[3];
-       cc[0]=_centerX;
-       cc[1]=_centerY;
-       cc[2]=_centerZ;
-       double aa;
-       int dimRes[3],dimOrig[3];
-       _imageSphere->GetDimensions(dimRes);
-       d2x=dimRes[0]/2;
-       d2y=dimRes[1]/2;
-       _imageDataOriginal->GetDimensions(dimOrig);
-
-       p[0]  = (i - d2x)*factor;
-       pxx=p[0]*p[0];
-       p[1]  = (j - d2y)*factor;
-       pyy=p[1]*p[1];
-       aa = pxx + pyy;
-       if (radio2>aa){
-               aa=radio2-aa;
-               p[2]  = sqrt(aa);
-               RotatePointOverTheSphere( pp, p,cc);
-               if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
-                        (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
-                        (pp[2]>=0) && (pp[2]<dimOrig[2]) )
-               {
-                       if (_vtkmprbasedata){
-                               _vtkmprbasedata->SetX(pp[0]);
-                               _vtkmprbasedata->SetY(pp[1]);
-                               _vtkmprbasedata->SetZ(pp[2]);
-                       }
-               }
-       }
-}
-
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::FiltreImageB(int id, double radio, bool ok,int deltaTMP)
-{      
-       double factor = 0.75;
-       double radioB   = radio/3;
-       double radio2   = radio*radio;
-       double pxx,pyy,d2x,d2y;
-       double cc[3],p[3],pp[3];
-       cc[0]=_centerX;
-       cc[1]=_centerY;
-       cc[2]=_centerZ;
-       double aa;
-       unsigned short *pOrig;
-       int dimRes[3],dimOrig[3];
-       double i,j;
-       int ext[6];
-       _imageSphere->GetExtent(ext);
-       _imageSphere->GetDimensions(dimRes);
-       //JCP 24 - 04 -09
-       //_imageSphere->SetExtent(0,dimRes[0]-1,0,dimRes[1]-1,0,dimRes[2]-1);
-       _imageSphere->SetExtent(ext);
-       //JCP 24 - 04 -09
-       d2x=dimRes[0]/2;
-       d2y=dimRes[1]/2;
-//     double deltaTMP=_delta;
-       _imageDataOriginal->GetDimensions(dimOrig);
-
-       int start,end;
-       int limitA,limitB;
-       limitA  = (int) ( (-radioB/factor)+d2x );
-       limitB  = (int) ( (radioB/factor)+d2x );
-       if (ok==true){
-               start   = limitA;
-               end             = limitB;
-       } else {
-               start=0;
-               end=dimRes[0];
-       }
-
-       for ( i=start ; i<end ; i=i+deltaTMP )
-       {
-               p[0]  = (i - d2x)*factor;
-               pxx=p[0]*p[0];
-               for (j=start;j<end;j=j+deltaTMP)
-               {
-                       p[1]  = (j - d2y)*factor;
-                       pyy=p[1]*p[1];
-                       aa = pxx + pyy;
-
-                       if  (( ((ok==false) && (!((i>limitA) && (i<limitB) && (j>limitA) && (j<limitB)))) )
-                                   ||
-                                       (ok==true))
-                       {
-                               if (radio2>aa){
-                                       aa=radio2-aa;
-                                       p[2]  = sqrt(aa);
-                                       RotatePointOverTheSphere( pp, p,cc);
-                                       if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
-                                                (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
-                                                (pp[2]>=0) && (pp[2]<dimOrig[2]) )
-                                       {
-                                               pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( (int)(pp[0]) , (int)(pp[1]) , (int)(pp[2]) ); 
-                                               SetVoxel(i,j,deltaTMP,id,*pOrig);
-                                       } else {
-                                               SetVoxel(i,j,deltaTMP,id,2000);
-                                       }
-                               } else {
-                                       SetVoxel(i,j,deltaTMP,id,0);
-                               }
-                       }
-               }
-       }
-
-       _imageSphere->Modified();  
-       _imageSphere->Update();
-}
-
-
-
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::FiltreImage(int id, double radio)
-{
-
-       _transform -> Identity();
-       _transform -> Concatenate(_transform1);
-       _transform -> Concatenate(_transform2);
-
-       FiltreImageB(id,radio,false, _delta);
-       FiltreImageB(id,radio,true, 1);
-}
-
-
-//----------------------------------------------------------------------------
-
-/*
-void wxSphereView::FiltreImage(int id, double radio)
-{
-       double radio2   = radio*radio;
-       double radio2TMP= (radio/2)*(radio/2);
-       double pxx,pyy,d2x,d2y;
-       double cc[3],p[3],pp[3];
-       cc[0]=_centerX;
-       cc[1]=_centerY;
-       cc[2]=_centerZ;
-       double aa;
-       unsigned short *pOrig;
-       int dimRes[3],dimOrig[3];
-       double i,j;
-       _imageSphere->GetDimensions(dimRes);
-       _imageSphere->SetExtent(0,dimRes[0]-1,0,dimRes[1]-1,0,dimRes[2]-1);
-       d2x=dimRes[0]/2;
-       d2y=dimRes[1]/2;
-       double deltaTMP=_delta;
-       _imageDataOriginal->GetDimensions(dimOrig);
-
-       for ( i=0 ; i<dimRes[0] ; i=i+deltaTMP )
-       {
-               p[0]  = (i - d2x)*0.75;
-               pxx=p[0]*p[0];
-               for (j=0;j<dimRes[1];j=j+deltaTMP)
-               {
-                       p[1]  = (j - d2y)*0.75;
-                       pyy=p[1]*p[1];
-                       aa = pxx + pyy;
-
-                       if (aa>radio2TMP)
-                       {
-                               if (radio2>aa){
-                                       aa=radio2-aa;
-                                       p[2]  = sqrt(aa);
-                                       RotatePointOverTheSphere( pp, p,cc);
-                                       if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
-                                                (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
-                                                (pp[2]>=0) && (pp[2]<dimOrig[2]) )
-                                       {
-                                               pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( pp[0] , pp[1] , pp[2] ); 
-                                               SetVoxel(i,j,deltaTMP,id,*pOrig);
-                                       } else {
-                                               SetVoxel(i,j,deltaTMP,id,2000);
-                                       }
-                               } else {
-                                       SetVoxel(i,j,deltaTMP,id,0);
-                               }
-                       }
-               }
-       }
-
-
-       deltaTMP=1;
-       for ( i=0 ; i<dimRes[0] ; i=i+deltaTMP )
-       {
-               p[0]  = (i - d2x)*0.75;
-               pxx=p[0]*p[0];
-               for (j=0;j<dimRes[1];j=j+deltaTMP)
-               {
-                       p[1]  = (j - d2y)*0.75;
-                       pyy=p[1]*p[1];
-                       aa = pxx + pyy;
-                       if (aa<=radio2TMP)
-                       {
-                               if (radio2>aa){
-                                       aa=radio2-aa;
-                                       p[2]  = sqrt(aa);
-                                       RotatePointOverTheSphere( pp, p,cc);
-                                       if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
-                                                (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
-                                                (pp[2]>=0) && (pp[2]<dimOrig[2]) )
-                                       {
-                                               pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( pp[0] , pp[1] , pp[2] ); 
-                                               SetVoxel(i,j,deltaTMP,id,*pOrig);
-                                       } else {
-                                               SetVoxel(i,j,deltaTMP,id,2000);
-                                       }
-                               } else {
-                                       SetVoxel(i,j,deltaTMP,id,0);
-                               }
-                       }
-               }
-       }
-
-       _imageSphere->Modified();  
-       _imageSphere->Update();
-}
-*/
-/*
-void wxSphereView::FiltreImage(vtkImageData *imageSphere)
-{
-       int dim[3],i,j,k;
-       imageSphere->GetDimensions(dim);
-       for (i=0;i<dim[0];i++)
-       {
-               for (j=0;j<dim[1];j++)
-               {
-                       for (k=0;k<dim[2];k++)
-                       {
-                               unsigned short *pRes=(unsigned short*)imageSphere->GetScalarPointer (i,j,k); 
-                               *pRes=0;
-                       }
-               }
-       }
-
-       double deltaA=90;
-       double cc[3],p1[3],p2[3],pp1[3],pp2[3];
-       cc[0]=_centerX;
-       cc[1]=_centerY;
-       cc[2]=_centerZ;
-       double r1       = _sl_radio->GetValue() - _sl_thickness->GetValue()/2;
-       double r2       = _sl_radio->GetValue() + _sl_thickness->GetValue()/2;
-       if (r1<10)
-       {
-               r1=10;
-       }
-       double alpha= _sl_alpha->GetValue();
-       double beta     = _sl_beta->GetValue();
-
-       double angA,angB;
-       for (angA=-deltaA;angA<deltaA;angA++)
-       {
-               for (angB=-deltaA;angB<deltaA;angB++)
-               {
-                       GetPointSphere(p1,r1,angA,angB);
-                       GetPointSphere(p2,r2,angA,angB);
-                       RotatePointOverTheSphere( pp1, alpha, beta, p1 ,cc );
-                       RotatePointOverTheSphere( pp2, alpha, beta, p2 ,cc );
-                       TransferePoints(pp1,pp2,angA+alpha+180,angB+beta+90,imageSphere);
-               }
-       }
-}
-*/
-
-
-//----------------------------------------------------------------------------
-
-void wxSphereView::InitSphere(double points[4][3])
-{
-       double cc[3];
-    double r = SphereFindCenter(points,cc); // 4-points , center
-    if (r > 0)
-    {
-        _centerX       = (int)(cc[0]);
-        _centerY       = (int)(cc[1]);
-        _centerZ       = (int)(cc[2]);
-    } else {
-               int dim[3];
-               _imageDataOriginal->GetDimensions(dim);
-        _centerX       = (int)(dim[0]/2);
-        _centerY       = (int)(dim[1]/2);
-        _centerZ       = (int)(dim[2]/2);
-       }
-}
-
-//----------------------------------------------------------------------------
-
-// Calculate center and radius of sphere given four points
-// http://home.att.net/~srschmitt/script_sphere_solver.html
-// source code HTML <script language=JavaScript>
-double wxSphereView::SphereFindCenter(double P[4][3], double cc[3])
-{
-    int i;
-    double r, m11, m12, m13, m14, m15;
-       double a[4][4];
-
-    for (i = 0; i < 4; i++)                    // find minor 11
-    {
-        a[i][0] = P[i][0];
-        a[i][1] = P[i][1];
-        a[i][2] = P[i][2];
-        a[i][3] = 1;
-    }
-    m11 = determinant( a, 4 );
-
-    for (i = 0; i < 4; i++)                    // find minor 12 
-    {
-        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
-        a[i][1] = P[i][1];
-        a[i][2] = P[i][2];
-        a[i][3] = 1;
-    }
-    m12 = determinant( a, 4 );
-
-    for (i = 0; i < 4; i++)                    // find minor 13
-    {
-        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
-        a[i][1] = P[i][0];
-        a[i][2] = P[i][2];
-        a[i][3] = 1;
-    }
-    m13 = determinant( a, 4 );
-
-    for (i = 0; i < 4; i++)                    // find minor 14
-    {
-        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
-        a[i][1] = P[i][0];
-        a[i][2] = P[i][1];
-        a[i][3] = 1;
-    }
-    m14 = determinant( a, 4 );
-
-
-    for (i = 0; i < 4; i++)                    // find minor 15
-    {
-        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
-        a[i][1] = P[i][0];
-        a[i][2] = P[i][1];
-        a[i][3] = P[i][2];
-    }
-    m15 = determinant( a, 4 );
-
-    if (m11 == 0)
-    {
-        r = 0;
-    }
-    else
-    {
-               // center of sphere
-        cc[0] =  0.5*m12/m11;  //cx                  
-        cc[1] = -0.5*m13/m11;  //cy
-        cc[2] =  0.5*m14/m11;  //cz
-               // Sphere radio 
-        r  = sqrt( cc[0]*cc[0] + cc[1]*cc[1] + cc[2]*cc[2] - m15/m11 );
-    }
-
-    return r;                                  // the radius
-}
-//----------------------------------------------------------------------------
-
-//  Recursive definition of determinate using expansion by minors.
-double wxSphereView::determinant(double a[4][4], int n)
-{
-    int i, j, j1, j2;
-    double d;
-       double m[4][4];
-
-       for (i=0;i<4;i++)
-       {
-               for (j=0;j<4;j++)
-               {
-                       m[i][j]=0;
-               }
-       }
-
-    if (n == 2)                                // terminate recursion
-    {
-        d = a[0][0]*a[1][1] - a[1][0]*a[0][1];
-    }
-    else 
-    {
-        d = 0;
-        for (j1 = 0; j1 < n; j1++ )            // do each column
-        {
-            for (i = 1; i < n; i++)            // create minor
-            {
-                j2 = 0;
-                for (j = 0; j < n; j++)
-                {
-                    if (j == j1) continue;
-                    m[i-1][j2] = a[i][j];
-                    j2++;
-                }
-            }
-            
-            // sum (+/-)cofactor * minor  
-            d = d + pow(-1.0, j1)*a[0][j1]*determinant( m, n-1 );
-        }
-    }
-
-    return d;
-}
-
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-vtkInteractorStylePlane2D::vtkInteractorStylePlane2D()
-{
-       _stateRotate=false;
-}
-//---------------------------------------------------------------------------
-vtkInteractorStylePlane2D::~vtkInteractorStylePlane2D()
-{
-}
-
-//---------------------------------------------------------------------------
-bool vtkInteractorStylePlane2D::GetStateRotate()
-{
-       return _stateRotate;
-}
-
-//---------------------------------------------------------------------------
-bool  vtkInteractorStylePlane2D::OnLeftButtonDown()  // vitual
-{
-       _stateRotate = true;
-       _fordwareX = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       _fordwareY = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-       vtkplane2Dview->RotationStart();
-
-       return true;
-}
-
-//---------------------------------------------------------------------------
-bool vtkInteractorStylePlane2D::OnLeftButtonUp() // virtual
-{
-       if (_stateRotate==true)
-       {
-               _stateRotate = false;
-               vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-               vtkplane2Dview->ResetBack();
-//             this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-       }
-
-       return true;
-}
-
-//---------------------------------------------------------------------------
-bool  vtkInteractorStylePlane2D::OnRightButtonUp()  // virtual
-{
-       if (_stateRotate==true){
-               //vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()); // JPRx
-
-// EED Borrame
-//             vtkplane2Dview->RotationEnd();
-
-               _stateRotate = false;
-       }
-
-       return true;
-}
-//---------------------------------------------------------------------------
-bool  vtkInteractorStylePlane2D::OnMouseMove () // virtual 
-{
-       bool ok_v, ok_ang;
-       if (_stateRotate==true){
-               ok_v=false;
-               ok_ang=false;
-               if (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==1)
-               {
-                       ok_v=true;
-               }
-               if (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==1)
-               {
-                       ok_ang=true;
-               }
-           int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-               vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-               vtkplane2Dview->RotationDrag( fx - _fordwareX , fy - _fordwareY , ok_v , ok_ang);
-               this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-       } 
-       return true;
-}
-//-------------------------------------------------------------------
-bool vtkInteractorStylePlane2D::OnLeftDClick() // virtual
-{
-       int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-       double xx=fx;
-       double yy=fy;
-       double zz=0;
-
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-       vtkMPRBaseData *vtkmprbasedata = vtkplane2Dview->GetVtkmprbasedata();
-
-       vtkplane2Dview->TransfromeCoordViewWorld2(xx,yy,zz);
-
-       vtkmprbasedata->SetX( xx );
-       vtkmprbasedata->SetY( yy );
-       vtkmprbasedata->SetZ( zz );
-       this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-
-       return true;
-}
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-vtkPlane2DView::vtkPlane2DView( wxWindow *parent)
-: wxVtk2DBaseView(parent)
-{
-
-       _backX                                  =       -99999;
-       _backY                                  =       -99999;
-       _backZ                                  =       -99999;
-
-       _backOrient[0]                  =       -99999;
-       _backOrient[1]                  =       -99999;
-       _backOrient[2]                  =       -99999;
-       _backOrient[3]                  =       -99999;
-
-       _active                                 =   true;
-       _mip_visualization              =       true;
-       _mip_width                              =       2;
-
-    _transform1                                =       vtkTransform::New();
-    _transform2                                =       vtkTransform::New();
-       _transform1->Identity();
-       _transform2->Identity();
-
-       _sizeIma                                =       200;
-
-       _pSource                                =       NULL;
-       _3Dslices                               =       NULL;
-       _stPoints                               =       NULL;
-       _change                                 =       NULL;
-       _imageResult                    =       NULL;
-
-       // line horizontal
-    _pts                       = NULL;
-    _lineActor         = NULL;
-       _lineMapper             = NULL;
-       _pd                             = NULL;
-
-       _interactorstyleplane2D =       false;
-}
-//-------------------------------------------------------------------
-vtkPlane2DView::~vtkPlane2DView()
-{
-       ResetPlane();
-
-       // Horizontal Line
-    if (_pts           != NULL)        {       _pts                    -> Delete(); }
-    if (_lineActor     != NULL)        {       _lineActor              -> Delete(); }
-    if (_lineMapper    != NULL)        {       _lineMapper             -> Delete(); }
-    if (_pd                    != NULL)        {       _pd                             -> Delete(); }
-
-       _transform1             -> Delete();
-       _transform2             -> Delete();
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::ResetBack()
-{
-               _backX=-1;
-               _backY=-1;
-               _backZ=-1;
-               _backOrient[0]=-1;
-               _backOrient[1]=-1;
-               _backOrient[2]=-1;
-               _backOrient[3]=-1;
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::ResetPlane(){
-       if (_pSource    !=NULL) { _pSource      -> Delete();    }
-       if (_3Dslices   !=NULL) { _3Dslices     -> Delete();    }
-       if (_stPoints   !=NULL) { _stPoints     -> Delete();    }
-       if (_change             !=NULL) { _change       -> Delete();    }
-}
-//-------------------------------------------------------------------
-vtkMPRBaseData *vtkPlane2DView::GetVtkmprbasedata()
-{
-       return (vtkMPRBaseData*)GetVtkBaseData();
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::SetPSource(int sizeIma){
-       int dimIma      = sizeIma; 
-
-       double x = GetVtkmprbasedata()->GetX();
-       double y = GetVtkmprbasedata()->GetY();
-       double z = GetVtkmprbasedata()->GetZ();
-
-       double spc[3];
-       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
-       imagedata->GetSpacing(spc);
-       x=x*spc[0];
-       y=y*spc[1];
-       z=z*spc[2];
-
-
-       vtkMPRBaseData  *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData();
-       vtkTransform    *transform       = mprbasedata->GetTransformOrientation();
-
-       double in[3];  // temp
-       double pA[3];
-       double pB[3];
-       in[0]=1;                in[1]=0;                        in[2]=0;
-       transform->TransformPoint(in,_n);
-
-       in[0]=0;        in[1]=dimIma-1;         in[2] = 0;
-       transform->TransformPoint(in,pA);
-
-       in[0]=0;        in[1]=0;                in[2]=dimIma-1;
-       transform->TransformPoint(in,pB);
-
-    _pSource -> SetPoint1( pA  );
-    _pSource -> SetPoint2( pB  );
-
-       _pSource -> SetOrigin( 0        , 0             , 0             );
-    _pSource -> SetResolution( sizeIma-1 , sizeIma -1 );
-       _pSource -> Update();
-       _pSource -> SetCenter( x, y, z );
-    _pSource -> SetNormal( _n );
-    _pSource -> Update( );
-
-// EED Borrame
-//     transform->Delete();
-
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::ExtractPlane() 
-{
-
-       double x = GetVtkmprbasedata()->GetX();
-       double y = GetVtkmprbasedata()->GetY();
-       double z = GetVtkmprbasedata()->GetZ();
-
-       double spc[3];
-       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
-       imagedata->GetSpacing(spc);
-       x=x*spc[0];
-       y=y*spc[1];
-       z=z*spc[2];
-
-       vtkTransform *transform = GetVtkmprbasedata()->GetTransformOrientation();
-       double orientation[4];
-       transform->GetOrientationWXYZ(orientation);
-
-       bool okOrientation=true;
-       if ((orientation[0]!=_backOrient[0]) || (orientation[1]!=_backOrient[1]) ||
-               (orientation[2]!=_backOrient[2]) || (orientation[3]!=_backOrient[3]))
-       {
-               okOrientation=false;
-       }
-
-       bool okPosicion=true;
-       if ( (x!=_backX) || (y!=_backY) || (z!=_backZ) )
-       {
-               okPosicion=false;
-       }
-
-       if ((okPosicion==false) || (okOrientation==false) ) {
-               if (_active==true){
-
-                       bool ok = false;
-
-                       if ( _mip_visualization==true )
-                       {
-                               if (_interactorstyleplane2D!=NULL)
-                               {
-                                       if (_interactorstyleplane2D->GetStateRotate()==false )
-                                       {
-                                               ok=true;
-                                       }
-                               }
-                       }
-//                     ok=true;
-
-                       if (ok==true)
-                       {
-                               Extract_MIP_PlaneVTK();
-                       } else {
-                               Extract_One_PlaneVTK();
-                       } // ok
-
-               } // active
-               _backX=x;
-               _backY=y;
-               _backZ=z;
-               _backOrient[0]=orientation[0];
-               _backOrient[1]=orientation[1];
-               _backOrient[2]=orientation[2];
-               _backOrient[3]=orientation[3];
-       } //okPosition okOrientation
-}
-
-//-------------------------------------------------------------------
-
-void vtkPlane2DView::Extract_One_PlaneVTK()
-{
-       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
-       SetPSource(_sizeIma);
-       _3Dslices -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
-       _3Dslices -> SetSource( imagedata );
-       _3Dslices -> Update( );
-       _stPoints -> GetPointData( )->SetScalars(  _3Dslices->GetOutput()->GetPointData()->GetScalars()  );
-       _stPoints -> SetDimensions( _sizeIma, _sizeIma, 1 );
-       _stPoints -> SetScalarType( imagedata->GetScalarType() );
-       _stPoints -> SetScalarTypeToShort();
-       _stPoints -> Update();
-//     _change   -> SetInput( _stPoints );  
-//     _change   -> Update();    //important
-       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _stPoints );
-//     _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _change->GetOutput() );
-       //      vtkImageActor *imageActor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor();
-}
-
-//-------------------------------------------------------------------
-
-void vtkPlane2DView::Extract_MIP_PlaneVTK( /*double heightDefinition*/ )
-{
-
-       int mipWidth;
-       double sp;
-       int sizeWidth = (_mip_width*2)+1 ;
-       int deltaPixel;
-       int iWidth,itmp,tmpSizeWith;
-
-       double spc[3];
-       vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
-       SetPSource(_sizeIma);
-       imagedata->GetSpacing(spc);
-
-       bool heightDefinition=false;
-       if (_mip_width<3)
-       {
-               heightDefinition=true;
-       }
-
-       if (heightDefinition==true)
-       {
-               mipWidth        =       _mip_width;
-               sp                      =       spc[0];
-               deltaPixel      =       1;
-       } else {
-               mipWidth        =       2;
-               tmpSizeWith =   (mipWidth*2) + 1;
-               sp                      =       (spc[0]*sizeWidth)/tmpSizeWith;
-               sizeWidth       =       tmpSizeWith;
-               deltaPixel      =       4;
-       }
-
-
-
-       std::vector< vtkProbeFilter* > slicesLST;
-
-       _pSource->Push( -mipWidth * sp );
-       _pSource->Update();
-
-       for ( iWidth=0 ; iWidth<sizeWidth ; iWidth++ )
-       {       
-               vtkProbeFilter *slice = vtkProbeFilter::New();
-               slice -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
-               slice -> SetSource( imagedata );
-               slice -> Update( );
-               slicesLST.push_back( slice );
-               _pSource->Push( sp );
-       }
-       
-       if (_imageResult ==NULL)
-       {
-               _imageResult = vtkImageData::New();
-               _imageResult -> SetDimensions(_sizeIma,_sizeIma,1);
-               _imageResult -> SetSpacing(1,1,1);
-               _imageResult -> SetScalarType( imagedata->GetScalarType() );
-               _imageResult -> SetExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
-               _imageResult -> SetWholeExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
-               _imageResult -> AllocateScalars();
-               _imageResult -> Update();
-       }
-
-       unsigned short *pTemp;
-       unsigned short *pResult;
-       pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); 
-
-       int iPixels , sizePixels = _sizeIma*_sizeIma;
-       for(iPixels=0 ; iPixels<sizePixels ; iPixels=iPixels+deltaPixel)
-       {
-
-               pTemp = (unsigned short*)slicesLST[0]->GetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0);
-
-               pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); 
-               pResult[iPixels] = pTemp[iPixels];
-
-               for (iWidth=1;iWidth<sizeWidth;iWidth++)
-               {
-                       pTemp = (unsigned short*)slicesLST[iWidth]->GetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0);
-
-                       if (pResult[iPixels]< pTemp[iPixels])
-                       {
-                               pResult[iPixels] = pTemp[iPixels];
-                       }
-               }
-
-               if (deltaPixel!=1)
-               {
-                       for (itmp=1;itmp<deltaPixel;itmp++)
-                       {
-                               pResult[iPixels+itmp] = pResult[iPixels];
-                       }
-               }
-
-       }
-
-       for (iWidth=0;iWidth<sizeWidth;iWidth++)
-       {       
-               slicesLST[iWidth]->Delete();
-       }
-
-       _imageResult->Modified();
-       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageResult );
-
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::Configure( )
-{
-       wxVtk2DBaseView::Configure(false);
-
-       HorizontalLine();
-// Borrame
-//     CircleLine();
-
-       _pSource         = vtkPlaneSource::New( );
-    _3Dslices   = vtkProbeFilter::New( ) ;
-       _stPoints        = vtkStructuredPoints::New( );
-       _change          = vtkImageChangeInformation::New();
-
-       wxVTKRenderWindowInteractor *iren               = GetWxVTKRenderWindowInteractor();
-       ExtractPlane();
-//     SetActive(false);
-       _imageViewer2XYZ -> GetVtkImageViewer2()        -> SetupInteractor ( iren );
-
-       SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
-
-       _interactorstyleplane2D = new vtkInteractorStylePlane2D();
-       GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _interactorstyleplane2D );
-
-       vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
-       
-       camera->SetViewUp               (       0                       ,       1                               ,       0       );
-       camera->SetPosition             ((0+_sizeIma)/2 , (0+_sizeIma)/2        , 10000 ); 
-       
-       camera->SetFocalPoint   ((0+_sizeIma)/2 , (0+_sizeIma)/2        ,       0       ); 
-       camera->SetClippingRange(0.01, 100000);
-       camera->ComputeViewPlaneNormal();
-       camera->SetParallelScale( _sizeIma/3.0 );
-
-       // text information over the graphic window
-       _vtkInfoTextImage                                               = new vtkInfoTextImage();
-       _vtkInfoTextImageInteractorPlane2D              = new vtkInfoTextImageInteractorPlane2D();
-       _vtkInfoTextImage->SetWxVtk2DBaseView(this);
-       _vtkInfoTextImage->SetMarImageData(  GetVtkmprbasedata()->GetMarImageData() );
-       _vtkInfoTextImageInteractorPlane2D->SetModelVtkInfoTextImage(_vtkInfoTextImage);        
-       _vtkInfoTextImage->Configure();
-       this->GetInteractorStyleBaseView()->AddInteractorStyleMaracas(_vtkInfoTextImageInteractorPlane2D);
-
-
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::HorizontalLine()
-{
-// Axe Horizontal
-       _pts = vtkPoints::New();
-       _pts->SetNumberOfPoints(2);
-       _pts->SetPoint(0, -1000 , -1000 , -1000 );
-       _pts->SetPoint(1,  1000 ,  1000 ,  1000 );
-       vtkCellArray *lines = vtkCellArray::New();
-       lines->InsertNextCell(2);
-       lines->InsertCellPoint(0);
-       lines->InsertCellPoint(1);
-       _pd = vtkPolyData::New();
-    _pd->SetPoints( _pts );
-    _pd->SetLines( lines );
-       lines->Delete();  //do not delete lines ??
-       _lineActor                                      =       vtkActor::New();
-    _lineMapper                                        =       vtkPolyDataMapper::New();
-       _lineMapper->SetInput(_pd);
-       _lineMapper->ImmediateModeRenderingOn();
-       _lineActor->SetMapper(_lineMapper);
-       _lineActor->GetProperty()->BackfaceCullingOn();
-       _lineActor->GetProperty()->SetDiffuseColor(0,0,1);
-       _lineActor->GetProperty()->SetLineWidth(2);
-       _lineActor->GetProperty()->SetOpacity(0);
-    _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineActor );
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::RotationStart()
-{
-       vtkMPRBaseData  *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData();
-       vtkTransform    *transform       = mprbasedata->GetTransformOrientation();
-       _transform1->SetMatrix( transform->GetMatrix() );
-}
-//-------------------------------------------------------------------
-void vtkPlane2DView::RotationDrag(double vx, double vy, bool ok_v, bool ok_ang)
-{ 
-       if (ok_ang==false)
-       {
-               _ang =sqrt( vx*vx + vy*vy ) / 1.5;
-       }
-
-       if (ok_v==false){
-               _vxb=-vy;
-               _vyb=vx;
-       }
-       _transform2->Identity();
-       _transform2->RotateWXYZ(_ang,0,_vxb,_vyb);
-
-       vtkMPRBaseData  *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData();
-       vtkTransform *transform          =      vtkTransform::New();
-       transform->Identity();
-       transform->Concatenate(_transform1);
-       transform->Concatenate(_transform2);
-       mprbasedata->InitTransformOrientation(transform);
-       transform->Delete();
-
-       // Refresh Horizontal Line
-       _pts->SetPoint( 0 , (_sizeIma/2) - _vxb*2       , (_sizeIma/2) - _vyb*2 , 1 );
-       _pts->SetPoint( 1 , (_sizeIma/2) + _vxb*2       , (_sizeIma/2) + _vyb*2 , 1 );
-//     RefreshCircleLine();
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::Refresh(  )
-{
-       ExtractPlane();
-       wxVtkBaseView::Refresh();
-}
-//-------------------------------------------------------------------
-void vtkPlane2DView::SetImgSize( int imgSize )
-{
-       _sizeIma = imgSize;
-}
-//-------------------------------------------------------------------
-int vtkPlane2DView::GetImgSize()
-{
-       return _sizeIma;
-}
-//-------------------------------------------------------------------
-int    vtkPlane2DView::GetActualSlice()  // virtual 
-{
-       _cx = GetVtkmprbasedata()->GetX();
-       _cy = GetVtkmprbasedata()->GetY();
-       _cz = GetVtkmprbasedata()->GetZ();
-       return 0;
-}
-
-//-------------------------------------------------------------------
-
-bool vtkPlane2DView::GetMipVisualization()
-{
-       return _mip_visualization;
-}
-
-//-------------------------------------------------------------------
-int vtkPlane2DView::GetMipWidth()
-{
-       return _mip_width;
-}
-
-//-------------------------------------------------------------------
-void vtkPlane2DView::SetActualSlice(int slice)  // Virtual
-{
-       double dir=(double)slice/3.0;
-       GetVtkmprbasedata()->SetX( _cx + (_n[0]*dir) );
-       GetVtkmprbasedata()->SetY( _cy + (_n[1]*dir) );
-       GetVtkmprbasedata()->SetZ( _cz + (_n[2]*dir) );
-}
-//---------------------------------------------------------------------------
-vtkInteractorStylePlane2D      *vtkPlane2DView::GetInteractorstyleplane2D()
-{
-       return this->_interactorstyleplane2D;
-}
-//---------------------------------------------------------------------------
-void vtkPlane2DView::SetActive(bool active)
-{
-       _active = active;
-}
-
-//---------------------------------------------------------------------------
-
-void vtkPlane2DView::SetMipVisualization(bool ok)
-{
-       _mip_visualization=ok;
-}
-
-//---------------------------------------------------------------------------
-
-void vtkPlane2DView::SetMipWidth(int value)
-{
-       _mip_width=value;
-}
-
-//---------------------------------------------------------------------------
-void vtkPlane2DView::SetVisibleLine(bool ok)
-{
-       double opacity;
-       if (ok==true)
-       {
-               opacity=1;
-       } else {
-               opacity=0;
-       }
-       _lineActor->GetProperty()->SetOpacity(opacity);
-}
-// ----------------------------------------------------------------------------
-void vtkPlane2DView::TransfromeCoordViewWorld2(double &X, double &Y, double &Z)
-{
-       double spc[3];
-       GetVtkmprbasedata()->GetImageData()->GetSpacing(spc);
-
-       double xx = X;
-       double yy = Y;
-       double zz = 0;
-
-       TransfromeCoordScreenToWorld(xx,yy,zz);
-
-
-       vtkTransform *transf1 = vtkTransform::New();
-       transf1->Identity();
-       vtkTransform *transf2 = GetVtkmprbasedata()->GetTransformOrientation();
-       transf1->Concatenate(transf2->GetMatrix());
-       double in[4], out[4];
-       double center = GetImgSize() / 2;
-       in[0] = 0;
-       in[1] = xx - center;
-       in[2] = yy - center;
-       in[3] = 0;
-
-       transf1->MultiplyPoint(in,out);
-       transf1->Delete();
-
-       X = out[0] + GetVtkmprbasedata()->GetX() ;
-       Y = out[1] + GetVtkmprbasedata()->GetY() ;
-       Z = out[2] + GetVtkmprbasedata()->GetZ() ;
-
-}
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-vtkInfoTextImageInteractorPlane2D::vtkInfoTextImageInteractorPlane2D()
-{
-}
-//-------------------------------------------------------------------
-vtkInfoTextImageInteractorPlane2D::~vtkInfoTextImageInteractorPlane2D()
-{
-}
-//-------------------------------------------------------------------
-bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
-{
-       int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
-       wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
-       wxVTKiren->GetEventPosition(X,Y);
-
-       int z = (int) (_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetVtkBaseData()->GetZ());
-       double xx=X,yy=Y,zz=z;
-
-// --> dif
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
-       vtkplane2Dview->TransfromeCoordViewWorld2(xx,yy,zz);
-
-       GetVtkInfoTextImage()->PutWindowLevel();
-       GetVtkInfoTextImage()->PutColorLevel();
-       GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
-       GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
-
-       this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
-       return true;
-}
-
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-manualViewPerpPlaneContour::manualViewPerpPlaneContour()
-{
-}
-// ----------------------------------------------------------------------------
-manualViewPerpPlaneContour::~manualViewPerpPlaneContour()
-{
-}
-
-
-// ----------------------------------------------------------------------------
-manualViewPerpPlaneContour * manualViewPerpPlaneContour :: Clone()
-{
-       manualViewPerpPlaneContour * clone = new manualViewPerpPlaneContour();
-       CopyAttributesTo(clone);
-       return clone;
-}
-
-// ---------------------------------------------------------------------------
-
-void manualViewPerpPlaneContour::CopyAttributesTo( manualViewPerpPlaneContour * cloneObject)
-{
-       // Fathers object
-       manualViewContour::CopyAttributesTo(cloneObject);
-}
-
-
-
-
-// ----------------------------------------------------------------------------
-void manualViewPerpPlaneContour::UpdateViewPoint(int id)
-{  // virtual
-       double x,y,z;
-       manualPoint *mp = _manContModel->GetManualPoint(id);
-       x = mp->GetX();
-       y = mp->GetY();
-       z = mp->GetZ();
-       FilterCordinateXYZ(x,y,z);
-
-       _lstViewPoints[id]->SetPositionXY( x , y ,GetRange(), z );
-       if ((z>=-1) && (z<=1))
-       {
-               _lstViewPoints[id]->GetVtkActor()->VisibilityOn();
-       } else {
-               _lstViewPoints[id]->GetVtkActor()->VisibilityOff();
-       }
-}
-// ----------------------------------------------------------------------------
-void manualViewPerpPlaneContour::FilterCordinateXYZ (double &x, double &y, double &z)
-{
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
-       vtkMPRBaseData *vtkmprbasedata = vtkplane2Dview->GetVtkmprbasedata();
-       vtkTransform *transf1 = vtkTransform::New();
-       vtkTransform *transf2 = vtkmprbasedata->GetTransformOrientation();
-       transf1->SetMatrix( transf2->GetMatrix() ); 
-       transf1->Inverse();
-
-       double in[4], out[4];
-       double center = vtkplane2Dview->GetImgSize() / 2;
-
-       in[0] = x - vtkmprbasedata->GetX();
-       in[1] = y - vtkmprbasedata->GetY();
-       in[2] = z - vtkmprbasedata->GetZ();
-       in[3] = 0;
-
-       transf1->MultiplyPoint(in,out);
-       z = out[0];
-       x = out[1]+center;
-       y = out[2]+center;
-
-       double spc[3];
-       this->GetWxVtkBaseView()->GetSpacing(spc);
-       x = x / spc[0];
-       y = y / spc[1];
-       z = z / spc[2];
-
-       transf1->Delete();
-}
-
-// ----------------------------------------------------------------------------
-void manualViewPerpPlaneContour::TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type )
-{
-       Z = 0;
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
-       vtkplane2Dview->TransfromeCoordViewWorld2(X,Y,Z);
-}
-
-
-// ----------------------------------------------------------------------------
-void manualViewPerpPlaneContour::RefreshContour() // virtual
-{
-//     manualViewContour::RefreshContour();
-
-       double pp1[3];
-       double pp2[3];
-       double u;
-               
-// JSTG 25-02-08 ----------------------------------------------------------
-//             tt;
-//--------------------------------------------------------
-
-       double pp[3];
-       double ppB[3];
-       double ppC[3];
-       ppB[0] = 999999;
-       double dist,distMin = 99999999;
-
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
-       double center = vtkplane2Dview->GetImgSize() / 2;
-
-       int i,np,nps;
-       np              = GetNumberOfPoints( );
-
-//JSTG 25-02-08 ------------------------------------------
-       //double t,delta;
-    //nps              = GetNumberOfPointsSpline(); 
-       nps = _manContModel->GetNumberOfPointsSpline();
-       //delta = ( double ) ( np  ) / ( double ) ( nps-1  );
-       _manContModel->UpdateSpline();
-//--------------------------------------------------------
-
-       if ( np >= 2 )
-       {
-               for( i = 0; i < nps; i++ ) 
-               {
-// JSTG 25-02-08 ----------------------------------------------------------
-                       //t     = delta * (double)i ;
-                       //tt    = delta * (double)(i+1) ;
-                       //_manContModel->GetSplinePoint(t ,pp1[0],pp1[1],pp1[2]);
-                       //_manContModel->GetSplinePoint(tt,pp2[0],pp2[1],pp2[2]);
-                       _manContModel->GetSpline_i_Point(i ,&pp1[0],&pp1[1],&pp1[2]);
-                       _manContModel->GetSpline_i_Point(i+1,&pp2[0],&pp2[1],&pp2[2]);
-//--------------------------------------------------------------------------
-                       FilterCordinateXYZ(pp1[0],pp1[1],pp1[2]);
-                       FilterCordinateXYZ(pp2[0],pp2[1],pp2[2]);
-                       if (pp2[2]*pp1[2]<=0)
-                       {
-                               if (pp1[2]-pp2[2]!=0) { 
-                                       u = -pp2[2] / (pp1[2]-pp2[2]);
-                               } else  {
-                                       u=9999999;
-                               }
-                               pp[0]    = ( pp1[0]-pp2[0] )*u + pp2[0];
-                               pp[1]    = ( pp1[1]-pp2[1] )*u + pp2[1];
-                               pp[2]    = ( pp1[2]-pp2[2] )*u + pp2[2];
-                               ppC[0] = pp[0] - center;
-                               ppC[1] = pp[1] - center;
-                               ppC[2] = pp[2] ;
-                               dist = sqrt( ppC[0]*ppC[0] + ppC[1]*ppC[1] + ppC[2]*ppC[2] );
-                               if (dist<distMin)
-                               {
-                                       distMin=dist;
-                                       ppB[0] = pp[0];
-                                       ppB[1] = pp[1];
-                                       ppB[2] = pp[2];
-                               }
-                       }
-
-               }// for 
-       } else {
-                       _pts->SetPoint(0, 0 , 0 , 0);   
-                       _pts->SetPoint(1, 0 , 0 , 0);   
-       } // if
-
-//EED 27 sep 2006
-       ppB[0]=ppB[0]*_spc[0];
-       ppB[1]=ppB[1]*_spc[1];
-
-       _pts->SetPoint( 0, ppB[0]   , ppB[1]+1 , 1 );   
-       _pts->SetPoint( 1, ppB[0]   , ppB[1]-1 , 1 );   
-       _pts->SetPoint( 2, ppB[0]   , ppB[1]   , 1 );   
-       _pts->SetPoint( 3, ppB[0]-1 , ppB[1]   , 1 );   
-       _pts->SetPoint( 4, ppB[0]+1 , ppB[1]   , 1 );   
-
-
-       for( i = 5; i < nps; i++ ) 
-       {
-               _pts->SetPoint( i, ppB[0] , ppB[1] , 1 );       
-       }
-
-}
-
-//---------------------------------------------------------------------------
-bool manualViewPerpPlaneContour::ifTouchContour( int x, int y, int z)
-{
-       bool ok=false;
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
-       double X=x;
-       double Y=y;
-       double Z=z;
-       vtkplane2Dview->TransfromeCoordScreenToWorld(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)
-       {
-               ok = true;
-       }
-       return ok;
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-vtkInteractorStyleMPRView::vtkInteractorStyleMPRView()
-{
-       _stateMoveAxisX = false;
-       _stateMoveAxisY = false;
-       _stateMoveAxisZ = false;
-}
-//---------------------------------------------------------------------------
-vtkInteractorStyleMPRView::~vtkInteractorStyleMPRView()
-{
-}
-
-
-//---------------------------------------------------------------------------
-bool  vtkInteractorStyleMPRView::OnLeftDClick () // virtual
-{
-       wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-       double x = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       double y = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-       double z = 1;
-       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
-       wxvtkmpr2Dview->MoveX(x,y,z);
-       wxvtkmpr2Dview->MoveY(x,y,z);
-       wxvtkmpr2Dview->MoveZ(x,y,z);
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       wxCommandEvent newevent2(wxEVT_COMMAND_MENU_SELECTED,12122);  // Doble click
-       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
-
-       return true;
-}
-//---------------------------------------------------------------------------
-bool  vtkInteractorStyleMPRView::OnLeftButtonDown () 
-{
-       wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-       double x        = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       double y        = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-       double z        = 1;
-       //double xx     = x;  // JPRx
-       //double yy     = y;  // JPRx
-       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
-
-/*EED Borrame
-       if ((_xBack==xx) && (_yBack==yy))
-       {
-               wxvtkmpr2Dview->MoveX(x,y,z);
-               wxvtkmpr2Dview->MoveY(x,y,z);
-               wxvtkmpr2Dview->MoveZ(x,y,z);
-               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-               wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-               wxCommandEvent newevent2(wxEVT_COMMAND_MENU_SELECTED,12122);  // Doble click
-               wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
-       }
-
-       _xBack=xx;      
-       _yBack=yy;
-*/
-
-       _stateMoveAxisX = wxvtkmpr2Dview->IfMouseTouchX(x,y,z);
-       _stateMoveAxisY = wxvtkmpr2Dview->IfMouseTouchY(x,y,z);
-       _stateMoveAxisZ = wxvtkmpr2Dview->IfMouseTouchZ(x,y,z);
-
-       return true;
-}
-//---------------------------------------------------------------------------
-bool  vtkInteractorStyleMPRView::OnLeftButtonUp () 
-{
-       if (_stateMoveAxisX==true) 
-       {
-               _stateMoveAxisX=false;
-       }
-       if (_stateMoveAxisY==true) 
-       {
-               _stateMoveAxisY=false;
-       }
-       if (_stateMoveAxisZ==true) 
-       {
-               _stateMoveAxisZ=false;
-       }
-       return true;
-}
-//---------------------------------------------------------------------------
-bool  vtkInteractorStyleMPRView::OnMouseMove () 
-{
-       double x = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       double y = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-
-       double z=1;
-       _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
-       wxVtkMPR2DView *wxvtkmpr2Dview = (wxVtkMPR2DView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView());
-//     wxvtkmpr2Dview->TransfromeCoordViewWorld(x,y,z);            
-
-       wxvtkmpr2Dview->ChangeAxisColor(x,y,z);
-
-       if ((_stateMoveAxisX==true) || (_stateMoveAxisY==true)  || (_stateMoveAxisZ==true) )
-       {
-               if (_stateMoveAxisX==true) 
-               {
-                       wxvtkmpr2Dview-> MoveX(x,y,z);
-               }
-               if (_stateMoveAxisY==true) 
-               {
-                       wxvtkmpr2Dview->MoveY(x,y,z);
-               }
-               if (_stateMoveAxisZ==true) 
-               {
-                       wxvtkmpr2Dview->MoveZ(x,y,z);
-               }
-
-               this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-       }
-       return true;
-}
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction)
- :wxVtk2DBaseView(parent)
-{
-       _backX                  = -99999;
-       _backY                  = -99999;
-       _backZ                  = -99999;
-       _direction              = direction;
-       _ptsA                   = NULL;
-       _lineAActor             = NULL;
-       _lineAMapper    = NULL;
-       _pdA                    = NULL;
-       _ptsB                   = NULL;
-       _lineBActor             = NULL;
-       _lineBMapper    = NULL;
-       _pdB                    = NULL;
-}
-
-//-------------------------------------------------------------------
-wxVtkMPR2DView::~wxVtkMPR2DView()
-{
-       if (_ptsA!=NULL)        { _ptsA         -> Delete(); }
-       if (_lineAActor!=NULL)  { _lineAActor   -> Delete(); }
-       if (_lineAMapper!=NULL) { _lineAMapper  -> Delete(); }
-       if (_pdA!=NULL)         { _pdA          -> Delete(); }
-       if (_ptsB!=NULL)        { _ptsB         -> Delete(); }
-       if (_lineBActor!=NULL)  { _lineBActor   -> Delete(); }
-       if (_lineBMapper!=NULL) { _lineBMapper  -> Delete(); }
-       if (_pdB!=NULL)         { _pdB          -> Delete(); }
-}
-//-------------------------------------------------------------------
-vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata()
-{
-       return (vtkMPRBaseData*)GetVtkBaseData();
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::Configure(){
-       wxVtk2DBaseView::Configure();
-
-       _interactorstylemprview = new vtkInteractorStyleMPRView();
-       GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _interactorstylemprview );
-
-       int x1,x2,y1,y2,z1,z2;
-       GetVtkmprbasedata()     -> GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
-
-       double spc[3];
-       vtkImageData* img =  GetVtkmprbasedata()->GetImageData();
-       if(img!=NULL){
-               img->GetSpacing(spc);
-               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]);
-
-               _visibleAxis = true;
-
-       // Axe A
-               _ptsA = vtkPoints::New();
-               _ptsA->SetNumberOfPoints(2);
-               _ptsA->SetPoint(0, -1000        , -1000 , -1000 );
-               _ptsA->SetPoint(1,  1000        ,  1000 ,  1000 );
-               vtkCellArray *linesA;
-               linesA = vtkCellArray::New();
-               linesA->InsertNextCell(2);
-               linesA->InsertCellPoint(0);
-               linesA->InsertCellPoint(1);
-               _pdA = vtkPolyData::New();
-               _pdA->SetPoints( _ptsA );
-               _pdA->SetLines( linesA );
-               linesA->Delete();  //do not delete lines ??
-               _lineAActor                                             =       vtkActor::New();
-               _lineAMapper                                    =       vtkPolyDataMapper::New();
-               _lineAMapper->SetInput(_pdA);
-               _lineAMapper->ImmediateModeRenderingOn();
-               _lineAActor->SetMapper(_lineAMapper);
-//             _lineAActor->GetProperty()->BackfaceCullingOn();
-               _lineAActor->GetProperty()->SetDiffuseColor(1,0,0);
-               _lineAActor->GetProperty()->SetLineWidth(2);
-               _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
-
-       // Axe B
-               _ptsB = vtkPoints::New();
-               _ptsB->SetNumberOfPoints(2);
-               _ptsB->SetPoint(0, -1000        , -1000 , -1000 );
-               _ptsB->SetPoint(1,  1000        ,  1000 ,  1000 );
-               vtkCellArray *linesB;
-               linesB = vtkCellArray::New();
-               linesB->InsertNextCell(2);
-               linesB->InsertCellPoint(0);
-               linesB->InsertCellPoint(1);
-               _pdB = vtkPolyData::New();
-               _pdB->SetPoints( _ptsB );
-               _pdB->SetLines( linesB );
-               linesB->Delete();  //do not delete lines ??
-               _lineBActor                                             =       vtkActor::New();
-               _lineBMapper                                    =       vtkPolyDataMapper::New();
-               _lineBMapper->SetInput(_pdB);
-               _lineBMapper->ImmediateModeRenderingOn();
-               _lineBActor->SetMapper(_lineBMapper);
-//             _lineBActor->GetProperty()->BackfaceCullingOn();
-               _lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
-               _lineBActor->GetProperty()->SetLineWidth(2);
-               _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
-
-       
-               vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
-               
-//EED 17Avril2009
-/*             
-               if (_direction==0) {
-                       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) { 
-                       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) { 
-                       camera->SetViewUp               (       0               ,       -1              ,       0       );
-                       camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     , -10000); 
-                       camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       ); 
-                       camera->SetParallelScale( (x2-x1)/3.0 );
-               }
- */
-
-               if (_direction==0) {
-                       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) { 
-                       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) { 
-                       camera->SetViewUp               (       0               ,       1               ,       0       );
-                       camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     ,  10000); 
-                       camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       ); 
-                       camera->SetParallelScale( (x2-x1)/3.0 );
-               }
-               
-               
-               
-       }
-
-//     _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow (160);
-//     _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel (800);
-
-}
-
-void wxVtkMPR2DView::SetVisibleAxis(bool ok)
-{
-       if (ok!=_visibleAxis)
-       {
-               _visibleAxis=ok;
-               if (_visibleAxis==true)
-               {
-                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
-                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
-               }
-               if (_visibleAxis==false)
-               {
-                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor );
-                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor );
-               }
-
-       }
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::Refresh() 
-{
-       //wxVtk2DBaseView::Refresh();
-
-
-       //vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2(); // JPRx
-       //vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera(); // JPRx
-
-
-
-       int x1,x2,y1,y2,z1,z2;
-       GetVtkmprbasedata()->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
-       double spc[3];
-       
-       vtkImageData* img = GetVtkmprbasedata()->GetImageData();
-       if(img!=NULL){
-               img->GetSpacing(spc);
-               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]);
-
-               int x = (int)(GetVtkmprbasedata()->GetX());
-               int y = (int)(GetVtkmprbasedata()->GetY());
-               int z = (int)(GetVtkmprbasedata()->GetZ());
-
-               x =  (int)(x*spc[0]);
-               y =  (int)(y*spc[1]);
-               z =  (int)(z*spc[2]);
-
-
-
-               if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) {
-
-                       if (_direction==0) { 
-                               _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);
-                       }
-                       if (_direction==1) { 
-                               _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) { 
-                               _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
-                               _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
-                       //      _ptsA->SetPoint(0, x1 , y , -z2 );
-                       //      _ptsA->SetPoint(1, x2 , y , -z2 );
-                       //      _ptsB->SetPoint(0, x  , y1, -z2 );
-                       //      _ptsB->SetPoint(1, x  , y2, -z2 );
-                               
-                               _ptsA->SetPoint(0, x1 , y , z2 );
-                               _ptsA->SetPoint(1, x2 , y , z2 );
-                               _ptsB->SetPoint(0, x  , y1, z2 );
-                               _ptsB->SetPoint(1, x  , y2, z2 );
-                       }
-                       _backX=x;
-                       _backY=y;
-                       _backZ=z;
-               }
-               wxVtkBaseView::Refresh();
-       }
-}
-//-------------------------------------------------------------------
-int wxVtkMPR2DView::GetActualSlice()   // virtual
-{
-       int result;
-       if (_direction==0) 
-       { 
-               result = (int)(GetVtkmprbasedata()->GetX());
-       }
-       if (_direction==1) 
-       { 
-               result = (int)(GetVtkmprbasedata()->GetY());
-       }
-       if (_direction==2) 
-       { 
-               result = (int)(GetVtkmprbasedata()->GetZ());
-       }
-       return result;
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::SetActualSlice(int slice)   // virtual
-{
-       if (_direction==0) 
-       { 
-               GetVtkmprbasedata()->SetX(slice);
-       }
-       if (_direction==1) 
-       { 
-               GetVtkmprbasedata()->SetY(slice);
-       }
-       if (_direction==2) 
-       { 
-               GetVtkmprbasedata()->SetZ(slice);
-       }
-}
-//-------------------------------------------------------------------
-bool wxVtkMPR2DView::IfMouseTouchX(double x, double y, double z)
-{
-       double delta=5;
-       bool result=false;
-       if (_direction==0) 
-       { 
-       }
-       if (_direction==1) 
-       { 
-               if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
-               {
-                       result = true;
-               }
-       }
-       if (_direction==2) 
-       { 
-               if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
-               {
-                       result = true;
-               }
-       }
-       return result;
-}
-//-------------------------------------------------------------------
-bool wxVtkMPR2DView::IfMouseTouchY(double x, double y, double z)
-{
-       double delta=5;
-       bool result=false;
-       if (_direction==0) 
-       { 
-               if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
-               {
-                       result = true;
-               }
-       }
-       if (_direction==1) 
-       { 
-       }
-       if (_direction==2) 
-       { 
-               if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
-               {
-                       result = true;
-               }
-       }
-       return result;
-}
-//-------------------------------------------------------------------
-bool wxVtkMPR2DView::IfMouseTouchZ(double x, double y, double z)
-{
-       double delta=5;
-       bool result=false;
-       if (_direction==0) 
-       { 
-               if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
-               {
-                       result = true;
-               }
-       }
-       if (_direction==1) 
-       { 
-               if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
-               {
-                       result = true;
-               }
-       }
-       if (_direction==2) 
-       { 
-       }
-       return result;
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::MoveX(double x, double y, double z)
-{
-       if (_direction==0) 
-       { 
-       }
-       if (_direction==1) 
-       { 
-               GetVtkmprbasedata()->SetX(x);
-       }
-       if (_direction==2) 
-       { 
-               GetVtkmprbasedata()->SetX(x);
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::MoveY(double x, double y, double z)
-{
-       if (_direction==0) 
-       { 
-               GetVtkmprbasedata()->SetY(y);
-       }
-       if (_direction==1) 
-       { 
-       }
-       if (_direction==2) 
-       { 
-               GetVtkmprbasedata()->SetY(y);
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::MoveZ(double x, double y, double z)
-{
-       if (_direction==0) 
-       { 
-               GetVtkmprbasedata()->SetZ(z);
-       }
-       if (_direction==1) 
-       { 
-               GetVtkmprbasedata()->SetZ(z);
-       }
-       if (_direction==2) 
-       { 
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z)
-{
-       double c1r=1,c1g=1,c1b=0;
-       double c2r=1,c2g=0,c2b=0;
-
-       if (_direction==0) 
-       { 
-               if (IfMouseTouchY(x,y,z)==true)
-               {
-                       _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
-               } else {
-                       _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
-               }
-               if (IfMouseTouchZ(x,y,z)==true)
-               {
-                       _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
-               } else {
-                       _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
-               }
-       }
-
-       if (_direction==1) 
-       { 
-               if (IfMouseTouchX(x,y,z)==true)
-               {
-                       _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
-               } else {
-                       _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
-               }
-               if (IfMouseTouchZ(x,y,z)==true)
-               {
-                       _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
-               } else {
-                       _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
-               }
-       }
-
-       if (_direction==2) 
-       { 
-               if (IfMouseTouchX(x,y,z)==true)
-               {
-                       _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
-               } else {
-                       _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
-               }
-               if (IfMouseTouchY(x,y,z)==true)
-               {
-                       _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
-               } else {
-                       _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
-               }
-       }
-       Refresh();
-}
-//-------------------------------------------------------------------
-void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual 
-{
-       wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction);
-
-       if (_direction==0)
-       {
-               X = ((vtkMPRBaseData*)GetVtkBaseData())->GetX();
-       }
-       if (_direction==1)
-       {
-               Y = ((vtkMPRBaseData*)GetVtkBaseData())->GetY();
-       }
-       if (_direction==2)
-       {
-               Z = ((vtkMPRBaseData*)GetVtkBaseData())->GetZ();
-       }
-}
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//void boxVolumeObserver::Execute(vtkObject *wdg, unsigned long eventId, void* calldata) {  // virtual
-//     if (eventId==vtkCommand::StartInteractionEvent){
-//             _renWin->SetDesiredUpdateRate(10);
-//     }
-//     if (eventId==vtkCommand::InteractionEvent){
-//             _renWin->SetDesiredUpdateRate(0.001);
-//     }
-//     if (eventId==vtkCommand::EndInteractionEvent){
-//             vtkPlanes *planes = vtkPlanes::New();
-//             vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
-//             boxwidget->GetPlanes(planes);
-//             _volumeMapper->SetClippingPlanes(planes);
-//             planes -> Delete();
-//     }
-//}
-
-//-------------------------------------------------------------------
-//void boxVolumeObserver::SetRenWin( vtkRenderWindow *renWin ){
-//     _renWin = renWin;
-//}
-//-------------------------------------------------------------------
-//void boxVolumeObserver::SetVolumeMapper(vtkVolumeRayCastMapper *volumeMapper){
-//     _volumeMapper = volumeMapper;
-//}
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-// EED 9 fev 2007
-void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* calldata) {  // virtual
-       vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
-       boxwidget->GetPlanes(_planes);
-
-       if ( _vtkVolumeRayCastMapper != NULL )
-       {
-               _vtkVolumeRayCastMapper->RemoveAllClippingPlanes();
-//             vtkPlanes *planes = vtkPlanes::New();
-//             boxwidget->GetPlanes(planes);
-//             _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
-               _vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
-       }
-
-//     _actor->VisibilityOn();
-
-}
-//-------------------------------------------------------------------
-void boxSurfaceObserver::SetPlanes(vtkPlanes *planes){
-       _planes = planes;
-}
-//-------------------------------------------------------------------
-void boxSurfaceObserver::SetActor(vtkProp *actor){
-       _actor = actor;
-}
-
-//-------------------------------------------------------------------
-void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
-{
-       _vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview )
-: wxPanel(parent, -1)
-{
-
-       wxPanel *panel  = this;
-       _wxvtkmpr3Dview = wxvtkmpr3Dview;
-
-       /*int maxX = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionX();
-       int maxY = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionY();
-       int maxZ = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionZ();*/
-
-       int maxX = 1;
-       int maxY = 1;
-       int maxZ = 1;
-
-       wxCheckBox              *ckBoxX                 = new wxCheckBox(panel,-1,_T("X           "));
-                                       _positionX              = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
-       wxCheckBox              *ckBoxY                 = new wxCheckBox(panel,-1,_T("Y           "));
-                                       _positionY              = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
-       wxCheckBox              *ckBoxZ                 = new wxCheckBox(panel,-1,_T("Z           "));
-                                       _positionZ              = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
-       wxButton                *btnColorTable  = new wxButton (panel, -1, _T("Edit Color Table") );
-
-       _ckBoxXYZ                       = new wxCheckBox(panel,-1,_T("XYZ                  "));
-       _ckBoxPlane                     = new wxCheckBox(panel,-1,_T("Plane"));
-
-       ckBoxX->SetValue(false);
-       ckBoxY->SetValue(false);
-       ckBoxZ->SetValue(false);
-       _ckBoxXYZ->SetValue(false);
-       _ckBoxPlane->SetValue(false);
-
-       _positionX->SetSize(400,20);
-       _positionY->SetSize(400,20);
-       _positionZ->SetSize(400,20);
-
-       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   );
-
-
-       wxFlexGridSizer *sizer   = new wxFlexGridSizer(1);
-//     wxBoxSizer *sizer        = new wxBoxSizer(wxVERTICAL);
-
-//     wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL);
-       wxFlexGridSizer *sizerH4 = new wxFlexGridSizer(10);
-       wxFlexGridSizer *sizerH5 = new wxFlexGridSizer(10);
-
-
-
-//EED 28 sep 2006
-//     wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10);
-//     wxFlexGridSizer *sizerH7 = new wxFlexGridSizer(10);
-
-//     sizerH4->Add( ckBoxX            , 1, wxALL|wxEXPAND, 0);
-//     sizerH4->Add( new wxStaticText(panel, -1,"  ")                  , 1, wxALL|wxEXPAND, 0);
-//     sizerH4->Add( _positionX        , 1, wxALL|wxEXPAND, 0);
-
-//     sizerH5->Add( ckBoxY            , 1, wxALL|wxEXPAND, 0);
-//     sizerH5->Add( new wxStaticText(panel, -1,"  ")                  , 1, wxALL|wxEXPAND, 0);
-//     sizerH5->Add( _positionY        , 1, wxALL|wxEXPAND, 0);
-
-//     sizerH6->Add( ckBoxZ            , 1, wxALL|wxEXPAND, 0);
-//     sizerH6->Add( new wxStaticText(panel, -1,"  ")                  , 1, wxALL|wxEXPAND, 0);
-//     sizerH6->Add( _positionZ        , 1, wxALL|wxEXPAND, 0);
-
-//     sizerH7->Add( _ckBoxXYZ         , 1, wxALL|wxEXPAND, 0);
-//     sizerH7->Add( _ckBoxPlane       , 1, wxALL|wxEXPAND, 0);
-
-//     sizer->Add( sizerH4                     , 1, wxALL|wxEXPAND, 2);
-//     sizer->Add( sizerH5                     , 1, wxALL|wxEXPAND, 2);
-//     sizer->Add( sizerH6                     , 1, wxALL|wxEXPAND, 2);
-//     sizer->Add( sizerH7                     , 1, wxALL|wxEXPAND, 2);
-
-       sizerH4->Add( _positionX                                                                ,1,wxGROW                                       , 0 );
-       sizerH4->Add( ckBoxX                                                                    ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 0 );
-       sizerH4->Add( _positionY                                                                ,1,wxGROW                                       , 0 );
-       sizerH4->Add( ckBoxY                                                                    ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 0 );
-       sizerH4->Add( _positionZ                                                                ,1,wxGROW                                       , 0 );
-       sizerH4->Add( ckBoxZ                                                                    ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 0 );
-       sizerH4->Add( btnColorTable                                                             ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 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);
-//     sizerH5->Add( ckBoxX                            ,  1, wxALL|wxEXPAND, 0);
-//     sizerH5->Add( ckBoxY                            ,  1, wxALL|wxEXPAND, 0);
-//     sizerH5->Add( ckBoxZ                            ,  1, wxALL|wxEXPAND, 0);
-
-       sizer->Add( sizerH4                                     ,  1, wxALL|wxGROW, 2);
-       sizer->Add( sizerH5                                     ,  1, wxALL|wxEXPAND, 2);
-
-
-       panel->SetSize(400,50);
-       panel->SetAutoLayout(true);
-       panel->SetSizer(sizer);
-       panel->Layout();
-
-       panel->SetEventHandler((wxEvtHandler*)this);
-
-       //this->UpdateControlPanel();
-
-}
-void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel()
-{
-
-       vtkMPRBaseData* basedata = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData();
-       if(basedata != NULL){
-
-               /*int maxX = basedata->GetMaxPositionX();
-               int maxY = basedata->GetMaxPositionY();
-               int maxZ = basedata->GetMaxPositionZ();*/
-               int x0,x1,y0,y1,z0,z1;
-
-               basedata->GetDimensionExtention(&x0,&x1,&y0,&y1,&z0,&z1);
-               /*int maxX = x1-x0;//basedata->GetMaxPositionX();
-               int maxY = y1-y0;//basedata->GetMaxPositionY();
-               int maxZ = z1-z0;//basedata->GetMaxPositionZ();*/
-
-               
-
-               //std::cout<<"wxVtkMPR3DViewCntrlPanel::UpdateControlPanel() maxX="<<maxX<<" maxY="<<maxY<<" maxZ="<<maxZ<<std::endl;
-               /*_positionX->SetRange(0,maxX);
-               _positionY->SetRange(0,maxY);
-               _positionZ->SetRange(0,maxZ);*/
-               _positionX->SetRange(x0,x1);
-               _positionY->SetRange(y0,y1);
-               _positionZ->SetRange(z0,z1);
-
-               _positionX->SetValue((x0+x1)/2);
-               _positionY->SetValue((y0+y1)/2);
-               _positionZ->SetValue((z0+z1)/2);
-
-               _positionX->Update();
-               _positionY->Update();
-               _positionZ->Update();
-               this->Update();
-       }
-       
-}
-//-------------------------------------------------------------------
-wxVtkMPR3DViewCntrlPanel::~wxVtkMPR3DViewCntrlPanel()
-{
-}
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::Refresh()
-{
-//     wxPanel::Refresh();
-       _positionX->SetValue( (int)(_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX( )) );
-       _positionY->SetValue( (int)(_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetY( )) );
-       _positionZ->SetValue( (int)(_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetZ( )) );
-}
-/*
-//-------------------------------------------------------------------
-int wxVtkMPR3DViewCntrlPanel::GetIdTissue()
-{
-       int idTissue=-1;
-       if (_surfA->GetValue()==true)
-       {
-               idTissue=0;
-       }
-       if (_surfB->GetValue()==true)
-       {
-               idTissue=1;
-       }
-       if (_surfC->GetValue()==true)
-       {
-               idTissue=2;
-       }
-       if (_surfD->GetValue()==true)
-       {
-               idTissue=3;
-       }
-
-       return idTissue;
-}
-*/
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnEditColorTable(wxCommandEvent& event)
-{
-
-       vtkColorTransferFunction *ctfun                 = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetvtkColorTransferFunction(); 
-       std::vector<double> *ctfunVectorPoint   = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorPoint();
-       std::vector<double> *ctfunVectorRed             = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorRed();
-       std::vector<double> *ctfunVectorGreen   = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorGreen();
-       std::vector<double> *ctfunVectorBlue    =   this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorBlue();
-
-       printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfun %p\n", this, ctfun);    
-       printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorPoint %p\n", this, ctfunVectorPoint);      
-       printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorRed %p\n", this, ctfunVectorRed);  
-       printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorGreen %p\n", this, ctfunVectorGreen);      
-       printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorBlue %p\n", this, ctfunVectorBlue);        
-
-       
-       //void *p=this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer(); // JPRx
-
-
-       int i=0,xi,r,g,b;
-       
-       vtkImageData *imagedata = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-
-       HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Color table"),imagedata,2);
-       
-               
-       hDlg->erasePointsTransferenceFunction();        
-       int ctfSize=ctfunVectorRed->size();
-       if(ctfSize>0)
-       {
-// MACHETE  OJO Eduardo
-               int i=0;
-                       while(i<ctfSize)
-                       {
-                               double gr       = (*ctfunVectorPoint)[i];
-                               double r        = (*ctfunVectorRed)[i];
-                               double g        = (*ctfunVectorGreen)[i];
-                               double b        = (*ctfunVectorBlue)[i];
-                       
-hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255));
-                               i++;
-                       }
-       }
-
-       //
-       // when the user had changed the transference Function
-       //
-       
-       //setting variables if the user wants to do refresh
-       
-       hDlg->setCTF(ctfun);
-       hDlg->setMPR3Dview(_wxvtkmpr3Dview);
-       
-       if(hDlg->ShowModal()== wxID_OK )
-       {       
-               
-               // -- vtkColorTransferFunction  --
-                       ctfun->RemoveAllPoints ();
-                       //clean colors
-                       ctfunVectorPoint->clear();
-                       ctfunVectorRed->clear();
-                       ctfunVectorGreen->clear();
-                       ctfunVectorBlue->clear();
-
-                       int nCTFpoints=hDlg->getSizeBarColor();
-// Machete .. Ojo Eduardo
-                       i=0;    
-                       while(i<nCTFpoints)
-                       {
-                               hDlg->getDataBarColorPoint(i,xi,r,g,b);
-                               /*
-                               if (i==0)
-                               {
-                                       hDlg->getDataBarColorPoint(1,xi,r,g,b);
-                               } 
-                               if (i==nCTFpoints)
-                               {
-                                       hDlg->getDataBarColorPoint(i-1,xi,r,g,b);
-                               } 
-                               */
-                               ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
-                               ctfunVectorPoint->push_back(xi);
-                               ctfunVectorRed->push_back(r/255.0);
-                               ctfunVectorGreen->push_back(g/255.0);
-                               ctfunVectorBlue->push_back(b/255.0);
-                               i++;
-                               
-                       }
-                       
-       }
-       
-       else
-       {
-               
-               if(hDlg->getRefreshed())
-               {
-                       // -- vtkColorTransferFunction  --
-                       ctfun->RemoveAllPoints ();
-                       
-                       int i=0;
-                       int size=ctfunVectorPoint->size();
-                       
-                       for(i=0;i<size;i++)
-                       {
-                               double grey2=(*ctfunVectorPoint)[i];
-                               double red =(*ctfunVectorRed)[i];
-                               double green =(*ctfunVectorGreen)[i];
-                               double blue = (*ctfunVectorBlue)[i];
-                               ctfun->AddRGBPoint(grey2,red,green,blue);
-                       }
-                }      
-                
-       }
-
- hDlg->Destroy();
-}
-
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(wxCommandEvent& event)
-{
-       _wxvtkmpr3Dview->VisibleImageActor(0, event.IsChecked() );
-       _wxvtkmpr3Dview->Refresh();
-
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-
-       try{
-               _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }catch(char* e){
-               std::cout<<e<<std::endl;
-       }
-
-}
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(wxCommandEvent& event)
-{
-       _wxvtkmpr3Dview->VisibleImageActor(1, event.IsChecked() );
-       _wxvtkmpr3Dview->Refresh();
-
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
-}
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
-{
-       _wxvtkmpr3Dview->VisibleImageActor(2, event.IsChecked() );
-       _wxvtkmpr3Dview->Refresh();
-
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ(wxCommandEvent& event)
-{
-       _wxvtkmpr3Dview->VisiblePointWidget(event.IsChecked());
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
-{
-       _wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
-}
-
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnPositionX(wxScrollEvent& event)
-{
-       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX( _positionX->GetValue() );
-       _wxvtkmpr3Dview->RefreshView();
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-}
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
-{
-       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( _positionY->GetValue() );
-       _wxvtkmpr3Dview->RefreshView();
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-}
-//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
-{
-       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( _positionZ->GetValue() );
-       _wxvtkmpr3Dview->RefreshView();
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, wxVtkClipping3DView *wxvtkclipping3Dview )
-: wxPanel(parent, -1)
-{
-       wxPanel *panel  = this;
-       _wxvtkclipping3Dview    = wxvtkclipping3Dview;
-
-//EEDx2.6
-//     wxStaticText    *text1                  = new wxStaticText(panel, -1,_T("          "));
-//     wxStaticText    *text2                  = new wxStaticText(panel, -1,_T("  "));
-
-                                       _surfA                  = new wxRadioButton(panel,-1,_T("A"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
-                                       _surfB                  = new wxRadioButton(panel,-1,_T("B"));
-                                       _surfC                  = new wxRadioButton(panel,-1,_T("C"));
-                                       _surfD                  = new wxRadioButton(panel,-1,_T("D"));
-
-       wxCheckBox              *ckVolum                = new wxCheckBox(panel,-1,_T("Vol"));
-       wxCheckBox              *ckBoxSurface   = new wxCheckBox(panel,-1,_T("Surface Box"));
-       wxCheckBox              *ckBoxVolume    = new wxCheckBox(panel,-1,_T("Volume Box"));
-
-                                       _color                  = new wxButton(panel,-1,_T(""));
-                                       _visible                = new wxCheckBox(panel,-1,_T("Vis"));
-                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL | wxSL_LABELS);
-
-       wxStaticText    *isoValueTitle  = new wxStaticText(panel,-1,_T("isoValue"));
-                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
-
-
-                                       _wireFrameRep   = new wxRadioButton(panel,-1,_T("WireFrame"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
-                                       _surfaceRep             = new wxRadioButton(panel,-1,_T("Surface"));
-
-
-       double range[2];
-       vtkImageData *vtkimagedata = wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-       vtkimagedata->GetScalarRange( range );
-       _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
-       _isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) );
-
-
-       _isoValue->SetTickFreq(25,0);
-
-       _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
-       _isoValueSpin->SetRange(1,8);
-       _isoValueSpin->SetValue(5);
-       Connect(_isoValueSpin->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin ); 
-
-       wxButton *btnSTL                                = new wxButton(panel,-1,_T("Create STL File"));
-       wxButton *btnSaveRaw                    = new wxButton(panel,-1,_T("Save Raw Volume"));
-
-       wxButton *btnVolumeFunctions    = new wxButton(panel,-1,_T("Read Volume Functions"));
-
-
-       Connect(btnSTL->GetId()                         , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL    ); 
-       Connect(btnSaveRaw->GetId()                     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume    ); 
-       Connect(btnVolumeFunctions->GetId()     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions  ); 
-
-
-       wxButton *btnMeshVTKLoad        = new wxButton(panel,-1,_T("Load Mesh"));
-       Connect(btnMeshVTKLoad->GetId() , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad      ); 
-
-
-/*
-       int maxX = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionX();
-       int maxY = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionY();
-       int maxZ = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionZ();
-       wxCheckBox              *ckBoxX                 = new wxCheckBox(panel,-1,"X");
-                                       _positionX              = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
-       wxCheckBox              *ckBoxY                 = new wxCheckBox(panel,-1,"Y");
-                                       _positionY              = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
-       wxCheckBox              *ckBoxZ                 = new wxCheckBox(panel,-1,"Z");
-                                       _positionZ              = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
-*/
-
-//     ckVolum->Enable(false);
-       ckBoxSurface->SetValue(false);
-       ckBoxVolume->SetValue(false);
-       _color->SetSize(40,20);
-       _opacity->SetSize(370,20);
-//     ckBoxX->SetValue(true);
-//     ckBoxY->SetValue(true);
-//     ckBoxZ->SetValue(true);
-       _surfA->SetValue(true);
-       _wireFrameRep->SetValue(false);
-       _surfaceRep->SetValue(true);
-       _visible->SetValue(false);
-//     _positionX->SetSize(400,20);
-//     _positionY->SetSize(400,20);
-//     _positionZ->SetSize(400,20);
-
-       Connect(ckVolum->GetId()                , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleVolume                             );
-       Connect(ckBoxVolume->GetId()    , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume                  );
-
-       Connect(_surfA->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
-       Connect(_surfB->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
-       Connect(_surfC->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
-       Connect(_surfD->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
-       Connect(ckBoxSurface->GetId()   , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface                 );
-
-       Connect(_wireFrameRep->GetId()  , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame        );
-       Connect(_surfaceRep->GetId()    , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame        );
-
-       Connect(_color->GetId()                 , wxEVT_COMMAND_BUTTON_CLICKED            , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnColor                                             );
-       Connect(_visible->GetId()               , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleSurface                    );
-       Connect(_opacity->GetId()               , wxEVT_COMMAND_SLIDER_UPDATED            , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnOpacity                                   );
-
-//EED 27Dic2007
-//     Connect(_isoValue->GetId()              , wxEVT_COMMAND_SLIDER_UPDATED            , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValue                                  );
-       Connect(_isoValue->GetId()              , wxEVT_SCROLL_THUMBRELEASE               , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValue                                          );
-
-/*
-       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              );
-*/
-
-       wxFlexGridSizer *sizer   = new wxFlexGridSizer(1);
-       wxFlexGridSizer *sizerH0 = new wxFlexGridSizer(20);
-       wxFlexGridSizer *sizerH1 = new wxFlexGridSizer(20);
-       wxFlexGridSizer *sizerH2 = new wxFlexGridSizer(10);
-       wxFlexGridSizer *sizerH3 = new wxFlexGridSizer(10);
-       //wxFlexGridSizer *sizerH4 = new wxFlexGridSizer(10); // JPRx
-       //wxFlexGridSizer *sizerH5 = new wxFlexGridSizer(10); // JPRx
-       //wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10); // JPRx
-
-       sizerH0->Add( ckVolum                                                                   , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( ckBoxVolume                                                               , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( btnVolumeFunctions                                                , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( btnMeshVTKLoad                                                    , 1, wxALL|wxEXPAND, 0);
-
-
-       sizerH1->Add( _surfA                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( _surfB                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( _surfC                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( _surfD                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( ckBoxSurface                                                              , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( btnSTL                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( btnSaveRaw                                                                , 1, wxALL|wxEXPAND, 0);
-
-
-//     sizerH2->Add( new wxStaticText(panel, -1,_T("          ")                       , 1, wxALL|wxEXPAND, 0);
-       sizerH2->Add( _color                            , 1, wxALL|wxEXPAND, 0);
-       sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
-       sizerH2->Add( _visible                          , 1, wxALL|wxEXPAND, 0);
-       sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
-
-       
-       sizerH2->Add( _wireFrameRep                             , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0);
-       sizerH2->Add( new wxStaticText(panel, -1,_T("   "))                                     , 1, wxALL|wxEXPAND, 0);
-       sizerH2->Add( _surfaceRep                               , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0);
-       sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
-       
-       sizerH2->Add( _opacity                          , 1, wxALL|wxEXPAND, 0);
-
-
-       sizerH3->Add( isoValueTitle                     , 1, wxALL|wxEXPAND, 0);
-       sizerH3->Add( _isoValueSpin                     , 1, wxALL|wxEXPAND, 0);
-       sizerH3->Add( _isoValue                         , 1, wxALL|wxEXPAND, 0);
-
-/*
-       sizerH4->Add( ckBoxX            , 1, wxALL|wxEXPAND, 0);
-       sizerH4->Add( text2                     , 1, wxALL|wxEXPAND, 0);
-       sizerH4->Add( _positionX                , 1, wxALL|wxEXPAND, 0);
-
-       sizerH5->Add( ckBoxY            , 1, wxALL|wxEXPAND, 0);
-       sizerH5->Add( text2                     , 1, wxALL|wxEXPAND, 0);
-       sizerH5->Add( _positionY                , 1, wxALL|wxEXPAND, 0);
-
-       sizerH6->Add( ckBoxZ            , 1, wxALL|wxEXPAND, 0);
-       sizerH6->Add( text2                     , 1, wxALL|wxEXPAND, 0);
-       sizerH6->Add( _positionZ                , 1, wxALL|wxEXPAND, 0);
-*/
-       sizer->Add( sizerH0 , 1, wxALL|wxEXPAND, 2);
-       sizer->Add( sizerH1 , 1, wxALL|wxEXPAND, 2);
-       sizer->Add( sizerH2 , 1, wxALL|wxEXPAND, 2);
-       sizer->Add( sizerH3 , 1, wxALL|wxEXPAND, 2);
-//     sizer->Add( sizerH4 , 1, wxALL|wxEXPAND, 2);
-//     sizer->Add( sizerH5 , 1, wxALL|wxEXPAND, 2);
-//     sizer->Add( sizerH6 , 1, wxALL|wxEXPAND, 2);
-
-       panel->SetSize(300,60);
-       panel->SetAutoLayout(true);
-       panel->SetSizer(sizer);
-       panel->Layout();
-
-       panel->SetEventHandler((wxEvtHandler*)this);
-
-}
-//-------------------------------------------------------------------
-wxVtkClipping3DViewCntrlPanel::~wxVtkClipping3DViewCntrlPanel()
-{
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::Refresh()
-{
-//     wxPanel::Refresh();
-/*
-       _positionX->SetValue( _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetX( ) );
-       _positionY->SetValue( _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetY( ) );
-       _positionZ->SetValue( _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetZ( ) );
-*/
-}
-//-------------------------------------------------------------------
-int wxVtkClipping3DViewCntrlPanel::GetIdTissue()
-{
-       int idTissue=-1;
-       if (_surfA->GetValue()==true)
-       {
-               idTissue=0;
-       }
-       if (_surfB->GetValue()==true)
-       {
-               idTissue=1;
-       }
-       if (_surfC->GetValue()==true)
-       {
-               idTissue=2;
-       }
-       if (_surfD->GetValue()==true)
-       {
-               idTissue=3;
-       }
-
-       return idTissue;
-}
-/*
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleAxisX(wxCommandEvent& event)
-{
-       _wxvtkclipping3Dview->VisibleImageActor(0, event.IsChecked() );
-       _wxvtkclipping3Dview->Refresh();
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleAxisY(wxCommandEvent& event)
-{
-       _wxvtkclipping3Dview->VisibleImageActor(1, event.IsChecked() );
-       _wxvtkclipping3Dview->Refresh();
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
-{
-       _wxvtkclipping3Dview->VisibleImageActor(2, event.IsChecked() );
-       _wxvtkclipping3Dview->Refresh();
-}
-*/
-
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnSurface(wxCommandEvent& event)
-{
-       int idTissue=GetIdTissue();
-       if (idTissue!=-1)
-       {
-               // Color
-               vtkActor *tmpActor;
-               tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
-               double rgb[3];
-               tmpActor->GetProperty()->GetColor( rgb );
-               wxColour colour( (int)(rgb[0]*255) , (int)(rgb[1]*255) , (int)(rgb[2]*255) );
-               _color->SetBackgroundColour(colour);
-
-               // Visible
-               _visible->SetValue(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVisibleTissue(idTissue));
-
-               // Opacity
-               _opacity->SetValue( (int)(tmpActor->GetProperty()->GetOpacity()*100) );
-
-               // Representation Type  WireFrame / Surface
-               _surfaceRep->SetValue(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue)); 
-               _wireFrameRep->SetValue(!_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue)); 
-
-               // isoValue
-               int isoValue= (int)(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(idTissue));
-               _isoValue->SetValue(isoValue);
-       }
-}
-
-
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(wxCommandEvent& event)
-{
-       int idTissue=GetIdTissue();
-       if (idTissue!=-1)
-       {
-               _wxvtkclipping3Dview->SetRepSurfaceWireFrame(idTissue , _surfaceRep->GetValue() );
-
-               _wxvtkclipping3Dview->Refresh();
-
-               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
-       }
-}
-
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
-{
-       _wxvtkclipping3Dview->VisibleVolumeActor( event.IsChecked()  );
-       _wxvtkclipping3Dview->Refresh();
-
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
-{
-       _wxvtkclipping3Dview->SetVisibleBoxSurface(event.IsChecked() );
-       _wxvtkclipping3Dview->Refresh();
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume(wxCommandEvent& event)
-{
-       _wxvtkclipping3Dview->SetVisibleBoxVolume(event.IsChecked() );
-       _wxvtkclipping3Dview->Refresh();
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnColor(wxCommandEvent& event)
-{
-       int idTissue=GetIdTissue();
-       if (idTissue!=-1)
-       {
-// EED 17 Janvier 2007
-               wxColourDialog dlgColour(this);
-//             dlgColour.ShowModal();
-               if( dlgColour.ShowModal( ) == wxID_OK ) 
-               {
-                       vtkActor *tmpActor;
-                       tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
-                       float r=dlgColour.GetColourData().GetColour().Red()/255;
-                       float g=dlgColour.GetColourData().GetColour().Green()/255;
-                       float b=dlgColour.GetColourData().GetColour().Blue()/255;
-                       tmpActor->GetProperty()->SetColor( r , g , b );
-                       _color->SetBackgroundColour(dlgColour.GetColourData().GetColour());
-
-                       _wxvtkclipping3Dview->Refresh();
-
-                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-               }
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
-{
-       int idTissue=GetIdTissue();
-       if (idTissue!=-1)
-       {
-               _wxvtkclipping3Dview->VisibleActor(idTissue, _visible->GetValue());
-
-               _wxvtkclipping3Dview->Refresh();
-
-               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
-{
-       int idTissue=GetIdTissue();
-       if (idTissue!=-1)
-       {
-               vtkActor *tmpActor;
-               tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
-               float opacity=_opacity->GetValue();
-               tmpActor->GetProperty()->SetOpacity( opacity/100 );
-
-               _wxvtkclipping3Dview->Refresh();
-
-               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
-}
-
-//----------------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin(wxScrollEvent& event)
-{
-       int value = _isoValue->GetValue();
-       int delta= (int)pow( 4 , _isoValueSpin->GetValue() );
-       int min=value - delta/2;
-       int max=value + delta/2;
-       if (min<0)
-       {
-               min=0;
-               max=delta;
-       }
-       _isoValue->SetRange(min,max);
-}
-
-
-//------------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnIsoValue(wxScrollEvent& event)
-{
-       wxBusyCursor wait;
-
-       int idTissue=GetIdTissue();
-       if (idTissue!=-1)
-       {
-               int isoValue=_isoValue->GetValue();
-               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->SetIsovalue(idTissue,isoValue);
-//             wxString tmpStr;
-//             tmpStr.Printf("%d",isoValue);
-       
-               _wxvtkclipping3Dview->Refresh();
-
-               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
-
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
-{
-
-       int idTissue=GetIdTissue();
-       if (idTissue==-1)
-       {
-               idTissue=0;
-       }
-
-
-       wxString dirSTL = wxGetHomeDir( ) ;
-       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
-
-       if( dialog.ShowModal( ) == wxID_OK ) 
-       {
-          
-       
-               // ------------------------------------------------------------------------
-               //  1.  GENERATE STL FILES
-               // ------------------------------------------------------------------------
-//             const char* fileprefix = "c:\\Creatis\\";
-               std::string prefix = (const char*) (dialog.GetPath().mb_str() );
-               std::string filename;
-
-               // 1.1. Se hace un filtro triangular puesto que el stl writer solo recibe poligonos triangulares.
-
-        vtkTriangleFilter *filtro = vtkTriangleFilter::New();
-
-
-               filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
-               vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
-        pdcf->SetInput( filtro->GetOutput() );
-        vtkClosePolyData *cpd = vtkClosePolyData::New();
-        cpd->SetInput( pdcf->GetOutput() );
-
-               // 1.2 se escribe a disco el archivo stl de la superficie interna
-        cpd->Update();
-        vtkSTLWriter *writer = vtkSTLWriter::New();
-        writer->SetInput( cpd->GetOutput() );
-               filename =prefix;
-        writer->SetFileName(filename.c_str());
-        writer->SetFileTypeToASCII();
-        writer->Write();
-        writer->Delete();
-
-   
-        filtro->Delete();
-        cpd->Delete();
-        pdcf->Delete();
-       }
-
-}
-
-//EED 30 Janvier 2007
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
-{
-       wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxSAVE );
-       if (dialog.ShowModal() == wxID_OK)
-       {
-               std::string directory = (const char*) (dialog.GetDirectory().mb_str() );
-               std::string filename  = (const char*) (dialog.GetFilename().mb_str() );
-               float rescalaSlope           =  1;
-               float rescalaIntercept       =  0;
-               vtkMPRBaseData *vtkmprbasedata = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData();
-               vtkImageData *vtkimagedata       = vtkmprbasedata->GetImageData();
-               int dim[3];
-               vtkimagedata->GetDimensions(dim);
-               int voi[6];
-               voi[0]=0;
-               voi[1]=dim[0];
-               voi[2]=0;
-               voi[3]=dim[1];
-               voi[4]=0;
-               voi[5]=dim[2];
-//EED 10 oct 2007 MaracasVisu pour bbMaracasvisu
-               marRAW2Files marraw2;
-               marraw2.saveVolume(directory,filename,vtkimagedata,voi,rescalaSlope,rescalaIntercept);
-       }
-}
-
-//EED 22 Fevrier 2007
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
-{
-       
-       int /*i=0,*/ xi,yi,r,g,b;  // JPRx
-       vtkColorTransferFunction* ctfun = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetColorTransferenceFunction();
-       vtkPiecewiseFunction* tfun      = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTransferencefunction();
-       std::vector<double>* gtf                = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetGreyValuesTransferenceFVector();
-       std::vector<double>* itf                = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIntensityValuesTransferenceFVector();
-       std::vector<double>* greyctf    = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetGreyValueColorsOfColorTransferenceFVector();
-       std::vector<double>* rctf               = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRedColorsOfColorTransferenceFVector();
-       std::vector<double>* gctf               = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetGreenColorsOfColorTransferenceFVector();
-       std::vector<double>* bctf               = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetBlueColorsOfColorTransferenceFVector();
-       vtkImageData *imagedata = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-
-       
-       
-       //use for update in the refresh
-       /*
-       vtkVolumeRayCastMapper* volumeMapper = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVolumeMapper();
-       vtkVolume* newvol       =this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVolumeActor();
-       */
-
-       /*
-       MMLR BORRAME 
-       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.MarVolConf"), wxOPEN);
-       if (dialog.ShowModal() == wxID_OK)
-       {
-               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions( (char *)dialog.GetPath().c_str() );
-               
-       
-       }
-       */
-
-       HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Histogram Dialog"),imagedata,1);
-       // 
-       // put in a method
-       //
-       int tfSize=gtf->size();
-               if(tfSize>0)
-               {
-                       int i=0;
-                       hDlg->erasePointsTransferenceFunction();
-                       while(i<tfSize)
-                       {
-                               double g=(*gtf)[i];
-                               double in=(*itf)[i];
-                               hDlg->addPointToTransferenceFunction(g,in*100);
-                               i++;
-                       }
-                       
-               }
-
-       int ctfSize=rctf->size();
-       if(ctfSize>0)
-       {
-               int i=0;
-                       while(i<ctfSize)
-                       {
-                               double gr=(*greyctf)[i];
-                               double r=(*rctf)[i];
-                               double g=(*gctf)[i];
-                               double b=(*bctf)[i];
-                               hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255));
-                               i++;
-                       }
-       }
-       //setting variables if the user wants to do refresh
-       hDlg->setCTF(ctfun);
-       hDlg->setTF(tfun);
-       hDlg->setClipping3DView(_wxvtkclipping3Dview);
-       /*
-       hDlg->setVolume(newvol);
-       hDlg->setVolumeMapper(volumeMapper);
-       */
-       //
-       // when the user had changed the transference Function
-       //
-       if(hDlg->ShowModal()== wxID_OK )
-       {       
-                       // -- vtkPiecewiseFunction --
-                       tfun->RemoveAllPoints();
-                       gtf->clear();
-                       itf->clear();
-               
-                       int nTFPoints=hDlg->getSizeTransferenceFunction();
-                       int i=0;
-                       while(i<nTFPoints)
-                       {
-                               hDlg->getTransferenceFunctionPoint(i,xi,yi);
-                               tfun->AddPoint( xi , yi/100.0 );
-                               gtf->push_back(xi);
-                               itf->push_back(yi/100.0);
-                               i++;
-                       }       
-                       // -- vtkColorTransferFunction  --
-                       ctfun->RemoveAllPoints ();
-                       //clean colors
-                       rctf->clear();
-                       gctf->clear();
-                       bctf->clear();
-                       greyctf->clear();
-
-                       int nCTFpoints=hDlg->getSizeBarColor();
-                       i=0;    
-                       while(i<nCTFpoints)
-                       {
-                               hDlg->getDataBarColorPoint(i,xi,r,g,b);
-                               ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
-                               rctf->push_back(r/255.0);
-                               gctf->push_back(g/255.0);
-                               bctf->push_back(b/255.0);
-                               greyctf->push_back(xi);
-                               i++;
-                       }
-                       //---------------------------------
-                       // Refreshing and sending the event
-                       //---------------------------------
-                       //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
-                       _wxvtkclipping3Dview->Refresh();
-                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-                       
-                       /*
-                       volumeMapper->Update();
-                       newvol->Update();
-                       */
-       }
-       
-       else
-       {
-               
-               if(hDlg->getRefreshed())
-               {
-                       int i=0,size;
-                       //--Transference Function----
-                       tfun->RemoveAllPoints();
-                       i=0;
-                       size=gtf->size();
-                       for(i=0;i<size;i++)
-                       {
-                               double grey1=(*gtf)[i];
-                               double  in2=(*itf)[i];
-                               tfun->AddPoint( grey1 , in2 );
-                       }
-                       
-                       // -- vtkColorTransferFunction  --
-                       ctfun->RemoveAllPoints ();
-                       
-                       i=0;
-                       size=greyctf->size();           
-                       for(i=0;i<size;i++)
-                       {
-                               double grey2=(*greyctf)[i];
-                               double red =(*rctf)[i];
-                               double green =(*gctf)[i];
-                               double blue = (*bctf)[i];
-                               ctfun->AddRGBPoint(grey2,red,green,blue);
-                       }
-               
-                       //---------------------------------
-                       // Refreshing and sending the event
-                       //---------------------------------
-                       //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
-                       _wxvtkclipping3Dview->Refresh();
-                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-                       
-                       /*
-                       volumeMapper->Update();
-                       newvol->Update();
-                       */
-                }
-                
-       }
-       //destroy the dialog
-       hDlg->Destroy();
-}
-
-//EED 23 Mai 2007
-//-------------------------------------------------------------------
-void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
-{
-       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxOPEN);
-       if (dialog.ShowModal() == wxID_OK)
-       {
-               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( (char *)dialog.GetPath().c_str() );
-               _wxvtkclipping3Dview->Refresh();
-               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-
-wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview )
-{
-       _wxvtk3Dbaseview                        =       wxvtk3Dbaseview;
-       _vtkmpr3Ddataviewer                     =       NULL;
-       _wxvtkmpr3DviewCntrlPanel       =       NULL;   
-       _myCallback=NULL;
-       _pointWidget=NULL;
-       _planeWidget=NULL;
-       _vtkplane=NULL;
-       _probe=NULL;
-       _contourMapper=NULL;
-}
-void wxVtkMPR3DView::RemoveActor(vtkActor* actor){     
-
-       _wxvtk3Dbaseview->GetRenderer()->RemoveActor(actor);    
-
-
-}
-void wxVtkMPR3DView::ResetCamera(int* ext, double* origin,double* spc){
-       if(ext == NULL){
-
-               _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();        
-               _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);      
-       }else{
-               /*double x = (spc[0])*(origin[0]+(((double)ext[1]-(double)ext[0])/2.0));                
-               double y = (spc[1])*(origin[1]+(double)ext[3]);
-               double z = (spc[2])*(origin[2]+(((double)ext[5]-(double)ext[4])/2.0));*/
-               /*double x0=(spc[0])*((double)ext[0]+origin[0]);
-               double x1=(spc[0])*((double)ext[1]+origin[0]);
-               double y0=(spc[1])*((double)ext[2]+origin[1]);
-               double y1=(spc[1])*((double)ext[3]+origin[1]);
-               double z0=(spc[2])*((double)ext[4]+origin[2]);
-               double z1=(spc[2])*((double)ext[5]+origin[2]);*/
-               double x0=(spc[0])*((double)ext[0]);
-               double x1=(spc[0])*((double)ext[1]);
-               double y0=(spc[1])*((double)ext[2]);
-               double y1=(spc[1])*((double)ext[3]);
-               double z0=(spc[2])*((double)ext[4]);
-               double z1=(spc[2])*((double)ext[5]);
-               
-               _wxvtk3Dbaseview->GetRenderer()->ResetCamera(x0,x1,y0,y1,z0,z1);
-               //_wxvtk3Dbaseview->GetCamera()->SetPosition(x,y,z);
-               _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);      
-       }
-}
-void wxVtkMPR3DView::Configure(){
-
-       _wxvtk3Dbaseview->Configure();
-       _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel();
-       
-//EED ??????  07Mai2009        
-//     _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
-
-
-       // An initial camera view is created.  The Dolly() method moves 
-       // the camera towards the FocalPoint, thereby enlarging the image.      
-       _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
-       this->ResetCamera();
-       
-
-       // Set a background color for the renderer and set the size of the
-       // render window (expressed in pixels).
-       _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
-       _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
-
-       // Note that when camera movement occurs (as it does in the Dolly()
-       // method), the clipping planes often need adjusting. Clipping planes
-       // consist of two planes: near and far along the view direction. The 
-       // near plane clips out objects in front of the plane; the far plane
-       // clips out objects behind the plane. This way only what is drawn
-       // between the planes is actually rendered.
-       _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
-
-
-       // vtkPointWidget
-       if(_myCallback!=NULL){
-               _myCallback->Delete();
-
-       }
-       _myCallback = vtkmyPWCallback_3DPointWidget::New();
-       _myCallback->SetWxVtkMPR3DView(this);
-       if(_pointWidget!=NULL){
-               _pointWidget->Delete();
-       }
-       _pointWidget = vtkPointWidget::New();
-       _myCallback->SetVtkPointWidget(_pointWidget);
-       _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); 
-       _pointWidget->SetInput( GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
-       
-       _pointWidget->AllOff();
-       
-       _pointWidget->PlaceWidget();
-//     _pointWidget->SetPosition( x,y,z ); 
-       
-//EED01 29Mars2009
-// MACOS probleme vtk-window out of wx-window  
-//     _pointWidget->On();
-       
-       _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
-
-
-// PlaneWidget
-       if(_planeWidget!=NULL){
-               _planeWidget->Delete();
-       }
-       _planeWidget = vtkPlaneWidget::New();
-       _myCallback->SetVtkPlaneWidget(_planeWidget);
-       _planeWidget->SetInput( GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
-       _planeWidget->NormalToXAxisOn();
-       _planeWidget->SetResolution(50);
-       _planeWidget->SetRepresentationToOutline();
-       int dim[3];
-       GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->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 );        
-
-       }else{
-               
-       }
-       _planeWidget->GetPolyData(_vtkplane);
-
-       
-       vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); 
-       _probe->SetSource( imageData );
-
-       
-       _contourMapper->SetScalarRange( imageData->GetScalarRange() );
-    
-       
-
-                       
-}
-//-------------------------------------------------------------------
-wxVtkMPR3DView::~wxVtkMPR3DView()
-{
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::Refresh()   // virtual
-{
-       _vtkmpr3Ddataviewer     ->      Refresh();
-       if (_wxvtkmpr3DviewCntrlPanel!=NULL)
-       {
-               _wxvtkmpr3DviewCntrlPanel->Refresh();
-       }
-
-}
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::RefreshView()   // virtual
-{
-       double spc[3];
-       this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->GetSpacing(spc);
-
-       //double nx=1,ny=0,nz=0; // JPRx
-       Refresh();
-       double x=GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetX();
-       double y=GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetY();
-       double z=GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetZ();
-
-       x=x*spc[0];
-       y=y*spc[1];
-       z=z*spc[2];
-
-       _pointWidget->SetPosition( x,y,z ); 
-
-
-       double in[3]; 
-       double normal[3];
-       vtkTransform *transform = GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetTransformOrientation();
-       in[0]=1;                in[1]=0;                        in[2]=0;
-       transform->TransformPoint(in,normal);
-       _planeWidget->SetNormal( normal[0],normal[1],normal[2] );
-
-
-       _planeWidget->SetCenter( x,y,z );
-       _planeWidget->UpdatePlacement();
-       _planeWidget->GetPolyData(_vtkplane);
-}
-//-------------------------------------------------------------------
-wxPanel* wxVtkMPR3DView::CreateControlPanel(wxWindow *parent)
-{
-       _wxvtkmpr3DviewCntrlPanel = new wxVtkMPR3DViewCntrlPanel(parent,this);
-       return _wxvtkmpr3DviewCntrlPanel;
-}
-//-------------------------------------------------------------------
-vtkMPR3DDataViewer* wxVtkMPR3DView::GetVtkMPR3DDataViewer() 
-{
-       return _vtkmpr3Ddataviewer; 
-}
-//-------------------------------------------------------------------
-wxVtk3DBaseView* wxVtkMPR3DView::GetWxvtk3Dbaseview() throw (char*)
-{
-       if(_wxvtk3Dbaseview==NULL){
-               throw "wxVtk3DBaseView* wxVtkMPR3DView::GetWxvtk3Dbaseview() _wxvtk3Dbaseview=NULL";
-       }
-       return _wxvtk3Dbaseview;
-}
-//-------------------------------------------------------------------
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible){
-       if (visible!=_vtkmpr3Ddataviewer->GetVisiblePosition(idPosition)){
-               if (visible==false){
-                       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkmpr3Ddataviewer->GetImageActor(idPosition)  );        
-               } else {
-                       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(idPosition)  );   
-               }
-               _vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible);
-       }
-}
-
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::VisiblePointWidget( bool visible )
-{
-       if (visible==true)
-       {
-               _pointWidget->On();
-       } else {
-               _pointWidget->Off();
-       }
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::VisiblePlaneWidget( bool visible )
-{
-       if (visible==true)
-       {
-               _planeWidget->On();
-               _contourPlaneActor->VisibilityOn();
-
-       } else {
-               _planeWidget->Off();
-               _contourPlaneActor->VisibilityOff();
-       }
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::SetVtkMPR3DDataViewer(vtkMPR3DDataViewer *vtkmpr3Ddataviewer)
-{
-       _vtkmpr3Ddataviewer = vtkmpr3Ddataviewer;
-}
-
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::InitOrientationPointWidget()
-{
-       this->_planeWidget->SetNormal(1,0,0);           
-}
-
-
-
-
-//-------------------------------------------------------------------
-// EED 25 Janvier 2007 testLoic
-void wxVtkMPR3DView::TestLoic1()
-{
-
-       int sizeIma     = 128;
-  double dimIma = sizeIma*2;
-
-       vtkImageData *vtkimagedata =  this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-
-       double spc[3];
-       vtkimagedata->GetSpacing(spc);
-
-       vtkimagedata->Update();
-
-
-        double p[3], n[3];
-     this->_planeWidget->GetOrigin(p);
-     this->_planeWidget->GetNormal(n);
-
-
-
-    vtkPlaneSource* pSource = vtkPlaneSource::New( );
-    pSource->SetResolution( sizeIma - 1, sizeIma - 1 );
-    pSource->SetOrigin( p[ 0 ], p[ 1 ], p[ 2 ] );
-    pSource->SetPoint1( p[ 0 ] + dimIma - 1.0, p[ 1 ], p[ 2 ] );
-    pSource->SetPoint2( p[ 0 ], p[ 1 ]+ dimIma - 1.0 , p[ 2 ] );
-    pSource->Update( );
-    pSource->SetCenter( p[ 0 ], p[ 1 ], p[ 2 ] );
-    pSource->SetNormal( n[ 0 ], n[ 1 ], n[ 2 ] );
-    pSource->Update( );
-
-    vtkProbeFilter* slices = vtkProbeFilter::New();
-    slices->SetInput( ( vtkDataSet* )pSource->GetOutput( ) );
-    slices->SetSource( vtkimagedata );
-    slices->Update( );
-    pSource->Delete( );
-
-       vtkStructuredPoints   *stPoints = vtkStructuredPoints::New();
-       stPoints -> GetPointData( )->SetScalars(  slices->GetOutput()->GetPointData()->GetScalars()  );
-       stPoints -> SetDimensions( sizeIma, sizeIma, 1 );
-       stPoints -> SetScalarType( vtkimagedata->GetScalarType() );
-       stPoints -> SetScalarTypeToShort();
-       stPoints -> Update();
-
-       vtkImageChangeInformation  *change = vtkImageChangeInformation ::New();
-       change    -> SetInput( stPoints );  
-       change    -> Update();    //important
-
-       double _range[2];
-       vtkimagedata->GetScalarRange(_range);
-   vtkWindowLevelLookupTable *_bwlookup = vtkWindowLevelLookupTable::New( );
-   _bwlookup->SetHueRange( 0 , 1 );
-   _bwlookup->SetNumberOfColors( (int)(_range[1] - _range[0] + 1) );
-   _bwlookup->SetTableRange( _range[0] , _range[1] );
-   _bwlookup->SetSaturationRange( 0 , 0 );
-   _bwlookup->SetValueRange( 0 , 1 );
-   _bwlookup->SetAlphaRange( 1 , 1 );
-   _bwlookup->Build( );
-   vtkLookupTable * _collookup = vtkLookupTable::New( );
-   _collookup->SetNumberOfColors( 256 );
-   _collookup->SetTableRange( 0 , 255 );
-   _collookup->Build( );
-   _collookup->SetTableValue( 0  , 1 , 0 , 0 , 1 );
-   _collookup->SetTableValue(128 , 0 , 0 , 1 , 1 );
-   _collookup->SetTableValue(255 , 0 , 1 , 0 , 1 );
-
-
-       vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
-       writer->SetInput( stPoints );
-       writer->SetFileName( "C:/Users/Images/temp_EED/image.mhd" );
-       writer->SetFileDimensionality( 2 );
-       writer->Write( );
-
-
-
-       vtkDataSetMapper *_3DSliceMapper = vtkDataSetMapper::New( );
-       _3DSliceMapper->SetInput(change->GetOutput( ) );
-       _3DSliceMapper->SetLookupTable( _bwlookup );
-       _3DSliceMapper->SetScalarRange( _range );
-       _3DSliceMapper->ImmediateModeRenderingOn( );
-
-       vtkActor *_3DSliceActor = vtkActor::New( );
-       _3DSliceActor->SetMapper( _3DSliceMapper );
-
- // The usual rendering stuff.
-  vtkCamera *camera = vtkCamera::New();
-      camera->SetPosition(1,1,1);
-      camera->SetFocalPoint(0,0,0);
-
-  vtkRenderer *renderer = vtkRenderer::New();
-  vtkRenderWindow *renWin = vtkRenderWindow::New();
-    renWin->AddRenderer(renderer);
-
-  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
-    iren->SetRenderWindow(renWin);
-
-  renderer->AddActor( _3DSliceActor );
-      renderer->SetActiveCamera(camera);
-      renderer->ResetCamera();
-      renderer->SetBackground(1,1,1);
-  
-  renWin->SetSize(300,300);
-
-  // interact with data
-  renWin->Render();
-  iren->Start();
-
-
-
-
-
-}
-
-//-------------------------------------------------------------------
-// EED 25 Janvier 2007 testLoic
-void wxVtkMPR3DView::TestLoic2()
-{
-/*
- vtkVectorNorm *vecMagnitude = vtkVectorNorm::New();
-                vecMagnitude->SetInput(VtkMainGrid);
-                vecMagnitude->NormalizeOff();
-                vecMagnitude->Update();
-*/
-
-        vtkPlane *slicePlane = vtkPlane::New();
-                               this->_planeWidget->GetPlane( slicePlane );
-
-                
-        vtkCutter* sliceCutter = vtkCutter::New();
-               vtkImageData *vtkimagedata =  this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-                sliceCutter->SetInput( vtkimagedata );
-                sliceCutter->SetCutFunction( slicePlane );
-
-//EED
-//        vtkLookupTable *lut = BuildHueWeightBaseMap();
-
-
-        vtkPolyDataMapper *slice = vtkPolyDataMapper::New();
-                slice->SetInput( sliceCutter->GetOutput() );
-        double range[2];
-// EED
-//                slice->Update();
-                                 vtkimagedata->GetScalarRange(range);
-//                vecMagnitude->GetOutput()->GetScalarRange( range );
-//                range[1] *= 0.7; // reduce the upper range by 30%
-//                slice->SetScalarRange( range );
-//                slice->SetLookupTable( lut );
-
-//       vtkActor *sliceActor = vtkActor::New();
-//                sliceActor->SetMapper( slice );
-
-        vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
-                contourMapper->SetInput( sliceCutter->GetOutput() );
-                contourMapper->SetScalarRange( range );
-  //              contourMapper->SetLookupTable( lut );
-
-                
-        vtkActor *contourActor = vtkActor::New();
-                contourActor->SetMapper( contourMapper );
-
-
-
- // The usual rendering stuff.
-  vtkCamera *camera = vtkCamera::New();
-      camera->SetPosition(1,1,1);
-      camera->SetFocalPoint(0,0,0);
-
-  vtkRenderer *renderer = vtkRenderer::New();
-  vtkRenderWindow *renWin = vtkRenderWindow::New();
-    renWin->AddRenderer(renderer);
-
-  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
-    iren->SetRenderWindow(renWin);
-
-  renderer->AddActor( contourActor );
-//  renderer->AddActor(cubeActor);
-      renderer->SetActiveCamera(camera);
-      renderer->ResetCamera();
-      renderer->SetBackground(1,1,1);
-  
-  renWin->SetSize(300,300);
-
-  // interact with data
-  renWin->Render();
-  iren->Start();
-
-
-}
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-wxVtkClipping3DView::wxVtkClipping3DView(wxVtk3DBaseView* wxvtk3Dbaseview)
-{
-       _wxvtk3Dbaseview                                =       wxvtk3Dbaseview;
-       _vtkclipping3Ddataviewer                =       NULL;
-       _wxvtkclipping3DviewCntrlPanel  =       NULL;
-
-       _boxWidgetVolume                                =       NULL;
-       _boxWidgetS1                                    =       NULL;
-}
-
-//-------------------------------------------------------------------
-wxVtkClipping3DView::~wxVtkClipping3DView(){
-       if (_boxWidgetVolume!=NULL)                              { _boxWidgetVolume     -> Delete();                                    }
-       if (_boxWidgetS1!=NULL)                                  { _boxWidgetS1         -> Delete();                                    }
-       if (_vtkclipping3Ddataviewer!=NULL)              { delete _vtkclipping3Ddataviewer;                     }
-       if (_wxvtkclipping3DviewCntrlPanel!=NULL){ delete _wxvtkclipping3DviewCntrlPanel;       }
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::SetVisibleBoxSurface(bool visible)
-{
-       if (visible==true){
-               _boxWidgetS1->On();
-       } else {
-               _boxWidgetS1->Off();
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::SetVisibleBoxVolume(bool visible)
-{
-       if (_boxWidgetVolume!=NULL){
-               if (visible==true){
-                       _boxWidgetVolume->On();
-               } else {
-                       _boxWidgetVolume->Off();
-               }
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::Refresh()
-{
-       _vtkclipping3Ddataviewer->Refresh();
-       if (_wxvtkclipping3DviewCntrlPanel!=NULL)
-       {
-               _wxvtkclipping3DviewCntrlPanel->Refresh();
-       }
-}
-//-------------------------------------------------------------------
-wxPanel* wxVtkClipping3DView::CreateControlPanel(wxWindow *parent)
-{
-       _wxvtkclipping3DviewCntrlPanel = new wxVtkClipping3DViewCntrlPanel(parent,this);
-       return _wxvtkclipping3DviewCntrlPanel;
-}
-//-------------------------------------------------------------------
-vtkClipping3DDataViewer* wxVtkClipping3DView::GetVtkClipping3DDataViewer()
-{
-       return _vtkclipping3Ddataviewer; 
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::VisibleActor(int idTissue, bool visTissue){
-       if (visTissue!=_vtkclipping3Ddataviewer->GetVisibleTissue(idTissue)){
-               if (visTissue==false){
-                       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );    
-               } else {
-                       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );       
-//                     _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(idTissue) );
-//                     _actor->VisibilityOn();
-               }
-               _vtkclipping3Ddataviewer->SetVisibleTissue(idTissue,visTissue);
-       }
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::SetRepSurfaceWireFrame(int idTissue , bool representationType )
-{
-       vtkActor *tmpActor;
-       tmpActor = GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
-
-       if (representationType==false){
-               tmpActor->GetProperty()->SetRepresentationToWireframe();
-       } else {
-               tmpActor->GetProperty()->SetRepresentationToSurface();
-       }
-
-       _vtkclipping3Ddataviewer->SetRepresentationType(idTissue,representationType);
-}
-
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::VisibleVolumeActor( bool visVolume){
-       if (visVolume!=_vtkclipping3Ddataviewer->GetVisibleVolume() ){
-               if (visVolume==false){
-//EED 31/03/2008                       
-//                     _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetVolumeActor()  );    
-                       _wxvtk3Dbaseview->GetRenderer()->RemoveVolume( _vtkclipping3Ddataviewer->GetVolumeActor()  );   
-               } else {
-//EED 31/03/2008                       
-//                     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetVolumeActor() );        
-                       _wxvtk3Dbaseview->GetRenderer()->AddVolume( _vtkclipping3Ddataviewer->GetVolumeActor() );       
-               }
-               _vtkclipping3Ddataviewer->SetVisibleVolume(visVolume);
-       }
-}
-//-------------------------------------------------------------------
-wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview()throw(char*)
-{
-       if(_wxvtk3Dbaseview==NULL){
-               throw "wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview() _wxvtk3Dbaseview=NULL";
-       }
-       return _wxvtk3Dbaseview;
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::Configure(){
-       _wxvtk3Dbaseview->Configure();
-
-       // Actors are added to the renderer. 
-       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );                       
-
-       _boxWidgetS1 = vtkBoxWidget::New();
-       _boxWidgetS1->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
-       _boxWidgetS1->SetPlaceFactor(1.25);
-
-
-
-       vtkStripper *stripper=_vtkclipping3Ddataviewer->GetTissueStripper(0);
-       vtkPolyData *polydata= stripper->GetOutput();
-
-       _boxWidgetS1->SetInput( polydata );
-       _boxWidgetS1->PlaceWidget();
-
-       int i;
-       for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
-       {
-               _boxWidgetS1->AddObserver( vtkCommand::InteractionEvent          , _vtkclipping3Ddataviewer->GetObserverS(i) );
-       }
-
-
-
-
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(0) );                       
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(3));                        
-
-       VisibleActor(0, false );
-       VisibleActor(1, false );
-       VisibleActor(2, false );
-       VisibleActor(3, false );
-
-       _boxWidgetS1->HandlesOn ();
-       
-//EED 29Mars2009       
-//     _boxWidgetS1->On();
-       
-       _boxWidgetS1->Off();
-
-       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
-       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(1) );
-       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(2) );
-       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(3) );
-       
-// EED 9 fev 2007
-// box Volume
-       _boxWidgetVolume = vtkBoxWidget::New();
-       _boxWidgetVolume->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
-       _boxWidgetVolume->SetPlaceFactor(1.25);
-
-       _boxWidgetVolume->SetInput( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
-       _boxWidgetVolume->PlaceWidget();
-
-       _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent              , _vtkclipping3Ddataviewer->GetObserverV() );
-
-       _boxWidgetVolume->HandlesOn ();
-       
-//EED 29Mars2009       
-//     _boxWidgetVolume->On();
-       
-       _boxWidgetVolume->Off();
-
-
-//     vtkPlanes *vtkplanes=this->GetVtkClipping3DDataViewer()->GetVolumePlanes();
-//     _boxWidgetVolume->GetPlanes( vtkplanes );
-
-
-  // An initial camera view is created.  The Dolly() method moves 
-  // the camera towards the FocalPoint, thereby enlarging the image.
-  _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
-  _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
-  _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);
-
-  // Set a background color for the renderer and set the size of the
-  // render window (expressed in pixels).
-  _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
-  _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
-
-  // Note that when camera movement occurs (as it does in the Dolly()
-  // method), the clipping planes often need adjusting. Clipping planes
-  // consist of two planes: near and far along the view direction. The 
-  // near plane clips out objects in front of the plane; the far plane
-  // clips out objects behind the plane. This way only what is drawn
-  // between the planes is actually rendered.
-  _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
-}
-//-------------------------------------------------------------------
-void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vtkclipping3Ddataviewer)
-{
-       _vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-vtkInteractorStyle3DView::vtkInteractorStyle3DView()
-{
-}
-//---------------------------------------------------------------------------
-vtkInteractorStyle3DView::~vtkInteractorStyle3DView()
-{
-}
-//---------------------------------------------------------------------------
-bool vtkInteractorStyle3DView::OnLeftDClick()
-{
-       SelectMarchibCubePoint();
-       return true;
-}
-//---------------------------------------------------------------------------
-bool vtkInteractorStyle3DView::SelectMarchibCubePoint()
-{
-       bool ok=false;
-    gtm::TVector< double > pO( 3 ), pF( 3 ), pp( 3 ), cp( 3 );
-    gtm::TVector< double > xc( 3 );
-    gtm::TVector< double > x1( 3 ), n1( 3 );
-    gtm::TVector< double > x2( 3 ), n2( 3 );
-
-       double pickPoint[ 3 ], cameraPos[ 3 ];
-       int eventrwi[2];
-       vtkPointPicker* picker = vtkPointPicker::New( );        
-       eventrwi[0]= _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
-       eventrwi[1]= _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-       vtkRenderer *pRenderer = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetRenderer();
-       picker->Pick( eventrwi[0], eventrwi[1], 0.0, pRenderer );
-       pRenderer->GetActiveCamera( )->GetPosition( cameraPos );
-       picker->GetPickPosition( pickPoint );
-       picker->Delete( );
-
-       pp( 0 ) = pickPoint[ 0 ]; pp( 1 ) = pickPoint[ 1 ]; pp( 2 ) = pickPoint[ 2 ];
-    cp( 0 ) = cameraPos[ 0 ]; cp( 1 ) = cameraPos[ 1 ]; cp( 2 ) = cameraPos[ 2 ];
-
-
-//EED 27 sep 2006  (1/2)
-//     wxVtkMPR3DView *wxvtkmpr3Dview = (wxVtkMPR3DView *)_vtkInteractorStyleBaseView->GetWxVtk3DBaseView();
-//     double spc[3];
-//     wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetSpacing(spc);
-
-
-       vtkImageData *imageData = GetWxVtkMPR3DView()->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-       int dim[3];
-       double spc[3];
-       imageData->GetDimensions(dim);
-       imageData->GetSpacing(spc);
-
-
-       vtkMarchingCubes *mcubes = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetMCubes(0);
-       
-
-       UtilVtk3DGeometriSelection utilVtk3DGeometriSelection;
-       utilVtk3DGeometriSelection.SetDimentions(dim[0],dim[1],dim[2]);
-
-       utilVtk3DGeometriSelection.SetMarchingCube(mcubes);
-
-    double fac;
-    fac = GTM_MAX( dim[0], dim[2] );
-
-
-    if( utilVtk3DGeometriSelection.FindCubePointsFromPoints(
-      pO.GetAnsiRef( ), pF.GetAnsiRef( ),
-      pp.GetAnsiRef( ), cp.GetAnsiRef( ) )  ) 
-       {
-
-               if( utilVtk3DGeometriSelection.GetPointAndNormalIntersection(
-                           x1.GetAnsiRef( ), n1.GetAnsiRef( ),
-                               pO.GetAnsiRef( ), pF.GetAnsiRef( ) ) ) 
-               {
-                   if( utilVtk3DGeometriSelection.GetPointAndNormalIntersection(
-                             x2.GetAnsiRef( ), n2.GetAnsiRef( ),
-                                ( x1 - n1 ).GetAnsiRef( ), ( x1 - ( n1 * fac ) ).GetAnsiRef( )   ) ) 
-                       {
-                               xc = ( x2 + x1 ) * 0.5;
-//EED 27 sep 2006  (2/2)
-                               this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX(xc(0)/spc[0]);
-                               this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xc(1)/spc[1]);
-                               this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xc(2)/spc[2]);
-                               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-                               this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-                               ok=true;
-                       }
-               }
-       }
-
-
-       return ok;
-}
-//-------------------------------------------------------------------
-void vtkInteractorStyle3DView::SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview )
-{
-       _wxvtkmpr3Dview = wxvtkmpr3Dview;
-}
-//-------------------------------------------------------------------
-wxVtkMPR3DView *vtkInteractorStyle3DView::GetWxVtkMPR3DView()
-{
-       return _wxvtkmpr3Dview;
-}
-//-------------------------------------------------------------------
-wxVtkClipping3DView *vtkInteractorStyle3DView::GetWxVtkClipping3DView()
-{
-       return _wxvtkclipping3Dview;
-}
-//-------------------------------------------------------------------
-void vtkInteractorStyle3DView::SetWxVtkClipping3DView( wxVtkClipping3DView *wxvtkclipping3Dview)
-{
-       _wxvtkclipping3Dview = wxvtkclipping3Dview;
-}
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-void vtkmyPWCallback_3DPointWidget::Execute(vtkObject *caller, unsigned long, void*)
-{
-       double n[3];
-       double p[3];
-       double delta = 0.000000001;
-
-       vtkInteractorStyleBaseView *isbv = _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
-
-       if (caller==_pointWidget)
-       {
-               _pointWidget->GetPosition(p);
-       }
-       if (caller==_planeWidget)
-       {
-               _planeWidget->GetCenter(p);
-               _planeWidget->GetNormal(n);
-               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetNormal(n[0],n[1],n[2]);
-       }
-
-       double spc[3];
-       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->GetSpacing(spc);
-       p[0]=p[0]/spc[0];
-       p[1]=p[1]/spc[1];
-       p[2]=p[2]/spc[2];
-
-       // Orientation change
-       if ( (fabs(n[0]-_backNormal[0])>delta) || (fabs(n[1]-_backNormal[1])>delta) || (fabs(n[2]-_backNormal[2])>delta) )
-       {
-               _backNormal[0] = n[0];
-               _backNormal[1] = n[1];
-               _backNormal[2] = n[2];
-               isbv->SetParent_refresh_waiting();
-       }
-
-       // ----------
-
-       double tx = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX();
-       double ty = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetY();
-       double tz = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetZ();
-
-       // Position Change
-       if ( (fabs(tx-p[0])>delta) || (fabs(ty-p[1])>delta) || (fabs(tz-p[2])>delta) )
-       {
-               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX( p[0] );
-               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( p[1] );
-               _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( p[2] );
-               vtkInteractorStyleBaseView *isbv = _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
-               isbv->BlockRefresh();
-               isbv->vtkInteractorStyleBaseView::OnLeftButtonDown();
-               isbv->SetParent_refresh_waiting();
-               isbv->vtkInteractorStyleBaseView::OnMouseMove();
-               isbv->UnBlockRefresh();
-       } 
-       isbv->EvaluateToRefresh();
-}
-//-------------------------------------------------------------------
-void vtkmyPWCallback_3DPointWidget::SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview )
-{
-       _wxvtkmpr3Dview=wxvtkmpr3Dview;
-}
-//-------------------------------------------------------------------
-void vtkmyPWCallback_3DPointWidget::SetVtkPointWidget( vtkPointWidget *pointWidget )
-{
-       _pointWidget=pointWidget;
-}
-//-------------------------------------------------------------------
-void vtkmyPWCallback_3DPointWidget::SetVtkPlaneWidget( vtkPlaneWidget *planeWidget )
-{
-       _planeWidget=planeWidget;
-}
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
-: wxPanel( parent, -1)
-{
-       _imageData=NULL;
-       _histogrammeVector=NULL;
-       _wxvtk3Dbaseview=NULL;
-       _wxvtkbaseView=NULL;
-       CreateInterface();
-       CreateModel();
-       Create3DViewObjects();
-}
-
-//-------------------------------------------------------------------
-wxPanelCuttingImageData::~wxPanelCuttingImageData()
-{
-
-
-       delete _modelCube;      
-       delete _modelSphere;    
-       delete _modelCylinder;  
-       _vtkcube                -> Delete();    
-       _vtksphere              -> Delete();    
-       _vtkcylinder    -> Delete();    
-       _cubeMapper             -> Delete();    
-       _sphereMapper   -> Delete();    
-       _cylinderMapper -> Delete();    
-       _cubeActor              -> Delete();    
-       _sphereActor    -> Delete();    
-       _cylinderActor  -> Delete();    
-//     _xyplot->RemoveAllInputs();     
-       _xyplot                 -> Delete();    
-       _histogrammeVector->Delete();   
-       _renplotter->Delete();
-       
-       if(_wxvtkbaseView!=NULL){
-               delete _wxvtkbaseView;
-       }
-       //delete _vtkclipping3Ddataviewer;
-       
-
-       //fclose(file);
-
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::RemoveActors()
-{
-       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _actualActor );
-}
-
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview )
-{
-       _wxvtk3Dbaseview=wxvtk3Dbaseview;
-}
-
-//-------------------------------------------------------------------
-
-void wxPanelCuttingImageData::SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer )
-{
-       this->_vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::Create3DViewObjects()
-{
-       // Sphere
-       _vtksphere              = vtkSphereSource::New();
-       _vtksphere->SetThetaResolution (20);
-       _vtksphere->SetPhiResolution (20);
-       _sphereMapper   = vtkPolyDataMapper::New();
-       _sphereMapper->SetInput( _vtksphere->GetOutput() );
-       _sphereActor    = vtkActor::New();
-       _sphereActor->SetMapper(_sphereMapper);
-       _sphereActor->SetOrigin(0, 0, 0);
-       _sphereActor->SetPosition(0, 0, 0);
-       _sphereActor->GetProperty()->SetColor(1, 0, 0);
-       _sphereActor->SetUserTransform( _modelSphere->GetVtkTransform() );      
-
-       // cube
-       _vtkcube                = vtkCubeSource::New();
-       _vtkcube->SetXLength (1);
-       _vtkcube->SetYLength (1);
-       _vtkcube->SetZLength (1);
-       _cubeMapper             = vtkPolyDataMapper::New();
-       _cubeMapper->SetInput( _vtkcube->GetOutput() );
-       _cubeActor              = vtkActor::New();
-       _cubeActor->SetMapper(_cubeMapper);
-       _cubeActor->SetOrigin(0, 0, 0);
-       _cubeActor->SetPosition(0, 0, 0);
-       _cubeActor->GetProperty()->SetColor(1, 0, 0);
-       _cubeActor->SetUserTransform( _modelCube->GetVtkTransform() );          
-
-       // cylinder
-       _vtkcylinder    = vtkCylinderSource::New();
-       _vtkcylinder->SetResolution(20);
-       _cylinderMapper = vtkPolyDataMapper::New();
-       _cylinderMapper->SetInput( _vtkcylinder->GetOutput() );
-       _cylinderActor  = vtkActor::New();
-       _cylinderActor->SetMapper(_cylinderMapper);
-       _cylinderActor->SetOrigin(0, 0, 0);
-       _cylinderActor->SetPosition(0, 0, 0);
-       _cylinderActor->GetProperty()->SetColor(1, 0, 0);
-       _cylinderActor->SetUserTransform( _modelCylinder->GetVtkTransform() );          
-
-
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::CreateModel()
-{
-       _modelCube              = new figureCuttingCubeModel();
-       _modelSphere    = new figureCuttingSphereModel();
-       _modelCylinder  = new figureCuttingCylinderModel();
-
-//     _modelCube->SetVtkTransform( _modelCube->GetVtkTransform()                      );
-//     _modelSphere->SetVtkTransform( _modelSphere->GetVtkTransform()          );
-//     _modelCylinder->SetVtkTransform( _modelCylinder->GetVtkTransform()      );
-}
-
-//-------------------------------------------------------------------
-
-void wxPanelCuttingImageData::InitHistogramme()
-{
-       double rangeA[2];
-       if (_imageData==NULL)
-       {
-               rangeA[1]=1;
-       } else {
-               _imageData->GetScalarRange(rangeA);
-       }
-       _xyplot->RemoveAllInputs();
-/*
-       if ( _histogrammeVector!=NULL )
-       {
-               _histogrammeVector -> Delete();
-       }
-*/
-       _histogrammeVector =  vtkImageData::New();
-    _histogrammeVector -> SetDimensions ( (int)(rangeA[1]),1,1 );
-    _histogrammeVector -> SetScalarTypeToUnsignedShort();
-    _histogrammeVector -> AllocateScalars();    
-    _histogrammeVector -> Update(); 
-       
-       unsigned short *p_vol = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
-       int i,size = (int) (rangeA[1]);
-       for (i=0; i < size; i++)
-       {
-               *p_vol=0;
-               p_vol++;
-       }
-       _xyplot->SetXRange(0, rangeA[1]);
-       _xyplot->SetYRange(0, 10);
-       _xyplot->AddInput( _histogrammeVector );
-}
-
-//-------------------------------------------------------------------
-wxWindow *wxPanelCuttingImageData::CreatePlotHistogrammeInterface()
-{
-       _xyplot = vtkXYPlotActor::New();
-       InitHistogramme();
-       _xyplot->GetPositionCoordinate()->SetValue(0.00, 0.00, 0);
-       _xyplot->GetPosition2Coordinate()->SetValue(1.0, 1.00, 0); //relative to Position
-       _xyplot->SetXValuesToArcLength();
-       _xyplot->SetNumberOfXLabels(6);
-
-       _xyplot->SetTitle("Histogramme");
-       _xyplot->SetXTitle("Gray level");
-       _xyplot->SetYTitle("Occurrences ");
-       _xyplot->GetProperty()->SetColor(1, 0, 0);
-       _xyplot->GetProperty()->SetPointSize(2);
-       vtkTextProperty *tprop = _xyplot->GetTitleTextProperty();
-       tprop->SetColor( 1,0,1 );
-       tprop->BoldOff ();
-       _xyplot->SetAxisTitleTextProperty(tprop);
-       _xyplot->SetAxisLabelTextProperty(tprop);
-       _xyplot->PlotPointsOn();
-       _xyplot->GetProperty()->SetPointSize(3);
-
-       _wxvtkbaseView = new wxVtkBaseView(this);
-       _wxvtkbaseView->Configure();
-
-       _renplotter = vtkRenderer::New();
-       vtkRenderWindow *renWin = _wxvtkbaseView->GetRenWin();
-       renWin->AddRenderer( _renplotter );
-       _renplotter->AddActor2D( _xyplot );
-
-       return _wxvtkbaseView->GetWxVTKRenderWindowInteractor();
-}
-
-//-------------------------------------------------------------------
-
-void wxPanelCuttingImageData::CreateInterface()
-{
-       SetSize(300,500);
-       wxBoxSizer      *topsizer               = new wxBoxSizer(wxVERTICAL);   // Principal sizer
-
-       wxBoxSizer              *sizerH0        = new wxBoxSizer(wxHORIZONTAL   );  // type of segmentation figure
-       wxBoxSizer          *sizerH2    = new wxBoxSizer(wxHORIZONTAL   );      // scale
-       wxBoxSizer              *sizerH3        = new wxBoxSizer(wxHORIZONTAL   );      // rotation
-       wxBoxSizer              *sizerH4        = new wxBoxSizer(wxHORIZONTAL   );  // intern extern
-       wxBoxSizer              *sizerH5        = new wxBoxSizer(wxHORIZONTAL   );  // Isovalue
-       wxBoxSizer              *sizerH6        = new wxBoxSizer(wxHORIZONTAL   );  // Buttons
-       wxFlexGridSizer *sizerH7        = new wxFlexGridSizer(2                 );  // Volumic information 
-
-       
-       _typeFig        = new wxChoice(this,-1);
-       _opacityFig     = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-
-       _scaleX         = new wxSlider(this,-1,6,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _scaleY         = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _scaleZ         = new wxSlider(this,-1,7,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-
-       _rotationX      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _rotationY      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _rotationZ      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-
-       _volIntern              = new wxRadioButton(this,-1, _T("Volume intern " ));
-       _volExtern              = new wxRadioButton(this,-1, _T("Volume extern " ));
-
-       _histogrammeAccumulated = new wxCheckBox(this,-1,_T("Histogramme accumulated"));
-
-       _isoValue                               = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _valueBeforeIsoValue    = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _valueAfterIsoValue             = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-
-       wxButton *btnExtract    = new wxButton(this, -1,_T("Extract"));
-
-       _infoToVo       = new wxStaticText(this,-1,_T("########################"));
-       _infoSuVoA      = new wxStaticText(this,-1,_T("############"));
-       _infoSuVo       = new wxStaticText(this,-1,_T("############"));
-       _infoPixLe      = new wxStaticText(this,-1,_T("############"));
-       _infoPixHi      = new wxStaticText(this,-1,_T("############"));
-
-
-       
-
-       _typeFig->Append(_T("Cylindre"));
-       _typeFig->Append(_T("Cube"));
-       _typeFig->Append(_T("Sphere"));
-       _typeFig->SetSelection(0);
-       _volIntern->SetValue(true);
-
-       Connect(_typeFig->GetId()                               , wxEVT_COMMAND_CHOICE_SELECTED         , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTypeFig ); 
-
-       Connect(_opacityFig->GetId()                    , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnOpacityFig ); 
-       Connect(_rotationX->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
-       Connect(_rotationY->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
-       Connect(_rotationZ->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
-       Connect(_scaleX->GetId()                                , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
-       Connect(_scaleY->GetId()                                , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
-       Connect(_scaleZ->GetId()                                , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
-       Connect(btnExtract->GetId()                             , wxEVT_COMMAND_BUTTON_CLICKED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnExtract   ); 
-        
-
-//     wxStaticText *text=new wxStaticText(this,-1, " ");
-
-       sizerH0 -> Add( new wxStaticText(this,-1, _T("Fig. Type:   "),wxDefaultPosition, wxSize(50,20)) ,1,wxALL  ,0);
-       sizerH0 -> Add( _typeFig                ,1,wxALL  ,0);
-       sizerH0 -> Add( _opacityFig             ,1,wxALL|wxEXPAND  ,0);
-
-       sizerH2 -> Add( new wxStaticText(this,-1,_T("Scale :   "))              ,1,wxALL  ,0);
-       sizerH2 -> Add( _scaleX         ,1,wxALL | wxEXPAND ,0 );
-       sizerH2 -> Add( _scaleY         ,1,wxALL | wxEXPAND ,0 );
-       sizerH2 -> Add( _scaleZ         ,1,wxALL | wxEXPAND ,0 );
-
-       sizerH3 -> Add( new wxStaticText(this,-1,_T("Rotation :   "))   ,1,wxALL  ,0);
-       sizerH3 -> Add( _rotationX      ,1,wxALL | wxEXPAND ,0 );
-       sizerH3 -> Add( _rotationY      ,1,wxALL | wxEXPAND ,0 );
-       sizerH3 -> Add( _rotationZ      ,1,wxALL | wxEXPAND ,0 );
-
-
-       sizerH4 -> Add( new wxStaticText(this,-1,_T("Intern / Extern :   "))    ,1,wxALL  ,0);
-       sizerH4 -> Add( _volIntern                                              ,1,wxALL  ,0);
-       sizerH4 -> Add( new wxStaticText(this,-1, _T(" "))      ,1,wxALL  ,0);
-       sizerH4 -> Add( _volExtern                                              ,1,wxALL  ,0);
-
-       sizerH5 -> Add( new wxStaticText(this,-1,_T("Isovalue   "))     ,1,wxALL  ,0);
-       sizerH5 -> Add( _isoValue                                               ,1,wxALL | wxEXPAND ,0 );
-       sizerH5 -> Add( _valueBeforeIsoValue                    ,1,wxALL | wxEXPAND ,0 );
-       sizerH5 -> Add( _valueAfterIsoValue                             ,1,wxALL | wxEXPAND ,0 );
-
-       sizerH6 -> Add( new wxStaticText(this,-1, _T(" "))              ,1,wxALL  ,0);
-       sizerH6 -> Add( btnExtract      ,1,wxALL  ,0);
-
-       sizerH7 -> Add( new wxStaticText(this,-1,_T("Total Volume: "), wxDefaultPosition, wxSize(200,12))                       , 1 , wxALL  ,0);
-       sizerH7 -> Add( _infoToVo                                                                               , 1 , wxALL  ,0);
-       sizerH7 -> Add( new wxStaticText(this,-1,_T("SubVolume:   "), wxDefaultPosition, wxSize(200,12) )               , 1 , wxALL  ,0);
-       sizerH7 -> Add( _infoSuVo                                                                               , 1 , wxALL  ,0);
-       sizerH7 -> Add( new wxStaticText(this,-1,_T("SubVolume (ana.): "), wxDefaultPosition, wxSize(200,12))   , 1 , wxALL  ,0);
-       sizerH7 -> Add( _infoSuVoA                                                                              , 1 , wxALL  ,0);
-       sizerH7 -> Add( new wxStaticText(this,-1,_T("Pix < isovalue:   ") , wxDefaultPosition, wxSize(200,12))  , 1 , wxALL  ,0);
-       sizerH7 -> Add( _infoPixLe                                                                              , 1 , wxALL  ,0);
-       sizerH7 -> Add( new wxStaticText(this,-1,_T("Pix > isovalue: "), wxDefaultPosition, wxSize(200,12))     , 1 , wxALL  ,0);
-       sizerH7 -> Add( _infoPixHi                                                                              , 1 , wxALL  ,0);
-//     sizerH7 -> SetMinSize(300, 120);
-
-       // Figure type
-       topsizer -> Add( sizerH0 ,1,wxALL|wxEXPAND  ,0);
-
-       // Scale
-       topsizer -> Add( sizerH2 ,1,wxALL|wxEXPAND  ,0);
-
-       // Rotation
-       topsizer -> Add( sizerH3 ,1,wxALL|wxEXPAND  ,0);
-
-       // Intern / Extern
-       topsizer -> Add( sizerH4 ,1,wxALL  ,0);
-
-
-       // Isovalue limite
-       topsizer -> Add( sizerH5 ,1,wxALL |wxEXPAND ,0);
-
-       // btn Extraction
-       topsizer -> Add( sizerH6        , 1 , wxALL  ,0);
-
-       // Histograme
-       topsizer -> Add( _histogrammeAccumulated ,1,  wxALL  ,0);
-
-       // Volumic information
-       topsizer -> Add( sizerH7                                , 1 , wxALL|wxEXPAND   ,0);
-
-
-
-//    wxBoxSizer *sizerHor = new wxBoxSizer(wxHORIZONTAL);
-    wxBoxSizer *sizerHor = new wxBoxSizer(wxVERTICAL);
-       sizerHor -> Add( topsizer                               , 1 , wxALL | wxEXPAND  ,0);
-
-
-       wxWindow *panelPlotHistogramme = CreatePlotHistogrammeInterface();
-       sizerHor -> Add( panelPlotHistogramme   , 1 , wxGROW  ,0);
-
-
-       this->SetAutoLayout(true);
-       this->SetSizer( sizerHor );      
-       this->Layout(); 
-//EEDxx2.4
-//     this->FitInside();
-}
-
-//-------------------------------------------------------------------
-
-void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
-{
-       wxBusyCursor wait;
-
-       bool                    inside;
-       bool                    volInt, volExt;
-       int                             xx,yy,zz;
-       unsigned short  *pOrg;
-       unsigned short  *p_histogramme;
-       int                             dim[3];
-       double                  spc[3];
-       long int                contAfter = 0;
-       long int                contBefor = 0;
-
-       double min=999999999;
-       double max=-999999999;
-
-       volExt=_volExtern->GetValue();
-       volInt=_volIntern->GetValue();
-       int isoValue                = _isoValue->GetValue();
-       int valueBeforeIsoValue = _valueBeforeIsoValue->GetValue(); 
-       int valueAfterIsoValue  = _valueAfterIsoValue ->GetValue(); 
-
-       InitHistogramme();
-       p_histogramme = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
-
-       _imageData->GetDimensions(dim);    
-       _imageData->GetSpacing(spc);    
-       _actualCuttingModel->CalculeInversMatrix();
-
-       for (xx=0;xx<dim[0]; xx++)
-       {
-               for (yy=0;yy<dim[1]; yy++)
-               {
-                       for (zz=0;zz<dim[2];zz++)
-                       {
-                               inside=_actualCuttingModel->IfPointInside(xx,yy,zz);
-                               if (  ((inside==true)&&(volInt==true)) || ((!inside==true)&&(volExt==true)) )
-                               {
-                                       pOrg=(unsigned short*)_imageData->GetScalarPointer (xx,yy,zz); 
-
-                                       if ((*pOrg)<isoValue)
-                                       {
-                                               contBefor++;
-                                               if (valueBeforeIsoValue!=-1)
-                                               {
-                                                       *pOrg=valueBeforeIsoValue;
-                                               }
-                                       } else {
-                                               contAfter++;
-                                               if (valueAfterIsoValue!=-1)
-                                               {
-                                                       *pOrg=valueAfterIsoValue;
-                                               } // if
-                                       } // if isovalue
-
-                                       p_histogramme[*pOrg]++;
-                                       if (*pOrg<min) min=*pOrg; 
-                                       if (*pOrg>max) max=*pOrg; 
-                               } // if inside
-                       } // for zz
-               } // for yy
-       } // for xx
-
-
-       // Information
-       wxString infoToVo;
-       wxString infoSuVo;
-       wxString infoSuVoA;
-       wxString infoPixLe;
-       wxString infoPixHi;
-
-       double volumeUnit = spc[0]*spc[1]*spc[2];
-       long int totalSubVolume = contBefor + contAfter;
-       double contBeforPorc    = 100*(double)contBefor/(double)totalSubVolume;
-       double contAfterPorc    = 100*(double)contAfter/(double)totalSubVolume;
-       infoToVo.Printf(_T("%dx%dx%d = %d"),dim[0],dim[1],dim[2], dim[0]*dim[1]*dim[2] );
-       infoSuVo.Printf(_T("%ld") , totalSubVolume);
-       infoSuVoA.Printf(_T("%.2f"), _actualCuttingModel->GetTheoricVolume() );
-       infoPixLe.Printf(_T("%ld pix.   (%.2f %s)  -  %.2f mm^3"),contBefor, contBeforPorc ,_T("%"),contBefor*volumeUnit);
-       infoPixHi.Printf(_T("%ld pix.   (%.2f %s)  -  %.2f mm^3"),contAfter, contAfterPorc ,_T("%"),contAfter*volumeUnit);
-
-       _infoToVo->SetLabel(infoToVo);
-       _infoSuVo->SetLabel(infoSuVo);
-       _infoSuVoA->SetLabel(infoSuVoA);
-       _infoPixLe->SetLabel(infoPixLe);
-       _infoPixHi->SetLabel(infoPixHi);
-
-       // Histogram
-       if ( _histogrammeAccumulated->GetValue()==true )
-       {
-               int dimHist[3];
-               _histogrammeVector -> GetDimensions ( dimHist );
-
-               int i,size=dimHist[0];
-               for (i=1; i<=size; i++)
-               {
-                       p_histogramme[i] = p_histogramme[i] + p_histogramme[i-1];
-               }
-       }
-       double range[2];
-       _histogrammeVector->Update();
-       _histogrammeVector->GetScalarRange(range);
-       _xyplot->SetYRange( 0   , range[1]      );
-       _xyplot->SetXRange( min , max           );
-
-       _vtkclipping3Ddataviewer->RefreshSurface();
-       _wxvtkbaseView->Refresh();
-
-//     _wxvtkbaseView->RefreshView();
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-}
-
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::OnTypeFig(wxCommandEvent& event)
-{
-       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _actualActor );
-
-       if (_typeFig->GetSelection()==0){
-               _actualCuttingModel=_modelCylinder;
-               _actualActor=_cylinderActor;
-       }
-       if (_typeFig->GetSelection()==1){
-               _actualCuttingModel=_modelCube;
-               _actualActor=_cubeActor;
-       }
-       if (_typeFig->GetSelection()==2){
-               _actualCuttingModel=_modelSphere;
-               _actualActor=_sphereActor;
-       }
-       _wxvtk3Dbaseview->GetRenderer()->AddActor( _actualActor );
-       RefreshOpacity();
-       RefreshView();
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::RefreshOpacity()
-{
-       double op= _opacityFig->GetValue()/100.0;
-       _actualActor->GetProperty()->SetOpacity( op );
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::OnOpacityFig(wxScrollEvent& event)
-{
-       RefreshOpacity();
-       Refresh();
-}
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::RefreshView()
-{
-       SetParamsOfTransformation( );
-       Refresh();
-}
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::Refresh()
-{
-       _wxvtk3Dbaseview->Refresh();
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::SetParamsOfTransformation( )
-{
-       double spc[3];
-       vtkImageData *vtkimagedata = _vtkmprbasedata->GetImageData();
-       vtkimagedata->GetSpacing(spc);
-       int px = (int) (_vtkmprbasedata->GetX() );
-       int py = (int) (_vtkmprbasedata->GetY() );
-       int pz = (int) (_vtkmprbasedata->GetZ() );
-       int sx = (int) (_scaleX->GetValue() * spc[0] );
-       int sy = (int) (_scaleY->GetValue() * spc[1] );
-       int sz = (int) (_scaleZ->GetValue() * spc[2] );
-       _actualCuttingModel     -> SetScale             ( sx    , sy    , sz );
-       _actualCuttingModel     -> SetPosition  ( px    , py , pz       );
-       _actualCuttingModel     -> SetRotation  ( _rotationX->GetValue()        , _rotationY->GetValue() , _rotationZ->GetValue()       );
-       _actualCuttingModel     -> SetSpacing   ( spc[0]        , spc[1]    , spc[2] );
-       _actualCuttingModel     -> CalculeMatrix();
-}
-
-//-------------------------------------------------------------------
-
-void wxPanelCuttingImageData::OnTransform(wxScrollEvent& event)
-{
-       RefreshView();
-}
-
-//-------------------------------------------------------------------
-void wxPanelCuttingImageData::SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata )
-{
-       _vtkmprbasedata = vtkmprbasedata;
-       _imageData              = _vtkmprbasedata->GetImageData();
-}
-
-//-------------------------------------------------------------------
-
-void wxPanelCuttingImageData::Configure()
-{
-       _actualCuttingModel=_modelCylinder;
-       _actualActor=_cylinderActor;
-       _wxvtk3Dbaseview->GetRenderer()->AddActor( _actualActor );
-       SetParamsOfTransformation();
-       RefreshView();
-}
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-/*
-BEGIN_EVENT_TABLE( wxWidgetMesure2D , wxSplitterWindow )
-       EVT_MENU( 12121, wxWidgetMesure2D::OnRefreshView )
-END_EVENT_TABLE( );
-*/
-//-------------------------------------------------------------------
-
-wxWidgetMesure2D::wxWidgetMesure2D( wxWindow *parent )
-: wxSplitterWindow( parent , -1)
-{
-// EED 27 oct 2007
-       this->SplitHorizontally( new wxPanel(this,-1) ,  new wxPanel(this,-1), 2 );
-       this->SetMinimumPaneSize(50);
-}
-//-------------------------------------------------------------------
-wxWidgetMesure2D::~wxWidgetMesure2D()
-{
-}
-//-------------------------------------------------------------------
-wxWindow *wxWidgetMesure2D::CreateWin1a(wxWindow *parent) // virtual
-{
-       wxPanel *panel = new wxPanel(parent,-1);
-
-       _cb_messuretool  = new wxCheckBox(panel,-1,_T("Active messure tool     ")); 
-       _cb_mt_visible   = new wxCheckBox(panel,-1,_T("Visibles    ")); 
-       _cb_closeContour = new wxCheckBox(panel,-1,_T("Close/Open    ")); 
-       _cb_visibleText  = new wxCheckBox(panel,-1,_T("Information    ")); 
-
-       _cb_mt_visible->SetValue(true);
-       _cb_closeContour->SetValue(true);
-       _cb_visibleText->SetValue(true);
-
-       wxFlexGridSizer *sizer = new wxFlexGridSizer(4);
-
-       sizer->Add(_cb_messuretool);
-       sizer->Add(_cb_mt_visible);
-       sizer->Add(_cb_closeContour);
-       sizer->Add(_cb_visibleText);
-
-       panel->SetAutoLayout(true);
-       panel->SetSizer(sizer);
-       panel->SetSize(400,30);
-       panel->Layout();
-//EEDxx2.4
-//     panel->FitInside();
-
-       Connect(_cb_messuretool->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnActiveMessureTool      );
-       Connect(_cb_mt_visible->GetId()   , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnVisibleMessureTool     );
-       Connect(_cb_closeContour->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnCloseContour           );
-       Connect(_cb_visibleText->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnVisibleInformation     );
-
-       return panel;
-}
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview) // virtual
-{
-       _wxvtk2Dbaseview = wxvtk2Dbaseview;
-
-       // Contorno 1
-       _manContourControl_1    = new manualContourControler();
-       _mContourModel_1                = new manualContourModel();
-       _mViewContour_1                 = new manualViewContour();
-       _mViewContour_1->SetModel( _mContourModel_1 );
-       _mViewContour_1->SetWxVtkBaseView( _wxvtk2Dbaseview );
-       _mViewContour_1->SetRange( 1 );
-
-// EED 3 oct 2006
-//     double spc[3];
-//     _wxvtk2Dbaseview->GetSpacing( spc );
-//     _mViewContour_1->SetSpacing( spc );
-
-
-
-       _manContourControl_1->SetZ( 1000 );
-       _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
-       _wxvtk2Dbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_1 );
-       _manContourControl_1->CreateNewManualContour();
-       _manContourControl_1->SetActive( false );
-       _mViewContour_1->RefreshContour();
-
-//EED 27 Oct 2007
-       
-//     this->ReplaceWindow( this->GetWindow1() ,  CreateWin1a(this) );
-//     this->ReplaceWindow( this->GetWindow2() ,  _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() );
-//     CreateWin1a(this->GetWindow1() );
-
-       wxBoxSizer *sizerA = new wxBoxSizer(wxHORIZONTAL);      
-       sizerA->Add(  CreateWin1a( this->GetWindow1()) ,1, wxGROW );
-       this->GetWindow1()->SetSizer(sizerA);
-       this->SetAutoLayout(true);
-       this->Layout();
-
-       wxBoxSizer *sizerB = new wxBoxSizer(wxHORIZONTAL);      
-       sizerB->Add(  _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor()  ,1, wxGROW );
-       this->GetWindow2()->SetSizer(sizerB);
-       this->SetAutoLayout(true);
-       this->Layout();
-
-
-//     this->SplitHorizontally( CreateWin1a(this) , _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() , 2 );
-
-
-//EEDxx2.4 
-//     this->FitInside();
-}
-
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::ActiveMessureTool(bool ok)
-{
-       _wxvtk2Dbaseview->GetInteractorStyleBaseView()->SetActiveAllInteractors(!ok);
-       _manContourControl_1->SetActive( ok );
-}
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::OnActiveMessureTool(wxCommandEvent& event)
-{
-       ActiveMessureTool( _cb_messuretool->GetValue() );
-       if ( _cb_messuretool->GetValue() == true )
-       {
-               _cb_mt_visible->SetValue(true);
-               _mViewContour_1->SetVisible( _cb_mt_visible->GetValue() );
-               _cb_closeContour->Enable(true);
-               _cb_visibleText->Enable(true);
-       } else{
-               _cb_closeContour->Enable(false);
-               _cb_visibleText->Enable(false);
-       }
-       _wxvtk2Dbaseview->Refresh();
-       _wxvtk2Dbaseview->RefreshView();
-}
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::OnVisibleMessureTool(wxCommandEvent& event)
-{
-       _cb_messuretool->SetValue( _cb_mt_visible->GetValue() );
-       if (_cb_messuretool->GetValue()==true)
-       {
-               _cb_closeContour->Enable(true);
-               _cb_visibleText->Enable(true);
-       }
-       ActiveMessureTool( _cb_messuretool->GetValue() );       
-       _mViewContour_1->SetVisible( _cb_mt_visible->GetValue() );
-       _mViewContour_1->Refresh();
-       _wxvtk2Dbaseview->Refresh();
-       _wxvtk2Dbaseview->RefreshView();
-}
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::OnCloseContour(wxCommandEvent& event)
-{
-       _mContourModel_1->SetCloseContour( _cb_closeContour->GetValue() );
-       _mViewContour_1->Refresh();
-       _wxvtk2Dbaseview->Refresh();
-       _wxvtk2Dbaseview->RefreshView();
-
-}
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::OnVisibleInformation(wxCommandEvent& event)
-{
-       _mViewContour_1->SetShowText( _cb_visibleText->GetValue() );
-       _mViewContour_1->Refresh();
-       _wxvtk2Dbaseview->Refresh();
-       _wxvtk2Dbaseview->RefreshView();
-}
-//-------------------------------------------------------------------
-void wxWidgetMesure2D::SetMesureScale(double mesureScale)
-{
-       _mViewContour_1->SetMesureScale(mesureScale);
-}
-//-------------------------------------------------------------------
-manualContourModel*    wxWidgetMesure2D::GetManualContourModel()
-{
-       return _mContourModel_1;
-}
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-wxWidgetMesure2D_Plane::wxWidgetMesure2D_Plane(wxWindow *parent)
-: wxWidgetMesure2D(parent)
-{
-       // Circle 1
-       _ptsCircle1             = NULL;
-       _circle1Actor   = NULL;
-       _circle1Mapper  = NULL;
-    _pdCircle1         = NULL;
-       // Circle 2
-       _ptsCircle2             = NULL;
-       _circle2Actor   = NULL;
-       _circle2Mapper  = NULL;
-    _pdCircle2         = NULL;
-       // line reference 1
-       _ptsLineRef1    = NULL;
-       _lineRef1Actor  = NULL;
-       _lineRef1Mapper = NULL;
-    _pdLineRef1                = NULL;
-       // line reference 2
-       _ptsLineRef2    = NULL;
-       _lineRef2Actor  = NULL;
-       _lineRef2Mapper = NULL;
-    _pdLineRef2                = NULL;
-
-}
-
-//-------------------------------------------------------------------
-
-wxWidgetMesure2D_Plane::~wxWidgetMesure2D_Plane()
-{
-       // Circle 1
-    if (       _ptsCircle1             != NULL){       _ptsCircle1                     -> Delete(); }
-    if (       _circle1Actor   != NULL){       _circle1Actor           -> Delete(); }
-    if (       _circle1Mapper  != NULL){       _circle1Mapper          -> Delete(); }
-    if (    _pdCircle1         != NULL){       _pdCircle1                      -> Delete(); }
-       // Circle 2
-    if (       _ptsCircle2             != NULL){       _ptsCircle2                     -> Delete(); }
-    if (       _circle2Actor   != NULL){       _circle2Actor           -> Delete(); }
-    if (       _circle2Mapper  != NULL){       _circle2Mapper          -> Delete(); }
-    if (    _pdCircle2         != NULL){       _pdCircle2                      -> Delete(); }
-       // line reference 1
-    if (       _ptsLineRef1    != NULL){       _ptsLineRef1            -> Delete(); }
-    if (       _lineRef1Actor  != NULL){       _lineRef1Actor          -> Delete(); }
-    if (       _lineRef1Mapper != NULL){       _lineRef1Mapper         -> Delete(); }
-     if (   _pdLineRef1                != NULL){       _pdLineRef1                     -> Delete(); }
-       // line reference 2
-    if (       _ptsLineRef2    != NULL){       _ptsLineRef2            -> Delete(); }
-    if (       _lineRef2Actor  != NULL){       _lineRef2Actor          -> Delete(); }
-    if (       _lineRef2Mapper != NULL){       _lineRef2Mapper         -> Delete(); }
-    if (    _pdLineRef2                != NULL){       _pdLineRef2                     -> Delete(); }
-}
-
-//-------------------------------------------------------------------
-
-wxWindow *wxWidgetMesure2D_Plane::CreateWin1a(wxWindow *parent) // virtual
-{
-       wxPanel *panel = new wxPanel(parent,-1);
+#include "vtkInteractorStyle3DView.h"
 
-       _cb_circle              = new wxCheckBox(panel,-1,_T("Circle        ")); 
-       _cb_line                = new wxCheckBox(panel,-1,_T("Rotation Axe ")); 
-
-
-       wxBoxSizer *sizerA = new wxBoxSizer(wxHORIZONTAL);
-       sizerA->Add(_cb_circle);
-       sizerA->Add(_cb_line);
-
-
-       wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
-       sizer->Add( sizerA );
-       sizer->Add( wxWidgetMesure2D::CreateWin1a(panel) );
-
-       panel->SetAutoLayout(true);
-       panel->SetSizer(sizer);
-       panel->SetSize(400,30);
-       panel->Layout();
-//EEDxx2.4
-//     panel->FitInside();
-
-       Connect(_cb_line->GetId()        , wxEVT_COMMAND_CHECKBOX_CLICKED         , (wxObjectEventFunction) &wxWidgetMesure2D_Plane::OnActiveLine                       );
-       Connect(_cb_circle->GetId()      , wxEVT_COMMAND_CHECKBOX_CLICKED         , (wxObjectEventFunction) &wxWidgetMesure2D_Plane::OnActiveCirlcle            );
-
-       return panel;
-}
-
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane::OnActiveCirlcle(wxCommandEvent& event)
-{
-       SetVisibleCircle( _cb_circle->GetValue() );
-       _wxvtk2Dbaseview->RefreshView();
-}
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane::SetVisibleCircle( bool ok )
-{
-       double opacity;
-       if (ok==true)
-       {
-               opacity=1;
-       } else {
-               opacity=0;
-       } 
-       _lineRef1Actor->GetProperty()->SetOpacity( opacity );
-       _lineRef2Actor->GetProperty()->SetOpacity( opacity );
-       _circle1Actor->GetProperty()->SetOpacity( opacity );
-       _circle2Actor->GetProperty()->SetOpacity( opacity );
-}
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane::OnActiveLine(wxCommandEvent& event)
-{
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_wxvtk2Dbaseview;
-       vtkplane2Dview->SetVisibleLine( _cb_line->GetValue() );
-       _wxvtk2Dbaseview->RefreshView();
-}
-
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane::ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview) // virtual
-{
-       wxWidgetMesure2D::ConfigureA(wxvtk2Dbaseview);
-       CircleLine();
-       ConfigureCircleLine();
-       SetVisibleCircle(false);        
-}
-
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane::ConfigureCircleLine()
-{
-       double ang;
-
-       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_wxvtk2Dbaseview;
-       int sizeIma = vtkplane2Dview->GetImgSize();
-
-       double i,maxPts=20;
-       double k=(360/(maxPts-1)) * (3.1416/180);
-       double x,y,r1=5,r2=10,r3=15;
-       for (i=0;i<maxPts;i++)
-       {
-               x=cos( k*i ) ;
-               y=sin( k*i ) ;
-               _ptsCircle1->SetPoint( (int)i , (sizeIma/2) + x*r1      , (sizeIma/2) + y*r1    , 1 );
-               _ptsCircle2->SetPoint( (int)i , (sizeIma/2) + x*r2      , (sizeIma/2) + y*r2    , 1 );
-       }
-
-       //
-       ang=(45) * (3.1416/180);
-       x=cos( ang ) ;
-       y=sin( ang ) ;
-       _ptsLineRef1->SetPoint( 0 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
-       
-       ang=(45+180) * (3.1416/180);
-       x=cos( ang ) ;
-       y=sin( ang ) ;
-       _ptsLineRef1->SetPoint( 1 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
-
-       //
-       ang=(135) * (3.1416/180);
-       x=cos( ang ) ;
-       y=sin( ang ) ;
-       _ptsLineRef2->SetPoint( 0 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
-       
-       ang=(135+180) * (3.1416/180);
-       x=cos( ang ) ;
-       y=sin( ang ) ;
-       _ptsLineRef2->SetPoint( 1 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
-}
-
-
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane::CircleLine()
-{
-       int i,maxPts=20;
-       vtkCellArray *lines;
-
-       vtkImageViewer2_XYZ *imageViewer2XYZ = _wxvtk2Dbaseview->_imageViewer2XYZ;
-       
-
-// Circle 1 Horizontal
-       _ptsCircle1 = vtkPoints::New();
-       _ptsCircle1->SetNumberOfPoints(maxPts);
-       lines = vtkCellArray::New();
-       lines->InsertNextCell(maxPts);
-       for (i=0;i<maxPts;i++)
-       {
-               lines->InsertCellPoint(i);
-               _ptsCircle1->SetPoint(i, 0      , 0     , 0 );
-       }
-       lines->InsertCellPoint(0);
-       _ptsCircle1->SetPoint(0, -1000  , -1000 , -1000 );
-       _ptsCircle1->SetPoint(1,  1000  ,  1000 ,  1000 );
-
-       _pdCircle1 = vtkPolyData::New();
-    _pdCircle1->SetPoints( _ptsCircle1 );
-    _pdCircle1->SetLines( lines );
-       lines->Delete();  //do not delete lines ??
-       _circle1Actor                                   =       vtkActor::New();
-    _circle1Mapper                                     =       vtkPolyDataMapper::New();
-       _circle1Mapper->SetInput(_pdCircle1);
-       _circle1Mapper->ImmediateModeRenderingOn();
-       _circle1Actor->SetMapper(_circle1Mapper);
-       _circle1Actor->GetProperty()->BackfaceCullingOn();
-       _circle1Actor->GetProperty()->SetDiffuseColor(0,0,1);
-       _circle1Actor->GetProperty()->SetLineWidth(2);
-    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _circle1Actor );
-
-// Circle 2 Horizontal
-       _ptsCircle2 = vtkPoints::New();
-       _ptsCircle2->SetNumberOfPoints(maxPts);
-       lines = vtkCellArray::New();
-       lines->InsertNextCell(maxPts);
-       for (i=0;i<maxPts;i++)
-       {
-               lines->InsertCellPoint(i);
-               _ptsCircle2->SetPoint(i, 0      , 0     , 0 );
-       }
-       _ptsCircle2->SetPoint(0, -1000  , -1000 , -1000 );
-       _ptsCircle2->SetPoint(1,  1000  ,  1000 ,  1000 );
-
-       _pdCircle2 = vtkPolyData::New();
-    _pdCircle2->SetPoints( _ptsCircle2 );
-    _pdCircle2->SetLines( lines );
-       lines->Delete();  //do not delete lines ??
-       _circle2Actor                                   =       vtkActor::New();
-    _circle2Mapper                                     =       vtkPolyDataMapper::New();
-       _circle2Mapper->SetInput(_pdCircle2);
-       _circle2Mapper->ImmediateModeRenderingOn();
-       _circle2Actor->SetMapper(_circle2Mapper);
-       _circle2Actor->GetProperty()->BackfaceCullingOn();
-       _circle2Actor->GetProperty()->SetDiffuseColor(0,0,1);
-       _circle2Actor->GetProperty()->SetLineWidth(2);
-    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _circle2Actor );
-
-// Line Referance 1
-       _ptsLineRef1 = vtkPoints::New();
-       _ptsLineRef1->SetNumberOfPoints(2);
-       _ptsLineRef1->SetPoint(0, -1000 , -1000 , -1000 );
-       _ptsLineRef1->SetPoint(1,  1000 ,  1000 ,  1000 );
-       lines = vtkCellArray::New();
-       lines->InsertNextCell(2);
-       lines->InsertCellPoint(0);
-       lines->InsertCellPoint(1);
-
-       _pdLineRef1 = vtkPolyData::New();
-    _pdLineRef1->SetPoints( _ptsLineRef1 );
-    _pdLineRef1->SetLines( lines );
-       lines->Delete();  //do not delete lines ??
-       _lineRef1Actor                                  =       vtkActor::New();
-    _lineRef1Mapper                                    =       vtkPolyDataMapper::New();
-       _lineRef1Mapper->SetInput(_pdLineRef1);
-       _lineRef1Mapper->ImmediateModeRenderingOn();
-       _lineRef1Actor->SetMapper(_lineRef1Mapper);
-       _lineRef1Actor->GetProperty()->BackfaceCullingOn();
-       _lineRef1Actor->GetProperty()->SetDiffuseColor(0,0,1);
-       _lineRef1Actor->GetProperty()->SetLineWidth(2);
-    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineRef1Actor );
-
-// Line Referance 2
-       _ptsLineRef2 = vtkPoints::New();
-       _ptsLineRef2->SetNumberOfPoints(2);
-       _ptsLineRef2->SetPoint(0, -1000 , -1000 , -1000 );
-       _ptsLineRef2->SetPoint(1,  1000 ,  1000 ,  1000 );
-       lines = vtkCellArray::New();
-       lines->InsertNextCell(2);
-       lines->InsertCellPoint(0);
-       lines->InsertCellPoint(1);
-
-       _pdLineRef2 = vtkPolyData::New();
-    _pdLineRef2->SetPoints( _ptsLineRef2 );
-    _pdLineRef2->SetLines( lines );
-       lines->Delete();  //do not delete lines ??
-       _lineRef2Actor                                  =       vtkActor::New();
-    _lineRef2Mapper                                    =       vtkPolyDataMapper::New();
-       _lineRef2Mapper->SetInput(_pdLineRef2);
-       _lineRef2Mapper->ImmediateModeRenderingOn();
-       _lineRef2Actor->SetMapper(_lineRef2Mapper);
-       _lineRef2Actor->GetProperty()->BackfaceCullingOn();
-       _lineRef2Actor->GetProperty()->SetDiffuseColor(0,0,1);
-       _lineRef2Actor->GetProperty()->SetLineWidth(2);
-    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineRef2Actor );
-
-
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
 //-------------------------------------------------------------------
-
-wxWidgetMesure2D_Plane_in_MPR::wxWidgetMesure2D_Plane_in_MPR(wxWindow *parent)
-:wxWidgetMesure2D_Plane(parent)
-{
-       _vtkplane2Dview=NULL;
-}
-
-//-------------------------------------------------------------------
-
-wxWidgetMesure2D_Plane_in_MPR::~wxWidgetMesure2D_Plane_in_MPR()
-{
-}
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane_in_MPR::OnActiveLink(wxCommandEvent& event)
-{
-       if (_vtkplane2Dview!=NULL)
-       {
-               _vtkplane2Dview->SetActive( _cb_link->GetValue() );
-               _vtkplane2Dview->Refresh();
-               _vtkplane2Dview->RefreshView();
-       }
-}
-
-
-//-------------------------------------------------------------------
-void wxWidgetMesure2D_Plane_in_MPR::SetActiveLink(bool ok)
-{
-       _cb_link->SetValue(ok);
-       if (_vtkplane2Dview!=NULL)
-       {
-               _vtkplane2Dview->SetActive( _cb_link->GetValue() );
-       }
-}
 //-------------------------------------------------------------------
-
-void wxWidgetMesure2D_Plane_in_MPR::SetVtkPlane2DView(vtkPlane2DView *vtkplane2Dview)
-{
-       _vtkplane2Dview = vtkplane2Dview;
-}
-
 //-------------------------------------------------------------------
 
-wxWindow *wxWidgetMesure2D_Plane_in_MPR::CreateWin1a(wxWindow *parent) // virtual
-{
-       wxPanel *panel = new wxPanel(parent,-1);
-
-       _cb_link                = new wxCheckBox(panel,-1,_T("LINK                    ")); 
-       _cb_link->SetValue(true);
-
-       wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
-
-       sizer->Add(_cb_link);
-
-       sizer->Add( wxWidgetMesure2D_Plane::CreateWin1a(panel) );
-
-       panel->SetAutoLayout(true);
-       panel->SetSizer(sizer);
-       panel->SetSize(400,30);
-       panel->Layout();
-
-//EEDxx2.4
-//     panel->FitInside();
-
-       Connect(_cb_link->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxWidgetMesure2D_Plane_in_MPR::OnActiveLink );
-
-       return panel;
-}
-
-
 
 
 //-------------------------------------------------------------------
@@ -6157,7 +688,7 @@ void wxMPRWidget::ConfigureVTK(){
 
        if (_wxvtk3Dbaseview_Clipping3D_BB!=NULL)
        {
-               _wxvtk3Dbaseview_Clipping3D_BB->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview );
+               ((vtkInteractorStyleBaseView*)_wxvtk3Dbaseview_Clipping3D_BB->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( vtkinteractorstyle3Dview );
        }
        
 //EED 29Mars2009
@@ -6318,296 +849,13 @@ wxVtkMPR2DView *wxMPRWidget::GetWxvtkMPR2Dview(int direction)
        return _vtkmpr2Dview[direction];
 }
 
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-wxMPRWidget2::wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize)
-: wxMPRWidget(parent,marimagedata,voxelSize)
-{
-}
-//----------------------------------------------------------------------------
-wxMPRWidget2::~wxMPRWidget2()
-{
-}
-//----------------------------------------------------------------------------
-void wxMPRWidget2::OnRefreshView(wxCommandEvent & event) // Virtual
-{      
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-    this->GetParent()->ProcessEvent(newevent1);
-}
-
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-figureCuttingModel::figureCuttingModel()
-{
-       _inversModel    = vtkTransform::New();
-       _matrixModel    = vtkTransform::New();
-       _matrixVisual   = vtkTransform::New();
-
-       _spcX=1;
-       _spcY=1;
-       _spcZ=1;
-}
-//----------------------------------------------------------------------------
-figureCuttingModel::~figureCuttingModel() // virtual
-{
-       _inversModel->Delete();
-}
-//----------------------------------------------------------------------------
-void figureCuttingModel::SetPosition(double x,double y, double z)
-{
-       _px=x;
-       _py=y;
-       _pz=z;
-}
-//----------------------------------------------------------------------------
-void figureCuttingModel::SetScale(double sx,double sy, double sz)
-{
-       _sx=sx;
-       _sy=sy;
-       _sz=sz;
-}
-//----------------------------------------------------------------------------
-void figureCuttingModel::SetRotation(double alfa,double beta, double teta)
-{
-       _alfa=alfa;
-       _beta=beta;
-       _teta=teta;
-}
-
-//----------------------------------------------------------------------------
-void figureCuttingModel::CalculeMatrix()
-{
-       _matrixModel->Identity();
-       _matrixModel->Translate(_px,_py,_pz);
-       _matrixModel->RotateY(_beta);
-       _matrixModel->RotateX(_alfa);
-       _matrixModel->RotateY(_teta);
-       _matrixModel->Scale(_sx,_sy,_sz);
-
-       _matrixVisual->Identity();
-       _matrixVisual->Translate( _px*_spcX  ,  _py*_spcY  ,  _pz*_spcZ  );
-       _matrixVisual->RotateY(_beta);
-       _matrixVisual->RotateX(_alfa);
-       _matrixVisual->RotateY(_teta);
-       _matrixVisual->Scale( _sx*_spcX  ,  _sy*_spcY  ,  _sz*_spcZ  );
-
-}
-
-
-//----------------------------------------------------------------------------
-void figureCuttingModel::CalculeInversMatrix()
-{
-       _inversModel->Identity ();
-       _inversModel->Concatenate ( _matrixModel );
-       _inversModel->Inverse();
-}
-//----------------------------------------------------------------------------
-bool figureCuttingModel::IfPointInside(double x, double y, double z) // virtual
-{
-       return true;
-}
-
-//----------------------------------------------------------------------------
-vtkTransform *figureCuttingModel::GetVtkTransform()
-{
-       return _matrixVisual;
-}
-
-//----------------------------------------------------------------------------
-//void figureCuttingModel::SetVtkTransform(vtkTransform *matrix)
-//{
-//     _matrixModel = matrix;
-//}
-
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetTheoricVolume() // virtual
-{
-       return 0;
-}
-
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetPositionX()
-{
-       return _px;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetPositionY()
-{
-       return _py;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetPositionZ()
-{
-       return _pz;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetScaleX()
-{
-       return _sx;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetScaleY()
-{
-       return _sy;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetScaleZ()
-{
-       return _sz;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetAngleAlfa()
-{
-       return _alfa;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetAngleBeta()
-{
-       return _beta;
-}
-//----------------------------------------------------------------------------
-double figureCuttingModel::GetAngleTeta()
-{
-       return _teta;
-}
-//----------------------------------------------------------------------------
-char *figureCuttingModel::GetName() // virtual
-{
-       return "--";
-}
-
-//----------------------------------------------------------------------------
-void figureCuttingModel::SetSpacing(double spcX,double spcY, double spcZ)
-{
-       _spcX = spcX;
-       _spcY = spcY;
-       _spcZ = spcZ;
-}
-
-//----------------------------------------------------------------------------
-
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-figureCuttingSphereModel::figureCuttingSphereModel()
-{
-}
-//----------------------------------------------------------------------------
-figureCuttingSphereModel::~figureCuttingSphereModel() // virtual
-{
-}
-//----------------------------------------------------------------------------
-bool figureCuttingSphereModel::IfPointInside(double x, double y, double z) // virtual
-{
-       double in[4],out[4];
-       in[0]=x;
-       in[1]=y;
-       in[2]=z;
-       in[3]=1;
-       _inversModel->MultiplyPoint (in, out);
-
-       bool result=false;
-       if (sqrt( out[0]*out[0] + out[1]*out[1] + out[2]*out[2] )<0.5 )
-       {
-               result=true;
-       }
-       return result;
-}
-//----------------------------------------------------------------------------
-double figureCuttingSphereModel::GetTheoricVolume() // virtual
-{
-       double piTMP=3.14159265;
-       return (4.0/3.0) * piTMP * (_sx/2)*(_sy/2)*(_sz/2);
-}
-//----------------------------------------------------------------------------
-char *figureCuttingSphereModel::GetName() // virtual
-{
-       return "Sphere";
-}
-
 
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-figureCuttingCubeModel::figureCuttingCubeModel()
-{
-}
-//----------------------------------------------------------------------------
-figureCuttingCubeModel::~figureCuttingCubeModel()  // virtual
-{
-}
-//----------------------------------------------------------------------------
-bool figureCuttingCubeModel::IfPointInside(double x, double y, double z) // virtual
-{
-       double in[4],out[4];
-       in[0]=x;
-       in[1]=y;
-       in[2]=z;
-       in[3]=1;
-       _inversModel->MultiplyPoint (in, out);
-
-       bool result=false;
-       if ((out[0]>-0.5) && (out[0]<0.5) && (out[1]>-0.5) && (out[1]<0.5)  && (out[2]>-0.5) && (out[2]<0.5)  )
-       {
-               result=true;
-       }
-       return result;
-}
-//----------------------------------------------------------------------------
-double figureCuttingCubeModel::GetTheoricVolume() // virtual
-{
-       return _sx * _sy * _sz;
-}
 
 //----------------------------------------------------------------------------
-char *figureCuttingCubeModel::GetName() // virtual
-{
-       return "Cube";
-}
 
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
 
-figureCuttingCylinderModel::figureCuttingCylinderModel()
-{
-}
-//----------------------------------------------------------------------------
-figureCuttingCylinderModel::~figureCuttingCylinderModel()  // virtual
-{
-}
-//----------------------------------------------------------------------------
-bool figureCuttingCylinderModel::IfPointInside(double x, double y, double z) // virtual
-{
-       double in[4],out[4];
-       in[0]=x;
-       in[1]=y;
-       in[2]=z;
-       in[3]=1;
-       _inversModel->MultiplyPoint (in, out);
-
-       bool result=false;
-       if ((sqrt( out[0]*out[0] + out[2]*out[2] )<0.5 )  && (out[1]>-0.5) && (out[1]<0.5)  )
-       {
-               result=true;
-       }
-       return result;
-}
 //----------------------------------------------------------------------------
-double figureCuttingCylinderModel::GetTheoricVolume() // virtual
-{
-       double piTMP=3.14159265;
-       return piTMP*(_sx/2)*(_sz/2)*_sy;
-}
 //----------------------------------------------------------------------------
-char *figureCuttingCylinderModel::GetName() // virtual
-{
-       return "Cylinder";
-}
 //----------------------------------------------------------------------------
 
 
index 986270a61fbc031875b4ccf24c09f93c8ef80d2f..d1d11b8ce0729341cdb374f10fc0da46a1f8731c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMPRWidget.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 15:06:42 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.10 $
 
   Copyright: (c) 2002, 2003
   License:
 #include <wx/tglbtn.h>
 #include <wx/splitter.h>
 #include "marTypes.h"
-
-class wxMPRWidget;
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorStyleSphere : public InteractorStyleMaracas
-{
-public:
-       vtkInteractorStyleSphere();
-       ~vtkInteractorStyleSphere();
-       virtual bool  OnLeftButtonUp(); 
-       virtual bool  OnLeftButtonDown(); 
-       virtual bool  OnMouseMove(); 
-       virtual bool  OnRightButtonUp();
-       virtual bool  OnRightButtonDown();
-
-private:
-       bool    _stateRotate;
-       bool    _stateRadio;
-       int     _fordwareX;
-       int     _fordwareY;
-
-       double  _radio;
-};
-
-
-
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-class idAlBeRa
-{
-public:
-       int             _id;
-       double  _radio;
-       int             _deltavoxel;
-       idAlBeRa(int id, double radio,int deltavoxel);
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxSphereView : public wxVtk2DBaseView
-{
-public:
-       wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData);
-       ~wxSphereView();
-       virtual void Configure();
-       void RotationEnd();
-       void RotationStart(double vx, double vy, bool ok_v, bool ok_ang);
-       virtual void    RefreshView();
-       virtual void    SetVoxel(double i, double j, int delta, double id, unsigned short gris);
-                       void    SetDeltaVoxel(int delta);
-                       double  GetRadio();
-                       void    SetRadio(double radio);
-                       int             GetIdOfImage(double radio);
-                       void    SetXYZtoParent(double i, double j);
-                       void    RefreshPoint();
-
-private:       
-       std::vector<idAlBeRa*> _lstId;
-
-       int                                                     _centerX;
-       int                                                     _centerY;
-       int                                                     _centerZ;
-       double                                          _radio;
-
-       double                                          _ang;
-       double                                          _vxb;
-       double                                          _vyb;
-
-       int                                                     _delta;
-
-       vtkImageData                            *_imageDataOriginal;
-       vtkImageData                            *_imageSphere;
-
-       vtkMPRBaseData                          *_vtkmprbasedata;
-       vtkInteractorStyleSphere        *_vtkinteractorstylesphere;
-
-       vtkTransform                            *_transform; 
-       vtkTransform                            *_transform1; 
-       vtkTransform                            *_transform2; 
-
-       void    FiltreImage(int id, double radio);
-       void    FiltreImageB(int id, double radio, bool ok,int deltaTMP);
-       void    DefineImageSphere();
-       void    ResetlstId();
-
-       void    InitSphere(double points[4][3]);
-       double  SphereFindCenter(double P[4][3], double cc[3]);
-       double  determinant(double a[4][4], int n);
-
-       void    GetPointSphere(double p[3],double r1,double angA,double angB);
-       void    RotatePointOverTheSphere( double pp[3], double p[3],double cc[3]);
-       void    TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image);
-};
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-class vtkInteractorStylePlane2D;
-class vtkInfoTextImageInteractorPlane2D;
-
-class vtkPlane2DView : public wxVtk2DBaseView
-{
-public:
-       vtkPlane2DView(wxWindow *parent);
-       ~vtkPlane2DView();
-       void                    Configure();
-       void                    ExtractPlane();
-       int                             GetImgSize();
-       void                    SetImgSize( int imgSize );
-
-       void                    RotationStart();
-       void                    RotationDrag(double vx, double vy,  bool ok_v, bool ok_ang);
-
-       virtual int             GetActualSlice(); 
-       virtual void    SetActualSlice(int slice);
-
-       virtual void    Refresh( );
-
-       vtkMPRBaseData                          *GetVtkmprbasedata();
-       vtkInteractorStylePlane2D       *GetInteractorstyleplane2D();
-
-       void                    SetActive(bool active);
-       void                    SetVisibleLine(bool ok);
-
-       void                    TransfromeCoordViewWorld2(double &X, double &Y, double &Z);
-
-       int                             GetMipWidth();
-       void                    SetMipWidth(int value);
-       bool                    GetMipVisualization();
-       void                    SetMipVisualization(bool ok);
-
-       void                    ResetBack();
-
-private:
-       bool                    _active;
-       int                             _mip_width;
-       bool                    _mip_visualization;
-
-       double                  _backX;
-       double                  _backY;
-       double                  _backZ;
-       double                  _backOrient[4];
-
-       double                  _ang;
-       double                  _vxb;
-       double                  _vyb;
-       double                  _n[3];   // Normal
-
-       double                  _cx;
-       double                  _cy;
-       double                  _cz;
-
-       int                             _sizeIma;
-
-       vtkImageData *  _imageResult;
-
-       // Horizontal line
-       vtkPoints                                                       *_pts;
-       vtkActor                                                        *_lineActor;
-       vtkPolyDataMapper                                       *_lineMapper;
-    vtkPolyData                                                        *_pd;
-
-    vtkProbeFilter                                             *_3Dslices;
-       vtkPlaneSource                                          *_pSource;
-       vtkStructuredPoints                                     *_stPoints;
-    vtkImageChangeInformation                  *_change;
-       vtkTransform                                            *_transform1; 
-       vtkTransform                                            *_transform2; 
-
-       vtkInteractorStylePlane2D                       *_interactorstyleplane2D;
-
-       vtkInfoTextImage                                        *_vtkInfoTextImage;
-       vtkInfoTextImageInteractorPlane2D       *_vtkInfoTextImageInteractorPlane2D;
-
-
-       void SetPSource(int sizeIma);
-       void HorizontalLine();
-       void ResetPlane();
-       void Extract_One_PlaneVTK();
-       void Extract_MIP_PlaneVTK();
-
-protected:
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInfoTextImageInteractorPlane2D : public vtkInfoTextImageInteractor{
-public:
-       vtkInfoTextImageInteractorPlane2D();
-       ~vtkInfoTextImageInteractorPlane2D();
-
-protected:
-
-       virtual bool  OnMouseMove();
-
-private:
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorStylePlane2D : public InteractorStyleMaracas 
-{
-public:
-       vtkInteractorStylePlane2D();
-       ~vtkInteractorStylePlane2D();
-       virtual bool  OnLeftButtonDown(); 
-       virtual bool  OnLeftButtonUp();
-       virtual bool  OnMouseMove(); 
-       virtual bool  OnRightButtonUp();
-       virtual bool  OnLeftDClick();
-                       bool  GetStateRotate();
-
-private:
-       bool    _stateRotate;
-
-       int     _fordwareX;
-       int     _fordwareY;
-};
-
-
-
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-
-class manualViewPerpPlaneContour : public manualViewContour
-{
-public:
-       manualViewPerpPlaneContour();
-       ~manualViewPerpPlaneContour();
-       virtual manualViewPerpPlaneContour * Clone();
-       void CopyAttributesTo( manualViewPerpPlaneContour *cloneObject );
-
-       virtual void UpdateViewPoint(int id);
-       virtual void RefreshContour();
-       virtual void TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type );
-       virtual bool ifTouchContour( int x, int y, int z);
-
-protected:
-private:
-       void FilterCordinateXYZ (double &x, double &y, double &z);
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-                               
-class vtkInteractorStyleMPRView;
-       
-class creaMaracasVisu_EXPORT wxVtkMPR2DView :  public wxVtk2DBaseView
-{
-public:
-       wxVtkMPR2DView( wxWindow *parent, int direction );
-       ~wxVtkMPR2DView();
-       void Configure();
-       virtual void                    Refresh();
-                       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);
-                       void                    MoveX(double x, double y, double z);
-                       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);
-                       void                    SetVisibleAxis(bool ok);
-
-
-private:
-
-       int                                                     _backX;
-       int                                                     _backY;
-       int                                                     _backZ;
-
-       bool                                            _visibleAxis;
-
-       int                                                     _direction;
-       vtkPoints                                       *_ptsA;
-       vtkActor                                        *_lineAActor;
-       vtkPolyDataMapper                       *_lineAMapper;
-    vtkPolyData                                        *_pdA;
-       vtkPoints                                       *_ptsB;
-       vtkActor                                        *_lineBActor;
-       vtkPolyDataMapper                       *_lineBMapper;
-    vtkPolyData                                        *_pdB;
-//     vtkInteractorStyle2DMaracas     *_interactorStyle2DMaracas; 
-       vtkInteractorStyleMPRView       *_interactorstylemprview;
-};
-
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorStyleMPRView : public InteractorStyleMaracas
-{
-public:
-       vtkInteractorStyleMPRView();
-       ~vtkInteractorStyleMPRView();
-
-       virtual bool  OnMouseMove();
-       virtual bool  OnLeftButtonDown(); 
-       virtual bool  OnLeftButtonUp();
-       virtual bool  OnLeftDClick();
-
-protected:
-/*EED Borrame
-               double  _xBack;
-               double  _yBack;
-*/
-               bool    _stateMoveAxisX;
-               bool    _stateMoveAxisY;
-               bool    _stateMoveAxisZ;
-};
-
-
-
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-class wxVtkMPR3DView;
-
-class wxVtkMPR3DViewCntrlPanel: public wxPanel
-{
-public:
-       wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview);
-       ~wxVtkMPR3DViewCntrlPanel();
-       void            OnVisibleAxisX(wxCommandEvent& event);
-       void            OnVisibleAxisY(wxCommandEvent& event);
-       void            OnVisibleAxisZ(wxCommandEvent& event);
-       void            OnPositionX(wxScrollEvent& event);
-       void            OnPositionY(wxScrollEvent& event);
-       void            OnPositionZ(wxScrollEvent& event);
-       void            OnVisibleAxisXYZ(wxCommandEvent& event);
-       void            OnVisiblePlane(wxCommandEvent& event);
-       void            OnEditColorTable(wxCommandEvent& event);
-       virtual void Refresh();
-       void            UpdateControlPanel();
-
-private:
-       wxVtkMPR3DView  *_wxvtkmpr3Dview;
-
-       wxSlider                *_opacity;
-       wxSlider                *_isoValue;
-       wxSlider                *_isoValueSpin;
-       wxStaticText    *_isoValueText;
-       wxRadioButton   *_surfA;
-       wxRadioButton   *_surfB;
-       wxRadioButton   *_surfC;
-       wxRadioButton   *_surfD;
-       wxCheckBox              *_visible;
-       wxButton                *_color;
-       wxSlider                *_positionX;
-       wxSlider                *_positionY;    
-       wxSlider                *_positionZ;
-
-       wxCheckBox              *_ckBoxXYZ;
-       wxCheckBox              *_ckBoxPlane;
-
-
-protected:
-
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-class wxVtkClipping3DView;
-
-
-
-class wxVtkClipping3DViewCntrlPanel: public wxPanel
-{
-public:
-       wxVtkClipping3DViewCntrlPanel(wxWindow *parent, wxVtkClipping3DView *_wxvtkclipping3Dview);
-       ~wxVtkClipping3DViewCntrlPanel();
-                       void    OnSurface(wxCommandEvent& event);
-                       void    OnRepresentationSurfaceWireFrame(wxCommandEvent& event);
-                       void    OnVisibleVolume(wxCommandEvent& event);
-                       void    OnVisibleBoxSurface(wxCommandEvent& event);
-                       void    OnVisibleBoxVolume(wxCommandEvent& event);
-                       void    OnColor(wxCommandEvent& event);
-                       void    OnVisibleSurface(wxCommandEvent& event);
-                       void    OnOpacity(wxScrollEvent& event);
-                       void    OnIsoValue(wxScrollEvent& event);
-                       void    OnIsoValueSpin(wxScrollEvent& event);
-       virtual void    Refresh();
-                       void    OnBtnCreateFileSTL(wxCommandEvent& event);
-                       void    OnBtnSaveRawVolume(wxCommandEvent& event);
-                       void    OnBtnVolumeFunctions(wxCommandEvent& event);
-                       void    OnBtnMeshVTKLoad(wxCommandEvent& event);
-
-
-private:
-       wxVtkClipping3DView     *_wxvtkclipping3Dview;
-       wxSlider                        *_opacity;
-       wxSlider                        *_isoValue;
-       wxSlider                        *_isoValueSpin;
-       wxRadioButton           *_surfA;
-       wxRadioButton           *_surfB;
-       wxRadioButton           *_surfC;
-       wxRadioButton           *_surfD;
-       wxCheckBox                      *_visible;
-       wxButton                        *_color;
-
-       wxRadioButton           *_wireFrameRep;
-       wxRadioButton           *_surfaceRep;
-
-       int                             GetIdTissue();
-protected:
-
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-class vtkmyPWCallback_3DPointWidget : public vtkCommand
-{
-public:
-  static vtkmyPWCallback_3DPointWidget *New() 
-    { return new vtkmyPWCallback_3DPointWidget; }
-  virtual void Execute(vtkObject *caller, unsigned long, void*);
-  vtkmyPWCallback_3DPointWidget(){}
-  void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
-  void SetVtkPointWidget( vtkPointWidget *pointWidget );
-  void SetVtkPlaneWidget( vtkPlaneWidget *planeWidget );
-private:
-
-       double                                                  _backNormal[3];
-       vtkPlaneWidget                                  *_planeWidget;
-       vtkPointWidget                                  *_pointWidget;
-       wxVtkMPR3DView *_wxvtkmpr3Dview;
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class creaMaracasVisu_EXPORT wxVtkMPR3DView
-{
-public:
-       wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview );
-       virtual ~wxVtkMPR3DView();      
-       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                            SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
-       wxPanel*                        CreateControlPanel(wxWindow *parent);
-
-       vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
-       wxVtk3DBaseView*        GetWxvtk3Dbaseview() throw (char*);
-
-       void                            InitOrientationPointWidget(); 
-
-       // EED 25 Janvier 2007 testLoic
-       void                            TestLoic1();
-       void                            TestLoic2();
-
-       void RemoveActor(vtkActor* actor);
-       void ResetCamera(int *ext=NULL, double* origin=NULL,double* spc=NULL);
-
-private:
-       wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
-       vtkMPR3DDataViewer                              *_vtkmpr3Ddataviewer;
-       wxVtkMPR3DViewCntrlPanel                *_wxvtkmpr3DviewCntrlPanel;
-
-       // Plane Widget (3D)
-       vtkPolyData                                             *_vtkplane;
-       vtkActor                                                *_contourPlaneActor;
-       vtkPlaneWidget                                  *_planeWidget;
-
-       // Point Widget (3D)
-       vtkPointWidget                                  *_pointWidget;
-       vtkmyPWCallback_3DPointWidget   *_myCallback;
-       vtkProbeFilter *_probe;
-       vtkPolyDataMapper *_contourMapper;
-
-       
-
-protected:
-};
-
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxVtkClipping3DView
-{
-public:
-       wxVtkClipping3DView( wxVtk3DBaseView* wxvtk3Dbaseview );
-       virtual ~wxVtkClipping3DView();
-       virtual void                            Refresh();
-       virtual void                            Configure();
-       void                                            SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
-       wxPanel*                                        CreateControlPanel(wxWindow *parent);
-       vtkClipping3DDataViewer*        GetVtkClipping3DDataViewer();
-
-       void                                            VisibleActor(int idTissue, bool visTissue);
-       void                                            VisibleVolumeActor( bool visVolume );
-       void                                            SetVisibleBoxSurface(bool visible);
-       void                                            SetVisibleBoxVolume(bool visible);
-       void                                            SetRepSurfaceWireFrame(int idTissue , bool typeRepresentation );
-
-       wxVtk3DBaseView*                        GetWxvtk3Dbaseview()throw(char*);
-
-private:
-       wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
-       vtkClipping3DDataViewer                 *_vtkclipping3Ddataviewer;
-       vtkBoxWidget                                    *_boxWidgetS1;
-       vtkBoxWidget                                    *_boxWidgetVolume;
-       wxVtkClipping3DViewCntrlPanel   *_wxvtkclipping3DviewCntrlPanel;
-protected:
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorStyle3DView : public InteractorStyleMaracas
-{
-public:
-       vtkInteractorStyle3DView();
-       ~vtkInteractorStyle3DView();
-
-       virtual bool                    OnLeftDClick();
-       bool                                    SelectMarchibCubePoint();
-
-
-       wxVtkMPR3DView                  *GetWxVtkMPR3DView();
-       void                                    SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
-
-       wxVtkClipping3DView             *GetWxVtkClipping3DView();
-       void                                    SetWxVtkClipping3DView( wxVtkClipping3DView *wxvtkclipping3Dview);
-
-protected:
-private:
-       wxVtkMPR3DView                  *_wxvtkmpr3Dview;
-       wxVtkClipping3DView             *_wxvtkclipping3Dview;
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class figureCuttingModel
-{
-public:
-       figureCuttingModel();
-       virtual ~figureCuttingModel();
-
-       void                    SetPosition(double x,double y, double z);
-       double                  GetPositionX();
-       double                  GetPositionY();
-       double                  GetPositionZ();
-
-       void                    SetScale(double sx,double sy, double sz);
-       double                  GetScaleX();
-       double                  GetScaleY();
-       double                  GetScaleZ();
-
-       void                    SetRotation(double alfa,double beta, double teta);
-       double                  GetAngleAlfa();
-       double                  GetAngleBeta();
-       double                  GetAngleTeta();
-
-       void                    SetSpacing(double spcX,double spcY, double spcZ);
-
-       void                    CalculeMatrix();
-       void                    CalculeInversMatrix();
-       virtual bool    IfPointInside(double x, double y, double z);
-       vtkTransform    *GetVtkTransform();
-//     void                    SetVtkTransform(vtkTransform *matrix);
-       virtual double  GetTheoricVolume();
-       virtual                 char *GetName();
-
-private:
-       double                  _px;
-       double                  _py;
-       double                  _pz;
-       double                  _alfa;
-       double                  _beta;
-       double                  _teta;
-       double                  _spcX;
-       double                  _spcY;
-       double                  _spcZ;
-protected:
-       double                  _sx;
-       double                  _sy;
-       double                  _sz;
-       vtkTransform    *_inversModel;
-       vtkTransform    *_matrixModel;
-       vtkTransform    *_matrixVisual;
-
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-class figureCuttingSphereModel : public figureCuttingModel
-{
-public:
-       figureCuttingSphereModel();
-       virtual ~figureCuttingSphereModel();
-       virtual bool IfPointInside(double x, double y, double z);
-       virtual double  GetTheoricVolume();
-       virtual char *GetName();
-private:
-protected:
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class figureCuttingCubeModel : public figureCuttingModel
-{
-public:
-       figureCuttingCubeModel();
-       virtual ~figureCuttingCubeModel();
-       virtual bool    IfPointInside(double x, double y, double z);
-       virtual double  GetTheoricVolume();
-       virtual char *GetName();
-private:
-protected:
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class figureCuttingCylinderModel : public figureCuttingModel
-{
-public:
-       figureCuttingCylinderModel();
-       virtual ~figureCuttingCylinderModel();
-       virtual bool    IfPointInside(double x, double y, double z);
-       virtual double  GetTheoricVolume();
-       virtual char *GetName();
-private:
-protected:
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxPanelCuttingImageData : public wxPanel
-{
-public:
-       wxPanelCuttingImageData (wxWindow *parent);
-       ~wxPanelCuttingImageData ();
-       void OnTransform(wxScrollEvent& event);
-       void OnOpacityFig(wxScrollEvent& event);
-       void OnTypeFig(wxCommandEvent& event);
-       void OnExtract(wxCommandEvent& event);
-       void SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata );
-       void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
-       void SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview );
-
-       void SetParamsOfTransformation( );
-       void Configure();
-       void Refresh();
-       void RefreshView();
-       void RemoveActors();
-
-
-private:
-       wxSlider                                                *_opacityFig;
-       wxSlider                                                *_scaleX;
-       wxSlider                                                *_scaleY;
-       wxSlider                                                *_scaleZ;
-       wxSlider                                                *_rotationX;
-       wxSlider                                                *_rotationY;
-       wxSlider                                                *_rotationZ;
-       
-       wxRadioButton                                   *_volIntern;
-       wxRadioButton                                   *_volExtern;
-       wxCheckBox                                              *_histogrammeAccumulated;
-       wxSlider                                                *_isoValue;
-       wxSlider                                                *_valueBeforeIsoValue;
-       wxSlider                                                *_valueAfterIsoValue;
-       wxChoice                                                *_typeFig;
-
-       wxStaticText                                    *_infoToVo;
-       wxStaticText                                    *_infoSuVo;
-       wxStaticText                                    *_infoSuVoA;
-       wxStaticText                                    *_infoPixLe;
-       wxStaticText                                    *_infoPixHi;
-
-       // Model
-       figureCuttingCylinderModel              *_modelCylinder;
-       figureCuttingCubeModel                  *_modelCube;
-       figureCuttingSphereModel                *_modelSphere;
-       figureCuttingModel                              *_actualCuttingModel;
-
-       // view
-       vtkCubeSource                                   *_vtkcube;
-       vtkSphereSource                                 *_vtksphere;
-       vtkCylinderSource                               *_vtkcylinder;
-       vtkPolyDataMapper                               *_cubeMapper;
-       vtkPolyDataMapper                               *_sphereMapper;
-       vtkPolyDataMapper                               *_cylinderMapper;
-       vtkActor                                                *_cubeActor;
-       vtkActor                                                *_sphereActor;
-       vtkActor                                                *_cylinderActor;
-       vtkActor                                                *_actualActor;
-
-
-       vtkMPRBaseData                                  *_vtkmprbasedata;
-       wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
-       vtkImageData                                    *_imageData;
-       vtkClipping3DDataViewer                 *_vtkclipping3Ddataviewer;
-
-       vtkImageData                                    *_histogrammeVector;
-       vtkXYPlotActor                                  *_xyplot;
-       wxVtkBaseView                                   *_wxvtkbaseView;
-       vtkRenderer                                             *_renplotter;
-
-       void    CreateModel();
-       void    CreateInterface();
-       void    Create3DViewObjects();
-       void    RefreshOpacity();
-       wxWindow *CreatePlotHistogrammeInterface();
-       void    InitHistogramme();
-
-
-protected:
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxWidgetMesure2D : public wxSplitterWindow
-{
-public: 
-       wxWidgetMesure2D( wxWindow *parent );
-       ~wxWidgetMesure2D();
-
-       void OnActiveMessureTool(wxCommandEvent& event);
-       void OnVisibleMessureTool(wxCommandEvent& event);
-       void OnCloseContour(wxCommandEvent& event);
-       void OnVisibleInformation(wxCommandEvent& event);
-
-       void SetMesureScale(double mesureScale);
-
-       manualContourModel*     GetManualContourModel();
-       virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
-
-protected:
-       wxVtk2DBaseView                 *_wxvtk2Dbaseview;
-       virtual wxWindow                *CreateWin1a(wxWindow *parent);
-private:
-       wxCheckBox                              *_cb_messuretool; 
-       wxCheckBox                              *_cb_mt_visible; 
-       wxCheckBox                              *_cb_closeContour; 
-       wxCheckBox                              *_cb_visibleText; 
-
-       manualContourControler  *_manContourControl_1;
-       manualContourModel              *_mContourModel_1;
-       manualViewContour               *_mViewContour_1;
-
-       void    ActiveMessureTool(bool ok);
-
-//     DECLARE_EVENT_TABLE();
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxWidgetMesure2D_Plane : public wxWidgetMesure2D
-{
-public:
-        wxWidgetMesure2D_Plane(wxWindow *parent);
-        ~wxWidgetMesure2D_Plane();
-       void                    OnActiveLine(wxCommandEvent& event);
-       void                    OnActiveCirlcle(wxCommandEvent& event);
-       virtual void    ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
-       void                    ConfigureCircleLine();
-       void                    CircleLine();
-
-protected:
-       virtual wxWindow                *CreateWin1a(wxWindow *parent);
-private:
-       wxCheckBox                              *_cb_line; 
-       wxCheckBox                              *_cb_circle; 
-
-       // Circle 1
-       vtkPoints                                       *_ptsCircle1;
-       vtkActor                                        *_circle1Actor;
-       vtkPolyDataMapper                       *_circle1Mapper;
-    vtkPolyData                                        *_pdCircle1;
-       // Circle 2
-       vtkPoints                                       *_ptsCircle2;
-       vtkActor                                        *_circle2Actor;
-       vtkPolyDataMapper                       *_circle2Mapper;
-    vtkPolyData                                        *_pdCircle2;
-       // line reference 1
-       vtkPoints                                       *_ptsLineRef1;
-       vtkActor                                        *_lineRef1Actor;
-       vtkPolyDataMapper                       *_lineRef1Mapper;
-    vtkPolyData                                        *_pdLineRef1;
-       // line reference 2
-       vtkPoints                                       *_ptsLineRef2;
-       vtkActor                                        *_lineRef2Actor;
-       vtkPolyDataMapper                       *_lineRef2Mapper;
-    vtkPolyData                                        *_pdLineRef2;
-
-       void SetVisibleCircle( bool ok );
-
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-class wxWidgetMesure2D_Plane_in_MPR : public wxWidgetMesure2D_Plane
-{
-public:
-        wxWidgetMesure2D_Plane_in_MPR(wxWindow *parent);
-        ~wxWidgetMesure2D_Plane_in_MPR();
-       void OnActiveLink(wxCommandEvent& event);
-       void SetVtkPlane2DView(vtkPlane2DView *vtkplane2Dview);
-       void SetActiveLink(bool ok);
-
-protected:
-       virtual wxWindow                *CreateWin1a(wxWindow *parent);
-private:
-       wxCheckBox                              *_cb_link; 
-       vtkPlane2DView                  *_vtkplane2Dview;
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
+#include "vtkInteractorStyleSphere.h"
+#include "idAlBeRa.h"
+
+#include "wxVtkMPR3DView.h"
+#include "wxVtkMPR2DView.h"
+#include "vtkPlane2DView.h"
+#include "wxSphereView.h"
+#include "wxVtkClipping3DView.h"
+#include "wxPanelCuttingImageData.h"
+#include "wxWidgetMesure2D_Plane_in_MPR.h"
+
+#include "wxVtk3DBaseView.h"
+
+//class wxMPRWidget;
+//class vtkInteractorStylePlane2D;
+//class vtkInfoTextImageInteractorPlane2D;
+//class vtkInteractorStyleMPRView;
+//class wxVtkMPR3DView;
+//class wxVtkClipping3DView;
 
 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
 {
@@ -1018,20 +147,6 @@ private:
        DECLARE_EVENT_TABLE( );
 };
 
-
-class creaMaracasVisu_EXPORT wxMPRWidget2 : public wxMPRWidget
-{
-public:
-       wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize);
-       ~wxMPRWidget2();
-       virtual void OnRefreshView(wxCommandEvent & event);
-private:
-protected:
-};
-
-
-
-
 #endif // __WX__MPR__WIDGET__HXX__
 
 
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx
new file mode 100644 (file)
index 0000000..89b0f9e
--- /dev/null
@@ -0,0 +1,21 @@
+
+#include "wxMPRWidget2.h"
+#include "marImageData.h"
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+wxMPRWidget2::wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize)
+: wxMPRWidget(parent,marimagedata,voxelSize)
+{
+}
+//----------------------------------------------------------------------------
+wxMPRWidget2::~wxMPRWidget2()
+{
+}
+//----------------------------------------------------------------------------
+void wxMPRWidget2::OnRefreshView(wxCommandEvent & event) // Virtual
+{      
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+    this->GetParent()->ProcessEvent(newevent1);
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.h
new file mode 100644 (file)
index 0000000..e325bdd
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef WXMPRWIDGET2_H_
+#define WXMPRWIDGET2_H_
+
+#include "wxMPRWidget.h"
+
+class creaMaracasVisu_EXPORT wxMPRWidget2 : public wxMPRWidget
+{
+public:
+       wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize);
+       ~wxMPRWidget2();
+       virtual void OnRefreshView(wxCommandEvent & event);
+private:
+protected:
+};
+
+#endif /*WXMPRWIDGET2_H_*/
index b3e42b198faf15b09e6880c9f2ac28151bbcb633..71279b87fe238898d39ac36ffce5444c0140b85a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxManualTree_MPRWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -23,6 +23,7 @@
 #include <wx/notebook.h>
 #include <wx/colordlg.h>
 
+#include "vtkInteractorStyle3DView.h"
 
 
 //-------------------------------------------------------------------
@@ -156,7 +157,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
 //EED 3 oct 2006
        _mViewContour_2->SetSpacing(spc);
 
-       wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_2 );
+       ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_2 );
 
        //
        wxvtkbaseview                   = _MPRWidget2->GetWxVtkBaseView(0,0);
@@ -170,7 +171,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
 //EED 3 oct 2006
        _mViewContour_0->SetSpacing(spc);
 
-       wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_0 );
+       ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_0 );
 
        //
        wxvtkbaseview                   = _MPRWidget2->GetWxVtkBaseView(0,1);
@@ -184,7 +185,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
 //EED 3 oct 2006
        _mViewContour_1->SetSpacing(spc);
 
-       wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_1 );
+       ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
 
 
        // perpendicular plane
@@ -200,7 +201,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _mViewContour_p->SetSpacing(spc);
 
 //     wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_p );
-       wxvtkbaseview->GetInteractorStyleBaseView()->InsertInteractorStyleMaracas( 0, _manContourControl_p );
+       ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView())->InsertInteractorStyleMaracas( 0, _manContourControl_p );
 
        vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)wxvtkbaseview;
        _manContourControl_p->SetVtkInteractorStylePlane2D( vtkplane2Dview->GetInteractorstyleplane2D() );
@@ -221,7 +222,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
        this->_marimageData->GetImageData()->GetDimensions( dim );  // image t=0
        _mViewContour_3D->SetDimensions( dim[0],dim[1],dim[2] );
        _mViewContour_3D->SetVtkMPRBaseData( _wxvtkmpr3Dview_C->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData() );
-       wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_3V3D );
+       ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_3V3D );
 
        //
        _manContourControl_0    -> SetVtkMPRBaseData( _MPRWidget2->GetVtkMPRBaseData() );
@@ -257,7 +258,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _manContourControl_3V   -> AddManualViewBaseContour( _mViewContour_0    );
        _manContourControl_3V   -> AddManualViewBaseContour( _mViewContour_1    );
        _manContourControl_3V   -> AddManualViewBaseContour( _mViewContour_p    );
-       _manContourControl_3V   -> SetVtkInteractorStyleBaseView (wxvtkbaseview->GetInteractorStyleBaseView() );
+       _manContourControl_3V   -> SetVtkInteractorStyleBaseView ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView() );
        _manContourControl_3V3D -> SetManualContour3VControler( _manContourControl_3V );
        _manContourControl_3V3D -> SetModelView( _mContourModel_2 , _mViewContour_3D );
 
@@ -269,7 +270,7 @@ void wxManualTree_MPRWidget::ConfigureContour()
        _manContourControl_3V_p -> AddManualViewBaseContour( _mViewContour_0    );
        _manContourControl_3V_p -> AddManualViewBaseContour( _mViewContour_1    );
        _manContourControl_3V_p -> AddManualViewBaseContour( _mViewContour_3D   );
-       _manContourControl_3V_p -> SetVtkInteractorStyleBaseView (wxvtkbaseview->GetInteractorStyleBaseView() );
+       _manContourControl_3V_p -> SetVtkInteractorStyleBaseView ((vtkInteractorStyleBaseView*)wxvtkbaseview->GetInteractorStyleBaseView() );
        _manContourControl_p    -> SetManualContour3VControler( _manContourControl_3V_p );
        _manContourControl_p    -> SetModelView( _mContourModel_2 , _mViewContour_p );
 
@@ -311,7 +312,7 @@ void wxManualTree_MPRWidget::ConfigureVTK(){
        vtkInteractorStyle3DView *vtkinteractorstyle3Dview      = new vtkInteractorStyle3DView();
        vtkinteractorstyle3Dview->SetWxVtkMPR3DView(_wxvtkmpr3Dview_C);
        vtkinteractorstyle3Dview->SetWxVtkClipping3DView(_wxvtkclipping3Dview_C);
-       _wxvtk3Dbaseview_Clipping3D_C->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview );
+       ((vtkInteractorStyleBaseView*)_wxvtk3Dbaseview_Clipping3D_C->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( vtkinteractorstyle3Dview );
 
        ConfigureContour();
 }
index 65b013117f8d6179279b519fe62c13028d34384a..19f01846ea6d246dfa47fa454142d6e1049c1b1c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxManualTree_MPRWidget.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
 */
 
 #include "wxMPRWidget.h"
+#include "wxMPRWidget2.h"
+#include "manualViewPerpPlaneContour.h"
 #include "../manualContour.h"
 
 #include <wx/notebook.h>
 
+#include "wxVtk3DBaseView.h"
 
 //------------------------------------------------------------------
 //------------------------------------------------------------------
index 9225874c8c3042b4afbc1ff138b6d69418f172e0..8f23ed16f7621ada4d9f21b48814d16ac19ec79a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasIRMView.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 15:06:42 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.8 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -20,6 +20,9 @@
 // EOF - wxMaracasMPR.cxx
 
 #include "wxMaracasIRMView.h"
+//#include "wxMaracasIRMViewPanel.h"
+#include "wxMaracasIRMViewProp3DMHD.h"
+#include "wxMaracasIRMViewProp3D.h"
 
 #include <wx/colordlg.h>
 #include <wx/bmpbuttn.h>
@@ -206,118 +209,10 @@ void wxMaracasIRMView::deleteActor(int propid){
        }
 }
 
-/**
-**     Implementation of viewProp3D
-**/
-
-wxMaracasIRMViewProp3D::wxMaracasIRMViewProp3D(wxWindow* parent,int propid)
-:wxMaracasIRMViewPanel(parent, propid){
-       createControls();       
-}
-
-wxMaracasIRMViewProp3D::~wxMaracasIRMViewProp3D(){     
-       //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
-       wxMaracasIRMView::getInstance()->deleteActor(_propid);
-}
-
-void wxMaracasIRMViewProp3D::createControls(){
-
-       wxFlexGridSizer* sizerirmprop = new wxFlexGridSizer(1,1,1);
-       
-       wxString choices[2];
-       choices[0] = wxString(_T("On"));
-       choices[1] = wxString(_T("Off"));
-       checkbox = new  wxCheckBox(this,-1,wxString(_T("Show Actor")));
-       Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onCheckBoxChange);   
-       checkbox->SetValue(true);       
-
-       sizerirmprop->Add(checkbox,wxFIXED_MINSIZE);
-
-       //this->addControl(checkbox);   
-       
-       wxBitmap bitmap(Color_xpm);
-       _colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));    
-       Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onColorChange);                    
-       sizerirmprop->Add(_colorchoose,wxFIXED_MINSIZE);        
-
-       //sizercolor->Add(checkbox,wxFIXED_MINSIZE);
-       //sizercolor->Add(_colorchoose,wxFIXED_MINSIZE);
-       //this->addControl(sizercolor);
-       
-       
-       wxStaticText* label = new wxStaticText(this, -1, wxString(_T("Opacity")));              
-       opacity = new wxSlider(this, -1,100,0,100,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS); 
-       Connect(opacity->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onOpacityRelease);      
-       wxFlexGridSizer* sizeropacity = new wxFlexGridSizer(1,1,1);     
-       sizeropacity->Add(label,wxFIXED_MINSIZE);
-       sizeropacity->Add(opacity,wxFIXED_MINSIZE);
-
-       sizerirmprop->Add(sizeropacity,wxFIXED_MINSIZE);
-
-       //this->addControl(sizeropacity);
-       this->addControl(sizerirmprop);
-       
-}
-void wxMaracasIRMViewProp3D::onCheckBoxChange(wxCommandEvent& event){  
-       wxMaracasIRMView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
-}
-void wxMaracasIRMViewProp3D::onColorChange(wxCommandEvent& event){
-       wxColourDialog* colourdiag = new wxColourDialog(this);
-       if(colourdiag->ShowModal()==wxID_OK){
-               wxColour colour = colourdiag->GetColourData().GetColour();
-               _colorchoose->SetBackgroundColour(colour);
-
-               double r = (double)(colour.Red())/255.0;
-               double g = (double)(colour.Green())/255.0;
-               double b = (double)(colour.Blue())/255.0;
-               
-               wxMaracasIRMView::getInstance()->changeColor(this->getPropId(),r,g,b);
-       }
-       delete colourdiag;
-}
-/*void wxMaracasIRMViewProp3D::onActionButtonPressedEliminate( wxCommandEvent& event ){        
-
-}*/
-
-void wxMaracasIRMViewProp3D::onOpacityRelease(wxScrollEvent& event ){
 
-       wxMaracasIRMView::getInstance()->changeOpacity(this->getPropId(),opacity->GetValue());
 
-}
 
 
-/**
-**     IRM viewProp3DMHD implementation
-**/
-wxMaracasIRMViewProp3DMHD::wxMaracasIRMViewProp3DMHD(wxWindow* parent, int propid)
-: wxMaracasIRMViewProp3D(parent, propid)
-{
-       
-}
-wxMaracasIRMViewProp3DMHD::~wxMaracasIRMViewProp3DMHD(){
-       //this->Show(false);
-       //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
-}
-void wxMaracasIRMViewProp3DMHD::createControls(int maxisovalue){
-       
-       wxFlexGridSizer* sizer = new wxFlexGridSizer(1,1,1);
-
-       wxStaticText* label = new wxStaticText(this, -1, wxString(_T("IsoValue")));
-       sizer->Add(label, wxGROW);
-       //this->addControl(label);
-       isovalue = new wxSlider(this, -1,maxisovalue,0,maxisovalue,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS);
-       sizer->Add(isovalue, wxGROW);
-       //this->addControl(isovalue);
-
-       this->addControl(sizer);        
-       Connect(isovalue->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasIRMViewProp3DMHD::onIsoValueRelease); 
-}
-
-void wxMaracasIRMViewProp3DMHD::onIsoValueRelease(wxScrollEvent& event ){
-
-       wxMaracasIRMView::getInstance()->changeIsoValue(this->getPropId(), isovalue->GetValue()/1.0);
-       
-}
 /**
 **
 **/
index 441f78cbef0bc9a1d2ef44410f96556dcd688323..5e90935ca22a291f570b4c2e5e901c6adc42ff41 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasIRMView.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:42 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
 #include "vtkProp3D.h"
 
 #include "wxMaracasIRMViewManager.h"
-
-class wxMaracasIRMViewPanel : public wxPanel{
-public:
-       wxMaracasIRMViewPanel(wxWindow* parent, int propid)
-               : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize){
-                       createPanel();
-                       _propid = propid;
-       }       
-       //virtual ~wxMaracasIRMViewPanel();
-       virtual void createPanel(){
-               show = false;
-        /*wxBoxSizer* sizerButtons = new wxBoxSizer(wxVERTICAL);
-
-               wxButton* b = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
-                                                               wxDefaultValidator, wxString(_T("-"))); 
-               Connect(b->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedHide);
-               wxButton* b1 = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
-                                                               wxDefaultValidator, wxString(_T("x"))); 
-               Connect(b1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedEliminate);
-
-               sizerButtons->Add(b, wxFIXED_MINSIZE);
-               sizerButtons->Add(b1, wxFIXED_MINSIZE);*/
-
-               sizercontrols = new wxBoxSizer(wxVERTICAL);
-
-               wxBoxSizer* sizerpanel = new wxBoxSizer(wxHORIZONTAL);
-
-               //sizerpanel->Add(sizerButtons,wxGROW);
-               sizerpanel->Add(sizercontrols,wxGROW);
-       
-               this->SetSizer(sizerpanel, true);               
-               this->SetAutoLayout( true );
-       }
-
-       /**
-       **      Adds a new control to the panel (sizer, radiob, etc)
-       **/
-       virtual void addControl(wxWindow* win){
-               if(sizercontrols!=NULL){
-                       sizercontrols->Add(win, wxGROW);
-               }
-       }
-       /**
-       **      Adds a new control to the panel (sizer, radiob, etc)
-       **/
-       virtual void addControl(wxSizer* sizer){
-               if(sizercontrols!=NULL){
-                       sizercontrols->Add(sizer, wxGROW);
-               }
-       }
-
-       /**
-       **      Hides or show the controls in the panel
-       **/
-       virtual void onActionButtonPressedHide( wxCommandEvent& event ){
-               wxList list = sizercontrols->GetChildren();             
-               int i;
-               for(i=0; i<list.size();i++){
-                       sizercontrols->Show(i,show);
-               }
-               show = !show;
-               sizercontrols->Layout();
-               this->Layout();
-       }
-
-    /**
-       **      The user must implement this function to remove the panel from the 
-       **/
-       //virtual void onActionButtonPressedEliminate( wxCommandEvent& event )=0;
-
-       /**
-       **      The user must implement this function to add the necessary controls to the panel
-       **/
-       virtual void createControls( )=0;
-       /**
-       ** returns the id of the panel
-       **/
-       int getPropId(){
-               return _propid;
-       }
-
-private:
-       wxBoxSizer* sizercontrols;
-       bool show;
-protected:
-       int _propid;
-
-};
-
+#include "wxMaracasIRMViewPanel.h"
 
 
 
@@ -169,44 +81,6 @@ private:
 
 
 
-class wxMaracasIRMViewProp3D : public wxMaracasIRMViewPanel{
-public:
-       wxMaracasIRMViewProp3D(wxWindow* parent, int propid);
-       ~wxMaracasIRMViewProp3D();
-       virtual void createControls();  
-       void onOpacityRelease(wxScrollEvent& event );   
-       void onCheckBoxChange(wxCommandEvent& event);
-       void onColorChange(wxCommandEvent& event);
-
-       
-private:
-       wxCheckBox* checkbox;
-       wxSlider* opacity;      
-       wxBitmapButton* _colorchoose;
-       
-       
-};
-
-
-
-
-class wxMaracasIRMViewProp3DMHD : public wxMaracasIRMViewProp3D{
-public:
-       wxMaracasIRMViewProp3DMHD(wxWindow* parent, int propid);
-       ~wxMaracasIRMViewProp3DMHD();
-       void onIsoValueRelease(wxScrollEvent& event );
-       void createControls(int maxisovalue);   
-
-       
-private:       
-       wxSlider* isovalue;
-       int _propid;
-       
-};
-
-
-
-
 class ToolBar : public wxToolBar{
 
 public:
index c655d51dd5538051719ff0c464a631f7a6b5e52a..26975360e5f435b8c9ca1423567738ee0f0c69ca 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasIRMViewManager.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:42 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -16,6 +16,8 @@
 =========================================================================*/
 #include "wxMaracasIRMViewManager.h"
 
+#include "wxMaracasIRMViewManagerDataMhd.h"
+
 /**
 **     Start of the manager class
 **/
@@ -53,7 +55,7 @@ int wxMaracasIRMViewManager::addPropMHD(vtkImageData* imagedata, std::string dat
 
        checkInvariant();
        if(imagedata != NULL){
-               wxMaracasIRMViewManagerData* data = new wxMaracasIRMViewManagerData(imagedata, dataname);
+               wxMaracasIRMViewManagerData* data = new wxMaracasIRMViewManagerDataMhd(imagedata, dataname);
                prop3Dvect.push_back(data);             
                _renderer->AddActor(data->getProp3D());
                data->setId(_idCount);
@@ -104,7 +106,7 @@ void wxMaracasIRMViewManager::changeIsoValue(int propid, double value )throw(cha
        wxMaracasIRMViewManagerData* data = this->getViewData(propid);          
 
        //_renderer->RemoveActor(data->getProp3D());
-       data->changeIsoValue(value);
+       ((wxMaracasIRMViewManagerDataMhd*)data)->changeIsoValue(value);
        //_renderer->AddActor(data->getProp3D());
 
        _renderer->Render();
@@ -161,7 +163,7 @@ wxMaracasIRMViewManagerData* wxMaracasIRMViewManager::getViewData(int id) throw(
 
 int wxMaracasIRMViewManager::getMaxIsoValue(int propid) throw(char*){
        
-       return this->getViewData(propid)->getMaxGreyLevel();
+       return ((wxMaracasIRMViewManagerDataMhd*)this->getViewData(propid))->getMaxGreyLevel();
 
 }
 
@@ -202,161 +204,4 @@ void wxMaracasIRMViewManager::deleteActor(int propid) throw (char *){
     
 }
 
-/********************************************************************************************
-** Start of data viewmanagerData
-*********************************************************************************************/
-
-wxMaracasIRMViewManagerData::wxMaracasIRMViewManagerData(vtkProp3D* prop3Dvect, std::string dataname){
-
-       _prop3D = prop3Dvect;   
-       _dataname = dataname;
-       _maxgreylevel=-1;
-
-       _cubesFilter=NULL;
-       _cleanFilter=NULL;      
-       _dataMapper=NULL;
-}
-wxMaracasIRMViewManagerData::wxMaracasIRMViewManagerData(vtkImageData* imagedata, std::string dataname){
-
-       this->setVtkImageData(imagedata);
-       _dataname = dataname;
-       
-       _maxgreylevel = getMaxLevel(imagedata);
-       _prop3D=NULL;                   
-
-       _cubesFilter = vtkMarchingCubes::New();
-       _cleanFilter = vtkCleanPolyData::New();         
-       _dataMapper = vtkPolyDataMapper::New();
-       vtkActor* dataActor = vtkActor::New();
-       
-       _cubesFilter->SetInput(this->_imagedata);
-       _cubesFilter->ComputeGradientsOn ();
-       _cubesFilter->ComputeScalarsOn ();
-       _cubesFilter->SetNumberOfContours( 1 );
-       _cleanFilter->SetInput ( _cubesFilter->GetOutput() );
-       _dataMapper->SetInput(_cleanFilter->GetOutput());
-       _dataMapper->ScalarVisibilityOff();
-       _dataMapper->ImmediateModeRenderingOn();
-       dataActor->SetMapper(_dataMapper);      
-
-       this->_prop3D = dataActor;
-
-       this->changeIsoValue(this->_maxgreylevel);      
-
-
-}
-/**
-**     changes the isovalue in a prop3D
-**/
-void wxMaracasIRMViewManagerData::changeIsoValue(double value){        
-               
-   
-    _cubesFilter->SetValue(0,value);           
-       _cubesFilter->Update();    
-       _cleanFilter->Update();
-       _dataMapper->Update();  
-       
-       
-       
-}
-int wxMaracasIRMViewManagerData::getMaxGreyLevel(){
-       return _maxgreylevel;
-}
-wxMaracasIRMViewManagerData::~wxMaracasIRMViewManagerData(){   
-       if(_cubesFilter!=NULL){
-               _cubesFilter->Delete();
-               _cleanFilter->Delete();
-               _dataMapper->Delete();
-       }
-       _prop3D->Delete();      
-}
-/**
-**     Adds a prop3D to the world of the application
-**/
-/**
-       ** Get's the max grey level of the image
-       **/
-int wxMaracasIRMViewManagerData::getMaxLevel(vtkImageData* img){
-
-       int ext[6], i, j, k,max=0;
-       img->GetExtent(ext);
-
-       for(i = ext[0]; i < ext[1];i++){
-               for(j = ext[2]; j < ext[3];j++){
-                       for(k = ext[4]; k < ext[5];k++){
-                unsigned short* ptr = (unsigned short*)img->GetScalarPointer(i,j,k);
-                               int temp = (int)*ptr;
-                               if(temp > max){
-                    max = temp;
-                               }
-                       }
-               }
-       }
-       return max;
-
-
-}
-void wxMaracasIRMViewManagerData::setVtkImageData(vtkImageData* imagedata){
-       _imagedata = imagedata;
-}
-/**
-**     Adds a prop3D to the world of the application
-**/
-void wxMaracasIRMViewManagerData::setProp3D(vtkProp3D* prop3D){
-       _prop3D = prop3D;
-}
-/**
-**     Changes the opacity in a prop3D
-**/
-void wxMaracasIRMViewManagerData::changeOpacity(int value){
-       std::cout<<"chage op"<<value<<std::endl;
-       vtkActor* actor = (vtkActor*)this->_prop3D;     
-       actor->GetProperty()->SetOpacity((double)value/100.0);
-
-       
-
-}
-void wxMaracasIRMViewManagerData::changeColor(double red, double green, double blue){
-       std::cout<<"chage col"<<red<<green<<blue<<std::endl;
-    vtkActor* actor = (vtkActor*)this->_prop3D;        
-       actor->GetProperty()->SetColor(red,green,blue); 
-}
-/**
-**     Check if the variables are setted correctly
-**/
-void wxMaracasIRMViewManagerData::checkInvariant(){
-
-}
-/**
-**     get the prop3D 
-**/
-vtkProp3D* wxMaracasIRMViewManagerData::getProp3D(){
-       return this->_prop3D;
-}
-/**
-**     return the id from the daat
-**/
-int wxMaracasIRMViewManagerData::getId(){
-       return _id;
-}
-/**
-**     set data id
-**/
-void wxMaracasIRMViewManagerData::setId(int propid){
-       _id = propid;
-}
-
-/**
-**     Get the filanme
-**/
-std::string wxMaracasIRMViewManagerData::getDataname(){
-       return _dataname;
-}
-/**
-** Set the filanme
-**/
-void wxMaracasIRMViewManagerData::setDataname(std::string dataname){
-       _dataname = dataname;
-}
-
 
index bd3e8923b6e328a1926bce0cb95456d81b0d435e..7e20fb2849bddca52a85e9540bf6584b4edda502 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasIRMViewManager.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:42 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
 #include <iostream>
 #include <vector>
 
-#include "vtkProp3D.h"
-#include "vtkRenderer.h"
-#include "vtkSTLReader.h"
-#include "vtkPolyDataMapper.h"
-#include "vtkActor.h"
-#include "vtkProperty.h"
-#include "vtkMetaImageReader.h"
-#include "vtkMarchingCubes.h"
-#include "vtkCleanPolyData.h"
-#include "vtkImageData.h"
+#include "wxMaracasIRMViewManagerData.h"
 
 
-
-
-class wxMaracasIRMViewManagerData  {
-
-public:
-       wxMaracasIRMViewManagerData(vtkProp3D* _prop3Dvect, std::string dataname="");
-       wxMaracasIRMViewManagerData(vtkImageData* imagedata, std::string dataname="");
-       ~wxMaracasIRMViewManagerData();
-
-       
-       /**
-       **      Adds a prop3D to the world of the application
-       **/
-       void setVtkImageData(vtkImageData* imagedata);
-       /**
-       **      Adds a prop3D to the world of the application
-       **/
-       void setProp3D(vtkProp3D* prop3D);
-       /**
-       **      Changes the opacity in a prop3D
-       **/
-       void changeOpacity(int value);
-       /**
-       **      changes the isovalue in a prop3D
-       **/
-       void changeIsoValue(double value);      
-       /**
-       **      Check if the variables are setted correctly
-       **/
-       void checkInvariant();
-       /**
-       **      get the prop3D 
-       **/
-       vtkProp3D* getProp3D();
-       /**
-       **      return the id from the daat
-       **/
-       int getId();
-       /**
-       **      set data id
-       **/
-       void setId(int propid);
-       /**
-       **      Get the filanme
-       **/
-    std::string getDataname();
-       /**
-       ** Set the filanme
-       **/
-    void setDataname(std::string dataname);
-       /**
-       **      Returns the grey max level of the image
-       **/
-
-       int getMaxGreyLevel();
-
-       /**
-       **      creates the image 
-       **/
-       void contourExtractor(int isovalue);
-
-       /**
-       **      Changes the color of the actor
-       **/
-       void changeColor(double red, double green, double blue);        
-       
-private:       
-       vtkProp3D* _prop3D;
-       vtkImageData* _imagedata;
-       int _id; 
-       std::string _dataname;
-       int _maxgreylevel;
-
-       /**
-       ** to the image render
-       **/
-       vtkMarchingCubes* _cubesFilter;
-       vtkCleanPolyData* _cleanFilter; 
-       vtkPolyDataMapper* _dataMapper;
-       
-       /**
-       ** Get's the max grey level of the image
-       **/
-       int getMaxLevel(vtkImageData* img);
-       
-
-       
-};
-
 class wxMaracasIRMViewManager  {
 
 public:
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerData.cxx
new file mode 100644 (file)
index 0000000..c265ec2
--- /dev/null
@@ -0,0 +1,80 @@
+
+#include "wxMaracasIRMViewManagerData.h"
+
+/********************************************************************************************
+** Start of data viewmanagerData
+*********************************************************************************************/
+
+wxMaracasIRMViewManagerData::wxMaracasIRMViewManagerData(vtkProp3D* prop3Dvect, std::string dataname){
+
+       _prop3D = prop3Dvect;   
+       _dataname = dataname;
+       
+}
+
+
+wxMaracasIRMViewManagerData::~wxMaracasIRMViewManagerData(){
+       
+       _prop3D->Delete();      
+}
+
+/**
+**     Adds a prop3D to the world of the application
+**/
+void wxMaracasIRMViewManagerData::setProp3D(vtkProp3D* prop3D){
+       _prop3D = prop3D;
+}
+/**
+**     Changes the opacity in a prop3D
+**/
+void wxMaracasIRMViewManagerData::changeOpacity(int value){
+       std::cout<<"chage op"<<value<<std::endl;
+       vtkActor* actor = (vtkActor*)this->_prop3D;     
+       actor->GetProperty()->SetOpacity((double)value/100.0);
+
+       
+
+}
+void wxMaracasIRMViewManagerData::changeColor(double red, double green, double blue){
+       std::cout<<"chage col"<<red<<green<<blue<<std::endl;
+    vtkActor* actor = (vtkActor*)this->_prop3D;        
+       actor->GetProperty()->SetColor(red,green,blue); 
+}
+/**
+**     Check if the variables are setted correctly
+**/
+void wxMaracasIRMViewManagerData::checkInvariant(){
+
+}
+/**
+**     get the prop3D 
+**/
+vtkProp3D* wxMaracasIRMViewManagerData::getProp3D(){
+       return this->_prop3D;
+}
+/**
+**     return the id from the daat
+**/
+int wxMaracasIRMViewManagerData::getId(){
+       return _id;
+}
+/**
+**     set data id
+**/
+void wxMaracasIRMViewManagerData::setId(int propid){
+       _id = propid;
+}
+
+/**
+**     Get the filanme
+**/
+std::string wxMaracasIRMViewManagerData::getDataname(){
+       return _dataname;
+}
+/**
+** Set the filanme
+**/
+void wxMaracasIRMViewManagerData::setDataname(std::string dataname){
+       _dataname = dataname;
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerData.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerData.h
new file mode 100644 (file)
index 0000000..ca547fb
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef WXMARACASIRMVIEWMANAGERDATA_H_
+#define WXMARACASIRMVIEWMANAGERDATA_H_
+
+#include "vtkProp3D.h"
+#include "vtkRenderer.h"
+#include "vtkSTLReader.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkActor.h"
+#include "vtkProperty.h"
+
+
+
+class wxMaracasIRMViewManagerData  {
+
+public:
+       wxMaracasIRMViewManagerData(vtkProp3D* _prop3Dvect, std::string dataname="");   
+       ~wxMaracasIRMViewManagerData(); 
+       
+       /**
+       **      Adds a prop3D to the world of the application
+       **/
+       void setProp3D(vtkProp3D* prop3D);
+       /**
+       **      Changes the opacity in a prop3D
+       **/
+       void changeOpacity(int value);          
+       /**
+       **      Check if the variables are setted correctly
+       **/
+       void checkInvariant();
+       /**
+       **      get the prop3D 
+       **/
+       vtkProp3D* getProp3D();
+       /**
+       **      return the id from the daat
+       **/
+       int getId();
+       /**
+       **      set data id
+       **/
+       void setId(int propid);
+       /**
+       **      Get the filanme
+       **/
+    std::string getDataname();
+       /**
+       ** Set the filanme
+       **/
+    void setDataname(std::string dataname);
+       
+       /**
+       **      creates the image 
+       **/
+       void contourExtractor(int isovalue);
+
+       /**
+       **      Changes the color of the actor
+       **/
+       void changeColor(double red, double green, double blue);        
+       
+protected:
+       /**
+        * Prop 3D (data actor)
+        */
+       vtkProp3D* _prop3D;     
+       /**
+        *  Dataname given by the user (ex. filename) 
+        **/
+       std::string _dataname;  
+       
+       
+private:
+       
+       /*
+        * id of the data
+        */
+       int _id;                
+
+       
+};
+
+#endif /*WXMARACASIRMVIEWMANAGERDATA_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerDataMhd.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerDataMhd.cxx
new file mode 100644 (file)
index 0000000..35e5811
--- /dev/null
@@ -0,0 +1,92 @@
+
+#include "wxMaracasIRMViewManagerDataMhd.h"
+
+wxMaracasIRMViewManagerDataMhd::wxMaracasIRMViewManagerDataMhd(vtkImageData* imagedata, std::string dataname)
+: wxMaracasIRMViewManagerData(NULL, dataname)
+{
+
+       this->setVtkImageData(imagedata);
+       _dataname = dataname;
+       
+       _maxgreylevel = getMaxLevel(imagedata);
+       _prop3D=NULL;                   
+
+       _cubesFilter = vtkMarchingCubes::New();
+       _cleanFilter = vtkCleanPolyData::New();         
+       _dataMapper = vtkPolyDataMapper::New();
+       vtkActor* dataActor = vtkActor::New();
+       
+       _cubesFilter->SetInput(this->_imagedata);
+       _cubesFilter->ComputeGradientsOn ();
+       _cubesFilter->ComputeScalarsOn ();
+       _cubesFilter->SetNumberOfContours( 1 );
+       _cleanFilter->SetInput ( _cubesFilter->GetOutput() );
+       _dataMapper->SetInput(_cleanFilter->GetOutput());
+       _dataMapper->ScalarVisibilityOff();
+       _dataMapper->ImmediateModeRenderingOn();
+       dataActor->SetMapper(_dataMapper);      
+
+       this->_prop3D = dataActor;
+
+       this->changeIsoValue(this->_maxgreylevel);      
+
+
+}
+
+wxMaracasIRMViewManagerDataMhd::~wxMaracasIRMViewManagerDataMhd(){     
+       _cubesFilter->Delete();
+       _cleanFilter->Delete();
+       _dataMapper->Delete();
+}
+       
+
+/**
+**     changes the isovalue in a prop3D
+**/
+void wxMaracasIRMViewManagerDataMhd::changeIsoValue(double value){     
+               
+   
+    _cubesFilter->SetValue(0,value);           
+       _cubesFilter->Update();    
+       _cleanFilter->Update();
+       _dataMapper->Update();  
+       
+       
+       
+}
+int wxMaracasIRMViewManagerDataMhd::getMaxGreyLevel(){
+       return _maxgreylevel;
+}
+
+/**
+       ** Get's the max grey level of the image
+       **/
+int wxMaracasIRMViewManagerDataMhd::getMaxLevel(vtkImageData* img){
+
+       int ext[6], i, j, k,max=0;
+       img->GetExtent(ext);
+
+       for(i = ext[0]; i < ext[1];i++){
+               for(j = ext[2]; j < ext[3];j++){
+                       for(k = ext[4]; k < ext[5];k++){
+                unsigned short* ptr = (unsigned short*)img->GetScalarPointer(i,j,k);
+                               int temp = (int)*ptr;
+                               if(temp > max){
+                    max = temp;
+                               }
+                       }
+               }
+       }
+       return max;
+
+
+}
+
+/**
+**     Sets the VTK image data
+**/
+
+void wxMaracasIRMViewManagerDataMhd::setVtkImageData(vtkImageData* imagedata){
+       _imagedata = imagedata;
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerDataMhd.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManagerDataMhd.h
new file mode 100644 (file)
index 0000000..b7b7a0b
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef WXMARACASIRMVIEWMANAGERDATAMHD_H_
+#define WXMARACASIRMVIEWMANAGERDATAMHD_H_
+
+
+#include "wxMaracasIRMViewManagerData.h"
+
+#include "vtkMetaImageReader.h"
+#include "vtkMarchingCubes.h"
+#include "vtkCleanPolyData.h"
+#include "vtkImageData.h"
+
+class wxMaracasIRMViewManagerDataMhd : public wxMaracasIRMViewManagerData  {
+
+public:
+       
+       wxMaracasIRMViewManagerDataMhd(vtkImageData* imagedata, std::string dataname="");
+       ~wxMaracasIRMViewManagerDataMhd();
+
+       
+       /**
+       **      Adds a prop3D to the world of the application
+       **/
+       void setVtkImageData(vtkImageData* imagedata);
+       
+       /**
+       **      changes the isovalue in a prop3D
+       **/
+       void changeIsoValue(double value);      
+       /**
+       **      Check if the variables are setted correctly
+       **/
+       void checkInvariant();  
+       
+       /**
+       **      Returns the grey max level of the image
+       **/
+
+       int getMaxGreyLevel();
+
+       /**
+       **      creates the image 
+       **/
+       void contourExtractor(int isovalue);            
+       
+private:       
+       
+       vtkImageData* _imagedata;
+       int _maxgreylevel;
+
+       /**
+       ** to the image render
+       **/
+       vtkMarchingCubes* _cubesFilter;
+       vtkCleanPolyData* _cleanFilter; 
+       vtkPolyDataMapper* _dataMapper;
+       
+       /**
+       ** Get's the max grey level of the image
+       **/
+       int getMaxLevel(vtkImageData* img);
+       
+
+       
+};
+
+#endif /*WXMARACASIRMVIEWMANAGERDATAMHD_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewPanel.h
new file mode 100644 (file)
index 0000000..f3a3bb2
--- /dev/null
@@ -0,0 +1,94 @@
+#ifndef WXMARACASIRMVIEWPANEL_H_
+#define WXMARACASIRMVIEWPANEL_H_
+
+#include "wx/wx.h"
+
+class wxMaracasIRMViewPanel : public wxPanel{
+public:
+       wxMaracasIRMViewPanel(wxWindow* parent, int propid)
+               : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize){
+                       createPanel();
+                       _propid = propid;
+       }       
+       //virtual ~wxMaracasIRMViewPanel();
+       virtual void createPanel(){
+               show = false;
+        /*wxBoxSizer* sizerButtons = new wxBoxSizer(wxVERTICAL);
+
+               wxButton* b = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
+                                                               wxDefaultValidator, wxString(_T("-"))); 
+               Connect(b->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedHide);
+               wxButton* b1 = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
+                                                               wxDefaultValidator, wxString(_T("x"))); 
+               Connect(b1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedEliminate);
+
+               sizerButtons->Add(b, wxFIXED_MINSIZE);
+               sizerButtons->Add(b1, wxFIXED_MINSIZE);*/
+
+               sizercontrols = new wxBoxSizer(wxVERTICAL);
+
+               wxBoxSizer* sizerpanel = new wxBoxSizer(wxHORIZONTAL);
+
+               //sizerpanel->Add(sizerButtons,wxGROW);
+               sizerpanel->Add(sizercontrols,wxGROW);
+       
+               this->SetSizer(sizerpanel, true);               
+               this->SetAutoLayout( true );
+       }
+
+       /**
+       **      Adds a new control to the panel (sizer, radiob, etc)
+       **/
+       virtual void addControl(wxWindow* win){
+               if(sizercontrols!=NULL){
+                       sizercontrols->Add(win, wxGROW);
+               }
+       }
+       /**
+       **      Adds a new control to the panel (sizer, radiob, etc)
+       **/
+       virtual void addControl(wxSizer* sizer){
+               if(sizercontrols!=NULL){
+                       sizercontrols->Add(sizer, wxGROW);
+               }
+       }
+
+       /**
+       **      Hides or show the controls in the panel
+       **/
+       virtual void onActionButtonPressedHide( wxCommandEvent& event ){
+               wxList list = sizercontrols->GetChildren();             
+               int i;
+               for(i=0; i<list.size();i++){
+                       sizercontrols->Show(i,show);
+               }
+               show = !show;
+               sizercontrols->Layout();
+               this->Layout();
+       }
+
+    /**
+       **      The user must implement this function to remove the panel from the 
+       **/
+       //virtual void onActionButtonPressedEliminate( wxCommandEvent& event )=0;
+
+       /**
+       **      The user must implement this function to add the necessary controls to the panel
+       **/
+       virtual void createControls( )=0;
+       /**
+       ** returns the id of the panel
+       **/
+       int getPropId(){
+               return _propid;
+       }
+
+private:
+       wxBoxSizer* sizercontrols;
+       bool show;
+protected:
+       int _propid;
+
+};
+
+#endif /*WXMARACASIRMVIEWPANEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3D.cxx
new file mode 100644 (file)
index 0000000..7cc6737
--- /dev/null
@@ -0,0 +1,83 @@
+#include "wxMaracasIRMViewProp3D.h"
+
+#include <wx/colordlg.h>
+#include "wxMaracasIRMView.h"
+#include "Color.xpm"
+/**
+**     Implementation of viewProp3D
+**/
+
+wxMaracasIRMViewProp3D::wxMaracasIRMViewProp3D(wxWindow* parent,int propid)
+:wxMaracasIRMViewPanel(parent, propid){
+       createControls();       
+}
+
+wxMaracasIRMViewProp3D::~wxMaracasIRMViewProp3D(){     
+       //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
+       wxMaracasIRMView::getInstance()->deleteActor(_propid);
+}
+
+void wxMaracasIRMViewProp3D::createControls(){
+
+       wxFlexGridSizer* sizerirmprop = new wxFlexGridSizer(1,1,1);
+       
+       wxString choices[2];
+       choices[0] = wxString(_T("On"));
+       choices[1] = wxString(_T("Off"));
+       checkbox = new  wxCheckBox(this,-1,wxString(_T("Show Actor")));
+       Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onCheckBoxChange);   
+       checkbox->SetValue(true);       
+
+       sizerirmprop->Add(checkbox,wxFIXED_MINSIZE);
+
+       //this->addControl(checkbox);   
+       
+       wxBitmap bitmap(Color_xpm);
+       _colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));    
+       Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onColorChange);                    
+       sizerirmprop->Add(_colorchoose,wxFIXED_MINSIZE);        
+
+       //sizercolor->Add(checkbox,wxFIXED_MINSIZE);
+       //sizercolor->Add(_colorchoose,wxFIXED_MINSIZE);
+       //this->addControl(sizercolor);
+       
+       
+       wxStaticText* label = new wxStaticText(this, -1, wxString(_T("Opacity")));              
+       opacity = new wxSlider(this, -1,100,0,100,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS); 
+       Connect(opacity->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onOpacityRelease);      
+       wxFlexGridSizer* sizeropacity = new wxFlexGridSizer(1,1,1);     
+       sizeropacity->Add(label,wxFIXED_MINSIZE);
+       sizeropacity->Add(opacity,wxFIXED_MINSIZE);
+
+       sizerirmprop->Add(sizeropacity,wxFIXED_MINSIZE);
+
+       //this->addControl(sizeropacity);
+       this->addControl(sizerirmprop);
+       
+}
+void wxMaracasIRMViewProp3D::onCheckBoxChange(wxCommandEvent& event){  
+       wxMaracasIRMView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+}
+void wxMaracasIRMViewProp3D::onColorChange(wxCommandEvent& event){
+       wxColourDialog* colourdiag = new wxColourDialog(this);
+       if(colourdiag->ShowModal()==wxID_OK){
+               wxColour colour = colourdiag->GetColourData().GetColour();
+               _colorchoose->SetBackgroundColour(colour);
+
+               double r = (double)(colour.Red())/255.0;
+               double g = (double)(colour.Green())/255.0;
+               double b = (double)(colour.Blue())/255.0;
+               
+               wxMaracasIRMView::getInstance()->changeColor(this->getPropId(),r,g,b);
+       }
+       delete colourdiag;
+}
+/*void wxMaracasIRMViewProp3D::onActionButtonPressedEliminate( wxCommandEvent& event ){        
+
+}*/
+
+void wxMaracasIRMViewProp3D::onOpacityRelease(wxScrollEvent& event ){
+
+       wxMaracasIRMView::getInstance()->changeOpacity(this->getPropId(),opacity->GetValue());
+
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3D.h
new file mode 100644 (file)
index 0000000..efbcbb7
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef WXMARACASIRMVIEWPROP3D_H_
+#define WXMARACASIRMVIEWPROP3D_H_
+
+#include "wxMaracasIRMViewPanel.h"
+
+class wxMaracasIRMViewProp3D : public wxMaracasIRMViewPanel{
+public:
+       wxMaracasIRMViewProp3D(wxWindow* parent, int propid);
+       ~wxMaracasIRMViewProp3D();
+       virtual void createControls();  
+       void onOpacityRelease(wxScrollEvent& event );   
+       void onCheckBoxChange(wxCommandEvent& event);
+       void onColorChange(wxCommandEvent& event);
+
+       
+private:
+       wxCheckBox* checkbox;
+       wxSlider* opacity;      
+       wxBitmapButton* _colorchoose;
+       
+       
+};
+
+#endif /*WXMARACASIRMVIEWPROP3D_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3DMHD.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3DMHD.cxx
new file mode 100644 (file)
index 0000000..c89f41e
--- /dev/null
@@ -0,0 +1,35 @@
+#include "wxMaracasIRMViewProp3DMHD.h"
+
+#include "wxMaracasIRMView.h"
+/**
+**     IRM viewProp3DMHD implementation
+**/
+wxMaracasIRMViewProp3DMHD::wxMaracasIRMViewProp3DMHD(wxWindow* parent, int propid)
+: wxMaracasIRMViewProp3D(parent, propid)
+{
+       
+}
+wxMaracasIRMViewProp3DMHD::~wxMaracasIRMViewProp3DMHD(){
+       //this->Show(false);
+       //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
+}
+void wxMaracasIRMViewProp3DMHD::createControls(int maxisovalue){
+       
+       wxFlexGridSizer* sizer = new wxFlexGridSizer(1,1,1);
+
+       wxStaticText* label = new wxStaticText(this, -1, wxString(_T("IsoValue")));
+       sizer->Add(label, wxGROW);
+       //this->addControl(label);
+       isovalue = new wxSlider(this, -1,maxisovalue,0,maxisovalue,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS);
+       sizer->Add(isovalue, wxGROW);
+       //this->addControl(isovalue);
+
+       this->addControl(sizer);        
+       Connect(isovalue->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasIRMViewProp3DMHD::onIsoValueRelease); 
+}
+
+void wxMaracasIRMViewProp3DMHD::onIsoValueRelease(wxScrollEvent& event ){
+
+       wxMaracasIRMView::getInstance()->changeIsoValue(this->getPropId(), isovalue->GetValue()/1.0);
+       
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3DMHD.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewProp3DMHD.h
new file mode 100644 (file)
index 0000000..598c345
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef WXMARACASIRMVIEWPROP3DMHD_H_
+#define WXMARACASIRMVIEWPROP3DMHD_H_
+
+#include "wxMaracasIRMViewProp3D.h"
+
+class wxMaracasIRMViewProp3DMHD : public wxMaracasIRMViewProp3D{
+public:
+       wxMaracasIRMViewProp3DMHD(wxWindow* parent, int propid);
+       ~wxMaracasIRMViewProp3DMHD();
+       void onIsoValueRelease(wxScrollEvent& event );
+       void createControls(int maxisovalue);   
+
+       
+private:       
+       wxSlider* isovalue;
+       int _propid;
+       
+};
+
+#endif /*WXMARACASIRMVIEWPROP3DMHD_H_*/
index 44edc24afdf9294311ec037dd175205cf918dc2a..d791fd378dcf97b3149349b6cf986e22744b5458 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:42 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.9 $
 
   Copyright: (c) 2002, 2003
   License:
index 89311f8269466a2a50ca00ca76a12d60c449123f..8d7a32066647c30f50d67e2b7f1f945343f633bf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_N_ViewersWidget.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:42 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
index f9822d12b23747942bb6f27925a2fc5724cdbfbc..f10eac6739610d3869fdadfd54997eeb4dcdabf2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/07 15:35:46 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.12 $
 
   Copyright: (c) 2002, 2003
   License:
 
                        mwxvtkmpr3Dview                                                 = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D );
 
+
                        vtkmpr3Ddataviewer      = new vtkMPR3DDataViewer();     
 
+                       
+
                        wxWindow        *window3D                                       = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
 
                        wxPanel                 *panelControl                   = new wxPanel(panelClipping3D,-1);      
index e221d82dd40e2096e4a6252287d582bf86ad3cf4..2f38aaa5a689e8b3a19ecee39885ccf525224196 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:43 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx
new file mode 100644 (file)
index 0000000..e3b24b2
--- /dev/null
@@ -0,0 +1,560 @@
+
+#include "wxPanelCuttingImageData.h"
+
+//-------------------------------------------------------------------
+
+#include <vtkProperty.h>
+#include <vtkTextProperty.h>
+#include <vtkProperty2D.h>
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
+: wxPanel( parent, -1)
+{
+       _imageData=NULL;
+       _histogrammeVector=NULL;
+       _wxvtk3Dbaseview=NULL;
+       _wxvtkbaseView=NULL;
+       CreateInterface();
+       CreateModel();
+       Create3DViewObjects();
+}
+
+//-------------------------------------------------------------------
+wxPanelCuttingImageData::~wxPanelCuttingImageData()
+{
+
+
+       delete _modelCube;      
+       delete _modelSphere;    
+       delete _modelCylinder;  
+       _vtkcube                -> Delete();    
+       _vtksphere              -> Delete();    
+       _vtkcylinder    -> Delete();    
+       _cubeMapper             -> Delete();    
+       _sphereMapper   -> Delete();    
+       _cylinderMapper -> Delete();    
+       _cubeActor              -> Delete();    
+       _sphereActor    -> Delete();    
+       _cylinderActor  -> Delete();    
+//     _xyplot->RemoveAllInputs();     
+       _xyplot                 -> Delete();    
+       _histogrammeVector->Delete();   
+       _renplotter->Delete();
+       
+       if(_wxvtkbaseView!=NULL){
+               delete _wxvtkbaseView;
+       }
+       //delete _vtkclipping3Ddataviewer;
+       
+
+       //fclose(file);
+
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::RemoveActors()
+{
+       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _actualActor );
+}
+
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview )
+{
+       _wxvtk3Dbaseview=wxvtk3Dbaseview;
+}
+
+//-------------------------------------------------------------------
+
+void wxPanelCuttingImageData::SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer )
+{
+       this->_vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::Create3DViewObjects()
+{
+       // Sphere
+       _vtksphere              = vtkSphereSource::New();
+       _vtksphere->SetThetaResolution (20);
+       _vtksphere->SetPhiResolution (20);
+       _sphereMapper   = vtkPolyDataMapper::New();
+       _sphereMapper->SetInput( _vtksphere->GetOutput() );
+       _sphereActor    = vtkActor::New();
+       _sphereActor->SetMapper(_sphereMapper);
+       _sphereActor->SetOrigin(0, 0, 0);
+       _sphereActor->SetPosition(0, 0, 0);
+       _sphereActor->GetProperty()->SetColor(1, 0, 0);
+       _sphereActor->SetUserTransform( _modelSphere->GetVtkTransform() );      
+
+       // cube
+       _vtkcube                = vtkCubeSource::New();
+       _vtkcube->SetXLength (1);
+       _vtkcube->SetYLength (1);
+       _vtkcube->SetZLength (1);
+       _cubeMapper             = vtkPolyDataMapper::New();
+       _cubeMapper->SetInput( _vtkcube->GetOutput() );
+       _cubeActor              = vtkActor::New();
+       _cubeActor->SetMapper(_cubeMapper);
+       _cubeActor->SetOrigin(0, 0, 0);
+       _cubeActor->SetPosition(0, 0, 0);
+       _cubeActor->GetProperty()->SetColor(1, 0, 0);
+       _cubeActor->SetUserTransform( _modelCube->GetVtkTransform() );          
+
+       // cylinder
+       _vtkcylinder    = vtkCylinderSource::New();
+       _vtkcylinder->SetResolution(20);
+       _cylinderMapper = vtkPolyDataMapper::New();
+       _cylinderMapper->SetInput( _vtkcylinder->GetOutput() );
+       _cylinderActor  = vtkActor::New();
+       _cylinderActor->SetMapper(_cylinderMapper);
+       _cylinderActor->SetOrigin(0, 0, 0);
+       _cylinderActor->SetPosition(0, 0, 0);
+       _cylinderActor->GetProperty()->SetColor(1, 0, 0);
+       _cylinderActor->SetUserTransform( _modelCylinder->GetVtkTransform() );          
+
+
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::CreateModel()
+{
+       _modelCube              = new figureCuttingCubeModel();
+       _modelSphere    = new figureCuttingSphereModel();
+       _modelCylinder  = new figureCuttingCylinderModel();
+
+//     _modelCube->SetVtkTransform( _modelCube->GetVtkTransform()                      );
+//     _modelSphere->SetVtkTransform( _modelSphere->GetVtkTransform()          );
+//     _modelCylinder->SetVtkTransform( _modelCylinder->GetVtkTransform()      );
+}
+
+//-------------------------------------------------------------------
+
+void wxPanelCuttingImageData::InitHistogramme()
+{
+       double rangeA[2];
+       if (_imageData==NULL)
+       {
+               rangeA[1]=1;
+       } else {
+               _imageData->GetScalarRange(rangeA);
+       }
+       _xyplot->RemoveAllInputs();
+/*
+       if ( _histogrammeVector!=NULL )
+       {
+               _histogrammeVector -> Delete();
+       }
+*/
+       _histogrammeVector =  vtkImageData::New();
+    _histogrammeVector -> SetDimensions ( (int)(rangeA[1]),1,1 );
+    _histogrammeVector -> SetScalarTypeToUnsignedShort();
+    _histogrammeVector -> AllocateScalars();    
+    _histogrammeVector -> Update(); 
+       
+       unsigned short *p_vol = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
+       int i,size = (int) (rangeA[1]);
+       for (i=0; i < size; i++)
+       {
+               *p_vol=0;
+               p_vol++;
+       }
+       _xyplot->SetXRange(0, rangeA[1]);
+       _xyplot->SetYRange(0, 10);
+       _xyplot->AddInput( _histogrammeVector );
+}
+
+//-------------------------------------------------------------------
+wxWindow *wxPanelCuttingImageData::CreatePlotHistogrammeInterface()
+{
+       _xyplot = vtkXYPlotActor::New();
+       InitHistogramme();
+       _xyplot->GetPositionCoordinate()->SetValue(0.00, 0.00, 0);
+       _xyplot->GetPosition2Coordinate()->SetValue(1.0, 1.00, 0); //relative to Position
+       _xyplot->SetXValuesToArcLength();
+       _xyplot->SetNumberOfXLabels(6);
+
+       _xyplot->SetTitle("Histogramme");
+       _xyplot->SetXTitle("Gray level");
+       _xyplot->SetYTitle("Occurrences ");
+       _xyplot->GetProperty()->SetColor(1, 0, 0);
+       _xyplot->GetProperty()->SetPointSize(2);
+       vtkTextProperty *tprop = _xyplot->GetTitleTextProperty();
+       tprop->SetColor( 1,0,1 );
+       tprop->BoldOff ();
+       _xyplot->SetAxisTitleTextProperty(tprop);
+       _xyplot->SetAxisLabelTextProperty(tprop);
+       _xyplot->PlotPointsOn();
+       _xyplot->GetProperty()->SetPointSize(3);
+
+       _wxvtkbaseView = new wxVtkBaseView(this);
+       _wxvtkbaseView->Configure();
+
+       _renplotter = vtkRenderer::New();
+       vtkRenderWindow *renWin = _wxvtkbaseView->GetRenWin();
+       renWin->AddRenderer( _renplotter );
+       _renplotter->AddActor2D( _xyplot );
+
+       return _wxvtkbaseView->GetWxVTKRenderWindowInteractor();
+}
+
+//-------------------------------------------------------------------
+
+void wxPanelCuttingImageData::CreateInterface()
+{
+       SetSize(300,500);
+       wxBoxSizer      *topsizer               = new wxBoxSizer(wxVERTICAL);   // Principal sizer
+
+       wxBoxSizer              *sizerH0        = new wxBoxSizer(wxHORIZONTAL   );  // type of segmentation figure
+       wxBoxSizer          *sizerH2    = new wxBoxSizer(wxHORIZONTAL   );      // scale
+       wxBoxSizer              *sizerH3        = new wxBoxSizer(wxHORIZONTAL   );      // rotation
+       wxBoxSizer              *sizerH4        = new wxBoxSizer(wxHORIZONTAL   );  // intern extern
+       wxBoxSizer              *sizerH5        = new wxBoxSizer(wxHORIZONTAL   );  // Isovalue
+       wxBoxSizer              *sizerH6        = new wxBoxSizer(wxHORIZONTAL   );  // Buttons
+       wxFlexGridSizer *sizerH7        = new wxFlexGridSizer(2                 );  // Volumic information 
+
+       
+       _typeFig        = new wxChoice(this,-1);
+       _opacityFig     = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+
+       _scaleX         = new wxSlider(this,-1,6,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleY         = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleZ         = new wxSlider(this,-1,7,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+
+       _rotationX      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationY      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationZ      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+
+       _volIntern              = new wxRadioButton(this,-1, _T("Volume intern " ));
+       _volExtern              = new wxRadioButton(this,-1, _T("Volume extern " ));
+
+       _histogrammeAccumulated = new wxCheckBox(this,-1,_T("Histogramme accumulated"));
+
+       _isoValue                               = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _valueBeforeIsoValue    = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _valueAfterIsoValue             = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+
+       wxButton *btnExtract    = new wxButton(this, -1,_T("Extract"));
+
+       _infoToVo       = new wxStaticText(this,-1,_T("########################"));
+       _infoSuVoA      = new wxStaticText(this,-1,_T("############"));
+       _infoSuVo       = new wxStaticText(this,-1,_T("############"));
+       _infoPixLe      = new wxStaticText(this,-1,_T("############"));
+       _infoPixHi      = new wxStaticText(this,-1,_T("############"));
+
+
+       
+
+       _typeFig->Append(_T("Cylindre"));
+       _typeFig->Append(_T("Cube"));
+       _typeFig->Append(_T("Sphere"));
+       _typeFig->SetSelection(0);
+       _volIntern->SetValue(true);
+
+       Connect(_typeFig->GetId()                               , wxEVT_COMMAND_CHOICE_SELECTED         , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTypeFig ); 
+
+       Connect(_opacityFig->GetId()                    , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnOpacityFig ); 
+       Connect(_rotationX->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
+       Connect(_rotationY->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
+       Connect(_rotationZ->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
+       Connect(_scaleX->GetId()                                , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
+       Connect(_scaleY->GetId()                                , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
+       Connect(_scaleZ->GetId()                                , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform ); 
+       Connect(btnExtract->GetId()                             , wxEVT_COMMAND_BUTTON_CLICKED          , (wxObjectEventFunction) &wxPanelCuttingImageData::OnExtract   ); 
+        
+
+//     wxStaticText *text=new wxStaticText(this,-1, " ");
+
+       sizerH0 -> Add( new wxStaticText(this,-1, _T("Fig. Type:   "),wxDefaultPosition, wxSize(50,20)) ,1,wxALL  ,0);
+       sizerH0 -> Add( _typeFig                ,1,wxALL  ,0);
+       sizerH0 -> Add( _opacityFig             ,1,wxALL|wxEXPAND  ,0);
+
+       sizerH2 -> Add( new wxStaticText(this,-1,_T("Scale :   "))              ,1,wxALL  ,0);
+       sizerH2 -> Add( _scaleX         ,1,wxALL | wxEXPAND ,0 );
+       sizerH2 -> Add( _scaleY         ,1,wxALL | wxEXPAND ,0 );
+       sizerH2 -> Add( _scaleZ         ,1,wxALL | wxEXPAND ,0 );
+
+       sizerH3 -> Add( new wxStaticText(this,-1,_T("Rotation :   "))   ,1,wxALL  ,0);
+       sizerH3 -> Add( _rotationX      ,1,wxALL | wxEXPAND ,0 );
+       sizerH3 -> Add( _rotationY      ,1,wxALL | wxEXPAND ,0 );
+       sizerH3 -> Add( _rotationZ      ,1,wxALL | wxEXPAND ,0 );
+
+
+       sizerH4 -> Add( new wxStaticText(this,-1,_T("Intern / Extern :   "))    ,1,wxALL  ,0);
+       sizerH4 -> Add( _volIntern                                              ,1,wxALL  ,0);
+       sizerH4 -> Add( new wxStaticText(this,-1, _T(" "))      ,1,wxALL  ,0);
+       sizerH4 -> Add( _volExtern                                              ,1,wxALL  ,0);
+
+       sizerH5 -> Add( new wxStaticText(this,-1,_T("Isovalue   "))     ,1,wxALL  ,0);
+       sizerH5 -> Add( _isoValue                                               ,1,wxALL | wxEXPAND ,0 );
+       sizerH5 -> Add( _valueBeforeIsoValue                    ,1,wxALL | wxEXPAND ,0 );
+       sizerH5 -> Add( _valueAfterIsoValue                             ,1,wxALL | wxEXPAND ,0 );
+
+       sizerH6 -> Add( new wxStaticText(this,-1, _T(" "))              ,1,wxALL  ,0);
+       sizerH6 -> Add( btnExtract      ,1,wxALL  ,0);
+
+       sizerH7 -> Add( new wxStaticText(this,-1,_T("Total Volume: "), wxDefaultPosition, wxSize(200,12))                       , 1 , wxALL  ,0);
+       sizerH7 -> Add( _infoToVo                                                                               , 1 , wxALL  ,0);
+       sizerH7 -> Add( new wxStaticText(this,-1,_T("SubVolume:   "), wxDefaultPosition, wxSize(200,12) )               , 1 , wxALL  ,0);
+       sizerH7 -> Add( _infoSuVo                                                                               , 1 , wxALL  ,0);
+       sizerH7 -> Add( new wxStaticText(this,-1,_T("SubVolume (ana.): "), wxDefaultPosition, wxSize(200,12))   , 1 , wxALL  ,0);
+       sizerH7 -> Add( _infoSuVoA                                                                              , 1 , wxALL  ,0);
+       sizerH7 -> Add( new wxStaticText(this,-1,_T("Pix < isovalue:   ") , wxDefaultPosition, wxSize(200,12))  , 1 , wxALL  ,0);
+       sizerH7 -> Add( _infoPixLe                                                                              , 1 , wxALL  ,0);
+       sizerH7 -> Add( new wxStaticText(this,-1,_T("Pix > isovalue: "), wxDefaultPosition, wxSize(200,12))     , 1 , wxALL  ,0);
+       sizerH7 -> Add( _infoPixHi                                                                              , 1 , wxALL  ,0);
+//     sizerH7 -> SetMinSize(300, 120);
+
+       // Figure type
+       topsizer -> Add( sizerH0 ,1,wxALL|wxEXPAND  ,0);
+
+       // Scale
+       topsizer -> Add( sizerH2 ,1,wxALL|wxEXPAND  ,0);
+
+       // Rotation
+       topsizer -> Add( sizerH3 ,1,wxALL|wxEXPAND  ,0);
+
+       // Intern / Extern
+       topsizer -> Add( sizerH4 ,1,wxALL  ,0);
+
+
+       // Isovalue limite
+       topsizer -> Add( sizerH5 ,1,wxALL |wxEXPAND ,0);
+
+       // btn Extraction
+       topsizer -> Add( sizerH6        , 1 , wxALL  ,0);
+
+       // Histograme
+       topsizer -> Add( _histogrammeAccumulated ,1,  wxALL  ,0);
+
+       // Volumic information
+       topsizer -> Add( sizerH7                                , 1 , wxALL|wxEXPAND   ,0);
+
+
+
+//    wxBoxSizer *sizerHor = new wxBoxSizer(wxHORIZONTAL);
+    wxBoxSizer *sizerHor = new wxBoxSizer(wxVERTICAL);
+       sizerHor -> Add( topsizer                               , 1 , wxALL | wxEXPAND  ,0);
+
+
+       wxWindow *panelPlotHistogramme = CreatePlotHistogrammeInterface();
+       sizerHor -> Add( panelPlotHistogramme   , 1 , wxGROW  ,0);
+
+
+       this->SetAutoLayout(true);
+       this->SetSizer( sizerHor );      
+       this->Layout(); 
+//EEDxx2.4
+//     this->FitInside();
+}
+
+//-------------------------------------------------------------------
+
+void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
+{
+       wxBusyCursor wait;
+
+       bool                    inside;
+       bool                    volInt, volExt;
+       int                             xx,yy,zz;
+       unsigned short  *pOrg;
+       unsigned short  *p_histogramme;
+       int                             dim[3];
+       double                  spc[3];
+       long int                contAfter = 0;
+       long int                contBefor = 0;
+
+       double min=999999999;
+       double max=-999999999;
+
+       volExt=_volExtern->GetValue();
+       volInt=_volIntern->GetValue();
+       int isoValue                = _isoValue->GetValue();
+       int valueBeforeIsoValue = _valueBeforeIsoValue->GetValue(); 
+       int valueAfterIsoValue  = _valueAfterIsoValue ->GetValue(); 
+
+       InitHistogramme();
+       p_histogramme = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
+
+       _imageData->GetDimensions(dim);    
+       _imageData->GetSpacing(spc);    
+       _actualCuttingModel->CalculeInversMatrix();
+
+       for (xx=0;xx<dim[0]; xx++)
+       {
+               for (yy=0;yy<dim[1]; yy++)
+               {
+                       for (zz=0;zz<dim[2];zz++)
+                       {
+                               inside=_actualCuttingModel->IfPointInside(xx,yy,zz);
+                               if (  ((inside==true)&&(volInt==true)) || ((!inside==true)&&(volExt==true)) )
+                               {
+                                       pOrg=(unsigned short*)_imageData->GetScalarPointer (xx,yy,zz); 
+
+                                       if ((*pOrg)<isoValue)
+                                       {
+                                               contBefor++;
+                                               if (valueBeforeIsoValue!=-1)
+                                               {
+                                                       *pOrg=valueBeforeIsoValue;
+                                               }
+                                       } else {
+                                               contAfter++;
+                                               if (valueAfterIsoValue!=-1)
+                                               {
+                                                       *pOrg=valueAfterIsoValue;
+                                               } // if
+                                       } // if isovalue
+
+                                       p_histogramme[*pOrg]++;
+                                       if (*pOrg<min) min=*pOrg; 
+                                       if (*pOrg>max) max=*pOrg; 
+                               } // if inside
+                       } // for zz
+               } // for yy
+       } // for xx
+
+
+       // Information
+       wxString infoToVo;
+       wxString infoSuVo;
+       wxString infoSuVoA;
+       wxString infoPixLe;
+       wxString infoPixHi;
+
+       double volumeUnit = spc[0]*spc[1]*spc[2];
+       long int totalSubVolume = contBefor + contAfter;
+       double contBeforPorc    = 100*(double)contBefor/(double)totalSubVolume;
+       double contAfterPorc    = 100*(double)contAfter/(double)totalSubVolume;
+       infoToVo.Printf(_T("%dx%dx%d = %d"),dim[0],dim[1],dim[2], dim[0]*dim[1]*dim[2] );
+       infoSuVo.Printf(_T("%ld") , totalSubVolume);
+       infoSuVoA.Printf(_T("%.2f"), _actualCuttingModel->GetTheoricVolume() );
+       infoPixLe.Printf(_T("%ld pix.   (%.2f %s)  -  %.2f mm^3"),contBefor, contBeforPorc ,_T("%"),contBefor*volumeUnit);
+       infoPixHi.Printf(_T("%ld pix.   (%.2f %s)  -  %.2f mm^3"),contAfter, contAfterPorc ,_T("%"),contAfter*volumeUnit);
+
+       _infoToVo->SetLabel(infoToVo);
+       _infoSuVo->SetLabel(infoSuVo);
+       _infoSuVoA->SetLabel(infoSuVoA);
+       _infoPixLe->SetLabel(infoPixLe);
+       _infoPixHi->SetLabel(infoPixHi);
+
+       // Histogram
+       if ( _histogrammeAccumulated->GetValue()==true )
+       {
+               int dimHist[3];
+               _histogrammeVector -> GetDimensions ( dimHist );
+
+               int i,size=dimHist[0];
+               for (i=1; i<=size; i++)
+               {
+                       p_histogramme[i] = p_histogramme[i] + p_histogramme[i-1];
+               }
+       }
+       double range[2];
+       _histogrammeVector->Update();
+       _histogrammeVector->GetScalarRange(range);
+       _xyplot->SetYRange( 0   , range[1]      );
+       _xyplot->SetXRange( min , max           );
+
+       _vtkclipping3Ddataviewer->RefreshSurface();
+       _wxvtkbaseView->Refresh();
+
+//     _wxvtkbaseView->RefreshView();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+}
+
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::OnTypeFig(wxCommandEvent& event)
+{
+       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _actualActor );
+
+       if (_typeFig->GetSelection()==0){
+               _actualCuttingModel=_modelCylinder;
+               _actualActor=_cylinderActor;
+       }
+       if (_typeFig->GetSelection()==1){
+               _actualCuttingModel=_modelCube;
+               _actualActor=_cubeActor;
+       }
+       if (_typeFig->GetSelection()==2){
+               _actualCuttingModel=_modelSphere;
+               _actualActor=_sphereActor;
+       }
+       _wxvtk3Dbaseview->GetRenderer()->AddActor( _actualActor );
+       RefreshOpacity();
+       RefreshView();
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::RefreshOpacity()
+{
+       double op= _opacityFig->GetValue()/100.0;
+       _actualActor->GetProperty()->SetOpacity( op );
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::OnOpacityFig(wxScrollEvent& event)
+{
+       RefreshOpacity();
+       Refresh();
+}
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::RefreshView()
+{
+       SetParamsOfTransformation( );
+       Refresh();
+}
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::Refresh()
+{
+       _wxvtk3Dbaseview->Refresh();
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::SetParamsOfTransformation( )
+{
+       double spc[3];
+       vtkImageData *vtkimagedata = _vtkmprbasedata->GetImageData();
+       vtkimagedata->GetSpacing(spc);
+       int px = (int) (_vtkmprbasedata->GetX() );
+       int py = (int) (_vtkmprbasedata->GetY() );
+       int pz = (int) (_vtkmprbasedata->GetZ() );
+       int sx = (int) (_scaleX->GetValue() * spc[0] );
+       int sy = (int) (_scaleY->GetValue() * spc[1] );
+       int sz = (int) (_scaleZ->GetValue() * spc[2] );
+       _actualCuttingModel     -> SetScale             ( sx    , sy    , sz );
+       _actualCuttingModel     -> SetPosition  ( px    , py , pz       );
+       _actualCuttingModel     -> SetRotation  ( _rotationX->GetValue()        , _rotationY->GetValue() , _rotationZ->GetValue()       );
+       _actualCuttingModel     -> SetSpacing   ( spc[0]        , spc[1]    , spc[2] );
+       _actualCuttingModel     -> CalculeMatrix();
+}
+
+//-------------------------------------------------------------------
+
+void wxPanelCuttingImageData::OnTransform(wxScrollEvent& event)
+{
+       RefreshView();
+}
+
+//-------------------------------------------------------------------
+void wxPanelCuttingImageData::SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata )
+{
+       _vtkmprbasedata = vtkmprbasedata;
+       _imageData              = _vtkmprbasedata->GetImageData();
+}
+
+//-------------------------------------------------------------------
+
+void wxPanelCuttingImageData::Configure()
+{
+       _actualCuttingModel=_modelCylinder;
+       _actualActor=_cylinderActor;
+       _wxvtk3Dbaseview->GetRenderer()->AddActor( _actualActor );
+       SetParamsOfTransformation();
+       RefreshView();
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.h
new file mode 100644 (file)
index 0000000..0c27caa
--- /dev/null
@@ -0,0 +1,101 @@
+#ifndef WXPANELCUTTINGIMAGEDATA_H_
+#define WXPANELCUTTINGIMAGEDATA_H_
+
+#include "vtkClipping3DDataViewer.h"
+
+#include "figureCuttingCylinderModel.h"
+#include "figureCuttingCubeModel.h"
+#include "figureCuttingSphereModel.h"
+#include "figureCuttingModel.h"
+
+#include "wxVtk3DBaseView.h"
+
+#include "vtkXYPlotActor.h"
+#include "vtkCubeSource.h"
+#include "vtkCylinderSource.h"
+#include "vtkSphereSource.h"
+
+class wxPanelCuttingImageData : public wxPanel
+{
+public:
+       wxPanelCuttingImageData (wxWindow *parent);
+       ~wxPanelCuttingImageData ();
+       void OnTransform(wxScrollEvent& event);
+       void OnOpacityFig(wxScrollEvent& event);
+       void OnTypeFig(wxCommandEvent& event);
+       void OnExtract(wxCommandEvent& event);
+       void SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata );
+       void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
+       void SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview );
+
+       void SetParamsOfTransformation( );
+       void Configure();
+       void Refresh();
+       void RefreshView();
+       void RemoveActors();
+
+
+private:
+       wxSlider                                                *_opacityFig;
+       wxSlider                                                *_scaleX;
+       wxSlider                                                *_scaleY;
+       wxSlider                                                *_scaleZ;
+       wxSlider                                                *_rotationX;
+       wxSlider                                                *_rotationY;
+       wxSlider                                                *_rotationZ;
+       
+       wxRadioButton                                   *_volIntern;
+       wxRadioButton                                   *_volExtern;
+       wxCheckBox                                              *_histogrammeAccumulated;
+       wxSlider                                                *_isoValue;
+       wxSlider                                                *_valueBeforeIsoValue;
+       wxSlider                                                *_valueAfterIsoValue;
+       wxChoice                                                *_typeFig;
+
+       wxStaticText                                    *_infoToVo;
+       wxStaticText                                    *_infoSuVo;
+       wxStaticText                                    *_infoSuVoA;
+       wxStaticText                                    *_infoPixLe;
+       wxStaticText                                    *_infoPixHi;
+
+       // Model
+       figureCuttingCylinderModel              *_modelCylinder;
+       figureCuttingCubeModel                  *_modelCube;
+       figureCuttingSphereModel                *_modelSphere;
+       figureCuttingModel                              *_actualCuttingModel;
+
+       // view
+       vtkCubeSource                                   *_vtkcube;
+       vtkSphereSource                                 *_vtksphere;
+       vtkCylinderSource                               *_vtkcylinder;
+       vtkPolyDataMapper                               *_cubeMapper;
+       vtkPolyDataMapper                               *_sphereMapper;
+       vtkPolyDataMapper                               *_cylinderMapper;
+       vtkActor                                                *_cubeActor;
+       vtkActor                                                *_sphereActor;
+       vtkActor                                                *_cylinderActor;
+       vtkActor                                                *_actualActor;
+
+
+       vtkMPRBaseData                                  *_vtkmprbasedata;
+       wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
+       vtkImageData                                    *_imageData;
+       vtkClipping3DDataViewer                 *_vtkclipping3Ddataviewer;
+
+       vtkImageData                                    *_histogrammeVector;
+       vtkXYPlotActor                                  *_xyplot;
+       wxVtkBaseView                                   *_wxvtkbaseView;
+       vtkRenderer                                             *_renplotter;
+
+       void    CreateModel();
+       void    CreateInterface();
+       void    Create3DViewObjects();
+       void    RefreshOpacity();
+       wxWindow *CreatePlotHistogrammeInterface();
+       void    InitHistogramme();
+
+
+protected:
+};
+
+#endif /*WXPANELCUTTINGIMAGEDATA_H_*/
index e1eabbf85c38d9573b7641213efc5e38bc9b0348..dde0d2434d98a7040610500c5bba470d0d7d20e9 100644 (file)
 #include "pPlotter/mBarRange.h"//SIL//
 
 //#include <marInterface.h>
-#include <axisExtractor02.h>
+//#include <include/axisExtractor02.h>
 
 
 #include "vtkSTLExtractor.h"    
-#include "vtkJoiner.h"
+#include "include/vtkJoiner.h"
 
 #include "marTypes.h"
 
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.cxx
new file mode 100644 (file)
index 0000000..189240f
--- /dev/null
@@ -0,0 +1,718 @@
+#include "wxSphereView.h"
+
+
+wxSphereView::wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData )
+: wxVtk2DBaseView(parent)
+{
+       _delta                          =       1;
+       _vtkmprbasedata         =       vtkmprbasedata;
+       _imageDataOriginal      =       imageData;
+
+       _imageSphere            =       vtkImageData::New();
+       _imageSphere->SetDimensions (150,150,500);
+       _imageSphere->SetScalarTypeToUnsignedShort();
+       _imageSphere->AllocateScalars();   
+       _imageSphere->Update();   
+
+
+       vtkBaseData *vtkbasedata = new vtkBaseData();
+       vtkbasedata->SetMarImageData( new marImageData(_imageSphere) );
+       this->SetVtkBaseData(vtkbasedata);
+
+    _transform                 =       vtkTransform::New();
+    _transform1                        =       vtkTransform::New();
+    _transform2                        =       vtkTransform::New();
+       _transform ->Identity();
+       _transform1->Identity();
+       _transform2->Identity();
+
+       _radio=25;
+}
+
+//-------------------------------------------------------------------
+
+wxSphereView::~wxSphereView()
+{
+       _transform  -> Delete();
+       _transform1 -> Delete();
+       _transform2 -> Delete();
+       ResetlstId();
+}
+
+//----------------------------------------------------------------------------
+
+double wxSphereView::GetRadio()
+{
+       return _radio;
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::SetRadio(double radio)
+{
+       if (radio<0)
+       {
+               radio=0;
+       }
+       _radio=radio;
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::Configure()
+{
+       wxVtk2DBaseView::Configure();
+
+       _vtkinteractorstylesphere = new vtkInteractorStyleSphere();
+       ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _vtkinteractorstylesphere );
+       double points[4][3];
+
+// EED purify 12/sep/2006
+       int i,j;
+       for (i=0;i<4;i++)
+       {
+               for (j=0;j<3;j++)
+               {
+                       points[i][j]=0;
+               }
+       }
+
+       InitSphere(points);
+       DefineImageSphere();
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::RefreshPoint()
+{
+       double x        = _vtkmprbasedata->GetX() - _centerX;
+       double y        = _vtkmprbasedata->GetY() - _centerY;
+       double z        = _vtkmprbasedata->GetZ() - _centerZ;
+       double alpha= atan2(x,z);
+       double beta = atan2( y , sqrt(z*z+x*x) );
+
+       alpha           = alpha*180/3.1416;
+       beta            = beta*180/3.1416;
+
+       _transform1->Identity();
+       _transform1->RotateY(alpha);
+       _transform1->RotateX(-beta);
+
+       _radio= sqrt(x*x + y*y +z*z);
+
+       RefreshView();
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::RefreshView()
+{
+       DefineImageSphere();
+       wxVtk2DBaseView::Refresh();
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::RotationEnd()
+{
+       _transform1->RotateWXYZ(_ang,_vxb,_vyb,0);
+       _transform2->Identity();
+       SetDeltaVoxel(1);
+       ResetlstId();
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::RotationStart(double vx, double vy, bool ok_v, bool ok_ang)
+{
+       if (ok_ang==false)
+       {
+               _ang = -sqrt( vx*vx + vy*vy ) / 1.0;
+       }
+
+       if (ok_v==false){
+               _vxb=-vy;
+               _vyb=vx;
+       }
+
+       _transform2->Identity();
+       _transform2->RotateWXYZ(_ang,_vxb,_vyb,0);
+       SetDeltaVoxel(3);
+       ResetlstId();
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::GetPointSphere(double p[3],double r1,double angA,double angB)
+{
+       double in[3],out[3];
+       in[0]=0;   
+       in[1]=r1;   
+       in[2]=0;
+       vtkTransform *transform = vtkTransform::New();
+       transform->Identity();
+       transform->RotateX(angB);
+       transform->RotateZ(angA);
+       transform->TransformPoint(in,out);
+       p[0]=out[0];
+       p[1]=out[1];
+       p[2]=out[2];
+       transform->Delete(); 
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::RotatePointOverTheSphere( double pp[3], double p[3],double cc[3])
+{
+
+       double out[3];
+       _transform->TransformPoint(p,out);
+       pp[0] = out[0] + cc[0];
+       pp[1] = out[1] + cc[1];
+       pp[2] = out[2] + cc[2];
+
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image)
+{
+       double t;
+       double difX = pp2[0]-pp1[0];
+       double difY = pp2[1]-pp1[1];
+       double difZ = pp2[2]-pp1[2];
+
+       double  max             = 200;
+
+       int dimOrg[3];
+       int dimRes[3];
+       int z;
+       _imageDataOriginal->GetDimensions(dimOrg);              
+       image->GetDimensions(dimRes);           
+
+       int i;
+       double x1=pp1[0];
+       double y1=pp1[1];
+       double z1=pp1[2];
+       int xx=-1,yy=-1,zz=-1;
+
+       for (i=0;i<max;i++)
+       {
+               t  = i/max;
+               xx = (int) (x1+t*difX);
+               yy = (int) (y1+t*difY);
+               zz = (int) (z1+t*difZ);
+
+               z=i;
+               if ((xx>=0) && (xx<dimOrg[0]) && (yy>=0) && (yy<dimOrg[1]) && (zz>=0) && (zz<dimOrg[2]) &&
+                       (AngX>=0) && (AngX<dimRes[0]) && (AngY>=0) && (AngY<dimRes[1]) && (z>=0) && (z<dimRes[2]) )
+               {
+                       unsigned short *pOrg=(unsigned short*)_imageDataOriginal->GetScalarPointer (xx,yy,zz); 
+                       unsigned short *pRes=(unsigned short*)image->GetScalarPointer( (int)AngX , (int)AngY , z ); 
+                       *pRes=*pOrg;
+               }
+       }
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::ResetlstId()
+{
+       int i,size=_lstId.size();
+       for (i=size-1;i>=0;i--)
+       {
+               delete _lstId[i];
+       }
+       _lstId.clear();
+}
+
+//----------------------------------------------------------------------------
+
+int wxSphereView::GetIdOfImage(double radio)
+{
+       int id=0;
+       int dim[3];     
+       _imageSphere->GetDimensions(dim);       
+       int sizeMaxList = dim[2];
+       // Search in list >> alpha beta radio
+       int i,size=_lstId.size();
+       for (i=0; i<size;i++)
+       {
+               //idAlBeRa *tmp=_lstId[i]; // JPRx
+               if ((_lstId[i]->_radio==radio) && (_lstId[i]->_deltavoxel==_delta)) 
+               {
+                       return _lstId[i]->_id;
+               }
+       }
+       if (size>sizeMaxList)
+       {
+               delete _lstId[size-1];
+               _lstId.pop_back(); 
+       }
+       if (size!=0){
+               id=_lstId[0]->_id+1;
+               id = id % sizeMaxList;
+       } else {
+               id = 0;
+       }
+
+       FiltreImage(id,radio);
+       _lstId.insert(_lstId.begin(),1,new idAlBeRa(id,radio,_delta) ); 
+
+       return id;
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::DefineImageSphere()
+{
+       int id;
+       id=GetIdOfImage( _radio );
+       GetVtkBaseData()->SetZ( id );
+}
+
+
+//----------------------------------------------------------------------------
+void wxSphereView::SetDeltaVoxel(int delta)
+{
+       _delta=delta;
+}
+
+//----------------------------------------------------------------------------
+void wxSphereView::SetVoxel(double i, double j, int delta,double id,  unsigned short gris)
+{
+       int ii,jj,delta2;
+       unsigned short *pRes;
+       int dimRes[3];
+       _imageSphere->GetDimensions(dimRes);
+
+       delta2=delta-1;
+       for ( ii=(int)(i-delta2) ; ii<=(int)(i+delta2) ; ii++ )
+       {
+               for ( jj=(int)(j-delta2) ; jj<=(int)(j+delta2) ; jj++ )
+               {
+                       if ( (ii>=0)&&(ii<dimRes[0]) &&  
+                                (jj>=0)&&(jj<dimRes[1]) )
+                       {
+                               pRes = (unsigned short*)_imageSphere->GetScalarPointer( ii , jj , (int)id );
+                               *pRes=gris;
+                       }
+               }
+       }
+
+}
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::SetXYZtoParent(double i, double j)
+{
+
+       double factor = 0.75;
+       double radio2   = _radio*_radio;
+       double pxx,pyy,d2x,d2y;
+       double cc[3],p[3],pp[3];
+       cc[0]=_centerX;
+       cc[1]=_centerY;
+       cc[2]=_centerZ;
+       double aa;
+       int dimRes[3],dimOrig[3];
+       _imageSphere->GetDimensions(dimRes);
+       d2x=dimRes[0]/2;
+       d2y=dimRes[1]/2;
+       _imageDataOriginal->GetDimensions(dimOrig);
+
+       p[0]  = (i - d2x)*factor;
+       pxx=p[0]*p[0];
+       p[1]  = (j - d2y)*factor;
+       pyy=p[1]*p[1];
+       aa = pxx + pyy;
+       if (radio2>aa){
+               aa=radio2-aa;
+               p[2]  = sqrt(aa);
+               RotatePointOverTheSphere( pp, p,cc);
+               if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
+                        (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
+                        (pp[2]>=0) && (pp[2]<dimOrig[2]) )
+               {
+                       if (_vtkmprbasedata){
+                               _vtkmprbasedata->SetX(pp[0]);
+                               _vtkmprbasedata->SetY(pp[1]);
+                               _vtkmprbasedata->SetZ(pp[2]);
+                       }
+               }
+       }
+}
+
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::FiltreImageB(int id, double radio, bool ok,int deltaTMP)
+{      
+       double factor = 0.75;
+       double radioB   = radio/3;
+       double radio2   = radio*radio;
+       double pxx,pyy,d2x,d2y;
+       double cc[3],p[3],pp[3];
+       cc[0]=_centerX;
+       cc[1]=_centerY;
+       cc[2]=_centerZ;
+       double aa;
+       unsigned short *pOrig;
+       int dimRes[3],dimOrig[3];
+       double i,j;
+       int ext[6];
+       _imageSphere->GetExtent(ext);
+       _imageSphere->GetDimensions(dimRes);
+       //JCP 24 - 04 -09
+       //_imageSphere->SetExtent(0,dimRes[0]-1,0,dimRes[1]-1,0,dimRes[2]-1);
+       _imageSphere->SetExtent(ext);
+       //JCP 24 - 04 -09
+       d2x=dimRes[0]/2;
+       d2y=dimRes[1]/2;
+//     double deltaTMP=_delta;
+       _imageDataOriginal->GetDimensions(dimOrig);
+
+       int start,end;
+       int limitA,limitB;
+       limitA  = (int) ( (-radioB/factor)+d2x );
+       limitB  = (int) ( (radioB/factor)+d2x );
+       if (ok==true){
+               start   = limitA;
+               end             = limitB;
+       } else {
+               start=0;
+               end=dimRes[0];
+       }
+
+       for ( i=start ; i<end ; i=i+deltaTMP )
+       {
+               p[0]  = (i - d2x)*factor;
+               pxx=p[0]*p[0];
+               for (j=start;j<end;j=j+deltaTMP)
+               {
+                       p[1]  = (j - d2y)*factor;
+                       pyy=p[1]*p[1];
+                       aa = pxx + pyy;
+
+                       if  (( ((ok==false) && (!((i>limitA) && (i<limitB) && (j>limitA) && (j<limitB)))) )
+                                   ||
+                                       (ok==true))
+                       {
+                               if (radio2>aa){
+                                       aa=radio2-aa;
+                                       p[2]  = sqrt(aa);
+                                       RotatePointOverTheSphere( pp, p,cc);
+                                       if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
+                                                (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
+                                                (pp[2]>=0) && (pp[2]<dimOrig[2]) )
+                                       {
+                                               pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( (int)(pp[0]) , (int)(pp[1]) , (int)(pp[2]) ); 
+                                               SetVoxel(i,j,deltaTMP,id,*pOrig);
+                                       } else {
+                                               SetVoxel(i,j,deltaTMP,id,2000);
+                                       }
+                               } else {
+                                       SetVoxel(i,j,deltaTMP,id,0);
+                               }
+                       }
+               }
+       }
+
+       _imageSphere->Modified();  
+       _imageSphere->Update();
+}
+
+
+
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::FiltreImage(int id, double radio)
+{
+
+       _transform -> Identity();
+       _transform -> Concatenate(_transform1);
+       _transform -> Concatenate(_transform2);
+
+       FiltreImageB(id,radio,false, _delta);
+       FiltreImageB(id,radio,true, 1);
+}
+
+
+//----------------------------------------------------------------------------
+
+/*
+void wxSphereView::FiltreImage(int id, double radio)
+{
+       double radio2   = radio*radio;
+       double radio2TMP= (radio/2)*(radio/2);
+       double pxx,pyy,d2x,d2y;
+       double cc[3],p[3],pp[3];
+       cc[0]=_centerX;
+       cc[1]=_centerY;
+       cc[2]=_centerZ;
+       double aa;
+       unsigned short *pOrig;
+       int dimRes[3],dimOrig[3];
+       double i,j;
+       _imageSphere->GetDimensions(dimRes);
+       _imageSphere->SetExtent(0,dimRes[0]-1,0,dimRes[1]-1,0,dimRes[2]-1);
+       d2x=dimRes[0]/2;
+       d2y=dimRes[1]/2;
+       double deltaTMP=_delta;
+       _imageDataOriginal->GetDimensions(dimOrig);
+
+       for ( i=0 ; i<dimRes[0] ; i=i+deltaTMP )
+       {
+               p[0]  = (i - d2x)*0.75;
+               pxx=p[0]*p[0];
+               for (j=0;j<dimRes[1];j=j+deltaTMP)
+               {
+                       p[1]  = (j - d2y)*0.75;
+                       pyy=p[1]*p[1];
+                       aa = pxx + pyy;
+
+                       if (aa>radio2TMP)
+                       {
+                               if (radio2>aa){
+                                       aa=radio2-aa;
+                                       p[2]  = sqrt(aa);
+                                       RotatePointOverTheSphere( pp, p,cc);
+                                       if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
+                                                (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
+                                                (pp[2]>=0) && (pp[2]<dimOrig[2]) )
+                                       {
+                                               pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( pp[0] , pp[1] , pp[2] ); 
+                                               SetVoxel(i,j,deltaTMP,id,*pOrig);
+                                       } else {
+                                               SetVoxel(i,j,deltaTMP,id,2000);
+                                       }
+                               } else {
+                                       SetVoxel(i,j,deltaTMP,id,0);
+                               }
+                       }
+               }
+       }
+
+
+       deltaTMP=1;
+       for ( i=0 ; i<dimRes[0] ; i=i+deltaTMP )
+       {
+               p[0]  = (i - d2x)*0.75;
+               pxx=p[0]*p[0];
+               for (j=0;j<dimRes[1];j=j+deltaTMP)
+               {
+                       p[1]  = (j - d2y)*0.75;
+                       pyy=p[1]*p[1];
+                       aa = pxx + pyy;
+                       if (aa<=radio2TMP)
+                       {
+                               if (radio2>aa){
+                                       aa=radio2-aa;
+                                       p[2]  = sqrt(aa);
+                                       RotatePointOverTheSphere( pp, p,cc);
+                                       if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
+                                                (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
+                                                (pp[2]>=0) && (pp[2]<dimOrig[2]) )
+                                       {
+                                               pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( pp[0] , pp[1] , pp[2] ); 
+                                               SetVoxel(i,j,deltaTMP,id,*pOrig);
+                                       } else {
+                                               SetVoxel(i,j,deltaTMP,id,2000);
+                                       }
+                               } else {
+                                       SetVoxel(i,j,deltaTMP,id,0);
+                               }
+                       }
+               }
+       }
+
+       _imageSphere->Modified();  
+       _imageSphere->Update();
+}
+*/
+/*
+void wxSphereView::FiltreImage(vtkImageData *imageSphere)
+{
+       int dim[3],i,j,k;
+       imageSphere->GetDimensions(dim);
+       for (i=0;i<dim[0];i++)
+       {
+               for (j=0;j<dim[1];j++)
+               {
+                       for (k=0;k<dim[2];k++)
+                       {
+                               unsigned short *pRes=(unsigned short*)imageSphere->GetScalarPointer (i,j,k); 
+                               *pRes=0;
+                       }
+               }
+       }
+
+       double deltaA=90;
+       double cc[3],p1[3],p2[3],pp1[3],pp2[3];
+       cc[0]=_centerX;
+       cc[1]=_centerY;
+       cc[2]=_centerZ;
+       double r1       = _sl_radio->GetValue() - _sl_thickness->GetValue()/2;
+       double r2       = _sl_radio->GetValue() + _sl_thickness->GetValue()/2;
+       if (r1<10)
+       {
+               r1=10;
+       }
+       double alpha= _sl_alpha->GetValue();
+       double beta     = _sl_beta->GetValue();
+
+       double angA,angB;
+       for (angA=-deltaA;angA<deltaA;angA++)
+       {
+               for (angB=-deltaA;angB<deltaA;angB++)
+               {
+                       GetPointSphere(p1,r1,angA,angB);
+                       GetPointSphere(p2,r2,angA,angB);
+                       RotatePointOverTheSphere( pp1, alpha, beta, p1 ,cc );
+                       RotatePointOverTheSphere( pp2, alpha, beta, p2 ,cc );
+                       TransferePoints(pp1,pp2,angA+alpha+180,angB+beta+90,imageSphere);
+               }
+       }
+}
+*/
+
+
+//----------------------------------------------------------------------------
+
+void wxSphereView::InitSphere(double points[4][3])
+{
+       double cc[3];
+    double r = SphereFindCenter(points,cc); // 4-points , center
+    if (r > 0)
+    {
+        _centerX       = (int)(cc[0]);
+        _centerY       = (int)(cc[1]);
+        _centerZ       = (int)(cc[2]);
+    } else {
+               int dim[3];
+               _imageDataOriginal->GetDimensions(dim);
+        _centerX       = (int)(dim[0]/2);
+        _centerY       = (int)(dim[1]/2);
+        _centerZ       = (int)(dim[2]/2);
+       }
+}
+
+//----------------------------------------------------------------------------
+
+// Calculate center and radius of sphere given four points
+// http://home.att.net/~srschmitt/script_sphere_solver.html
+// source code HTML <script language=JavaScript>
+double wxSphereView::SphereFindCenter(double P[4][3], double cc[3])
+{
+    int i;
+    double r, m11, m12, m13, m14, m15;
+       double a[4][4];
+
+    for (i = 0; i < 4; i++)                    // find minor 11
+    {
+        a[i][0] = P[i][0];
+        a[i][1] = P[i][1];
+        a[i][2] = P[i][2];
+        a[i][3] = 1;
+    }
+    m11 = determinant( a, 4 );
+
+    for (i = 0; i < 4; i++)                    // find minor 12 
+    {
+        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
+        a[i][1] = P[i][1];
+        a[i][2] = P[i][2];
+        a[i][3] = 1;
+    }
+    m12 = determinant( a, 4 );
+
+    for (i = 0; i < 4; i++)                    // find minor 13
+    {
+        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
+        a[i][1] = P[i][0];
+        a[i][2] = P[i][2];
+        a[i][3] = 1;
+    }
+    m13 = determinant( a, 4 );
+
+    for (i = 0; i < 4; i++)                    // find minor 14
+    {
+        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
+        a[i][1] = P[i][0];
+        a[i][2] = P[i][1];
+        a[i][3] = 1;
+    }
+    m14 = determinant( a, 4 );
+
+
+    for (i = 0; i < 4; i++)                    // find minor 15
+    {
+        a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
+        a[i][1] = P[i][0];
+        a[i][2] = P[i][1];
+        a[i][3] = P[i][2];
+    }
+    m15 = determinant( a, 4 );
+
+    if (m11 == 0)
+    {
+        r = 0;
+    }
+    else
+    {
+               // center of sphere
+        cc[0] =  0.5*m12/m11;  //cx                  
+        cc[1] = -0.5*m13/m11;  //cy
+        cc[2] =  0.5*m14/m11;  //cz
+               // Sphere radio 
+        r  = sqrt( cc[0]*cc[0] + cc[1]*cc[1] + cc[2]*cc[2] - m15/m11 );
+    }
+
+    return r;                                  // the radius
+}
+//----------------------------------------------------------------------------
+
+//  Recursive definition of determinate using expansion by minors.
+double wxSphereView::determinant(double a[4][4], int n)
+{
+    int i, j, j1, j2;
+    double d;
+       double m[4][4];
+
+       for (i=0;i<4;i++)
+       {
+               for (j=0;j<4;j++)
+               {
+                       m[i][j]=0;
+               }
+       }
+
+    if (n == 2)                                // terminate recursion
+    {
+        d = a[0][0]*a[1][1] - a[1][0]*a[0][1];
+    }
+    else 
+    {
+        d = 0;
+        for (j1 = 0; j1 < n; j1++ )            // do each column
+        {
+            for (i = 1; i < n; i++)            // create minor
+            {
+                j2 = 0;
+                for (j = 0; j < n; j++)
+                {
+                    if (j == j1) continue;
+                    m[i-1][j2] = a[i][j];
+                    j2++;
+                }
+            }
+            
+            // sum (+/-)cofactor * minor  
+            d = d + pow(-1.0, j1)*a[0][j1]*determinant( m, n-1 );
+        }
+    }
+
+    return d;
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.h
new file mode 100644 (file)
index 0000000..049f417
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef WXSPHEREVIEW_H_
+#define WXSPHEREVIEW_H_
+
+#include "wxVtk2DBaseView.h"
+#include "idAlBeRa.h"
+#include "vtkInteractorStyleSphere.h"
+#include "vtkTransform.h"
+
+class wxMPRBaseData;
+
+class wxSphereView : public wxVtk2DBaseView
+{
+public:
+       wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData);
+       ~wxSphereView();
+       virtual void Configure();
+       void RotationEnd();
+       void RotationStart(double vx, double vy, bool ok_v, bool ok_ang);
+       virtual void    RefreshView();
+       virtual void    SetVoxel(double i, double j, int delta, double id, unsigned short gris);
+                       void    SetDeltaVoxel(int delta);
+                       double  GetRadio();
+                       void    SetRadio(double radio);
+                       int             GetIdOfImage(double radio);
+                       void    SetXYZtoParent(double i, double j);
+                       void    RefreshPoint();
+
+private:       
+       std::vector<idAlBeRa*> _lstId;
+
+       int                                                     _centerX;
+       int                                                     _centerY;
+       int                                                     _centerZ;
+       double                                          _radio;
+
+       double                                          _ang;
+       double                                          _vxb;
+       double                                          _vyb;
+
+       int                                                     _delta;
+
+       vtkImageData                            *_imageDataOriginal;
+       vtkImageData                            *_imageSphere;
+
+       vtkMPRBaseData                          *_vtkmprbasedata;
+       vtkInteractorStyleSphere        *_vtkinteractorstylesphere;
+
+       vtkTransform                            *_transform; 
+       vtkTransform                            *_transform1; 
+       vtkTransform                            *_transform2; 
+
+       void    FiltreImage(int id, double radio);
+       void    FiltreImageB(int id, double radio, bool ok,int deltaTMP);
+       void    DefineImageSphere();
+       void    ResetlstId();
+
+       void    InitSphere(double points[4][3]);
+       double  SphereFindCenter(double P[4][3], double cc[3]);
+       double  determinant(double a[4][4], int n);
+
+       void    GetPointSphere(double p[3],double r1,double angA,double angB);
+       void    RotatePointOverTheSphere( double pp[3], double p[3],double cc[3]);
+       void    TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image);
+};
+
+#endif /*WXSPHEREVIEW_H_*/
index 8881c822185f66e27710618d84427a656f9870db..9c313b558d4a29683686f73eb5ba669cc0329cb2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: wxVTKRenderWindowInteractor.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:43 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.3 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
   All rights reserved.
index 1482efa53e780375a9fb4c4b3822a2a217eaa761..7543b22efa6f2ffe8207ce12bf01aa8e8b418cb5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: wxVTKRenderWindowInteractor.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:43 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2009/05/14 13:54:35 $
+  Version:   $Revision: 1.3 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
   All rights reserved.
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.cxx
new file mode 100644 (file)
index 0000000..ecf2684
--- /dev/null
@@ -0,0 +1,77 @@
+
+#include "wxVTKRenderWindowInteractorPlus.h"
+#include "vtkInteractorStyleBaseView.h"
+
+BEGIN_EVENT_TABLE( wxVTKRenderWindowInteractorPlus, wxVTKRenderWindowInteractor )
+    EVT_LEFT_DCLICK( wxVTKRenderWindowInteractorPlus::OnLeftDClick )
+    EVT_RIGHT_DCLICK( wxVTKRenderWindowInteractorPlus::OnRightDClick )
+    EVT_MIDDLE_DCLICK( wxVTKRenderWindowInteractorPlus::OnMiddleDClick )
+       EVT_MOUSEWHEEL( wxVTKRenderWindowInteractorPlus::OnMouseWheel )
+END_EVENT_TABLE( );
+
+//-------------------------------------------------------------------
+wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus() 
+: wxVTKRenderWindowInteractor()
+{
+}
+
+
+//-------------------------------------------------------------------
+wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus(wxWindow *parent, wxVtkBaseView *wxvtkbaseview)
+: wxVTKRenderWindowInteractor(parent, -1)
+{
+       _wxvtkbaseview = wxvtkbaseview;
+}
+
+//-------------------------------------------------------------------
+wxVTKRenderWindowInteractorPlus::~wxVTKRenderWindowInteractorPlus()
+{
+}
+
+//---------------------------------------------------------------------------
+wxVTKRenderWindowInteractorPlus * wxVTKRenderWindowInteractorPlus::New()
+{
+  // we don't make use of the objectfactory, because we're not registered
+  return new wxVTKRenderWindowInteractorPlus;
+}
+
+//-------------------------------------------------------------------
+void wxVTKRenderWindowInteractorPlus::OnLeftDClick( wxMouseEvent& event )
+{
+       /**
+        * JCP 14/05/09  
+       wxvtkbaseview->GetInteractorStyleBaseView()->OnLeftDClick();
+       */
+       ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnLeftDClick();
+}
+//-------------------------------------------------------------------
+void wxVTKRenderWindowInteractorPlus::OnRightDClick( wxMouseEvent& event )
+{
+       /**
+                * JCP 14/05/09          
+       _wxvtkbaseview->GetInteractorStyleBaseView()->OnRightDClick();
+       */
+       ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnRightDClick();
+}
+//-------------------------------------------------------------------
+void wxVTKRenderWindowInteractorPlus::OnMiddleDClick( wxMouseEvent& event )
+{
+       /**
+                * JCP 14/05/09
+                
+       _wxvtkbaseview->GetInteractorStyleBaseView()->OnMiddleDClick();
+       */
+       ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMiddleDClick();
+}
+//-------------------------------------------------------------------
+void wxVTKRenderWindowInteractorPlus::OnMouseWheel( wxMouseEvent& event )
+{
+       /**
+                * JCP 14/05/09
+                
+       _wxvtkbaseview->GetInteractorStyleBaseView()->OnMouseWheel();
+       */
+       ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMouseWheel();
+}
+
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.h
new file mode 100644 (file)
index 0000000..ed3940d
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef WXVTKRENDERWINDOWINTERACTORPLUS_H_
+#define WXVTKRENDERWINDOWINTERACTORPLUS_H_
+
+
+//class wxVtkBaseView;
+#include "wxVtkBaseView.h"
+#include "wxVTKRenderWindowInteractor.h"
+
+
+class creaMaracasVisu_EXPORT wxVTKRenderWindowInteractorPlus : public wxVTKRenderWindowInteractor
+{
+public:
+       wxVTKRenderWindowInteractorPlus(wxWindow *parent ,wxVtkBaseView *_wxvtkbaseview);
+       virtual ~wxVTKRenderWindowInteractorPlus();
+
+       wxVTKRenderWindowInteractorPlus();
+        void OnLeftDClick( wxMouseEvent& event );   
+        void OnRightDClick( wxMouseEvent& event );   
+        void OnMiddleDClick( wxMouseEvent& event );   
+        void OnMouseWheel( wxMouseEvent& event );
+
+
+ // VTK
+    static wxVTKRenderWindowInteractorPlus * New();
+
+protected:
+private:
+       wxVtkBaseView   *_wxvtkbaseview;
+  DECLARE_EVENT_TABLE( );
+
+
+};
+
+#endif /*WXVTKRENDERWINDOWINTERACTORPLUS_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
new file mode 100644 (file)
index 0000000..53bf047
--- /dev/null
@@ -0,0 +1,242 @@
+#include "wxVtk2DBaseView.h"
+
+#include "vtkInfoTextImage.h"
+#include "vtkInteractorStyleBaseView2D.h"
+#include "vtkInfoTextImageInteractor.h"
+
+
+wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent)
+:wxVtkBaseView(parent)
+{
+       _imageViewer2XYZ        = NULL;
+       _vtkIinfoTextImage      = NULL;
+}
+
+//EED 5mai2009
+//-------------------------------------------------------------------
+wxVtk2DBaseView::~wxVtk2DBaseView()
+{      
+       if (_vtkIinfoTextImage!=NULL) 
+       {
+               delete _vtkIinfoTextImage; 
+       }
+
+       if (_imageViewer2XYZ!=NULL) 
+       {
+               delete _imageViewer2XYZ; 
+       }
+}
+
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel(double &X,double &Y, double &Z) //       virtual 
+{
+//EEDx5
+       double spc[3];
+//     GetVtkBaseData()->GetImageData()->GetSpacing(spc);
+       this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
+
+       X = X / spc[0];
+       Y = Y / spc[1];
+       Z = Z / spc[2];
+
+}
+
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::TransformCoordinate_spacing_ModelToView(double &X,double &Y, double &Z) //       virtual 
+{
+//EEDx5
+       double spc[3];
+//     GetVtkBaseData()->GetImageData()->GetSpacing(spc);
+       this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
+
+       X=X*spc[0];
+       Y=Y*spc[1];
+       Z=Z*spc[2];
+
+}
+
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::ResetView()
+{
+       double spx,spy,spz;
+       int x1,x2,y1,y2,z1,z2;
+       wxVtkBaseView::Configure();
+       
+       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       vtkImageData *imageData = GetVtkBaseData()->GetImageData();
+       imageData->UpdateInformation();
+       imageData->SetUpdateExtent( imageData->GetWholeExtent());
+       imageData->Update();
+
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
+       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 );
+
+       _imageViewer2XYZ->GetVtkImageViewer2()->Render();
+       SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+       
+}
+
+
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::Configure(bool okimage)
+{
+       double spx,spy,spz;
+       int x1,x2,y1,y2,z1,z2;
+       wxVtkBaseView::Configure();
+
+// EED 17 Oct 2007
+                       if (_imageViewer2XYZ==NULL)
+                       {
+                               _imageViewer2XYZ = new vtkImageViewer2_XYZ();
+                               wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+                               _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
+                               SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+                       }
+
+
+       vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
+       if (imageData!=NULL){
+               imageData->UpdateInformation();
+               imageData->SetUpdateExtent( imageData->GetWholeExtent());
+               imageData->Update();
+               if (okimage==true){
+                       imageData->GetSpacing (spx,spy,spz);
+                       imageData->GetExtent (x1,x2,y1,y2,z1,z2);
+
+
+                       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
+                       _imageViewer2XYZ->SetExtentDimension(x1,x2,y1,y2,z1,z2);
+                       double range[2];
+                         imageData->GetScalarRange(range);
+                         if (range[1]<20000){
+                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( (range[1]-range[0])/2 );
+                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( (range[1]+range[0])/4 );
+                         } else {
+                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( 1000 );
+                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( 500 );
+                         }
+// EED 31 Janvier 2007
+//vtkImageActor *vtkimageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor ();
+//vtkimageactor->InterpolateOff ();
+//vtkLookupTable * _collookup = vtkLookupTable::New( );
+//_collookup->SetNumberOfColors( 256 );
+//_collookup->SetTableRange( 0 , 255 );
+//_collookup->Build( );
+//_collookup->SetTableValue( 0  , 1 , 0 , 0 , 1 );
+//_collookup->SetTableValue(128 , 0 , 0 , 1 , 1 );
+//_collookup->SetTableValue(255 , 0 , 1 , 0 , 1 );
+//_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel ()->SetLookupTable(_collookup );
+
+
+// EED 17 Oct 2007
+//                     SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+
+
+                       vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2();
+                       vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera();
+
+//EED 17Avril2009      
+/*                     
+                       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         ); 
+*/ 
+                       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         ); 
+                       
+                       
+                       camera->SetClippingRange( 0.01                  , 1000000 );
+                       camera->ComputeViewPlaneNormal();
+                       camera->SetParallelScale( spx*(x2-x1)/3.0 );
+                       
+                       // text information over the graphic window
+                       _vtkIinfoTextImage                              = new vtkInfoTextImage();
+                       _vtkIinfoTextImageInteractor    = new vtkInfoTextImageInteractor();
+                       _vtkIinfoTextImage->SetWxVtk2DBaseView(this);
+                       _vtkIinfoTextImage->SetMarImageData( GetVtkBaseData()->GetMarImageData() );
+                       _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage);     
+                       _vtkIinfoTextImage->Configure();
+                       ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
+               } // okimage
+       } // imageData
+
+}
+
+//-------------------------------------------------------------------
+
+int    wxVtk2DBaseView::GetActualSlice()  // virtual 
+{
+       return (int)(_vtkbasedata->GetZ());
+}
+
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::SetActualSlice(int slice)  // Virtual
+{
+       _vtkbasedata->SetZ(slice);
+}
+
+//-------------------------------------------------------------------
+
+vtkBaseData *wxVtk2DBaseView::GetVtkBaseData()
+{
+       return _vtkbasedata;
+}
+
+//-------------------------------------------------------------------
+
+void wxVtk2DBaseView::SetVtkBaseData(vtkBaseData *vtkbasedata)
+{
+       _vtkbasedata=vtkbasedata;
+}
+
+//-------------------------------------------------------------------
+
+void wxVtk2DBaseView::Refresh()
+{
+       int z = (int)(GetVtkBaseData()->GetZ());
+       _imageViewer2XYZ->SetZSlice( z ); 
+
+       wxVtkBaseView::Refresh();
+}
+
+//-------------------------------------------------------------------
+
+void wxVtk2DBaseView::SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview)
+{
+       SetInteractorStyleBaseView(interactorstylebaseview);
+
+       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       interactorstylebaseview->SetInteractor ( iren );
+       iren->SetInteractorStyle(interactorstylebaseview);
+       interactorstylebaseview->SetwxVtkBaseView(this);        
+
+       vtkMaracasImageViewer2Callback * cbk = vtkMaracasImageViewer2Callback::New();
+       cbk->IV = _imageViewer2XYZ->GetVtkImageViewer2();
+       interactorstylebaseview->AddObserver( vtkCommand::WindowLevelEvent, cbk );
+       interactorstylebaseview->AddObserver( vtkCommand::StartWindowLevelEvent, cbk );
+       interactorstylebaseview->AddObserver( vtkCommand::ResetWindowLevelEvent, cbk );
+       cbk->Delete();
+}
+
+//---------------------------------------------------------------------------
+vtkRenderer* wxVtk2DBaseView::GetRenderer()    // virtual 
+{
+       return  _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer();
+}
+//---------------------------------------------------------------------------
+vtkRenderWindow* wxVtk2DBaseView::GetRenWin()          // virtual
+{
+       return  _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderWindow();
+}
+
+//-------------------------------------------------------------------
+
+void wxVtk2DBaseView::GetSpacing(double spc[3])  // virtual
+{
+       vtkImageData *imageData = GetVtkBaseData()->GetImageData();
+       imageData->GetSpacing(spc);
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.h
new file mode 100644 (file)
index 0000000..7494012
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef WXVTK2DBASEVIEW_H_
+#define WXVTK2DBASEVIEW_H_
+
+#include "wxVtkBaseView.h"
+#include "vtkImageViewer2_XYZ.h"
+
+//class vtkInteractorStyleBaseView;
+#include "vtkInteractorStyleBaseView.h"
+class vtkInfoTextImage;
+class vtkInfoTextImageInteractor;
+
+
+
+//------------------------------------------------------------------
+
+
+class creaMaracasVisu_EXPORT wxVtk2DBaseView: public wxVtkBaseView{
+public:
+       wxVtk2DBaseView(wxWindow *parent);
+       virtual ~wxVtk2DBaseView();
+       virtual void                    Configure(bool okimage=true);
+       vtkImageViewer2_XYZ*    _imageViewer2XYZ;
+       vtkBaseData*                    GetVtkBaseData();
+       void                                    SetVtkBaseData(vtkBaseData *vtkbasedata);
+       virtual void                    Refresh();
+       virtual void                    ResetView();
+       virtual int                             GetActualSlice();
+       virtual void                    SetActualSlice(int slice);
+                       void                    SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview);
+
+       virtual vtkRenderer*            GetRenderer();
+       virtual vtkRenderWindow*        GetRenWin();
+       virtual void                    TransformCoordinate_spacing_ViewToModel(double &X,double &Y, double &Z);
+       virtual void                    TransformCoordinate_spacing_ModelToView(double &X,double &Y, double &Z);
+       virtual void                    GetSpacing(double spc[3]);
+
+
+private:
+       vtkBaseData                                                     *_vtkbasedata;
+
+       vtkInfoTextImage                                        *_vtkIinfoTextImage;
+       vtkInfoTextImageInteractor                      *_vtkIinfoTextImageInteractor;
+
+protected:
+
+};
+
+#endif /*WXVTK2DBASEVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx
new file mode 100644 (file)
index 0000000..ffb634b
--- /dev/null
@@ -0,0 +1,104 @@
+#include "wxVtk3DBaseView.h"
+
+#include "vtkInteractorStyleBaseView3D.h"
+
+
+wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent)
+:wxVtkBaseView( parent )
+{
+       _configure      = false;
+       _aRenderer      = NULL;
+       _renWin         = NULL;
+       _aCamera        = NULL;
+}
+//-------------------------------------------------------------------
+wxVtk3DBaseView::~wxVtk3DBaseView()
+{
+       if (_aCamera!=NULL)             { _aCamera              -> Delete(); }
+       if (_aRenderer!=NULL)   { _aRenderer    -> Delete(); }
+       if (_renWin!=NULL)              { _renWin               -> Delete(); }
+}
+//-------------------------------------------------------------------
+vtkCamera* wxVtk3DBaseView::GetCamera()
+{
+       return _aCamera;
+}
+//-------------------------------------------------------------------
+vtkRenderer* wxVtk3DBaseView::GetRenderer()  // virtual
+{
+       return _aRenderer;
+}
+//-------------------------------------------------------------------
+vtkRenderWindow* wxVtk3DBaseView::GetRenWin()  // virtual
+{
+       return _renWin;
+}
+//-------------------------------------------------------------------
+void wxVtk3DBaseView::Refresh()
+{
+//     _renWin->Render();
+       vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor();
+       vri->vtkRenderWindowInteractor::Render();
+}
+//-------------------------------------------------------------------
+void wxVtk3DBaseView::Configure()
+{
+       if (_configure==false)
+       {
+               _configure=true;
+               //wxVtkBaseView::Configure();
+               _aRenderer      = vtkRenderer::New();
+               _renWin         = vtkRenderWindow::New();
+               _renWin->AddRenderer(_aRenderer);
+
+
+//       _renWin->SetStereoCapableWindow(1);
+// //      //renderwindow->SetStereoTypeToCrystalEyes();  
+//       _renWin->SetStereoTypeToRedBlue();
+//       _renWin->SetStereoRender(1);
+
+               GetWxVTKRenderWindowInteractor()->SetRenderWindow(_renWin);
+
+
+// EED Borrame
+//             vtkInteractorStyle3DMaracas *interactorStyle3DMaracas = vtkInteractorStyle3DMaracas::New(); 
+               vtkInteractorStyleBaseView3D *interactorStyleBaseView3D = vtkInteractorStyleBaseView3D::New(); 
+
+               SetInteractorStyleBaseView( interactorStyleBaseView3D );
+               interactorStyleBaseView3D->SetInteractor (  GetWxVTKRenderWindowInteractor() );
+               GetWxVTKRenderWindowInteractor()->SetInteractorStyle( interactorStyleBaseView3D );
+               interactorStyleBaseView3D->SetwxVtkBaseView(this);      
+
+
+/* EED Borrame
+  vtkInteractorStyleSwitch *iss = dynamic_cast<vtkInteractorStyleSwitch*>(_iren->GetInteractorStyle());
+  iss->SetCurrentStyleToTrackballCamera();
+*/
+
+               // It is convenient to create an initial view of the data. The
+               // FocalPoint and Position form a vector direction. Later on
+               // (ResetCamera() method) this vector is used to position the camera
+               // to look at the data in this direction.
+               _aCamera = vtkCamera::New();
+
+//EED 17Avril2009      
+/*
+               _aCamera->SetViewUp (0, 0, -1);
+               _aCamera->SetPosition (0, 1, 0);
+ */
+               _aCamera->SetViewUp (0, 1, 0);
+               _aCamera->SetPosition (0, 0, 1);
+               
+               _aCamera->SetFocalPoint (0, 0, 0);
+               _aCamera->ComputeViewPlaneNormal();
+
+       }
+}
+//-------------------------------------------------------------------
+//EED 27 sep 2006
+void wxVtk3DBaseView::GetSpacing(double spc[3])
+{
+       spc[0]=1;
+       spc[1]=1;
+       spc[2]=1;
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.h
new file mode 100644 (file)
index 0000000..8ab8755
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef WXVTK3DBASEVIEW_H_
+#define WXVTK3DBASEVIEW_H_
+
+#include "wxVtkBaseView.h"
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+
+class creaMaracasVisu_EXPORT wxVtk3DBaseView: public wxVtkBaseView{
+public:
+       wxVtk3DBaseView( wxWindow *parent );
+       virtual ~wxVtk3DBaseView();
+       vtkCamera*                      GetCamera();
+       virtual vtkRenderer*            GetRenderer();
+       virtual vtkRenderWindow*        GetRenWin();
+       void                            Refresh();
+       void                            Configure();
+       virtual void            GetSpacing(double spc[3]);
+
+private:
+       bool                            _configure;
+       vtkRenderer                     *_aRenderer;
+       vtkRenderWindow         *_renWin;
+       vtkCamera                       *_aCamera;
+protected:
+};
+
+#endif /*WXVTK3DBASEVIEW_H_*/
index 7bbda0afddaf0f87117dbe6ac11cff696a48df19..564f6594cc4e136f1b0a5d68599b68627a30802a 100644 (file)
-#include <vtkRenderer.h>
-#include <vtkRenderWindowInteractor.h>
-#include <vtkRenderWindow.h>
-#include <vtkObjectFactory.h>
-#include <vtkCamera.h>
-#include <vtkProperty.h>
-#include <vtkActor.h>
-#include <vtkInteractorStyleTrackballCamera.h>
-#include <vtkInteractorStyleSwitch.h>
-#include <vtkImageActor.h>
-#include <vtkTextProperty.h>
-#include <vtkImageMapToWindowLevelColors.h>
 
-#include "wxVtkBaseView.h"
-
-
-vtkStandardNewMacro(vtkInteractorStyleBaseView);
-vtkStandardNewMacro(vtkInteractorStyleBaseView2D);
-vtkStandardNewMacro(vtkInteractorStyleBaseView3D);
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-vtkImageViewer2_XYZ::vtkImageViewer2_XYZ()
-{
-       _vtkimageviewer2=  vtkImageViewer2::New();
-}
-//-------------------------------------------------------------------
-vtkImageViewer2_XYZ::~vtkImageViewer2_XYZ()
-{
-       //_vtkimageviewer2->Delete();
-}
-//-------------------------------------------------------------------
-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;
-}
-//-------------------------------------------------------------------
-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)
-{
-#if (VTK_MAJOR_VERSION >= 5)
-//             _vtkimageviewer2->SetSlice( slice );
-       vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
-       imageActor->SetDisplayExtent(_x1, _x2, _y1, _y2, slice, slice );  
-#else
-               _vtkimageviewer2->SetZSlice( slice );
-#endif
-
-
-}
-//-------------------------------------------------------------------
-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
-
-       
-       return result;
-}
-//-------------------------------------------------------------------
-vtkImageViewer2 *vtkImageViewer2_XYZ::GetVtkImageViewer2()
-{
-       return _vtkimageviewer2;
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-
-
-BEGIN_EVENT_TABLE( wxVTKRenderWindowInteractorPlus, wxVTKRenderWindowInteractor )
-    EVT_LEFT_DCLICK( wxVTKRenderWindowInteractorPlus::OnLeftDClick )
-    EVT_RIGHT_DCLICK( wxVTKRenderWindowInteractorPlus::OnRightDClick )
-    EVT_MIDDLE_DCLICK( wxVTKRenderWindowInteractorPlus::OnMiddleDClick )
-       EVT_MOUSEWHEEL( wxVTKRenderWindowInteractorPlus::OnMouseWheel )
-END_EVENT_TABLE( );
-
-//-------------------------------------------------------------------
-wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus() 
-: wxVTKRenderWindowInteractor()
-{
-}
-
-
-//-------------------------------------------------------------------
-wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus(wxWindow *parent, wxVtkBaseView *wxvtkbaseview)
-: wxVTKRenderWindowInteractor(parent, -1)
-{
-       _wxvtkbaseview = wxvtkbaseview;
-}
-
-//-------------------------------------------------------------------
-wxVTKRenderWindowInteractorPlus::~wxVTKRenderWindowInteractorPlus()
-{
-}
 
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractorPlus * wxVTKRenderWindowInteractorPlus::New()
-{
-  // we don't make use of the objectfactory, because we're not registered
-  return new wxVTKRenderWindowInteractorPlus;
-}
+//#include "vtkInteractorStyleBaseView.h"
 
-//-------------------------------------------------------------------
-void wxVTKRenderWindowInteractorPlus::OnLeftDClick( wxMouseEvent& event )
-{
-       _wxvtkbaseview->GetInteractorStyleBaseView()->OnLeftDClick();
-}
-//-------------------------------------------------------------------
-void wxVTKRenderWindowInteractorPlus::OnRightDClick( wxMouseEvent& event )
-{
-       _wxvtkbaseview->GetInteractorStyleBaseView()->OnRightDClick();
-}
-//-------------------------------------------------------------------
-void wxVTKRenderWindowInteractorPlus::OnMiddleDClick( wxMouseEvent& event )
-{
-       _wxvtkbaseview->GetInteractorStyleBaseView()->OnMiddleDClick();
-}
-//-------------------------------------------------------------------
-void wxVTKRenderWindowInteractorPlus::OnMouseWheel( wxMouseEvent& event )
-{
-       _wxvtkbaseview->GetInteractorStyleBaseView()->OnMouseWheel();
-}
+#include "wxVtkBaseView.h"
+#include "wxVtk2DBaseView.h"
+#include "wxVTKRenderWindowInteractorPlus.h"
 
 
 
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
 wxVtkBaseView::wxVtkBaseView()
 {
        _parent                         = NULL;
@@ -179,7 +20,7 @@ wxVtkBaseView::wxVtkBaseView()
 wxVtkBaseView::wxVtkBaseView(wxWindow *parent)
 {
        _parent                         = parent;
-       _iren                           = new wxVTKRenderWindowInteractorPlus(_parent,this);
+       _iren                           = (wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
 //     _iren->UseCaptureMouseOn();
 //     _iren                           = new wxVTKRenderWindowInteractor(_parent,-1);
        _interactorStyle        = NULL;
@@ -263,7 +104,11 @@ void wxVtkBaseView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z
        }
 
 // EEDx5
-       this->GetInteractorStyleBaseView()->GetWxVtk2DBaseView()->TransformCoordinate_spacing_ViewToModel( fP[0] , fP[1] , fP[2] );
+       //JCP 13/05/2009
+       vtkInteractorStyleBaseView* interactorstyle = (vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView();
+       wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)interactorstyle->GetWxVtk2DBaseView();
+       baseview->TransformCoordinate_spacing_ViewToModel( fP[0] , fP[1] , fP[2] );
+       //JCP 13/05/2009
 
        if (type!=0)
        {
@@ -280,15 +125,21 @@ void wxVtkBaseView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z
 }
 
 //---------------------------------------------------------------------------
-
+/* JCP 14/05/09
 vtkInteractorStyleBaseView*    wxVtkBaseView::GetInteractorStyleBaseView()
 {
        return _interactorStyle;
 }
+*/
+vtkInteractorStyleImage*       wxVtkBaseView::GetInteractorStyleBaseView()
+{
+       return _interactorStyle;
+}
+
 
 //---------------------------------------------------------------------------
 
-void wxVtkBaseView::SetInteractorStyleBaseView( vtkInteractorStyleBaseView*    interactorStyle)
+void wxVtkBaseView::SetInteractorStyleBaseView( vtkInteractorStyleImage*       interactorStyle)
 {
        _interactorStyle = interactorStyle;
 }
@@ -303,1562 +154,10 @@ void wxVtkBaseView::GetSpacing(double spc[3])  // virtual
 }
 
 
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-InteractorStyleMaracas::InteractorStyleMaracas()
-{
-       _active                                         = true;
-       _vtkInteractorStyleBaseView     = NULL;
-}
-//---------------------------------------------------------------------------
-InteractorStyleMaracas::~InteractorStyleMaracas()
-{
-}
-
-// ----------------------------------------------------------------------------
-InteractorStyleMaracas * InteractorStyleMaracas :: Clone()  // virtual 
-{
-       InteractorStyleMaracas * clone = new InteractorStyleMaracas();
-       CopyAttributesTo(clone);
-       return clone;
-}
-
-// ---------------------------------------------------------------------------
-
-void InteractorStyleMaracas::CopyAttributesTo( InteractorStyleMaracas * cloneObject)
-{
-       // Fathers object
-       //<FATHERCLASS>::CopyAttributesTo(cloneObject);
-
-       cloneObject->SetActive(  this->GetActive() );
-}
-
-
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnChar()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnMouseMove()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnLeftButtonDown()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnLeftButtonUp()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool  InteractorStyleMaracas::OnLeftDClick()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnMiddleButtonDown() 
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnMiddleButtonUp()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnMiddleDClick()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnRightButtonDown()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnRightButtonUp()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnRightDClick()
-{
-       return true;
-}
-//---------------------------------------------------------------------------
-bool InteractorStyleMaracas::OnMouseWheel()
-{
-       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;
-}
-
-
 
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
 
-manualInteractorWindowLevel::manualInteractorWindowLevel()
-{
-       _stateWindowLevel       =       false;
-       _backPx                         =       0;
-       _backPy                         =       0;
-       _backWindow                     =       -1;
-       _backLevel                      =       -1;
-}
-
-//-------------------------------------------------------------------
-
-manualInteractorWindowLevel::~manualInteractorWindowLevel()
-{
-}
-
-//-------------------------------------------------------------------
-
-bool manualInteractorWindowLevel::OnMouseMove()                        // virtual 
-{
-
-       if (_stateWindowLevel==true)
-       {
-               int tmpPx,tmpPy;
-               wxVTKRenderWindowInteractor *wxVTKiren;
-               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
-               wxVTKiren->GetEventPosition( tmpPx , tmpPy );
-               int colorWin=_backWindow - 2*( _backPx - tmpPx );
-               int colorLev=_backLevel  + 2*( _backPy - tmpPy );       
-
-               if (colorWin<0)
-               { 
-                       colorWin=0;
-               }
-               if (colorWin>100000)
-               { 
-                       colorWin=100000;
-               }       
-
-               if (colorLev<0)
-               { 
-                       colorLev=0;
-               }
-               if (colorLev>100000)
-               { 
-                       colorLev=100000;
-               }
-               vtkImageViewer2 *vtkimageviewer2;
-               vtkimageviewer2=_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->_imageViewer2XYZ->GetVtkImageViewer2();
-               vtkimageviewer2->SetColorWindow(colorWin);
-               vtkimageviewer2->SetColorLevel(colorLev);
-//             vtkimageviewer2->Render();
-       }
-       return true;
-}
-
-//-------------------------------------------------------------------
-
-bool manualInteractorWindowLevel::OnMiddleButtonDown() // virtual 
-{
-       if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
-               (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){
-
-               _stateWindowLevel       = true;
-               wxVTKRenderWindowInteractor *wxVTKiren;
-               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
-               wxVTKiren->GetEventPosition( _backPx , _backPy );
-
-               _backWindow = (int)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow());
-               _backLevel  = (int)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorLevel());
-       }
-       return true;
-}
-
-//-------------------------------------------------------------------
-
-bool manualInteractorWindowLevel::OnMiddleButtonUp()           // virtual
-{
-       if (_stateWindowLevel==true)
-       {
-               _stateWindowLevel=false;
-       }
-       return true;
-}
-
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-vtkInteractorScrollZ::vtkInteractorScrollZ()
-{
-       _stateFordware=false;
-}
-//---------------------------------------------------------------------------
-vtkInteractorScrollZ::~vtkInteractorScrollZ()
-{
-}
-//---------------------------------------------------------------------------
-bool vtkInteractorScrollZ::OnRightButtonDown()
-{    
-       vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
-       if ((interactor->GetControlKey()==0) && (interactor->GetShiftKey()==0) ){
-               _stateFordware  = true;
-               _fordwareX      = interactor->GetEventPosition()[0];
-               _fordwareY      = interactor->GetEventPosition()[1];
-               _sliceZ         = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetActualSlice();
-       }
-       return true;
-}
-//---------------------------------------------------------------------------
-bool vtkInteractorScrollZ::OnRightButtonUp() 
-{
-       _stateFordware=false;
-       return true;
-}
-//---------------------------------------------------------------------------
-bool vtkInteractorScrollZ::OnMouseMove () 
-{
-       if (_stateFordware==true){
-           //int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];  // JPRx
-        int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
-               int delta = (_fordwareY - fy)/3;
-               _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->SetActualSlice( _sliceZ + delta);
-
-               this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-
-       //      wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
-       //      _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
-
-               //_wxvtk2Dbaseview->Refresh();
-       } 
-       return true;
-}
-
-
-
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-vtkInteractorStyleBaseView::vtkInteractorStyleBaseView()
-{
-       _refresh_waiting                = false;
-       _parent_refresh_waiting = false;
-       _blockRefresh                   = false;
-}
-//---------------------------------------------------------------------------
-vtkInteractorStyleBaseView::~vtkInteractorStyleBaseView()
-{
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnMouseMove() // virtual 
-{
-       CallLstInteractorStyleMaracas(3);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnLeftButtonDown()  // virtual 
-{
-       CallLstInteractorStyleMaracas(4);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnLeftButtonUp() // virtual 
-{
-       CallLstInteractorStyleMaracas(5);
-}
-
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnLeftDClick()  // virtual
-{
-       CallLstInteractorStyleMaracas( 11 );
-}
 
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnMiddleButtonDown()  // virtual 
-{
-       CallLstInteractorStyleMaracas(6);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnMiddleButtonUp() // virtual 
-{
-       CallLstInteractorStyleMaracas(7);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnMiddleDClick()  // virtual
-{
-       CallLstInteractorStyleMaracas( 13 );
-}
 
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnRightButtonDown() // virtual 
-{
-       CallLstInteractorStyleMaracas(1);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnRightButtonUp() // virtual 
-{
-       CallLstInteractorStyleMaracas(2);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnRightDClick()  // virtual
-{
-       CallLstInteractorStyleMaracas( 12 );
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnMouseWheel()  // virtual
-{
-       CallLstInteractorStyleMaracas( 14 );
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas)
-{
-       interactorStyleMaracas->SetVtkInteractorStyleBaseView(this);
-       _lstInteractorStyleMaracas.push_back(interactorStyleMaracas);
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas)
-{
-       interactorStyleMaracas->RemoveVtkInteractorStyleBaseView();
-       int i, size = _lstInteractorStyleMaracas.size();
-       std::vector< InteractorStyleMaracas* >::iterator iter = _lstInteractorStyleMaracas.begin();
-       bool removed = false;
-       for (i=0; !removed && i<size; i++)
-       {
-               if ( _lstInteractorStyleMaracas[i] == interactorStyleMaracas )
-               {
-                       _lstInteractorStyleMaracas.erase(iter);
-                       removed = true;
-               }
-               iter++;
-       }               
-}
-//---------------------------------------------------------------------------
-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();
-
-//EED Borrame
-//FILE *ff = fopen("c:/temp/wxVtkBaseView_SceneManagerStadistics.txt","a+");
-//fprintf(ff,"EED vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas \n" );
-//for (i=0;i<size;i++)
-//{
-//fprintf(ff,"    %p\n" , _lstInteractorStyleMaracas[i] );
-//}
-//fclose(ff);
-
-
-
-       for (i=0;i<size;i++)
-       {
-               intStyMar = _lstInteractorStyleMaracas[i];
-               if (intStyMar->GetActive()==true){
-                       if (type ==1)
-                       {  // OnRightButtonDown
-                               if (intStyMar->OnRightButtonDown()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type ==2)
-                       {  // OnRightButtonUp
-                               if (intStyMar->OnRightButtonUp()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==3)
-                       {  // OnMouseMouve
-                               if (intStyMar->OnMouseMove()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==4)
-                       {  // OnLeftButtonDown
-                               if (intStyMar->OnLeftButtonDown()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==5)
-                       {  // OnLeftButtonUp
-                               if (intStyMar->OnLeftButtonUp()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==6)
-                       {  // OnMiddleButtonDown
-                               if (intStyMar->OnMiddleButtonDown()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==7)
-                       {  // OnMiddleButtonUp
-                               if (intStyMar->OnMiddleButtonUp()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==10)
-                       {  // OnMiddleButtonUp
-                               if (intStyMar->OnChar()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==11)
-                       {  // OnLeftDClick
-                               if (intStyMar->OnLeftDClick()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==12)
-                       {  // OnRightDClick
-                               if (intStyMar->OnRightDClick()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==13)
-                       {  // OnMiddleDClick
-                               if (intStyMar-> OnMiddleDClick()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-                       if (type==14)
-                       {  // OnMouseWheel
-                               if (intStyMar->OnMouseWheel()==false)
-                               {
-                                       i=size;
-                               }
-                       }
-               } // if active
-       } // for
-
-       EvaluateToRefresh();
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView::OnChar()  // virtual 
-{    
-//     char a=GetInteractor()->GetKeyCode();
-       CallLstInteractorStyleMaracas(10);
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::TransformCoordinate(double &X, double &Y, double &Z)
-{
-    vtkImageViewer2 *imageViewer = 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
-       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;
-}
-//---------------------------------------------------------------------------
-wxVtk2DBaseView* vtkInteractorStyleBaseView::GetWxVtk2DBaseView()
-{
-       return (wxVtk2DBaseView*)_wxvtkbaseview;
-}
-//---------------------------------------------------------------------------
-wxVtk3DBaseView* vtkInteractorStyleBaseView::GetWxVtk3DBaseView()
-{
-       return (wxVtk3DBaseView*)_wxvtkbaseview;
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::SetActiveAllInteractors(bool ok)
-{
-       InteractorStyleMaracas *intStyMar;
-       int i,size=_lstInteractorStyleMaracas.size();
-       for (i=0;i<size;i++)
-       {
-               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()
-{
-       _parent_refresh_waiting=true;
-}
-//---------------------------------------------------------------------------
-bool vtkInteractorStyleBaseView::GetParent_refresh_waiting()
-{
-       return _parent_refresh_waiting;
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::EvaluateToRefresh()
-{
-
-       if  ( _blockRefresh==false )
-       {
-               if ( (_refresh_waiting==true) && (_parent_refresh_waiting==false))
-               {
-                       _refresh_waiting                = false;
-                       this->_wxvtkbaseview->Refresh();
-               }
-               if (_parent_refresh_waiting==true)
-               {
-                       _parent_refresh_waiting = false;
-                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-                       this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-               }
-       }
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::BlockRefresh()
-{
-       _blockRefresh=true;
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::UnBlockRefresh()
-{
-       _blockRefresh=false;
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-
-
-//---------------------------------------------------------------------------
-vtkInteractorStyleBaseView2D::vtkInteractorStyleBaseView2D()
-{
-       _manualinteractorwindowlevel= new manualInteractorWindowLevel();
-       AddInteractorStyleMaracas( _manualinteractorwindowlevel );
-
-       _vtkInteractorScrollZ = new vtkInteractorScrollZ();
-       AddInteractorStyleMaracas(_vtkInteractorScrollZ);
-       
-}
-//---------------------------------------------------------------------------
-vtkInteractorStyleBaseView2D::~vtkInteractorStyleBaseView2D()
-{
-}
-
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView2D::OnRightButtonDown()  // virtual
-{    
-       vtkInteractorStyleBaseView::OnRightButtonDown();
-
-       if ((GetInteractor()->GetControlKey()==1) && (GetInteractor()->GetShiftKey()==0) ){
-               this->vtkInteractorStyleImage::OnRightButtonDown();
-       }
-
-}
-
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView2D::OnRightButtonUp()  // virtual
-{
-       vtkInteractorStyleBaseView::OnRightButtonUp();
-       this->vtkInteractorStyleImage::OnRightButtonUp();
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView2D::OnMouseMove () // virtual
-{
-       vtkInteractorStyleBaseView::OnMouseMove();
-       this->vtkInteractorStyleImage::OnMouseMove();
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView2D::OnLeftButtonDown() // virtual
-{
-       vtkInteractorStyleBaseView::OnLeftButtonDown();
-
-       if ((GetInteractor()->GetControlKey()==0) && (GetInteractor()->GetShiftKey()==1) )
-       {
-               this->vtkInteractorStyleImage::OnLeftButtonDown();
-       }
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView2D::OnLeftButtonUp () // virtual
-{
-       vtkInteractorStyleBaseView::OnLeftButtonUp();
-
-       this->vtkInteractorStyleImage::OnLeftButtonUp();
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView2D::OnMiddleButtonDown () // virtual
-{
-       vtkInteractorStyleBaseView::OnMiddleButtonDown();
-
-       if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
-       {
-               this->vtkInteractorStyleImage::OnLeftButtonDown();
-       }
-}
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView2D::OnMiddleButtonUp () // virtual
-{
-       vtkInteractorStyleBaseView::OnMiddleButtonUp();
-
-       if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
-       {
-               this->vtkInteractorStyleImage::OnLeftButtonUp();
-       }
-}
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-
-//---------------------------------------------------------------------------
-vtkInteractorStyleBaseView3D::vtkInteractorStyleBaseView3D(){
-}
-//---------------------------------------------------------------------------
-vtkInteractorStyleBaseView3D::~vtkInteractorStyleBaseView3D(){
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnRightButtonDown ()
-{    
-       vtkInteractorStyleBaseView::OnRightButtonDown();
-
-/*
-               if (GetInteractor()->GetControlKey()==1 ){
-                       this->vtkInteractorStyleTrackballCamera::OnRightButtonDown();
-               }
-*/
-  this->FindPokedRenderer(this->Interactor->GetEventPosition()[0], 
-                          this->Interactor->GetEventPosition()[1]);
-
-  if (this->CurrentRenderer == NULL)
-    {
-    return;
-    }
-
-  if (this->Interactor->GetControlKey()) {
-      this->StartDolly();
-  }
-
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnRightButtonUp () 
-{
-       vtkInteractorStyleBaseView::OnRightButtonUp();
-
-/*
-               if (GetInteractor()->GetControlKey()==1 ){
-                       this->vtkInteractorStyleTrackballCamera::OnRightButtonUp();
-               }
-*/
-
-               
-  switch (this->State) 
-    {
-    case VTKIS_DOLLY:
-      this->EndDolly();
-      break;
-    }
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnMouseMove () 
-{
-       vtkInteractorStyleBaseView::OnMouseMove();
-
-//             this->vtkInteractorStyleTrackballCamera::OnMouseMove();
-
- // int x = this->Interactor->GetEventPosition()[0]; // JPRx
- // int y = this->Interactor->GetEventPosition()[1]; // JPRx
-
-
- // vtkRenderWindowInteractor *rwi = this->Interactor;
-
- // int lx =  rwi->GetLastEventPosition()[0]; // JPRx
- // int ly =  rwi->GetLastEventPosition()[1]; // JPRx
- // int dx = rwi->GetEventPosition()[0] ; // JPRx
- // int dy = rwi->GetEventPosition()[1] ; // JPRx
-
-
-  switch (this->State) 
-    {
-    case VTKIS_ROTATE:
- //     this->FindPokedRenderer(x, y);
-      this->Rotate();
- //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
-      break;
-
-    case VTKIS_PAN:
- //     this->FindPokedRenderer(x, y);
-      this->Pan();
- //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
-      break;
-
-    case VTKIS_DOLLY:
- //     this->FindPokedRenderer(x, y);
-      this->Dolly();
- //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
-      break;
-
-    case VTKIS_SPIN:
- //     this->FindPokedRenderer(x, y);
-      this->Spin();
- //     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
-      break;
-    }
-
-
-
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnLeftButtonDown ()
-{
-       vtkInteractorStyleBaseView::OnLeftButtonDown();
-/*
-               if (GetInteractor()->GetControlKey()==1 ){
-                       this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
-               } else {
-                       this->vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
-               }
-*/
-
-
-  this->FindPokedRenderer(this->Interactor->GetEventPosition()[0], 
-                          this->Interactor->GetEventPosition()[1]);
-  if (this->CurrentRenderer == NULL)
-    {
-    return;
-    }
-
-  if (this->Interactor->GetControlKey()) {
-      this->StartPan();
-  } else {
-      this->StartRotate();
-  }
-
- /* 
-  if (this->Interactor->GetShiftKey()) 
-    {
-    if (this->Interactor->GetControlKey()) 
-      {
-      this->StartDolly();
-      }
-    else 
-      {
-      this->StartPan();
-      }
-    } 
-  else 
-    {
-    if (this->Interactor->GetControlKey()) 
-      {
-      this->StartSpin();
-      }
-    else 
-      {
-      this->StartRotate();
-      }
-    }
-*/
-
-
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnLeftButtonUp () 
-{
-       vtkInteractorStyleBaseView::OnLeftButtonUp();
-
-/*
-               if (GetInteractor()->GetControlKey()==1 ){
-                       this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();
-               } else {
-                       this->vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
-               }
-*/
-  switch (this->State) 
-    {
-
-    case VTKIS_PAN:
-      this->EndPan();
-      break;
-
-    case VTKIS_ROTATE:
-      this->EndRotate();
-      break;
-    }
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnMiddleButtonDown () 
-{
-       vtkInteractorStyleBaseView::OnMiddleButtonDown();
-       //              this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
-}
-//---------------------------------------------------------------------------
-void  vtkInteractorStyleBaseView3D::OnMiddleButtonUp () 
-{
-       vtkInteractorStyleBaseView::OnMiddleButtonUp();
-
-       //              this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-vtkInfoTextImage::vtkInfoTextImage()
-{
-       _vtkText_WindowLevel    = NULL;
-       _vtkText_ColorLevel             = NULL;
-       _vtkText_position               = NULL;
-       _vtkText_pixelIntensity = NULL;
-       _marimagedata                   = NULL;
-}
-
-//-------------------------------------------------------------------
-
-vtkInfoTextImage::~vtkInfoTextImage()
-{
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::Configure()
-{
-       _vtkText_WindowLevel    = Create_Text_Label( 10 , 55 );
-       _vtkText_ColorLevel             = Create_Text_Label( 10 , 40 );
-       _vtkText_position               = Create_Text_Label( 10 , 25 );
-       _vtkText_pixelIntensity = Create_Text_Label( 10 , 10 );
-}
-
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::SetMarImageData(marImageData *marimagedata)
-{
-       _marimagedata=marimagedata;
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview)
-{
-       _wxvtk2Dbaseview=wxvtk2Dbaseview;
-}
-
-//-------------------------------------------------------------------
-
-vtkTextActor *vtkInfoTextImage::Create_Text_Label(int px, int py )
-{
-       // Text Window Level
-       vtkTextActor *textActor = vtkTextActor::New();
-       textActor->SetDisplayPosition(px, py);
-       textActor->SetInput("0");
-
-       // Set coordinates to match the old vtkScaledTextActor default value
-       textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
-       textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
-
-       vtkTextProperty *tprop = textActor->GetTextProperty();
-       tprop->SetFontSize(14);
-       tprop->SetFontFamilyToArial();
-       tprop->SetColor(1, 1, 0);
-       _wxvtk2Dbaseview->GetRenderer()->AddActor2D(textActor);
-
-       return textActor;
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::PutWindowLevel()
-{
-       int value = (int)( _wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->GetWindow() );
-       char zTzxt[20];
-       char resultText[50];
-
-       strcpy(resultText,"w:");
-
-
-       //ltoa ( (long)value , zTzxt , 10 );
-       sprintf(zTzxt,"%d",value);
-
-       strcat(resultText,zTzxt);
-       _vtkText_WindowLevel            -> SetInput(resultText);
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::PutColorLevel()
-{
-       int value = (int)(_wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->GetLevel());
-       char zTzxt[20];
-       char resultText[50];
-
-       strcpy(resultText,"c:");
-
-//     itoa (value,zTzxt,10);
-       sprintf(zTzxt,"%d",value);
-
-       strcat(resultText,zTzxt);
-       _vtkText_ColorLevel             -> SetInput(resultText);
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::PutPosition(int xx,int yy, int zz)
-{
-
-//EEDx7
-//     double spa[3];
-//     _imagedata->GetSpacing(spa);
-//     xx=xx*(1/spa[0]);
-//     yy=yy*(1/spa[1]);
-
-
-       char zTzxt[50];
-       char resultText[50];
-       strcpy(resultText,"p: ");
-//     itoa ((int)xx,zTzxt,10);
-       sprintf(zTzxt,"%d",xx);
-
-       strcat(resultText,zTzxt);
-       strcat(resultText," , ");
-
-//     itoa ((int)yy,zTzxt,10);
-       sprintf(zTzxt,"%d",yy);
-
-       strcat(resultText,zTzxt);
-       strcat(resultText," , ");
-
-//     itoa ((int)zz,zTzxt,10);
-       sprintf(zTzxt,"%d",zz);
-
-       strcat(resultText,zTzxt);
-
-
-       
-       int nX = _marimagedata->GetXOriginal(xx);
-       int nY = _marimagedata->GetYOriginal(yy);
-       int nZ = _marimagedata->GetZOriginal(zz);
-
-       strcat(resultText,"   (");
-//     ltoa ((int)nX,zTzxt,10);
-       sprintf(zTzxt,"%d",nX);
-
-       strcat(resultText,zTzxt);
-       strcat(resultText,",");
-
-//     ltoa ((int)nY,zTzxt,10);
-       sprintf(zTzxt,"%d",nY);
-
-       strcat(resultText,zTzxt);
-       strcat(resultText,",");
-
-//     ltoa ((int)nZ,zTzxt,10);
-       sprintf(zTzxt,"%d",nZ);
-
-       strcat(resultText,zTzxt);
-       strcat(resultText,")");
-
-
-
-
-       _vtkText_position               -> SetInput(resultText);
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImage::PutPixelIntensity(int xx, int yy, int zz)
-{
-
-//EEDx2
-       bool ok=true;
-
-       int dim[3];
-       double spa[3];
-       vtkImageData *imagedata = _marimagedata->GetImageData();
-       imagedata->GetDimensions(dim);
-       imagedata->GetSpacing(spa);
-
-// EEDx7
-//     xx=xx*(1/spa[0]);
-//     yy=yy*(1/spa[1]);
-//     zz=xx*spa[2];
-
-       if ( (xx<0) || (xx>=dim[0]) || (yy<0) || (yy>=dim[1]) || (zz<0) || (zz>=dim[2]) )
-       {
-               ok=false;
-       }
-
-       
-       char zTzxt[20];
-       char resultText[50];
-       strcpy(resultText,"GL: ");
-       if (ok==true) 
-       {
-               if (imagedata->GetScalarType()==VTK_BIT)
-               {
-                       char *pOrg=(char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       if(*pOrg==0)
-                       {
-                               sprintf(zTzxt,"%d",0);
-                       }
-                       else
-                       {
-                               sprintf(zTzxt,"%d",1);
-                       }
-               }
-       
-               if (imagedata->GetScalarType()==VTK_CHAR)
-               {
-                       char *pOrg=(char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       int tmp=*pOrg;
-                       sprintf(zTzxt,"%d",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_SIGNED_CHAR)
-               {
-                       signed char *pOrg=(signed char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       int tmp=*pOrg;
-                       sprintf(zTzxt,"%d",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_UNSIGNED_CHAR)
-               {
-                       unsigned char *pOrg=(unsigned char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       int tmp=*pOrg;
-                       sprintf(zTzxt,"%d",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_SHORT)
-               {
-                       short *pOrg=(short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       int tmp=*pOrg;
-                       sprintf(zTzxt,"%d",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_UNSIGNED_SHORT)
-               {
-                       unsigned short *pOrg=(unsigned short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       int tmp=*pOrg;
-                       sprintf(zTzxt,"%d",tmp);
-               }
-       
-               if (imagedata->GetScalarType()==VTK_INT)
-               {
-                       int *pOrg=(int*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       sprintf(zTzxt,"%d",*pOrg);
-               }
-
-               if (imagedata->GetScalarType()==VTK_UNSIGNED_INT)
-               {
-                       unsigned int *pOrg=(unsigned int*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       int tmp=*pOrg;
-                       sprintf(zTzxt,"%d",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_LONG)
-               {
-                       long *pOrg=(long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       double tmp=*pOrg;
-                       sprintf(zTzxt,"%3.2f",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_UNSIGNED_LONG)
-               {
-                       unsigned long *pOrg=(unsigned long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       double tmp=*pOrg;
-                       sprintf(zTzxt,"%3.2f",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_FLOAT)
-               {
-                       long *pOrg=(long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       double tmp=*pOrg;
-                       sprintf(zTzxt,"%3.2f",tmp);
-               }
-
-               if (imagedata->GetScalarType()==VTK_DOUBLE)
-               {
-                       double *pOrg=(double*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
-       //              itoa (*pOrg,zTzxt,10);
-                       double tmp=*pOrg;
-                       sprintf(zTzxt,"%3.2f",tmp);
-               }
-       } 
-       else 
-       {
-               strcpy(zTzxt,"---");
-       }
-       strcat(resultText,zTzxt);
-       _vtkText_pixelIntensity -> SetInput(resultText);
-}
-
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-vtkInfoTextImageInteractor::vtkInfoTextImageInteractor()
-{
-}
-
-//-------------------------------------------------------------------
-vtkInfoTextImageInteractor::~vtkInfoTextImageInteractor()
-{
-}
-
-//-------------------------------------------------------------------
-
-void vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(vtkInfoTextImage *vtkinfotextimage)
-{
-       _vtkinfotextimage       = vtkinfotextimage;
-}
-
-//-------------------------------------------------------------------
-bool vtkInfoTextImageInteractor::OnMouseMove()
-{
-       int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
-       wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
-       wxVTKiren->GetEventPosition(X,Y);
-
-       int z = (int)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetVtkBaseData()->GetZ());
-       double xx=X,yy=Y,zz=z;
-       _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransfromeCoordScreenToWorld(xx,yy,zz);
-
-       
-       GetVtkInfoTextImage()->PutWindowLevel();
-       GetVtkInfoTextImage()->PutColorLevel();
-       GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
-       GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
-
-       this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
-       return true;
-}
-
-//-------------------------------------------------------------------
-vtkInfoTextImage *vtkInfoTextImageInteractor::GetVtkInfoTextImage()
-{
-       return _vtkinfotextimage;
-}
-
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-
-wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent)
-:wxVtkBaseView(parent)
-{
-       _imageViewer2XYZ        = NULL;
-       _vtkIinfoTextImage      = NULL;
-}
-
-//EED 5mai2009
-//-------------------------------------------------------------------
-wxVtk2DBaseView::~wxVtk2DBaseView()
-{      
-       if (_vtkIinfoTextImage!=NULL) 
-       {
-               delete _vtkIinfoTextImage; 
-       }
-
-       if (_imageViewer2XYZ!=NULL) 
-       {
-               delete _imageViewer2XYZ; 
-       }
-}
-
-//-------------------------------------------------------------------
-void wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel(double &X,double &Y, double &Z) //       virtual 
-{
-//EEDx5
-       double spc[3];
-//     GetVtkBaseData()->GetImageData()->GetSpacing(spc);
-       this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
-
-       X = X / spc[0];
-       Y = Y / spc[1];
-       Z = Z / spc[2];
-
-}
-
-//-------------------------------------------------------------------
-void wxVtk2DBaseView::TransformCoordinate_spacing_ModelToView(double &X,double &Y, double &Z) //       virtual 
-{
-//EEDx5
-       double spc[3];
-//     GetVtkBaseData()->GetImageData()->GetSpacing(spc);
-       this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
-
-       X=X*spc[0];
-       Y=Y*spc[1];
-       Z=Z*spc[2];
-
-}
-
-//-------------------------------------------------------------------
-void wxVtk2DBaseView::ResetView()
-{
-       double spx,spy,spz;
-       int x1,x2,y1,y2,z1,z2;
-       wxVtkBaseView::Configure();
-       
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
-       vtkImageData *imageData = GetVtkBaseData()->GetImageData();
-       imageData->UpdateInformation();
-       imageData->SetUpdateExtent( imageData->GetWholeExtent());
-       imageData->Update();
-
-       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
-       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 );
-
-       _imageViewer2XYZ->GetVtkImageViewer2()->Render();
-       SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
-       
-}
-
-
-//-------------------------------------------------------------------
-void wxVtk2DBaseView::Configure(bool okimage)
-{
-       double spx,spy,spz;
-       int x1,x2,y1,y2,z1,z2;
-       wxVtkBaseView::Configure();
-
-// EED 17 Oct 2007
-                       if (_imageViewer2XYZ==NULL)
-                       {
-                               _imageViewer2XYZ = new vtkImageViewer2_XYZ();
-                               wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
-                               _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
-                               SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
-                       }
-
-
-       vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
-       if (imageData!=NULL){
-               imageData->UpdateInformation();
-               imageData->SetUpdateExtent( imageData->GetWholeExtent());
-               imageData->Update();
-               if (okimage==true){
-                       imageData->GetSpacing (spx,spy,spz);
-                       imageData->GetExtent (x1,x2,y1,y2,z1,z2);
-
-
-                       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
-                       _imageViewer2XYZ->SetExtentDimension(x1,x2,y1,y2,z1,z2);
-                       double range[2];
-                         imageData->GetScalarRange(range);
-                         if (range[1]<20000){
-                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( (range[1]-range[0])/2 );
-                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( (range[1]+range[0])/4 );
-                         } else {
-                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( 1000 );
-                                _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( 500 );
-                         }
-// EED 31 Janvier 2007
-//vtkImageActor *vtkimageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor ();
-//vtkimageactor->InterpolateOff ();
-//vtkLookupTable * _collookup = vtkLookupTable::New( );
-//_collookup->SetNumberOfColors( 256 );
-//_collookup->SetTableRange( 0 , 255 );
-//_collookup->Build( );
-//_collookup->SetTableValue( 0  , 1 , 0 , 0 , 1 );
-//_collookup->SetTableValue(128 , 0 , 0 , 1 , 1 );
-//_collookup->SetTableValue(255 , 0 , 1 , 0 , 1 );
-//_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel ()->SetLookupTable(_collookup );
-
-
-// EED 17 Oct 2007
-//                     SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
-
-
-                       vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2();
-                       vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera();
-
-//EED 17Avril2009      
-/*                     
-                       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         ); 
-*/ 
-                       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         ); 
-                       
-                       
-                       camera->SetClippingRange( 0.01                  , 1000000 );
-                       camera->ComputeViewPlaneNormal();
-                       camera->SetParallelScale( spx*(x2-x1)/3.0 );
-                       
-                       // text information over the graphic window
-                       _vtkIinfoTextImage                              = new vtkInfoTextImage();
-                       _vtkIinfoTextImageInteractor    = new vtkInfoTextImageInteractor();
-                       _vtkIinfoTextImage->SetWxVtk2DBaseView(this);
-                       _vtkIinfoTextImage->SetMarImageData( GetVtkBaseData()->GetMarImageData() );
-                       _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage);     
-                       _vtkIinfoTextImage->Configure();
-                       this->GetInteractorStyleBaseView()->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
-               } // okimage
-       } // imageData
-
-}
-
-//-------------------------------------------------------------------
-
-int    wxVtk2DBaseView::GetActualSlice()  // virtual 
-{
-       return (int)(_vtkbasedata->GetZ());
-}
-
-//-------------------------------------------------------------------
-void wxVtk2DBaseView::SetActualSlice(int slice)  // Virtual
-{
-       _vtkbasedata->SetZ(slice);
-}
-
-//-------------------------------------------------------------------
-
-vtkBaseData *wxVtk2DBaseView::GetVtkBaseData()
-{
-       return _vtkbasedata;
-}
-
-//-------------------------------------------------------------------
-
-void wxVtk2DBaseView::SetVtkBaseData(vtkBaseData *vtkbasedata)
-{
-       _vtkbasedata=vtkbasedata;
-}
-
-//-------------------------------------------------------------------
-
-void wxVtk2DBaseView::Refresh()
-{
-       int z = (int)(GetVtkBaseData()->GetZ());
-       _imageViewer2XYZ->SetZSlice( z ); 
-
-       wxVtkBaseView::Refresh();
-}
-
-//-------------------------------------------------------------------
-
-void wxVtk2DBaseView::SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview)
-{
-       SetInteractorStyleBaseView(interactorstylebaseview);
-
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
-       interactorstylebaseview->SetInteractor ( iren );
-       iren->SetInteractorStyle(interactorstylebaseview);
-       interactorstylebaseview->SetwxVtkBaseView(this);        
-
-       vtkMaracasImageViewer2Callback * cbk = vtkMaracasImageViewer2Callback::New();
-       cbk->IV = _imageViewer2XYZ->GetVtkImageViewer2();
-       interactorstylebaseview->AddObserver( vtkCommand::WindowLevelEvent, cbk );
-       interactorstylebaseview->AddObserver( vtkCommand::StartWindowLevelEvent, cbk );
-       interactorstylebaseview->AddObserver( vtkCommand::ResetWindowLevelEvent, cbk );
-       cbk->Delete();
-}
-
-//---------------------------------------------------------------------------
-vtkRenderer* wxVtk2DBaseView::GetRenderer()    // virtual 
-{
-       return  _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer();
-}
-//---------------------------------------------------------------------------
-vtkRenderWindow* wxVtk2DBaseView::GetRenWin()          // virtual
-{
-       return  _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderWindow();
-}
-
-//-------------------------------------------------------------------
-
-void wxVtk2DBaseView::GetSpacing(double spc[3])  // virtual
-{
-       vtkImageData *imageData = GetVtkBaseData()->GetImageData();
-       imageData->GetSpacing(spc);
-}
-
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-//-------------------------------------------------------------------
-
-
-
-
-wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent)
-:wxVtkBaseView( parent )
-{
-       _configure      = false;
-       _aRenderer      = NULL;
-       _renWin         = NULL;
-       _aCamera        = NULL;
-}
-//-------------------------------------------------------------------
-wxVtk3DBaseView::~wxVtk3DBaseView()
-{
-       if (_aCamera!=NULL)             { _aCamera              -> Delete(); }
-       if (_aRenderer!=NULL)   { _aRenderer    -> Delete(); }
-       if (_renWin!=NULL)              { _renWin               -> Delete(); }
-}
-//-------------------------------------------------------------------
-vtkCamera* wxVtk3DBaseView::GetCamera()
-{
-       return _aCamera;
-}
-//-------------------------------------------------------------------
-vtkRenderer* wxVtk3DBaseView::GetRenderer()  // virtual
-{
-       return _aRenderer;
-}
-//-------------------------------------------------------------------
-vtkRenderWindow* wxVtk3DBaseView::GetRenWin()  // virtual
-{
-       return _renWin;
-}
-//-------------------------------------------------------------------
-void wxVtk3DBaseView::Refresh()
-{
-//     _renWin->Render();
-       vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor();
-       vri->vtkRenderWindowInteractor::Render();
-}
-//-------------------------------------------------------------------
-void wxVtk3DBaseView::Configure()
-{
-       if (_configure==false)
-       {
-               _configure=true;
-               //wxVtkBaseView::Configure();
-               _aRenderer      = vtkRenderer::New();
-               _renWin         = vtkRenderWindow::New();
-               _renWin->AddRenderer(_aRenderer);
-
-
-//       _renWin->SetStereoCapableWindow(1);
-// //      //renderwindow->SetStereoTypeToCrystalEyes();  
-//       _renWin->SetStereoTypeToRedBlue();
-//       _renWin->SetStereoRender(1);
-
-               GetWxVTKRenderWindowInteractor()->SetRenderWindow(_renWin);
-
-
-// EED Borrame
-//             vtkInteractorStyle3DMaracas *interactorStyle3DMaracas = vtkInteractorStyle3DMaracas::New(); 
-               vtkInteractorStyleBaseView3D *interactorStyleBaseView3D = vtkInteractorStyleBaseView3D::New(); 
-
-               SetInteractorStyleBaseView( interactorStyleBaseView3D );
-               interactorStyleBaseView3D->SetInteractor (  GetWxVTKRenderWindowInteractor() );
-               GetWxVTKRenderWindowInteractor()->SetInteractorStyle( interactorStyleBaseView3D );
-               interactorStyleBaseView3D->SetwxVtkBaseView(this);      
-
-
-/* EED Borrame
-  vtkInteractorStyleSwitch *iss = dynamic_cast<vtkInteractorStyleSwitch*>(_iren->GetInteractorStyle());
-  iss->SetCurrentStyleToTrackballCamera();
-*/
-
-               // It is convenient to create an initial view of the data. The
-               // FocalPoint and Position form a vector direction. Later on
-               // (ResetCamera() method) this vector is used to position the camera
-               // to look at the data in this direction.
-               _aCamera = vtkCamera::New();
-
-//EED 17Avril2009      
-/*
-               _aCamera->SetViewUp (0, 0, -1);
-               _aCamera->SetPosition (0, 1, 0);
- */
-               _aCamera->SetViewUp (0, 1, 0);
-               _aCamera->SetPosition (0, 0, 1);
-               
-               _aCamera->SetFocalPoint (0, 0, 0);
-               _aCamera->ComputeViewPlaneNormal();
-
-       }
-}
-//-------------------------------------------------------------------
-//EED 27 sep 2006
-void wxVtk3DBaseView::GetSpacing(double spc[3])
-{
-       spc[0]=1;
-       spc[1]=1;
-       spc[2]=1;
-}
index 9b24c188b1e050e22491a3952d24ff0c7206bacd..31b41d5eb5ba0e7183eeb44ee0258a70c031d4fb 100644 (file)
 #include <vector>
 #include "marTypes.h"
 
+#include "wxVTKRenderWindowInteractor.h"
+//#include "include/vtkImageViewer2_XYZ.h"
 
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-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);
-       void                    SetZSlice(int slice);
-       int                             GetXSlice();
-       int                             GetYSlice();
-       int                             GetZSlice();
-       vtkImageViewer2 *GetVtkImageViewer2();
-
-private:
-       int     _x1,_x2,_y1,_y2,_z1,_z2;
-       vtkImageViewer2 *_vtkimageviewer2;
-protected:     
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxVtkBaseView;
-
-class creaMaracasVisu_EXPORT wxVTKRenderWindowInteractorPlus : public wxVTKRenderWindowInteractor
-{
-public:
-       wxVTKRenderWindowInteractorPlus(wxWindow *parent ,wxVtkBaseView *_wxvtkbaseview);
-       virtual ~wxVTKRenderWindowInteractorPlus();
-
-       wxVTKRenderWindowInteractorPlus();
-        void OnLeftDClick( wxMouseEvent& event );   
-        void OnRightDClick( wxMouseEvent& event );   
-        void OnMiddleDClick( wxMouseEvent& event );   
-        void OnMouseWheel( wxMouseEvent& event );
-
-
- // VTK
-    static wxVTKRenderWindowInteractorPlus * New();
+/* JCP 14/05/09
+//#include "vtkInteractorStyleBaseView.h"
+//class vtkInteractorStyleBaseView;  
+ */
 
-protected:
-private:
-       wxVtkBaseView   *_wxvtkbaseview;
-  DECLARE_EVENT_TABLE( );
+#include "vtkInteractorStyleImage.h"
 
 
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-class vtkInteractorStyleBaseView;
 
 
 class creaMaracasVisu_EXPORT wxVtkBaseView{
@@ -106,341 +53,37 @@ public:
        virtual vtkRenderer*                    GetRenderer();
        virtual vtkRenderWindow*                GetRenWin();
        virtual void                                    TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type=2);
+       /* JCP 04/05/09
        void                                                    SetInteractorStyleBaseView( vtkInteractorStyleBaseView* interactorStyle);
-       vtkInteractorStyleBaseView*             GetInteractorStyleBaseView();
+       */
+       void                                                    SetInteractorStyleBaseView( vtkInteractorStyleImage*    interactorStyle);
+       /* JCP 04/05/09
+        * 
+       vtkInteractorStyleBaseView*             GetInteractorStyleBaseView();   
+       */
+       vtkInteractorStyleImage*                GetInteractorStyleBaseView();
        virtual void                                    GetSpacing(double spc[3]);
 
 private:
        wxWindow                                                *_parent;
        wxVTKRenderWindowInteractor             *_iren;
-       vtkInteractorStyleBaseView              *_interactorStyle;
-protected:
-
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorStyleBaseView;
-class manualInteractorWindowLevel;
-class vtkInfoTextImage;
-class vtkInfoTextImageInteractor;
-
-//------------------------------------------------------------------
-
-
-class creaMaracasVisu_EXPORT wxVtk2DBaseView: public wxVtkBaseView{
-public:
-       wxVtk2DBaseView(wxWindow *parent);
-       virtual ~wxVtk2DBaseView();
-       virtual void                    Configure(bool okimage=true);
-       vtkImageViewer2_XYZ*    _imageViewer2XYZ;
-       vtkBaseData*                    GetVtkBaseData();
-       void                                    SetVtkBaseData(vtkBaseData *vtkbasedata);
-       virtual void                    Refresh();
-       virtual void                    ResetView();
-       virtual int                             GetActualSlice();
-       virtual void                    SetActualSlice(int slice);
-                       void                    SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview);
-
-       virtual vtkRenderer*            GetRenderer();
-       virtual vtkRenderWindow*        GetRenWin();
-       virtual void                    TransformCoordinate_spacing_ViewToModel(double &X,double &Y, double &Z);
-       virtual void                    TransformCoordinate_spacing_ModelToView(double &X,double &Y, double &Z);
-       virtual void                    GetSpacing(double spc[3]);
-
-
-private:
-       vtkBaseData                                                     *_vtkbasedata;
-
-       vtkInfoTextImage                                        *_vtkIinfoTextImage;
-       vtkInfoTextImageInteractor                      *_vtkIinfoTextImageInteractor;
-
+       /**
+        * JCP 04/05/09
+        * vtkInteractorStyleImage              *_interactorStyle;
+        */
+       vtkInteractorStyleImage         *_interactorStyle;
 protected:
 
 };
 
 
 
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-//------------------------------------------------------------------
-
-class creaMaracasVisu_EXPORT InteractorStyleMaracas 
-{
-public:
-       InteractorStyleMaracas();
-       virtual ~InteractorStyleMaracas();
-
-       virtual InteractorStyleMaracas * Clone();
-       void CopyAttributesTo( InteractorStyleMaracas *cloneObject );
-
-
-       virtual bool  OnChar();
-       virtual bool  OnMouseMove();
-       virtual bool  OnLeftButtonDown(); 
-       virtual bool  OnLeftButtonUp();
-       virtual bool  OnMiddleButtonDown(); 
-       virtual bool  OnMiddleButtonUp();
-       virtual bool  OnRightButtonDown();
-       virtual bool  OnRightButtonUp();
-
-       virtual bool  OnLeftDClick();
-       virtual bool  OnRightDClick();   
-       virtual bool  OnMiddleDClick();  
-       virtual bool  OnMouseWheel();    
-
-
-                       void  SetVtkInteractorStyleBaseView(vtkInteractorStyleBaseView* _vtkInteractorStyleBaseView);
-                       void  RemoveVtkInteractorStyleBaseView();
-       void SetActive(bool active);
-       bool GetActive();
-
-protected:
-       vtkInteractorStyleBaseView* _vtkInteractorStyleBaseView;
-private:
-       bool                                            _active;
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-
-class creaMaracasVisu_EXPORT manualInteractorWindowLevel : public InteractorStyleMaracas {
-public:
-       manualInteractorWindowLevel();
-       virtual ~manualInteractorWindowLevel();
-protected:
-
-       bool    _stateWindowLevel;
-       int             _backPx;
-       int             _backPy;
-       int             _backWindow;
-       int             _backLevel;
-
-       virtual bool  OnMouseMove();
-       virtual bool  OnMiddleButtonDown(); 
-       virtual bool  OnMiddleButtonUp();
-};
-
-
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 //------------------------------------------------------------------
 
-class vtkInfoTextImage{
-public:
-       vtkInfoTextImage();
-       ~vtkInfoTextImage();
-       void SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview);
-       void SetMarImageData(marImageData *marimagedata);
-       void Configure();
-       void PutPixelIntensity(int x, int y, int z);
-       void PutPosition(int x, int y, int z);
-       void PutColorLevel();
-       void PutWindowLevel();
 
 
-protected:
-private:
-
-       marImageData    *_marimagedata;
-       wxVtk2DBaseView *_wxvtk2Dbaseview;
-       vtkTextActor    *_vtkText_WindowLevel;
-       vtkTextActor    *_vtkText_ColorLevel;
-       vtkTextActor    *_vtkText_position;
-       vtkTextActor    *_vtkText_pixelIntensity;
-
-       vtkTextActor    *Create_Text_Label(int px, int py);
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInfoTextImageInteractor : public InteractorStyleMaracas{
-public:
-       vtkInfoTextImageInteractor();
-       virtual ~vtkInfoTextImageInteractor();
-       void SetModelVtkInfoTextImage(vtkInfoTextImage *vtkinfotextimage);
-       vtkInfoTextImage *GetVtkInfoTextImage();
-
-protected:
-
-       virtual bool  OnMouseMove();
-
-private:
-       vtkInfoTextImage        *_vtkinfotextimage; 
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorScrollZ : public InteractorStyleMaracas {
-public:
-       vtkInteractorScrollZ();
-       virtual ~vtkInteractorScrollZ();
-
-       virtual bool  OnMouseMove();
-       virtual bool  OnRightButtonDown();
-       virtual bool  OnRightButtonUp();
-
-
-
-protected:
-               bool                    _stateFordware;
-           int                         _fordwareX;
-        int                            _fordwareY;
-               int                             _sliceZ;
-
-private:
-
-};
-
-
-
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxVtk3DBaseView;
-
-class creaMaracasVisu_EXPORT vtkInteractorStyleBaseView : public vtkInteractorStyleImage
-{
-public:
-       vtkInteractorStyleBaseView();
-       ~vtkInteractorStyleBaseView();
-       static vtkInteractorStyleBaseView *New();
-       virtual void  OnChar();
-       virtual void  OnMouseMove();
-       virtual void  OnLeftButtonDown(); 
-       virtual void  OnLeftButtonUp();
-       virtual void  OnMiddleButtonDown(); 
-       virtual void  OnMiddleButtonUp();
-       virtual void  OnRightButtonDown();
-       virtual void  OnRightButtonUp();
-
-       virtual void  OnLeftDClick();
-       virtual void  OnRightDClick();
-       virtual void  OnMiddleDClick();
-       virtual void  OnMouseWheel();
-
-       virtual void  TransformCoordinate(double &X, double &Y, double &Z);
-                       void  AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas);
-                       void  RemoveInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas);
-                       void  InsertInteractorStyleMaracas(int pos, InteractorStyleMaracas* interactorStyleMaracas);
-                       void  CallLstInteractorStyleMaracas(int type);
-
-       wxVtk2DBaseView         *GetWxVtk2DBaseView();
-       wxVtk3DBaseView         *GetWxVtk3DBaseView();
-                       void            SetwxVtkBaseView(wxVtkBaseView *wxvtkbaseview);
-                       void            SetActiveAllInteractors(bool ok);
-
-                       void            SetRefresh_waiting();
-                       void            SetParent_refresh_waiting();
-
-                       bool            GetRefresh_waiting();
-                       bool            GetParent_refresh_waiting();
-
-
-                       void            EvaluateToRefresh();
-                       void            BlockRefresh();
-                       void            UnBlockRefresh();
-
-protected:
-               std::vector< InteractorStyleMaracas* >  _lstInteractorStyleMaracas;
-
-private:
-       bool                            _blockRefresh;
-       bool                            _refresh_waiting;
-       bool                            _parent_refresh_waiting;
-       wxVtkBaseView           *_wxvtkbaseview;
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class creaMaracasVisu_EXPORT vtkInteractorStyleBaseView2D : public vtkInteractorStyleBaseView{
-public:
-       vtkInteractorStyleBaseView2D();
-       ~vtkInteractorStyleBaseView2D();
-       static vtkInteractorStyleBaseView2D *New();
-       virtual void  OnMouseMove();
-       virtual void  OnLeftButtonDown(); 
-       virtual void  OnLeftButtonUp();
-       virtual void  OnMiddleButtonDown(); 
-       virtual void  OnMiddleButtonUp();
-       virtual void  OnRightButtonDown();
-       virtual void  OnRightButtonUp();
-
-
-protected:
-
-private:
-       manualInteractorWindowLevel             *_manualinteractorwindowlevel;
-       vtkInteractorScrollZ                    *_vtkInteractorScrollZ;
-
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class creaMaracasVisu_EXPORT vtkInteractorStyleBaseView3D : public vtkInteractorStyleBaseView {
-public:
-       vtkInteractorStyleBaseView3D();
-       ~vtkInteractorStyleBaseView3D();
-       static vtkInteractorStyleBaseView3D *New();
-
-       virtual void  OnMouseMove () ;
-       virtual void  OnLeftButtonDown (); 
-       virtual void  OnLeftButtonUp () ;
-       virtual void  OnMiddleButtonDown (); 
-       virtual void  OnMiddleButtonUp () ;
-       virtual void  OnRightButtonDown () ;
-       virtual void  OnRightButtonUp () ;
-
-private:
-
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class creaMaracasVisu_EXPORT wxVtk3DBaseView: public wxVtkBaseView{
-public:
-       wxVtk3DBaseView( wxWindow *parent );
-       virtual ~wxVtk3DBaseView();
-       vtkCamera*                      GetCamera();
-       virtual vtkRenderer*            GetRenderer();
-       virtual vtkRenderWindow*        GetRenWin();
-       void                            Refresh();
-       void                            Configure();
-       virtual void            GetSpacing(double spc[3]);
-
-private:
-       bool                            _configure;
-       vtkRenderer                     *_aRenderer;
-       vtkRenderWindow         *_renWin;
-       vtkCamera                       *_aCamera;
-protected:
-};
-
 
 
 #endif // __WX_VTK__BASE__VIEW__H
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx
new file mode 100644 (file)
index 0000000..7333e93
--- /dev/null
@@ -0,0 +1,208 @@
+#include "wxVtkClipping3DView.h"
+
+#include "wxVtkClipping3DViewCntrlPanel.h"
+
+wxVtkClipping3DView::wxVtkClipping3DView(wxVtk3DBaseView* wxvtk3Dbaseview)
+{
+       _wxvtk3Dbaseview                                =       wxvtk3Dbaseview;
+       _vtkclipping3Ddataviewer                =       NULL;
+       _wxvtkclipping3DviewCntrlPanel  =       NULL;
+
+       _boxWidgetVolume                                =       NULL;
+       _boxWidgetS1                                    =       NULL;
+}
+
+//-------------------------------------------------------------------
+wxVtkClipping3DView::~wxVtkClipping3DView(){
+       if (_boxWidgetVolume!=NULL)                              { _boxWidgetVolume     -> Delete();                                    }
+       if (_boxWidgetS1!=NULL)                                  { _boxWidgetS1         -> Delete();                                    }
+       if (_vtkclipping3Ddataviewer!=NULL)              { delete _vtkclipping3Ddataviewer;                     }
+       if (_wxvtkclipping3DviewCntrlPanel!=NULL){ delete _wxvtkclipping3DviewCntrlPanel;       }
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::SetVisibleBoxSurface(bool visible)
+{
+       if (visible==true){
+               _boxWidgetS1->On();
+       } else {
+               _boxWidgetS1->Off();
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::SetVisibleBoxVolume(bool visible)
+{
+       if (_boxWidgetVolume!=NULL){
+               if (visible==true){
+                       _boxWidgetVolume->On();
+               } else {
+                       _boxWidgetVolume->Off();
+               }
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::Refresh()
+{
+       _vtkclipping3Ddataviewer->Refresh();
+       if (_wxvtkclipping3DviewCntrlPanel!=NULL)
+       {
+               _wxvtkclipping3DviewCntrlPanel->Refresh();
+       }
+}
+//-------------------------------------------------------------------
+wxPanel* wxVtkClipping3DView::CreateControlPanel(wxWindow *parent)
+{
+       _wxvtkclipping3DviewCntrlPanel = new wxVtkClipping3DViewCntrlPanel(parent,this);
+       return _wxvtkclipping3DviewCntrlPanel;
+}
+//-------------------------------------------------------------------
+vtkClipping3DDataViewer* wxVtkClipping3DView::GetVtkClipping3DDataViewer()
+{
+       return _vtkclipping3Ddataviewer; 
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::VisibleActor(int idTissue, bool visTissue){
+       if (visTissue!=_vtkclipping3Ddataviewer->GetVisibleTissue(idTissue)){
+               if (visTissue==false){
+                       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );    
+               } else {
+                       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );       
+//                     _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(idTissue) );
+//                     _actor->VisibilityOn();
+               }
+               _vtkclipping3Ddataviewer->SetVisibleTissue(idTissue,visTissue);
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::SetRepSurfaceWireFrame(int idTissue , bool representationType )
+{
+       vtkActor *tmpActor;
+       tmpActor = GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
+
+       if (representationType==false){
+               tmpActor->GetProperty()->SetRepresentationToWireframe();
+       } else {
+               tmpActor->GetProperty()->SetRepresentationToSurface();
+       }
+
+       _vtkclipping3Ddataviewer->SetRepresentationType(idTissue,representationType);
+}
+
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::VisibleVolumeActor( bool visVolume){
+       if (visVolume!=_vtkclipping3Ddataviewer->GetVisibleVolume() ){
+               if (visVolume==false){
+//EED 31/03/2008                       
+//                     _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetVolumeActor()  );    
+                       _wxvtk3Dbaseview->GetRenderer()->RemoveVolume( _vtkclipping3Ddataviewer->GetVolumeActor()  );   
+               } else {
+//EED 31/03/2008                       
+//                     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetVolumeActor() );        
+                       _wxvtk3Dbaseview->GetRenderer()->AddVolume( _vtkclipping3Ddataviewer->GetVolumeActor() );       
+               }
+               _vtkclipping3Ddataviewer->SetVisibleVolume(visVolume);
+       }
+}
+//-------------------------------------------------------------------
+wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview()throw(char*)
+{
+       if(_wxvtk3Dbaseview==NULL){
+               throw "wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview() _wxvtk3Dbaseview=NULL";
+       }
+       return _wxvtk3Dbaseview;
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::Configure(){
+       _wxvtk3Dbaseview->Configure();
+
+       // Actors are added to the renderer. 
+       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );                       
+
+       _boxWidgetS1 = vtkBoxWidget::New();
+       _boxWidgetS1->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
+       _boxWidgetS1->SetPlaceFactor(1.25);
+
+
+
+       vtkStripper *stripper=_vtkclipping3Ddataviewer->GetTissueStripper(0);
+       vtkPolyData *polydata= stripper->GetOutput();
+
+       _boxWidgetS1->SetInput( polydata );
+       _boxWidgetS1->PlaceWidget();
+
+       int i;
+       for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
+       {
+               _boxWidgetS1->AddObserver( vtkCommand::InteractionEvent          , _vtkclipping3Ddataviewer->GetObserverS(i) );
+       }
+
+
+
+
+//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(0) );                       
+//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(3));                        
+
+       VisibleActor(0, false );
+       VisibleActor(1, false );
+       VisibleActor(2, false );
+       VisibleActor(3, false );
+
+       _boxWidgetS1->HandlesOn ();
+       
+//EED 29Mars2009       
+//     _boxWidgetS1->On();
+       
+       _boxWidgetS1->Off();
+
+       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
+       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(1) );
+       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(2) );
+       _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(3) );
+       
+// EED 9 fev 2007
+// box Volume
+       _boxWidgetVolume = vtkBoxWidget::New();
+       _boxWidgetVolume->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
+       _boxWidgetVolume->SetPlaceFactor(1.25);
+
+       _boxWidgetVolume->SetInput( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+       _boxWidgetVolume->PlaceWidget();
+
+       _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent              , _vtkclipping3Ddataviewer->GetObserverV() );
+
+       _boxWidgetVolume->HandlesOn ();
+       
+//EED 29Mars2009       
+//     _boxWidgetVolume->On();
+       
+       _boxWidgetVolume->Off();
+
+
+//     vtkPlanes *vtkplanes=this->GetVtkClipping3DDataViewer()->GetVolumePlanes();
+//     _boxWidgetVolume->GetPlanes( vtkplanes );
+
+
+  // An initial camera view is created.  The Dolly() method moves 
+  // the camera towards the FocalPoint, thereby enlarging the image.
+  _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
+  _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
+  _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);
+
+  // Set a background color for the renderer and set the size of the
+  // render window (expressed in pixels).
+  _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
+  _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
+
+  // Note that when camera movement occurs (as it does in the Dolly()
+  // method), the clipping planes often need adjusting. Clipping planes
+  // consist of two planes: near and far along the view direction. The 
+  // near plane clips out objects in front of the plane; the far plane
+  // clips out objects behind the plane. This way only what is drawn
+  // between the planes is actually rendered.
+  _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vtkclipping3Ddataviewer)
+{
+       _vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.h
new file mode 100644 (file)
index 0000000..ffc455d
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef WXVTKCLIPPING3DVIEW_H_
+#define WXVTKCLIPPING3DVIEW_H_
+
+#include "vtkClipping3DDataViewer.h"
+#include "wxVtk3DBaseView.h"
+#include "wx/wx.h"
+//#include "wxVtkClipping3DViewCntrlPanel.h"
+//class wxVtkClipping3DViewCntrlPanel;
+
+class wxVtkClipping3DView
+{
+public:
+       wxVtkClipping3DView( wxVtk3DBaseView* wxvtk3Dbaseview );
+       virtual ~wxVtkClipping3DView();
+       virtual void                            Refresh();
+       virtual void                            Configure();
+       void                                            SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
+       wxPanel*                                        CreateControlPanel(wxWindow *parent);
+       vtkClipping3DDataViewer*        GetVtkClipping3DDataViewer();
+
+       void                                            VisibleActor(int idTissue, bool visTissue);
+       void                                            VisibleVolumeActor( bool visVolume );
+       void                                            SetVisibleBoxSurface(bool visible);
+       void                                            SetVisibleBoxVolume(bool visible);
+       void                                            SetRepSurfaceWireFrame(int idTissue , bool typeRepresentation );
+
+       wxVtk3DBaseView*                        GetWxvtk3Dbaseview()throw(char*);
+
+private:
+       wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
+       vtkClipping3DDataViewer                 *_vtkclipping3Ddataviewer;
+       vtkBoxWidget                                    *_boxWidgetS1;
+       vtkBoxWidget                                    *_boxWidgetVolume;
+       wxPanel                                                 *_wxvtkclipping3DviewCntrlPanel;
+protected:
+};
+
+#endif /*WXVTKCLIPPING3DVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
new file mode 100644 (file)
index 0000000..ab9803c
--- /dev/null
@@ -0,0 +1,702 @@
+
+#include "wxVtkClipping3DViewCntrlPanel.h"
+#include "wx/colordlg.h"
+#include "vtkTriangleFilter.h"
+#include "vtkPolyDataConnectivityFilter.h"
+#include "vtkClosePolyData.h"
+#include "vtkSTLWriter.h"
+#include "HistogramDialog.h"
+#include "marDicomBase.h"
+
+wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, wxVtkClipping3DView *wxvtkclipping3Dview )
+: wxPanel(parent, -1)
+{
+       wxPanel *panel  = this;
+       _wxvtkclipping3Dview    = wxvtkclipping3Dview;
+
+//EEDx2.6
+//     wxStaticText    *text1                  = new wxStaticText(panel, -1,_T("          "));
+//     wxStaticText    *text2                  = new wxStaticText(panel, -1,_T("  "));
+
+                                       _surfA                  = new wxRadioButton(panel,-1,_T("A"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
+                                       _surfB                  = new wxRadioButton(panel,-1,_T("B"));
+                                       _surfC                  = new wxRadioButton(panel,-1,_T("C"));
+                                       _surfD                  = new wxRadioButton(panel,-1,_T("D"));
+
+       wxCheckBox              *ckVolum                = new wxCheckBox(panel,-1,_T("Vol"));
+       wxCheckBox              *ckBoxSurface   = new wxCheckBox(panel,-1,_T("Surface Box"));
+       wxCheckBox              *ckBoxVolume    = new wxCheckBox(panel,-1,_T("Volume Box"));
+
+                                       _color                  = new wxButton(panel,-1,_T(""));
+                                       _visible                = new wxCheckBox(panel,-1,_T("Vis"));
+                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL | wxSL_LABELS);
+
+       wxStaticText    *isoValueTitle  = new wxStaticText(panel,-1,_T("isoValue"));
+                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
+
+
+                                       _wireFrameRep   = new wxRadioButton(panel,-1,_T("WireFrame"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
+                                       _surfaceRep             = new wxRadioButton(panel,-1,_T("Surface"));
+
+
+       double range[2];
+       vtkImageData *vtkimagedata = wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+       vtkimagedata->GetScalarRange( range );
+       _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
+       _isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) );
+
+
+       _isoValue->SetTickFreq(25,0);
+
+       _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
+       _isoValueSpin->SetRange(1,8);
+       _isoValueSpin->SetValue(5);
+       Connect(_isoValueSpin->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin ); 
+
+       wxButton *btnSTL                                = new wxButton(panel,-1,_T("Create STL File"));
+       wxButton *btnSaveRaw                    = new wxButton(panel,-1,_T("Save Raw Volume"));
+
+       wxButton *btnVolumeFunctions    = new wxButton(panel,-1,_T("Read Volume Functions"));
+
+
+       Connect(btnSTL->GetId()                         , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL    ); 
+       Connect(btnSaveRaw->GetId()                     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume    ); 
+       Connect(btnVolumeFunctions->GetId()     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions  ); 
+
+
+       wxButton *btnMeshVTKLoad        = new wxButton(panel,-1,_T("Load Mesh"));
+       Connect(btnMeshVTKLoad->GetId() , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad      ); 
+
+
+/*
+       int maxX = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionX();
+       int maxY = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionY();
+       int maxZ = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionZ();
+       wxCheckBox              *ckBoxX                 = new wxCheckBox(panel,-1,"X");
+                                       _positionX              = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       wxCheckBox              *ckBoxY                 = new wxCheckBox(panel,-1,"Y");
+                                       _positionY              = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       wxCheckBox              *ckBoxZ                 = new wxCheckBox(panel,-1,"Z");
+                                       _positionZ              = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+*/
+
+//     ckVolum->Enable(false);
+       ckBoxSurface->SetValue(false);
+       ckBoxVolume->SetValue(false);
+       _color->SetSize(40,20);
+       _opacity->SetSize(370,20);
+//     ckBoxX->SetValue(true);
+//     ckBoxY->SetValue(true);
+//     ckBoxZ->SetValue(true);
+       _surfA->SetValue(true);
+       _wireFrameRep->SetValue(false);
+       _surfaceRep->SetValue(true);
+       _visible->SetValue(false);
+//     _positionX->SetSize(400,20);
+//     _positionY->SetSize(400,20);
+//     _positionZ->SetSize(400,20);
+
+       Connect(ckVolum->GetId()                , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleVolume                             );
+       Connect(ckBoxVolume->GetId()    , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume                  );
+
+       Connect(_surfA->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
+       Connect(_surfB->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
+       Connect(_surfC->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
+       Connect(_surfD->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
+       Connect(ckBoxSurface->GetId()   , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface                 );
+
+       Connect(_wireFrameRep->GetId()  , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame        );
+       Connect(_surfaceRep->GetId()    , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame        );
+
+       Connect(_color->GetId()                 , wxEVT_COMMAND_BUTTON_CLICKED            , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnColor                                             );
+       Connect(_visible->GetId()               , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleSurface                    );
+       Connect(_opacity->GetId()               , wxEVT_COMMAND_SLIDER_UPDATED            , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnOpacity                                   );
+
+//EED 27Dic2007
+//     Connect(_isoValue->GetId()              , wxEVT_COMMAND_SLIDER_UPDATED            , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValue                                  );
+       Connect(_isoValue->GetId()              , wxEVT_SCROLL_THUMBRELEASE               , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValue                                          );
+
+/*
+       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              );
+*/
+
+       wxFlexGridSizer *sizer   = new wxFlexGridSizer(1);
+       wxFlexGridSizer *sizerH0 = new wxFlexGridSizer(20);
+       wxFlexGridSizer *sizerH1 = new wxFlexGridSizer(20);
+       wxFlexGridSizer *sizerH2 = new wxFlexGridSizer(10);
+       wxFlexGridSizer *sizerH3 = new wxFlexGridSizer(10);
+       //wxFlexGridSizer *sizerH4 = new wxFlexGridSizer(10); // JPRx
+       //wxFlexGridSizer *sizerH5 = new wxFlexGridSizer(10); // JPRx
+       //wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10); // JPRx
+
+       sizerH0->Add( ckVolum                                                                   , 1, wxALL|wxEXPAND, 0);
+       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       sizerH0->Add( ckBoxVolume                                                               , 1, wxALL|wxEXPAND, 0);
+       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       sizerH0->Add( btnVolumeFunctions                                                , 1, wxALL|wxEXPAND, 0);
+       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       sizerH0->Add( btnMeshVTKLoad                                                    , 1, wxALL|wxEXPAND, 0);
+
+
+       sizerH1->Add( _surfA                                                                    , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( _surfB                                                                    , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( _surfC                                                                    , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( _surfD                                                                    , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( ckBoxSurface                                                              , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( btnSTL                                                                    , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( btnSaveRaw                                                                , 1, wxALL|wxEXPAND, 0);
+
+
+//     sizerH2->Add( new wxStaticText(panel, -1,_T("          ")                       , 1, wxALL|wxEXPAND, 0);
+       sizerH2->Add( _color                            , 1, wxALL|wxEXPAND, 0);
+       sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH2->Add( _visible                          , 1, wxALL|wxEXPAND, 0);
+       sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
+
+       
+       sizerH2->Add( _wireFrameRep                             , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0);
+       sizerH2->Add( new wxStaticText(panel, -1,_T("   "))                                     , 1, wxALL|wxEXPAND, 0);
+       sizerH2->Add( _surfaceRep                               , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0);
+       sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
+       
+       sizerH2->Add( _opacity                          , 1, wxALL|wxEXPAND, 0);
+
+
+       sizerH3->Add( isoValueTitle                     , 1, wxALL|wxEXPAND, 0);
+       sizerH3->Add( _isoValueSpin                     , 1, wxALL|wxEXPAND, 0);
+       sizerH3->Add( _isoValue                         , 1, wxALL|wxEXPAND, 0);
+
+/*
+       sizerH4->Add( ckBoxX            , 1, wxALL|wxEXPAND, 0);
+       sizerH4->Add( text2                     , 1, wxALL|wxEXPAND, 0);
+       sizerH4->Add( _positionX                , 1, wxALL|wxEXPAND, 0);
+
+       sizerH5->Add( ckBoxY            , 1, wxALL|wxEXPAND, 0);
+       sizerH5->Add( text2                     , 1, wxALL|wxEXPAND, 0);
+       sizerH5->Add( _positionY                , 1, wxALL|wxEXPAND, 0);
+
+       sizerH6->Add( ckBoxZ            , 1, wxALL|wxEXPAND, 0);
+       sizerH6->Add( text2                     , 1, wxALL|wxEXPAND, 0);
+       sizerH6->Add( _positionZ                , 1, wxALL|wxEXPAND, 0);
+*/
+       sizer->Add( sizerH0 , 1, wxALL|wxEXPAND, 2);
+       sizer->Add( sizerH1 , 1, wxALL|wxEXPAND, 2);
+       sizer->Add( sizerH2 , 1, wxALL|wxEXPAND, 2);
+       sizer->Add( sizerH3 , 1, wxALL|wxEXPAND, 2);
+//     sizer->Add( sizerH4 , 1, wxALL|wxEXPAND, 2);
+//     sizer->Add( sizerH5 , 1, wxALL|wxEXPAND, 2);
+//     sizer->Add( sizerH6 , 1, wxALL|wxEXPAND, 2);
+
+       panel->SetSize(300,60);
+       panel->SetAutoLayout(true);
+       panel->SetSizer(sizer);
+       panel->Layout();
+
+       panel->SetEventHandler((wxEvtHandler*)this);
+
+}
+//-------------------------------------------------------------------
+wxVtkClipping3DViewCntrlPanel::~wxVtkClipping3DViewCntrlPanel()
+{
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::Refresh()
+{
+//     wxPanel::Refresh();
+/*
+       _positionX->SetValue( _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetX( ) );
+       _positionY->SetValue( _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetY( ) );
+       _positionZ->SetValue( _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetZ( ) );
+*/
+}
+//-------------------------------------------------------------------
+int wxVtkClipping3DViewCntrlPanel::GetIdTissue()
+{
+       int idTissue=-1;
+       if (_surfA->GetValue()==true)
+       {
+               idTissue=0;
+       }
+       if (_surfB->GetValue()==true)
+       {
+               idTissue=1;
+       }
+       if (_surfC->GetValue()==true)
+       {
+               idTissue=2;
+       }
+       if (_surfD->GetValue()==true)
+       {
+               idTissue=3;
+       }
+
+       return idTissue;
+}
+/*
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleAxisX(wxCommandEvent& event)
+{
+       _wxvtkclipping3Dview->VisibleImageActor(0, event.IsChecked() );
+       _wxvtkclipping3Dview->Refresh();
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleAxisY(wxCommandEvent& event)
+{
+       _wxvtkclipping3Dview->VisibleImageActor(1, event.IsChecked() );
+       _wxvtkclipping3Dview->Refresh();
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
+{
+       _wxvtkclipping3Dview->VisibleImageActor(2, event.IsChecked() );
+       _wxvtkclipping3Dview->Refresh();
+}
+*/
+
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnSurface(wxCommandEvent& event)
+{
+       int idTissue=GetIdTissue();
+       if (idTissue!=-1)
+       {
+               // Color
+               vtkActor *tmpActor;
+               tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
+               double rgb[3];
+               tmpActor->GetProperty()->GetColor( rgb );
+               wxColour colour( (int)(rgb[0]*255) , (int)(rgb[1]*255) , (int)(rgb[2]*255) );
+               _color->SetBackgroundColour(colour);
+
+               // Visible
+               _visible->SetValue(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVisibleTissue(idTissue));
+
+               // Opacity
+               _opacity->SetValue( (int)(tmpActor->GetProperty()->GetOpacity()*100) );
+
+               // Representation Type  WireFrame / Surface
+               _surfaceRep->SetValue(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue)); 
+               _wireFrameRep->SetValue(!_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue)); 
+
+               // isoValue
+               int isoValue= (int)(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(idTissue));
+               _isoValue->SetValue(isoValue);
+       }
+}
+
+
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(wxCommandEvent& event)
+{
+       int idTissue=GetIdTissue();
+       if (idTissue!=-1)
+       {
+               _wxvtkclipping3Dview->SetRepSurfaceWireFrame(idTissue , _surfaceRep->GetValue() );
+
+               _wxvtkclipping3Dview->Refresh();
+
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+
+       }
+}
+
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
+{
+       _wxvtkclipping3Dview->VisibleVolumeActor( event.IsChecked()  );
+       _wxvtkclipping3Dview->Refresh();
+
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
+{
+       _wxvtkclipping3Dview->SetVisibleBoxSurface(event.IsChecked() );
+       _wxvtkclipping3Dview->Refresh();
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume(wxCommandEvent& event)
+{
+       _wxvtkclipping3Dview->SetVisibleBoxVolume(event.IsChecked() );
+       _wxvtkclipping3Dview->Refresh();
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnColor(wxCommandEvent& event)
+{
+       int idTissue=GetIdTissue();
+       if (idTissue!=-1)
+       {
+// EED 17 Janvier 2007
+               wxColourDialog dlgColour(this);
+//             dlgColour.ShowModal();
+               if( dlgColour.ShowModal( ) == wxID_OK ) 
+               {
+                       vtkActor *tmpActor;
+                       tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
+                       float r=dlgColour.GetColourData().GetColour().Red()/255;
+                       float g=dlgColour.GetColourData().GetColour().Green()/255;
+                       float b=dlgColour.GetColourData().GetColour().Blue()/255;
+                       tmpActor->GetProperty()->SetColor( r , g , b );
+                       _color->SetBackgroundColour(dlgColour.GetColourData().GetColour());
+
+                       _wxvtkclipping3Dview->Refresh();
+
+                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+               }
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
+{
+       int idTissue=GetIdTissue();
+       if (idTissue!=-1)
+       {
+               _wxvtkclipping3Dview->VisibleActor(idTissue, _visible->GetValue());
+
+               _wxvtkclipping3Dview->Refresh();
+
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
+{
+       int idTissue=GetIdTissue();
+       if (idTissue!=-1)
+       {
+               vtkActor *tmpActor;
+               tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
+               float opacity=_opacity->GetValue();
+               tmpActor->GetProperty()->SetOpacity( opacity/100 );
+
+               _wxvtkclipping3Dview->Refresh();
+
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+       }
+}
+
+//----------------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin(wxScrollEvent& event)
+{
+       int value = _isoValue->GetValue();
+       int delta= (int)pow( 4 , _isoValueSpin->GetValue() );
+       int min=value - delta/2;
+       int max=value + delta/2;
+       if (min<0)
+       {
+               min=0;
+               max=delta;
+       }
+       _isoValue->SetRange(min,max);
+}
+
+
+//------------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnIsoValue(wxScrollEvent& event)
+{
+       wxBusyCursor wait;
+
+       int idTissue=GetIdTissue();
+       if (idTissue!=-1)
+       {
+               int isoValue=_isoValue->GetValue();
+               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->SetIsovalue(idTissue,isoValue);
+//             wxString tmpStr;
+//             tmpStr.Printf("%d",isoValue);
+       
+               _wxvtkclipping3Dview->Refresh();
+
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+       }
+
+}
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
+{
+
+       int idTissue=GetIdTissue();
+       if (idTissue==-1)
+       {
+               idTissue=0;
+       }
+
+
+       wxString dirSTL = wxGetHomeDir( ) ;
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+
+       if( dialog.ShowModal( ) == wxID_OK ) 
+       {
+          
+       
+               // ------------------------------------------------------------------------
+               //  1.  GENERATE STL FILES
+               // ------------------------------------------------------------------------
+//             const char* fileprefix = "c:\\Creatis\\";
+               std::string prefix = (const char*) (dialog.GetPath().mb_str() );
+               std::string filename;
+
+               // 1.1. Se hace un filtro triangular puesto que el stl writer solo recibe poligonos triangulares.
+
+        vtkTriangleFilter *filtro = vtkTriangleFilter::New();
+
+
+               filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+               vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
+        pdcf->SetInput( filtro->GetOutput() );
+        vtkClosePolyData *cpd = vtkClosePolyData::New();
+        cpd->SetInput( pdcf->GetOutput() );
+
+               // 1.2 se escribe a disco el archivo stl de la superficie interna
+        cpd->Update();
+        vtkSTLWriter *writer = vtkSTLWriter::New();
+        writer->SetInput( cpd->GetOutput() );
+               filename =prefix;
+        writer->SetFileName(filename.c_str());
+        writer->SetFileTypeToASCII();
+        writer->Write();
+        writer->Delete();
+
+   
+        filtro->Delete();
+        cpd->Delete();
+        pdcf->Delete();
+       }
+
+}
+
+//EED 30 Janvier 2007
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
+{
+       wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxSAVE );
+       if (dialog.ShowModal() == wxID_OK)
+       {
+               std::string directory = (const char*) (dialog.GetDirectory().mb_str() );
+               std::string filename  = (const char*) (dialog.GetFilename().mb_str() );
+               float rescalaSlope           =  1;
+               float rescalaIntercept       =  0;
+               vtkMPRBaseData *vtkmprbasedata = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData();
+               vtkImageData *vtkimagedata       = vtkmprbasedata->GetImageData();
+               int dim[3];
+               vtkimagedata->GetDimensions(dim);
+               int voi[6];
+               voi[0]=0;
+               voi[1]=dim[0];
+               voi[2]=0;
+               voi[3]=dim[1];
+               voi[4]=0;
+               voi[5]=dim[2];
+//EED 10 oct 2007 MaracasVisu pour bbMaracasvisu
+               marRAW2Files marraw2;
+               marraw2.saveVolume(directory,filename,vtkimagedata,voi,rescalaSlope,rescalaIntercept);
+       }
+}
+
+//EED 22 Fevrier 2007
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
+{
+       
+       int /*i=0,*/ xi,yi,r,g,b;  // JPRx
+       vtkColorTransferFunction* ctfun = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetColorTransferenceFunction();
+       vtkPiecewiseFunction* tfun      = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTransferencefunction();
+       std::vector<double>* gtf                = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetGreyValuesTransferenceFVector();
+       std::vector<double>* itf                = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIntensityValuesTransferenceFVector();
+       std::vector<double>* greyctf    = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetGreyValueColorsOfColorTransferenceFVector();
+       std::vector<double>* rctf               = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRedColorsOfColorTransferenceFVector();
+       std::vector<double>* gctf               = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetGreenColorsOfColorTransferenceFVector();
+       std::vector<double>* bctf               = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetBlueColorsOfColorTransferenceFVector();
+       vtkImageData *imagedata = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+
+       //use for update in the refresh
+       /*
+       vtkVolumeRayCastMapper* volumeMapper = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVolumeMapper();
+       vtkVolume* newvol       =this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVolumeActor();
+       */
+
+       /*
+       MMLR BORRAME 
+       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.MarVolConf"), wxOPEN);
+       if (dialog.ShowModal() == wxID_OK)
+       {
+               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions( (char *)dialog.GetPath().c_str() );
+               
+       
+       }
+       */
+
+       HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Histogram Dialog"),imagedata,1);
+       // 
+       // put in a method
+       //
+       int tfSize=gtf->size();
+               if(tfSize>0)
+               {
+                       int i=0;
+                       hDlg->erasePointsTransferenceFunction();
+                       while(i<tfSize)
+                       {
+                               double g=(*gtf)[i];
+                               double in=(*itf)[i];
+                               hDlg->addPointToTransferenceFunction(g,in*100);
+                               i++;
+                       }
+                       
+               }
+
+       int ctfSize=rctf->size();
+       if(ctfSize>0)
+       {
+               int i=0;
+                       while(i<ctfSize)
+                       {
+                               double gr=(*greyctf)[i];
+                               double r=(*rctf)[i];
+                               double g=(*gctf)[i];
+                               double b=(*bctf)[i];
+                               hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255));
+                               i++;
+                       }
+       }
+       //setting variables if the user wants to do refresh
+       hDlg->setCTF(ctfun);
+       hDlg->setTF(tfun);
+       hDlg->setClipping3DView(_wxvtkclipping3Dview);
+       /*
+       hDlg->setVolume(newvol);
+       hDlg->setVolumeMapper(volumeMapper);
+       */
+       //
+       // when the user had changed the transference Function
+       //
+       if(hDlg->ShowModal()== wxID_OK )
+       {       
+                       // -- vtkPiecewiseFunction --
+                       tfun->RemoveAllPoints();
+                       gtf->clear();
+                       itf->clear();
+               
+                       int nTFPoints=hDlg->getSizeTransferenceFunction();
+                       int i=0;
+                       while(i<nTFPoints)
+                       {
+                               hDlg->getTransferenceFunctionPoint(i,xi,yi);
+                               tfun->AddPoint( xi , yi/100.0 );
+                               gtf->push_back(xi);
+                               itf->push_back(yi/100.0);
+                               i++;
+                       }       
+                       // -- vtkColorTransferFunction  --
+                       ctfun->RemoveAllPoints ();
+                       //clean colors
+                       rctf->clear();
+                       gctf->clear();
+                       bctf->clear();
+                       greyctf->clear();
+
+                       int nCTFpoints=hDlg->getSizeBarColor();
+                       i=0;    
+                       while(i<nCTFpoints)
+                       {
+                               hDlg->getDataBarColorPoint(i,xi,r,g,b);
+                               ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
+                               rctf->push_back(r/255.0);
+                               gctf->push_back(g/255.0);
+                               bctf->push_back(b/255.0);
+                               greyctf->push_back(xi);
+                               i++;
+                       }
+                       //---------------------------------
+                       // Refreshing and sending the event
+                       //---------------------------------
+                       //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
+                       _wxvtkclipping3Dview->Refresh();
+                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+                       
+                       /*
+                       volumeMapper->Update();
+                       newvol->Update();
+                       */
+       }
+       
+       else
+       {
+               
+               if(hDlg->getRefreshed())
+               {
+                       int i=0,size;
+                       //--Transference Function----
+                       tfun->RemoveAllPoints();
+                       i=0;
+                       size=gtf->size();
+                       for(i=0;i<size;i++)
+                       {
+                               double grey1=(*gtf)[i];
+                               double  in2=(*itf)[i];
+                               tfun->AddPoint( grey1 , in2 );
+                       }
+                       
+                       // -- vtkColorTransferFunction  --
+                       ctfun->RemoveAllPoints ();
+                       
+                       i=0;
+                       size=greyctf->size();           
+                       for(i=0;i<size;i++)
+                       {
+                               double grey2=(*greyctf)[i];
+                               double red =(*rctf)[i];
+                               double green =(*gctf)[i];
+                               double blue = (*bctf)[i];
+                               ctfun->AddRGBPoint(grey2,red,green,blue);
+                       }
+               
+                       //---------------------------------
+                       // Refreshing and sending the event
+                       //---------------------------------
+                       //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
+                       _wxvtkclipping3Dview->Refresh();
+                       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+                       
+                       /*
+                       volumeMapper->Update();
+                       newvol->Update();
+                       */
+                }
+                
+       }
+       //destroy the dialog
+       hDlg->Destroy();
+}
+
+//EED 23 Mai 2007
+//-------------------------------------------------------------------
+void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
+{
+       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxOPEN);
+       if (dialog.ShowModal() == wxID_OK)
+       {
+               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( (char *)dialog.GetPath().c_str() );
+               _wxvtkclipping3Dview->Refresh();
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+       }
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.h
new file mode 100644 (file)
index 0000000..fb00b2f
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef WXVTKCLIPPING3DVIEWCNTRLPANEL_H_
+#define WXVTKCLIPPING3DVIEWCNTRLPANEL_H_
+
+#include "wxVtkClipping3DView.h"
+#include "wx/wx.h"
+
+class wxVtkClipping3DViewCntrlPanel: public wxPanel
+{
+public:
+       wxVtkClipping3DViewCntrlPanel(wxWindow *parent, wxVtkClipping3DView *_wxvtkclipping3Dview);
+       ~wxVtkClipping3DViewCntrlPanel();
+                       void    OnSurface(wxCommandEvent& event);
+                       void    OnRepresentationSurfaceWireFrame(wxCommandEvent& event);
+                       void    OnVisibleVolume(wxCommandEvent& event);
+                       void    OnVisibleBoxSurface(wxCommandEvent& event);
+                       void    OnVisibleBoxVolume(wxCommandEvent& event);
+                       void    OnColor(wxCommandEvent& event);
+                       void    OnVisibleSurface(wxCommandEvent& event);
+                       void    OnOpacity(wxScrollEvent& event);
+                       void    OnIsoValue(wxScrollEvent& event);
+                       void    OnIsoValueSpin(wxScrollEvent& event);
+       virtual void    Refresh();
+                       void    OnBtnCreateFileSTL(wxCommandEvent& event);
+                       void    OnBtnSaveRawVolume(wxCommandEvent& event);
+                       void    OnBtnVolumeFunctions(wxCommandEvent& event);
+                       void    OnBtnMeshVTKLoad(wxCommandEvent& event);
+
+
+private:
+       wxVtkClipping3DView     *_wxvtkclipping3Dview;
+       wxSlider                        *_opacity;
+       wxSlider                        *_isoValue;
+       wxSlider                        *_isoValueSpin;
+       wxRadioButton           *_surfA;
+       wxRadioButton           *_surfB;
+       wxRadioButton           *_surfC;
+       wxRadioButton           *_surfD;
+       wxCheckBox                      *_visible;
+       wxButton                        *_color;
+
+       wxRadioButton           *_wireFrameRep;
+       wxRadioButton           *_surfaceRep;
+
+       int                             GetIdTissue();
+protected:
+
+};
+
+#endif /*WXVTKCLIPPING3DVIEWCNTRLPANEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
new file mode 100644 (file)
index 0000000..5c9562e
--- /dev/null
@@ -0,0 +1,511 @@
+#include "wxVtkMPR2DView.h"
+
+#include "vtkInteractorStyleBaseView.h"
+
+#include "vtkCellArray.h"
+
+wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction)
+ :wxVtk2DBaseView(parent)
+{
+       _backX                  = -99999;
+       _backY                  = -99999;
+       _backZ                  = -99999;
+       _direction              = direction;
+       _ptsA                   = NULL;
+       _lineAActor             = NULL;
+       _lineAMapper    = NULL;
+       _pdA                    = NULL;
+       _ptsB                   = NULL;
+       _lineBActor             = NULL;
+       _lineBMapper    = NULL;
+       _pdB                    = NULL;
+}
+
+//-------------------------------------------------------------------
+wxVtkMPR2DView::~wxVtkMPR2DView()
+{
+       if (_ptsA!=NULL)        { _ptsA         -> Delete(); }
+       if (_lineAActor!=NULL)  { _lineAActor   -> Delete(); }
+       if (_lineAMapper!=NULL) { _lineAMapper  -> Delete(); }
+       if (_pdA!=NULL)         { _pdA          -> Delete(); }
+       if (_ptsB!=NULL)        { _ptsB         -> Delete(); }
+       if (_lineBActor!=NULL)  { _lineBActor   -> Delete(); }
+       if (_lineBMapper!=NULL) { _lineBMapper  -> Delete(); }
+       if (_pdB!=NULL)         { _pdB          -> Delete(); }
+}
+//-------------------------------------------------------------------
+vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata()
+{
+       return (vtkMPRBaseData*)GetVtkBaseData();
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::Configure(){
+       wxVtk2DBaseView::Configure();
+
+       _interactorstylemprview = new vtkInteractorStyleMPRView();
+       ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
+
+       int x1,x2,y1,y2,z1,z2;
+       GetVtkmprbasedata()     -> GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
+
+       double spc[3];
+       vtkImageData* img =  GetVtkmprbasedata()->GetImageData();
+       if(img!=NULL){
+               img->GetSpacing(spc);
+               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]);
+
+               _visibleAxis = true;
+
+       // Axe A
+               _ptsA = vtkPoints::New();
+               _ptsA->SetNumberOfPoints(2);
+               _ptsA->SetPoint(0, -1000        , -1000 , -1000 );
+               _ptsA->SetPoint(1,  1000        ,  1000 ,  1000 );
+               vtkCellArray *linesA;
+               linesA = vtkCellArray::New();
+               linesA->InsertNextCell(2);
+               linesA->InsertCellPoint(0);
+               linesA->InsertCellPoint(1);
+               _pdA = vtkPolyData::New();
+               _pdA->SetPoints( _ptsA );
+               _pdA->SetLines( linesA );
+               linesA->Delete();  //do not delete lines ??
+               _lineAActor                                             =       vtkActor::New();
+               _lineAMapper                                    =       vtkPolyDataMapper::New();
+               _lineAMapper->SetInput(_pdA);
+               _lineAMapper->ImmediateModeRenderingOn();
+               _lineAActor->SetMapper(_lineAMapper);
+//             _lineAActor->GetProperty()->BackfaceCullingOn();
+               _lineAActor->GetProperty()->SetDiffuseColor(1,0,0);
+               _lineAActor->GetProperty()->SetLineWidth(2);
+               _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
+
+       // Axe B
+               _ptsB = vtkPoints::New();
+               _ptsB->SetNumberOfPoints(2);
+               _ptsB->SetPoint(0, -1000        , -1000 , -1000 );
+               _ptsB->SetPoint(1,  1000        ,  1000 ,  1000 );
+               vtkCellArray *linesB;
+               linesB = vtkCellArray::New();
+               linesB->InsertNextCell(2);
+               linesB->InsertCellPoint(0);
+               linesB->InsertCellPoint(1);
+               _pdB = vtkPolyData::New();
+               _pdB->SetPoints( _ptsB );
+               _pdB->SetLines( linesB );
+               linesB->Delete();  //do not delete lines ??
+               _lineBActor                                             =       vtkActor::New();
+               _lineBMapper                                    =       vtkPolyDataMapper::New();
+               _lineBMapper->SetInput(_pdB);
+               _lineBMapper->ImmediateModeRenderingOn();
+               _lineBActor->SetMapper(_lineBMapper);
+//             _lineBActor->GetProperty()->BackfaceCullingOn();
+               _lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
+               _lineBActor->GetProperty()->SetLineWidth(2);
+               _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
+
+       
+               vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
+               
+//EED 17Avril2009
+/*             
+               if (_direction==0) {
+                       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) { 
+                       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) { 
+                       camera->SetViewUp               (       0               ,       -1              ,       0       );
+                       camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     , -10000); 
+                       camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       ); 
+                       camera->SetParallelScale( (x2-x1)/3.0 );
+               }
+ */
+
+               if (_direction==0) {
+                       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) { 
+                       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) { 
+                       camera->SetViewUp               (       0               ,       1               ,       0       );
+                       camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     ,  10000); 
+                       camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       ); 
+                       camera->SetParallelScale( (x2-x1)/3.0 );
+               }
+               
+               
+               
+       }
+
+//     _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow (160);
+//     _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel (800);
+
+}
+
+void wxVtkMPR2DView::SetVisibleAxis(bool ok)
+{
+       if (ok!=_visibleAxis)
+       {
+               _visibleAxis=ok;
+               if (_visibleAxis==true)
+               {
+                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
+                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
+               }
+               if (_visibleAxis==false)
+               {
+                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor );
+                       _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor );
+               }
+
+       }
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::Refresh() 
+{
+       //wxVtk2DBaseView::Refresh();
+
+
+       //vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2(); // JPRx
+       //vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera(); // JPRx
+
+
+
+       int x1,x2,y1,y2,z1,z2;
+       GetVtkmprbasedata()->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
+       double spc[3];
+       
+       vtkImageData* img = GetVtkmprbasedata()->GetImageData();
+       if(img!=NULL){
+               img->GetSpacing(spc);
+               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]);
+
+               int x = (int)(GetVtkmprbasedata()->GetX());
+               int y = (int)(GetVtkmprbasedata()->GetY());
+               int z = (int)(GetVtkmprbasedata()->GetZ());
+
+               x =  (int)(x*spc[0]);
+               y =  (int)(y*spc[1]);
+               z =  (int)(z*spc[2]);
+
+
+
+               if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) {
+
+                       if (_direction==0) { 
+                               _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);
+                       }
+                       if (_direction==1) { 
+                               _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) { 
+                               _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
+                               _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
+                       //      _ptsA->SetPoint(0, x1 , y , -z2 );
+                       //      _ptsA->SetPoint(1, x2 , y , -z2 );
+                       //      _ptsB->SetPoint(0, x  , y1, -z2 );
+                       //      _ptsB->SetPoint(1, x  , y2, -z2 );
+                               
+                               _ptsA->SetPoint(0, x1 , y , z2 );
+                               _ptsA->SetPoint(1, x2 , y , z2 );
+                               _ptsB->SetPoint(0, x  , y1, z2 );
+                               _ptsB->SetPoint(1, x  , y2, z2 );
+                       }
+                       _backX=x;
+                       _backY=y;
+                       _backZ=z;
+               }
+               wxVtkBaseView::Refresh();
+       }
+}
+//-------------------------------------------------------------------
+int wxVtkMPR2DView::GetActualSlice()   // virtual
+{
+       int result;
+       if (_direction==0) 
+       { 
+               result = (int)(GetVtkmprbasedata()->GetX());
+       }
+       if (_direction==1) 
+       { 
+               result = (int)(GetVtkmprbasedata()->GetY());
+       }
+       if (_direction==2) 
+       { 
+               result = (int)(GetVtkmprbasedata()->GetZ());
+       }
+       return result;
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::SetActualSlice(int slice)   // virtual
+{
+       if (_direction==0) 
+       { 
+               GetVtkmprbasedata()->SetX(slice);
+       }
+       if (_direction==1) 
+       { 
+               GetVtkmprbasedata()->SetY(slice);
+       }
+       if (_direction==2) 
+       { 
+               GetVtkmprbasedata()->SetZ(slice);
+       }
+}
+//-------------------------------------------------------------------
+bool wxVtkMPR2DView::IfMouseTouchX(double x, double y, double z)
+{
+       double delta=5;
+       bool result=false;
+       if (_direction==0) 
+       { 
+       }
+       if (_direction==1) 
+       { 
+               if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
+               {
+                       result = true;
+               }
+       }
+       if (_direction==2) 
+       { 
+               if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
+               {
+                       result = true;
+               }
+       }
+       return result;
+}
+//-------------------------------------------------------------------
+bool wxVtkMPR2DView::IfMouseTouchY(double x, double y, double z)
+{
+       double delta=5;
+       bool result=false;
+       if (_direction==0) 
+       { 
+               if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
+               {
+                       result = true;
+               }
+       }
+       if (_direction==1) 
+       { 
+       }
+       if (_direction==2) 
+       { 
+               if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
+               {
+                       result = true;
+               }
+       }
+       return result;
+}
+//-------------------------------------------------------------------
+bool wxVtkMPR2DView::IfMouseTouchZ(double x, double y, double z)
+{
+       double delta=5;
+       bool result=false;
+       if (_direction==0) 
+       { 
+               if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
+               {
+                       result = true;
+               }
+       }
+       if (_direction==1) 
+       { 
+               if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
+               {
+                       result = true;
+               }
+       }
+       if (_direction==2) 
+       { 
+       }
+       return result;
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::MoveX(double x, double y, double z)
+{
+       if (_direction==0) 
+       { 
+       }
+       if (_direction==1) 
+       { 
+               GetVtkmprbasedata()->SetX(x);
+       }
+       if (_direction==2) 
+       { 
+               GetVtkmprbasedata()->SetX(x);
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::MoveY(double x, double y, double z)
+{
+       if (_direction==0) 
+       { 
+               GetVtkmprbasedata()->SetY(y);
+       }
+       if (_direction==1) 
+       { 
+       }
+       if (_direction==2) 
+       { 
+               GetVtkmprbasedata()->SetY(y);
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::MoveZ(double x, double y, double z)
+{
+       if (_direction==0) 
+       { 
+               GetVtkmprbasedata()->SetZ(z);
+       }
+       if (_direction==1) 
+       { 
+               GetVtkmprbasedata()->SetZ(z);
+       }
+       if (_direction==2) 
+       { 
+       }
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z)
+{
+       double c1r=1,c1g=1,c1b=0;
+       double c2r=1,c2g=0,c2b=0;
+
+       if (_direction==0) 
+       { 
+               if (IfMouseTouchY(x,y,z)==true)
+               {
+                       _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
+               } else {
+                       _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
+               }
+               if (IfMouseTouchZ(x,y,z)==true)
+               {
+                       _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
+               } else {
+                       _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
+               }
+       }
+
+       if (_direction==1) 
+       { 
+               if (IfMouseTouchX(x,y,z)==true)
+               {
+                       _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
+               } else {
+                       _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
+               }
+               if (IfMouseTouchZ(x,y,z)==true)
+               {
+                       _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
+               } else {
+                       _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
+               }
+       }
+
+       if (_direction==2) 
+       { 
+               if (IfMouseTouchX(x,y,z)==true)
+               {
+                       _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
+               } else {
+                       _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
+               }
+               if (IfMouseTouchY(x,y,z)==true)
+               {
+                       _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
+               } else {
+                       _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
+               }
+       }
+       Refresh();
+}
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual 
+{
+       wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction);
+
+       if (_direction==0)
+       {
+               X = ((vtkMPRBaseData*)GetVtkBaseData())->GetX();
+       }
+       if (_direction==1)
+       {
+               Y = ((vtkMPRBaseData*)GetVtkBaseData())->GetY();
+       }
+       if (_direction==2)
+       {
+               Z = ((vtkMPRBaseData*)GetVtkBaseData())->GetZ();
+       }
+}
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//void boxVolumeObserver::Execute(vtkObject *wdg, unsigned long eventId, void* calldata) {  // virtual
+//     if (eventId==vtkCommand::StartInteractionEvent){
+//             _renWin->SetDesiredUpdateRate(10);
+//     }
+//     if (eventId==vtkCommand::InteractionEvent){
+//             _renWin->SetDesiredUpdateRate(0.001);
+//     }
+//     if (eventId==vtkCommand::EndInteractionEvent){
+//             vtkPlanes *planes = vtkPlanes::New();
+//             vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
+//             boxwidget->GetPlanes(planes);
+//             _volumeMapper->SetClippingPlanes(planes);
+//             planes -> Delete();
+//     }
+//}
+
+//-------------------------------------------------------------------
+//void boxVolumeObserver::SetRenWin( vtkRenderWindow *renWin ){
+//     _renWin = renWin;
+//}
+//-------------------------------------------------------------------
+//void boxVolumeObserver::SetVolumeMapper(vtkVolumeRayCastMapper *volumeMapper){
+//     _volumeMapper = volumeMapper;
+//}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h
new file mode 100644 (file)
index 0000000..b385e4d
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef WXVTKMPR2DVIEW_H_
+#define WXVTKMPR2DVIEW_H_
+
+#include "vtkInteractorStyleMPRView.h"
+
+#include "wxVtk2DBaseView.h"
+
+class creaMaracasVisu_EXPORT wxVtkMPR2DView :  public wxVtk2DBaseView
+{
+public:
+       wxVtkMPR2DView( wxWindow *parent, int direction );
+       ~wxVtkMPR2DView();
+       void Configure();
+       virtual void                    Refresh();
+                       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);
+                       void                    MoveX(double x, double y, double z);
+                       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);
+                       void                    SetVisibleAxis(bool ok);
+
+
+private:
+
+       int                                                     _backX;
+       int                                                     _backY;
+       int                                                     _backZ;
+
+       bool                                            _visibleAxis;
+
+       int                                                     _direction;
+       vtkPoints                                       *_ptsA;
+       vtkActor                                        *_lineAActor;
+       vtkPolyDataMapper                       *_lineAMapper;
+    vtkPolyData                                        *_pdA;
+       vtkPoints                                       *_ptsB;
+       vtkActor                                        *_lineBActor;
+       vtkPolyDataMapper                       *_lineBMapper;
+    vtkPolyData                                        *_pdB;
+//     vtkInteractorStyle2DMaracas     *_interactorStyle2DMaracas; 
+       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
new file mode 100644 (file)
index 0000000..52fe1b7
--- /dev/null
@@ -0,0 +1,490 @@
+#include "wxVtkMPR3DView.h"
+
+#include "vtkDataSetMapper.h"
+#include "vtkPlaneSource.h"
+#include "vtkProbeFilter.h"
+#include "vtkStructuredPoints.h"
+#include "vtkMetaImageWriter.h"
+#include "vtkDataSetMapper.h"
+#include "vtkImageChangeInformation.h"
+#include "vtkPointData.h"
+#include "vtkWindowLevelLookupTable.h"
+#include "vtkPlane.h"
+#include "vtkCutter.h"
+#include "vtkTransform.h"
+#include "vtkmyPWCallback_3DPointWidget.h"
+
+wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview )
+{
+       _wxvtk3Dbaseview                        =       wxvtk3Dbaseview;
+       _vtkmpr3Ddataviewer                     =       NULL;
+       _wxvtkmpr3DviewCntrlPanel       =       NULL;   
+       //_myCallback=NULL;
+       _pointWidget=NULL;
+       _planeWidget=NULL;
+       _vtkplane=NULL;
+       _probe=NULL;
+       _contourMapper=NULL;
+}
+void wxVtkMPR3DView::RemoveActor(vtkActor* actor){     
+
+       _wxvtk3Dbaseview->GetRenderer()->RemoveActor(actor);    
+
+
+}
+void wxVtkMPR3DView::ResetCamera(int* ext, double* origin,double* spc){
+       if(ext == NULL){
+
+               _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();        
+               _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);      
+       }else{
+               /*double x = (spc[0])*(origin[0]+(((double)ext[1]-(double)ext[0])/2.0));                
+               double y = (spc[1])*(origin[1]+(double)ext[3]);
+               double z = (spc[2])*(origin[2]+(((double)ext[5]-(double)ext[4])/2.0));*/
+               /*double x0=(spc[0])*((double)ext[0]+origin[0]);
+               double x1=(spc[0])*((double)ext[1]+origin[0]);
+               double y0=(spc[1])*((double)ext[2]+origin[1]);
+               double y1=(spc[1])*((double)ext[3]+origin[1]);
+               double z0=(spc[2])*((double)ext[4]+origin[2]);
+               double z1=(spc[2])*((double)ext[5]+origin[2]);*/
+               double x0=(spc[0])*((double)ext[0]);
+               double x1=(spc[0])*((double)ext[1]);
+               double y0=(spc[1])*((double)ext[2]);
+               double y1=(spc[1])*((double)ext[3]);
+               double z0=(spc[2])*((double)ext[4]);
+               double z1=(spc[2])*((double)ext[5]);
+               
+               _wxvtk3Dbaseview->GetRenderer()->ResetCamera(x0,x1,y0,y1,z0,z1);
+               //_wxvtk3Dbaseview->GetCamera()->SetPosition(x,y,z);
+               _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);      
+       }
+}
+void wxVtkMPR3DView::Configure(){
+
+
+       _wxvtk3Dbaseview->Configure();
+       _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel();
+       _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
+
+
+       // An initial camera view is created.  The Dolly() method moves 
+       // the camera towards the FocalPoint, thereby enlarging the image.      
+       _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
+       this->ResetCamera();
+       
+
+       // Set a background color for the renderer and set the size of the
+       // render window (expressed in pixels).
+       _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
+       _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
+
+       // Note that when camera movement occurs (as it does in the Dolly()
+       // method), the clipping planes often need adjusting. Clipping planes
+       // consist of two planes: near and far along the view direction. The 
+       // near plane clips out objects in front of the plane; the far plane
+       // clips out objects behind the plane. This way only what is drawn
+       // between the planes is actually rendered.
+       _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
+
+
+       // vtkPointWidget
+       //if(_myCallback!=NULL){
+               //_myCallback->Delete();
+
+       //}
+       vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New();
+       _myCallback->SetWxVtkMPR3DView(this);
+       if(_pointWidget!=NULL){
+               _pointWidget->Delete();
+       }
+       _pointWidget = vtkPointWidget::New();
+       _myCallback->SetVtkPointWidget(_pointWidget);
+       _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); 
+       _pointWidget->SetInput( GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+       
+       _pointWidget->AllOff();
+       
+       _pointWidget->PlaceWidget();
+//     _pointWidget->SetPosition( x,y,z ); 
+       
+//EED01 29Mars2009
+// MACOS probleme vtk-window out of wx-window  
+//     _pointWidget->On();
+       
+       _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
+
+
+// PlaneWidget
+       if(_planeWidget!=NULL){
+               _planeWidget->Delete();
+       }
+       _planeWidget = vtkPlaneWidget::New();
+       _myCallback->SetVtkPlaneWidget(_planeWidget);
+       _planeWidget->SetInput( GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+       _planeWidget->NormalToXAxisOn();
+       _planeWidget->SetResolution(50);
+       _planeWidget->SetRepresentationToOutline();
+       int dim[3];
+       GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->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 );        
+
+       }else{
+               
+       }
+       _planeWidget->GetPolyData(_vtkplane);
+
+       
+       vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); 
+       _probe->SetSource( imageData );
+
+       
+       _contourMapper->SetScalarRange( imageData->GetScalarRange() );
+    
+       
+
+                       
+}
+//-------------------------------------------------------------------
+wxVtkMPR3DView::~wxVtkMPR3DView()
+{
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::Refresh()   // virtual
+{
+       _vtkmpr3Ddataviewer     ->      Refresh();
+       if (_wxvtkmpr3DviewCntrlPanel!=NULL)
+       {
+               _wxvtkmpr3DviewCntrlPanel->Refresh();
+       }
+
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::RefreshView()   // virtual
+{
+       double spc[3];
+       this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->GetSpacing(spc);
+
+       //double nx=1,ny=0,nz=0; // JPRx
+       Refresh();
+       double x=GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetX();
+       double y=GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetY();
+       double z=GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetZ();
+
+       x=x*spc[0];
+       y=y*spc[1];
+       z=z*spc[2];
+
+       _pointWidget->SetPosition( x,y,z ); 
+
+
+       double in[3]; 
+       double normal[3];
+       vtkTransform *transform = GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetTransformOrientation();
+       in[0]=1;                in[1]=0;                        in[2]=0;
+       transform->TransformPoint(in,normal);
+       _planeWidget->SetNormal( normal[0],normal[1],normal[2] );
+
+
+       _planeWidget->SetCenter( x,y,z );
+       _planeWidget->UpdatePlacement();
+       _planeWidget->GetPolyData(_vtkplane);
+}
+//-------------------------------------------------------------------
+wxPanel* wxVtkMPR3DView::CreateControlPanel(wxWindow *parent)
+{
+       _wxvtkmpr3DviewCntrlPanel = new wxVtkMPR3DViewCntrlPanel(parent,this);
+       return _wxvtkmpr3DviewCntrlPanel;
+}
+//-------------------------------------------------------------------
+vtkMPR3DDataViewer* wxVtkMPR3DView::GetVtkMPR3DDataViewer() 
+{
+       return _vtkmpr3Ddataviewer; 
+}
+//-------------------------------------------------------------------
+wxVtk3DBaseView* wxVtkMPR3DView::GetWxvtk3Dbaseview() throw (char*)
+{
+       if(_wxvtk3Dbaseview==NULL){
+               throw "wxVtk3DBaseView* wxVtkMPR3DView::GetWxvtk3Dbaseview() _wxvtk3Dbaseview=NULL";
+       }
+       return _wxvtk3Dbaseview;
+}
+//-------------------------------------------------------------------
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible){
+       if (visible!=_vtkmpr3Ddataviewer->GetVisiblePosition(idPosition)){
+               if (visible==false){
+                       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkmpr3Ddataviewer->GetImageActor(idPosition)  );        
+               } else {
+                       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(idPosition)  );   
+               }
+               _vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible);
+       }
+}
+
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::VisiblePointWidget( bool visible )
+{
+       if (visible==true)
+       {
+               _pointWidget->On();
+       } else {
+               _pointWidget->Off();
+       }
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::VisiblePlaneWidget( bool visible )
+{
+       if (visible==true)
+       {
+               _planeWidget->On();
+               _contourPlaneActor->VisibilityOn();
+
+       } else {
+               _planeWidget->Off();
+               _contourPlaneActor->VisibilityOff();
+       }
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::SetVtkMPR3DDataViewer(vtkMPR3DDataViewer *vtkmpr3Ddataviewer)
+{
+       _vtkmpr3Ddataviewer = vtkmpr3Ddataviewer;
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::InitOrientationPointWidget()
+{
+       this->_planeWidget->SetNormal(1,0,0);           
+}
+
+
+
+
+//-------------------------------------------------------------------
+// EED 25 Janvier 2007 testLoic
+void wxVtkMPR3DView::TestLoic1()
+{
+
+       int sizeIma     = 128;
+  double dimIma = sizeIma*2;
+
+       vtkImageData *vtkimagedata =  this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+
+       double spc[3];
+       vtkimagedata->GetSpacing(spc);
+
+       vtkimagedata->Update();
+
+
+        double p[3], n[3];
+     this->_planeWidget->GetOrigin(p);
+     this->_planeWidget->GetNormal(n);
+
+
+
+    vtkPlaneSource* pSource = vtkPlaneSource::New( );
+    pSource->SetResolution( sizeIma - 1, sizeIma - 1 );
+    pSource->SetOrigin( p[ 0 ], p[ 1 ], p[ 2 ] );
+    pSource->SetPoint1( p[ 0 ] + dimIma - 1.0, p[ 1 ], p[ 2 ] );
+    pSource->SetPoint2( p[ 0 ], p[ 1 ]+ dimIma - 1.0 , p[ 2 ] );
+    pSource->Update( );
+    pSource->SetCenter( p[ 0 ], p[ 1 ], p[ 2 ] );
+    pSource->SetNormal( n[ 0 ], n[ 1 ], n[ 2 ] );
+    pSource->Update( );
+
+    vtkProbeFilter* slices = vtkProbeFilter::New();
+    slices->SetInput( ( vtkDataSet* )pSource->GetOutput( ) );
+    slices->SetSource( vtkimagedata );
+    slices->Update( );
+    pSource->Delete( );
+
+       vtkStructuredPoints   *stPoints = vtkStructuredPoints::New();
+       stPoints -> GetPointData( )->SetScalars(  slices->GetOutput()->GetPointData()->GetScalars()  );
+       stPoints -> SetDimensions( sizeIma, sizeIma, 1 );
+       stPoints -> SetScalarType( vtkimagedata->GetScalarType() );
+       stPoints -> SetScalarTypeToShort();
+       stPoints -> Update();
+
+       vtkImageChangeInformation  *change = vtkImageChangeInformation ::New();
+       change    -> SetInput( stPoints );  
+       change    -> Update();    //important
+
+       double _range[2];
+       vtkimagedata->GetScalarRange(_range);
+   vtkWindowLevelLookupTable *_bwlookup = vtkWindowLevelLookupTable::New( );
+   _bwlookup->SetHueRange( 0 , 1 );
+   _bwlookup->SetNumberOfColors( (int)(_range[1] - _range[0] + 1) );
+   _bwlookup->SetTableRange( _range[0] , _range[1] );
+   _bwlookup->SetSaturationRange( 0 , 0 );
+   _bwlookup->SetValueRange( 0 , 1 );
+   _bwlookup->SetAlphaRange( 1 , 1 );
+   _bwlookup->Build( );
+   vtkLookupTable * _collookup = vtkLookupTable::New( );
+   _collookup->SetNumberOfColors( 256 );
+   _collookup->SetTableRange( 0 , 255 );
+   _collookup->Build( );
+   _collookup->SetTableValue( 0  , 1 , 0 , 0 , 1 );
+   _collookup->SetTableValue(128 , 0 , 0 , 1 , 1 );
+   _collookup->SetTableValue(255 , 0 , 1 , 0 , 1 );
+
+
+       vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
+       writer->SetInput( stPoints );
+       writer->SetFileName( "C:/Users/Images/temp_EED/image.mhd" );
+       writer->SetFileDimensionality( 2 );
+       writer->Write( );
+
+
+
+       vtkDataSetMapper *_3DSliceMapper = vtkDataSetMapper::New( );
+       _3DSliceMapper->SetInput(change->GetOutput( ) );
+       _3DSliceMapper->SetLookupTable( _bwlookup );
+       _3DSliceMapper->SetScalarRange( _range );
+       _3DSliceMapper->ImmediateModeRenderingOn( );
+
+       vtkActor *_3DSliceActor = vtkActor::New( );
+       _3DSliceActor->SetMapper( _3DSliceMapper );
+
+ // The usual rendering stuff.
+  vtkCamera *camera = vtkCamera::New();
+      camera->SetPosition(1,1,1);
+      camera->SetFocalPoint(0,0,0);
+
+  vtkRenderer *renderer = vtkRenderer::New();
+  vtkRenderWindow *renWin = vtkRenderWindow::New();
+    renWin->AddRenderer(renderer);
+
+  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
+    iren->SetRenderWindow(renWin);
+
+  renderer->AddActor( _3DSliceActor );
+      renderer->SetActiveCamera(camera);
+      renderer->ResetCamera();
+      renderer->SetBackground(1,1,1);
+  
+  renWin->SetSize(300,300);
+
+  // interact with data
+  renWin->Render();
+  iren->Start();
+
+
+
+
+
+}
+
+//-------------------------------------------------------------------
+// EED 25 Janvier 2007 testLoic
+void wxVtkMPR3DView::TestLoic2()
+{
+/*
+ vtkVectorNorm *vecMagnitude = vtkVectorNorm::New();
+                vecMagnitude->SetInput(VtkMainGrid);
+                vecMagnitude->NormalizeOff();
+                vecMagnitude->Update();
+*/
+
+        vtkPlane *slicePlane = vtkPlane::New();
+                               this->_planeWidget->GetPlane( slicePlane );
+
+                
+        vtkCutter* sliceCutter = vtkCutter::New();
+               vtkImageData *vtkimagedata =  this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+                sliceCutter->SetInput( vtkimagedata );
+                sliceCutter->SetCutFunction( slicePlane );
+
+//EED
+//        vtkLookupTable *lut = BuildHueWeightBaseMap();
+
+
+        vtkPolyDataMapper *slice = vtkPolyDataMapper::New();
+                slice->SetInput( sliceCutter->GetOutput() );
+        double range[2];
+// EED
+//                slice->Update();
+                                 vtkimagedata->GetScalarRange(range);
+//                vecMagnitude->GetOutput()->GetScalarRange( range );
+//                range[1] *= 0.7; // reduce the upper range by 30%
+//                slice->SetScalarRange( range );
+//                slice->SetLookupTable( lut );
+
+//       vtkActor *sliceActor = vtkActor::New();
+//                sliceActor->SetMapper( slice );
+
+        vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
+                contourMapper->SetInput( sliceCutter->GetOutput() );
+                contourMapper->SetScalarRange( range );
+  //              contourMapper->SetLookupTable( lut );
+
+                
+        vtkActor *contourActor = vtkActor::New();
+                contourActor->SetMapper( contourMapper );
+
+
+
+ // The usual rendering stuff.
+  vtkCamera *camera = vtkCamera::New();
+      camera->SetPosition(1,1,1);
+      camera->SetFocalPoint(0,0,0);
+
+  vtkRenderer *renderer = vtkRenderer::New();
+  vtkRenderWindow *renWin = vtkRenderWindow::New();
+    renWin->AddRenderer(renderer);
+
+  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
+    iren->SetRenderWindow(renWin);
+
+  renderer->AddActor( contourActor );
+//  renderer->AddActor(cubeActor);
+      renderer->SetActiveCamera(camera);
+      renderer->ResetCamera();
+      renderer->SetBackground(1,1,1);
+  
+  renWin->SetSize(300,300);
+
+  // interact with data
+  renWin->Render();
+  iren->Start();
+
+
+}
\ No newline at end of file
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h
new file mode 100644 (file)
index 0000000..a668507
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef WXVTKMPR3DVIEW_H_
+#define WXVTKMPR3DVIEW_H_
+
+#include "vtkMPR3DDataViewer.h"
+#include "wxVtkMPR3DViewCntrlPanel.h"
+#include "wxVtk3DBaseView.h"
+
+#include "vtkProbeFilter.h"
+#include "vtkPlaneWidget.h"
+
+
+//class vtkmyPWCallback_3DPointWidget;
+class wxVtkMPR3DViewCntrlPanel;
+
+class creaMaracasVisu_EXPORT wxVtkMPR3DView
+{
+public:
+       wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview );
+       virtual ~wxVtkMPR3DView();      
+       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                            SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
+       wxPanel*                        CreateControlPanel(wxWindow *parent);
+
+       vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
+       wxVtk3DBaseView*        GetWxvtk3Dbaseview() throw (char*);
+
+       void                            InitOrientationPointWidget(); 
+
+       // EED 25 Janvier 2007 testLoic
+       void                            TestLoic1();
+       void                            TestLoic2();
+
+       void RemoveActor(vtkActor* actor);
+       void ResetCamera(int *ext=NULL, double* origin=NULL,double* spc=NULL);
+
+private:
+       wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
+       vtkMPR3DDataViewer                              *_vtkmpr3Ddataviewer;
+       wxVtkMPR3DViewCntrlPanel                *_wxvtkmpr3DviewCntrlPanel;
+
+       // Plane Widget (3D)
+       vtkPolyData                                             *_vtkplane;
+       vtkActor                                                *_contourPlaneActor;
+       vtkPlaneWidget                                  *_planeWidget;
+
+       // Point Widget (3D)
+       vtkPointWidget                                  *_pointWidget;
+       //vtkmyPWCallback_3DPointWidget *_myCallback;
+       vtkProbeFilter *_probe;
+       vtkPolyDataMapper *_contourMapper;
+
+       
+
+protected:
+};
+
+#endif /*WXVTKMPR3DVIEW_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx
new file mode 100644 (file)
index 0000000..8665e09
--- /dev/null
@@ -0,0 +1,373 @@
+#include "wxVtkMPR3DViewCntrlPanel.h"
+
+#include "HistogramDialog.h"
+
+wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview )
+: wxPanel(parent, -1)
+{
+
+       wxPanel *panel  = this;
+       _wxvtkmpr3Dview = wxvtkmpr3Dview;
+
+       /*int maxX = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionX();
+       int maxY = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionY();
+       int maxZ = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionZ();*/
+
+       int maxX = 1;
+       int maxY = 1;
+       int maxZ = 1;
+
+       wxCheckBox              *ckBoxX                 = new wxCheckBox(panel,-1,_T("X           "));
+                                       _positionX              = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       wxCheckBox              *ckBoxY                 = new wxCheckBox(panel,-1,_T("Y           "));
+                                       _positionY              = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       wxCheckBox              *ckBoxZ                 = new wxCheckBox(panel,-1,_T("Z           "));
+                                       _positionZ              = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       wxButton                *btnColorTable  = new wxButton (panel, -1, _T("Edit Color Table") );
+
+       _ckBoxXYZ                       = new wxCheckBox(panel,-1,_T("XYZ                  "));
+       _ckBoxPlane                     = new wxCheckBox(panel,-1,_T("Plane"));
+
+       ckBoxX->SetValue(false);
+       ckBoxY->SetValue(false);
+       ckBoxZ->SetValue(false);
+       _ckBoxXYZ->SetValue(false);
+       _ckBoxPlane->SetValue(false);
+
+       _positionX->SetSize(400,20);
+       _positionY->SetSize(400,20);
+       _positionZ->SetSize(400,20);
+
+       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   );
+
+
+       wxFlexGridSizer *sizer   = new wxFlexGridSizer(1);
+//     wxBoxSizer *sizer        = new wxBoxSizer(wxVERTICAL);
+
+//     wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL);
+       wxFlexGridSizer *sizerH4 = new wxFlexGridSizer(10);
+       wxFlexGridSizer *sizerH5 = new wxFlexGridSizer(10);
+
+
+
+//EED 28 sep 2006
+//     wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10);
+//     wxFlexGridSizer *sizerH7 = new wxFlexGridSizer(10);
+
+//     sizerH4->Add( ckBoxX            , 1, wxALL|wxEXPAND, 0);
+//     sizerH4->Add( new wxStaticText(panel, -1,"  ")                  , 1, wxALL|wxEXPAND, 0);
+//     sizerH4->Add( _positionX        , 1, wxALL|wxEXPAND, 0);
+
+//     sizerH5->Add( ckBoxY            , 1, wxALL|wxEXPAND, 0);
+//     sizerH5->Add( new wxStaticText(panel, -1,"  ")                  , 1, wxALL|wxEXPAND, 0);
+//     sizerH5->Add( _positionY        , 1, wxALL|wxEXPAND, 0);
+
+//     sizerH6->Add( ckBoxZ            , 1, wxALL|wxEXPAND, 0);
+//     sizerH6->Add( new wxStaticText(panel, -1,"  ")                  , 1, wxALL|wxEXPAND, 0);
+//     sizerH6->Add( _positionZ        , 1, wxALL|wxEXPAND, 0);
+
+//     sizerH7->Add( _ckBoxXYZ         , 1, wxALL|wxEXPAND, 0);
+//     sizerH7->Add( _ckBoxPlane       , 1, wxALL|wxEXPAND, 0);
+
+//     sizer->Add( sizerH4                     , 1, wxALL|wxEXPAND, 2);
+//     sizer->Add( sizerH5                     , 1, wxALL|wxEXPAND, 2);
+//     sizer->Add( sizerH6                     , 1, wxALL|wxEXPAND, 2);
+//     sizer->Add( sizerH7                     , 1, wxALL|wxEXPAND, 2);
+
+       sizerH4->Add( _positionX                                                                ,1,wxGROW                                       , 0 );
+       sizerH4->Add( ckBoxX                                                                    ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 0 );
+       sizerH4->Add( _positionY                                                                ,1,wxGROW                                       , 0 );
+       sizerH4->Add( ckBoxY                                                                    ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 0 );
+       sizerH4->Add( _positionZ                                                                ,1,wxGROW                                       , 0 );
+       sizerH4->Add( ckBoxZ                                                                    ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 0 );
+       sizerH4->Add( btnColorTable                                                             ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED     , 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);
+//     sizerH5->Add( ckBoxX                            ,  1, wxALL|wxEXPAND, 0);
+//     sizerH5->Add( ckBoxY                            ,  1, wxALL|wxEXPAND, 0);
+//     sizerH5->Add( ckBoxZ                            ,  1, wxALL|wxEXPAND, 0);
+
+       sizer->Add( sizerH4                                     ,  1, wxALL|wxGROW, 2);
+       sizer->Add( sizerH5                                     ,  1, wxALL|wxEXPAND, 2);
+
+
+       panel->SetSize(400,50);
+       panel->SetAutoLayout(true);
+       panel->SetSizer(sizer);
+       panel->Layout();
+
+       panel->SetEventHandler((wxEvtHandler*)this);
+
+       //this->UpdateControlPanel();
+
+}
+void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel()
+{
+
+       vtkMPRBaseData* basedata = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData();
+       if(basedata != NULL){
+
+               /*int maxX = basedata->GetMaxPositionX();
+               int maxY = basedata->GetMaxPositionY();
+               int maxZ = basedata->GetMaxPositionZ();*/
+               int x0,x1,y0,y1,z0,z1;
+
+               basedata->GetDimensionExtention(&x0,&x1,&y0,&y1,&z0,&z1);
+               /*int maxX = x1-x0;//basedata->GetMaxPositionX();
+               int maxY = y1-y0;//basedata->GetMaxPositionY();
+               int maxZ = z1-z0;//basedata->GetMaxPositionZ();*/
+
+               
+
+               //std::cout<<"wxVtkMPR3DViewCntrlPanel::UpdateControlPanel() maxX="<<maxX<<" maxY="<<maxY<<" maxZ="<<maxZ<<std::endl;
+               /*_positionX->SetRange(0,maxX);
+               _positionY->SetRange(0,maxY);
+               _positionZ->SetRange(0,maxZ);*/
+               _positionX->SetRange(x0,x1);
+               _positionY->SetRange(y0,y1);
+               _positionZ->SetRange(z0,z1);
+
+               _positionX->SetValue((x0+x1)/2);
+               _positionY->SetValue((y0+y1)/2);
+               _positionZ->SetValue((z0+z1)/2);
+
+               _positionX->Update();
+               _positionY->Update();
+               _positionZ->Update();
+               this->Update();
+       }
+       
+}
+//-------------------------------------------------------------------
+wxVtkMPR3DViewCntrlPanel::~wxVtkMPR3DViewCntrlPanel()
+{
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::Refresh()
+{
+//     wxPanel::Refresh();
+       _positionX->SetValue( (int)(_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX( )) );
+       _positionY->SetValue( (int)(_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetY( )) );
+       _positionZ->SetValue( (int)(_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetZ( )) );
+}
+/*
+//-------------------------------------------------------------------
+int wxVtkMPR3DViewCntrlPanel::GetIdTissue()
+{
+       int idTissue=-1;
+       if (_surfA->GetValue()==true)
+       {
+               idTissue=0;
+       }
+       if (_surfB->GetValue()==true)
+       {
+               idTissue=1;
+       }
+       if (_surfC->GetValue()==true)
+       {
+               idTissue=2;
+       }
+       if (_surfD->GetValue()==true)
+       {
+               idTissue=3;
+       }
+
+       return idTissue;
+}
+*/
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnEditColorTable(wxCommandEvent& event)
+{
+
+       vtkColorTransferFunction *ctfun                 = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetvtkColorTransferFunction(); 
+       std::vector<double> *ctfunVectorPoint   = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorPoint();
+       std::vector<double> *ctfunVectorRed             = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorRed();
+       std::vector<double> *ctfunVectorGreen   = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorGreen();
+       std::vector<double> *ctfunVectorBlue    =   this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorBlue();
+
+       //void *p=this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer(); // JPRx
+
+
+       int i=0,xi,r,g,b;
+       
+       vtkImageData *imagedata = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+
+       HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Color table"),imagedata,2);
+       
+               
+       hDlg->erasePointsTransferenceFunction();        
+       int ctfSize=ctfunVectorRed->size();
+       if(ctfSize>0)
+       {
+// MACHETE  OJO Eduardo
+               int i=0;
+                       while(i<ctfSize)
+                       {
+                               double gr       = (*ctfunVectorPoint)[i];
+                               double r        = (*ctfunVectorRed)[i];
+                               double g        = (*ctfunVectorGreen)[i];
+                               double b        = (*ctfunVectorBlue)[i];
+                       
+hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255));
+                               i++;
+                       }
+       }
+
+       //
+       // when the user had changed the transference Function
+       //
+       
+       //setting variables if the user wants to do refresh
+       
+       hDlg->setCTF(ctfun);
+       hDlg->setMPR3Dview(_wxvtkmpr3Dview);
+       
+       if(hDlg->ShowModal()== wxID_OK )
+       {       
+               
+               // -- vtkColorTransferFunction  --
+                       ctfun->RemoveAllPoints ();
+                       //clean colors
+                       ctfunVectorPoint->clear();
+                       ctfunVectorRed->clear();
+                       ctfunVectorGreen->clear();
+                       ctfunVectorBlue->clear();
+
+                       int nCTFpoints=hDlg->getSizeBarColor();
+// Machete .. Ojo Eduardo
+                       i=0;    
+                       while(i<nCTFpoints)
+                       {
+                               hDlg->getDataBarColorPoint(i,xi,r,g,b);
+                               /*
+                               if (i==0)
+                               {
+                                       hDlg->getDataBarColorPoint(1,xi,r,g,b);
+                               } 
+                               if (i==nCTFpoints)
+                               {
+                                       hDlg->getDataBarColorPoint(i-1,xi,r,g,b);
+                               } 
+                               */
+                               ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
+                               ctfunVectorPoint->push_back(xi);
+                               ctfunVectorRed->push_back(r/255.0);
+                               ctfunVectorGreen->push_back(g/255.0);
+                               ctfunVectorBlue->push_back(b/255.0);
+                               i++;
+                               
+                       }
+                       
+       }
+       
+       else
+       {
+               
+               if(hDlg->getRefreshed())
+               {
+                       // -- vtkColorTransferFunction  --
+                       ctfun->RemoveAllPoints ();
+                       
+                       int i=0;
+                       int size=ctfunVectorPoint->size();
+                       
+                       for(i=0;i<size;i++)
+                       {
+                               double grey2=(*ctfunVectorPoint)[i];
+                               double red =(*ctfunVectorRed)[i];
+                               double green =(*ctfunVectorGreen)[i];
+                               double blue = (*ctfunVectorBlue)[i];
+                               ctfun->AddRGBPoint(grey2,red,green,blue);
+                       }
+                }      
+                
+       }
+
+ hDlg->Destroy();
+}
+
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->VisibleImageActor(0, event.IsChecked() );
+       _wxvtkmpr3Dview->Refresh();
+
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+       try{
+               _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+       }catch(char* e){
+               std::cout<<e<<std::endl;
+       }
+
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->VisibleImageActor(1, event.IsChecked() );
+       _wxvtkmpr3Dview->Refresh();
+
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->VisibleImageActor(2, event.IsChecked() );
+       _wxvtkmpr3Dview->Refresh();
+
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->VisiblePointWidget(event.IsChecked());
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
+}
+
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnPositionX(wxScrollEvent& event)
+{
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX( _positionX->GetValue() );
+       _wxvtkmpr3Dview->RefreshView();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
+{
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( _positionY->GetValue() );
+       _wxvtkmpr3Dview->RefreshView();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
+{
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( _positionZ->GetValue() );
+       _wxvtkmpr3Dview->RefreshView();
+       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
new file mode 100644 (file)
index 0000000..4d5c1ed
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef WXVTKMPR3DVIEWCNTRLPANEL_H_
+#define WXVTKMPR3DVIEWCNTRLPANEL_H_
+
+#include "wxVtkMPR3DView.h"
+
+#include "wx/wx.h"
+
+class wxVtkMPR3DView;
+
+class wxVtkMPR3DViewCntrlPanel: public wxPanel
+{
+public:
+       wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview);
+       ~wxVtkMPR3DViewCntrlPanel();
+       void            OnVisibleAxisX(wxCommandEvent& event);
+       void            OnVisibleAxisY(wxCommandEvent& event);
+       void            OnVisibleAxisZ(wxCommandEvent& event);
+       void            OnPositionX(wxScrollEvent& event);
+       void            OnPositionY(wxScrollEvent& event);
+       void            OnPositionZ(wxScrollEvent& event);
+       void            OnVisibleAxisXYZ(wxCommandEvent& event);
+       void            OnVisiblePlane(wxCommandEvent& event);
+       void            OnEditColorTable(wxCommandEvent& event);
+       virtual void Refresh();
+       void            UpdateControlPanel();
+
+private:
+       wxVtkMPR3DView  *_wxvtkmpr3Dview;
+
+       wxSlider                *_opacity;
+       wxSlider                *_isoValue;
+       wxSlider                *_isoValueSpin;
+       wxStaticText    *_isoValueText;
+       wxRadioButton   *_surfA;
+       wxRadioButton   *_surfB;
+       wxRadioButton   *_surfC;
+       wxRadioButton   *_surfD;
+       wxCheckBox              *_visible;
+       wxButton                *_color;
+       wxSlider                *_positionX;
+       wxSlider                *_positionY;    
+       wxSlider                *_positionZ;
+
+       wxCheckBox              *_ckBoxXYZ;
+       wxCheckBox              *_ckBoxPlane;
+
+
+protected:
+
+};
+
+#endif /*WXVTKMPR3DVIEWCNTRLPANEL_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.cxx
new file mode 100644 (file)
index 0000000..1cffb2d
--- /dev/null
@@ -0,0 +1,179 @@
+#include "wxWidgetMesure2D.h"
+
+
+/*
+BEGIN_EVENT_TABLE( wxWidgetMesure2D , wxSplitterWindow )
+       EVT_MENU( 12121, wxWidgetMesure2D::OnRefreshView )
+END_EVENT_TABLE( );
+*/
+//-------------------------------------------------------------------
+
+wxWidgetMesure2D::wxWidgetMesure2D( wxWindow *parent )
+: wxSplitterWindow( parent , -1)
+{
+// EED 27 oct 2007
+       this->SplitHorizontally( new wxPanel(this,-1) ,  new wxPanel(this,-1), 2 );
+       this->SetMinimumPaneSize(50);
+}
+//-------------------------------------------------------------------
+wxWidgetMesure2D::~wxWidgetMesure2D()
+{
+}
+//-------------------------------------------------------------------
+wxWindow *wxWidgetMesure2D::CreateWin1a(wxWindow *parent) // virtual
+{
+       wxPanel *panel = new wxPanel(parent,-1);
+
+       _cb_messuretool  = new wxCheckBox(panel,-1,_T("Active messure tool     ")); 
+       _cb_mt_visible   = new wxCheckBox(panel,-1,_T("Visibles    ")); 
+       _cb_closeContour = new wxCheckBox(panel,-1,_T("Close/Open    ")); 
+       _cb_visibleText  = new wxCheckBox(panel,-1,_T("Information    ")); 
+
+       _cb_mt_visible->SetValue(true);
+       _cb_closeContour->SetValue(true);
+       _cb_visibleText->SetValue(true);
+
+       wxFlexGridSizer *sizer = new wxFlexGridSizer(4);
+
+       sizer->Add(_cb_messuretool);
+       sizer->Add(_cb_mt_visible);
+       sizer->Add(_cb_closeContour);
+       sizer->Add(_cb_visibleText);
+
+       panel->SetAutoLayout(true);
+       panel->SetSizer(sizer);
+       panel->SetSize(400,30);
+       panel->Layout();
+//EEDxx2.4
+//     panel->FitInside();
+
+       Connect(_cb_messuretool->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnActiveMessureTool      );
+       Connect(_cb_mt_visible->GetId()   , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnVisibleMessureTool     );
+       Connect(_cb_closeContour->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnCloseContour           );
+       Connect(_cb_visibleText->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED        , (wxObjectEventFunction) &wxWidgetMesure2D::OnVisibleInformation     );
+
+       return panel;
+}
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview) // virtual
+{
+       _wxvtk2Dbaseview = wxvtk2Dbaseview;
+
+       // Contorno 1
+       _manContourControl_1    = new manualContourControler();
+       _mContourModel_1                = new manualContourModel();
+       _mViewContour_1                 = new manualViewContour();
+       _mViewContour_1->SetModel( _mContourModel_1 );
+       _mViewContour_1->SetWxVtkBaseView( _wxvtk2Dbaseview );
+       _mViewContour_1->SetRange( 1 );
+
+// EED 3 oct 2006
+//     double spc[3];
+//     _wxvtk2Dbaseview->GetSpacing( spc );
+//     _mViewContour_1->SetSpacing( spc );
+
+
+
+       _manContourControl_1->SetZ( 1000 );
+       _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
+       ((vtkInteractorStyleBaseView*)_wxvtk2Dbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
+       _manContourControl_1->CreateNewManualContour();
+       _manContourControl_1->SetActive( false );
+       _mViewContour_1->RefreshContour();
+
+//EED 27 Oct 2007
+       
+//     this->ReplaceWindow( this->GetWindow1() ,  CreateWin1a(this) );
+//     this->ReplaceWindow( this->GetWindow2() ,  _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() );
+//     CreateWin1a(this->GetWindow1() );
+
+       wxBoxSizer *sizerA = new wxBoxSizer(wxHORIZONTAL);      
+       sizerA->Add(  CreateWin1a( this->GetWindow1()) ,1, wxGROW );
+       this->GetWindow1()->SetSizer(sizerA);
+       this->SetAutoLayout(true);
+       this->Layout();
+
+       wxBoxSizer *sizerB = new wxBoxSizer(wxHORIZONTAL);      
+       sizerB->Add(  _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor()  ,1, wxGROW );
+       this->GetWindow2()->SetSizer(sizerB);
+       this->SetAutoLayout(true);
+       this->Layout();
+
+
+//     this->SplitHorizontally( CreateWin1a(this) , _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() , 2 );
+
+
+//EEDxx2.4 
+//     this->FitInside();
+}
+
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::ActiveMessureTool(bool ok)
+{
+       ((vtkInteractorStyleBaseView*)_wxvtk2Dbaseview->GetInteractorStyleBaseView())->SetActiveAllInteractors(!ok);
+       _manContourControl_1->SetActive( ok );
+}
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::OnActiveMessureTool(wxCommandEvent& event)
+{
+       ActiveMessureTool( _cb_messuretool->GetValue() );
+       if ( _cb_messuretool->GetValue() == true )
+       {
+               _cb_mt_visible->SetValue(true);
+               _mViewContour_1->SetVisible( _cb_mt_visible->GetValue() );
+               _cb_closeContour->Enable(true);
+               _cb_visibleText->Enable(true);
+       } else{
+               _cb_closeContour->Enable(false);
+               _cb_visibleText->Enable(false);
+       }
+       _wxvtk2Dbaseview->Refresh();
+       _wxvtk2Dbaseview->RefreshView();
+}
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::OnVisibleMessureTool(wxCommandEvent& event)
+{
+       _cb_messuretool->SetValue( _cb_mt_visible->GetValue() );
+       if (_cb_messuretool->GetValue()==true)
+       {
+               _cb_closeContour->Enable(true);
+               _cb_visibleText->Enable(true);
+       }
+       ActiveMessureTool( _cb_messuretool->GetValue() );       
+       _mViewContour_1->SetVisible( _cb_mt_visible->GetValue() );
+       _mViewContour_1->Refresh();
+       _wxvtk2Dbaseview->Refresh();
+       _wxvtk2Dbaseview->RefreshView();
+}
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::OnCloseContour(wxCommandEvent& event)
+{
+       _mContourModel_1->SetCloseContour( _cb_closeContour->GetValue() );
+       _mViewContour_1->Refresh();
+       _wxvtk2Dbaseview->Refresh();
+       _wxvtk2Dbaseview->RefreshView();
+
+}
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::OnVisibleInformation(wxCommandEvent& event)
+{
+       _mViewContour_1->SetShowText( _cb_visibleText->GetValue() );
+       _mViewContour_1->Refresh();
+       _wxvtk2Dbaseview->Refresh();
+       _wxvtk2Dbaseview->RefreshView();
+}
+//-------------------------------------------------------------------
+void wxWidgetMesure2D::SetMesureScale(double mesureScale)
+{
+       _mViewContour_1->SetMesureScale(mesureScale);
+}
+//-------------------------------------------------------------------
+manualContourModel*    wxWidgetMesure2D::GetManualContourModel()
+{
+       return _mContourModel_1;
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D.h
new file mode 100644 (file)
index 0000000..0446df2
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef WXWIDGETMESURE2D_H_
+#define WXWIDGETMESURE2D_H_
+
+#include <wx/splitter.h>
+#include <wx/checkbox.h>
+#include "manualContour.h"
+#include "wxVtk2DBaseView.h"
+
+class wxWidgetMesure2D : public wxSplitterWindow
+{
+public: 
+       wxWidgetMesure2D( wxWindow *parent );
+       ~wxWidgetMesure2D();
+
+       void OnActiveMessureTool(wxCommandEvent& event);
+       void OnVisibleMessureTool(wxCommandEvent& event);
+       void OnCloseContour(wxCommandEvent& event);
+       void OnVisibleInformation(wxCommandEvent& event);
+
+       void SetMesureScale(double mesureScale);
+
+       manualContourModel*     GetManualContourModel();
+       virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
+
+protected:
+       wxVtk2DBaseView                 *_wxvtk2Dbaseview;
+       virtual wxWindow                *CreateWin1a(wxWindow *parent);
+private:
+       wxCheckBox                              *_cb_messuretool; 
+       wxCheckBox                              *_cb_mt_visible; 
+       wxCheckBox                              *_cb_closeContour; 
+       wxCheckBox                              *_cb_visibleText; 
+
+       manualContourControler  *_manContourControl_1;
+       manualContourModel              *_mContourModel_1;
+       manualViewContour               *_mViewContour_1;
+
+       void    ActiveMessureTool(bool ok);
+
+//     DECLARE_EVENT_TABLE();
+};
+
+
+#endif /*WXWIDGETMESURE2D_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.cxx
new file mode 100644 (file)
index 0000000..20244c0
--- /dev/null
@@ -0,0 +1,289 @@
+#include "wxWidgetMesure2D_Plane.h"
+
+#include "vtkPlane2DView.h"
+
+wxWidgetMesure2D_Plane::wxWidgetMesure2D_Plane(wxWindow *parent)
+: wxWidgetMesure2D(parent)
+{
+       // Circle 1
+       _ptsCircle1             = NULL;
+       _circle1Actor   = NULL;
+       _circle1Mapper  = NULL;
+    _pdCircle1         = NULL;
+       // Circle 2
+       _ptsCircle2             = NULL;
+       _circle2Actor   = NULL;
+       _circle2Mapper  = NULL;
+    _pdCircle2         = NULL;
+       // line reference 1
+       _ptsLineRef1    = NULL;
+       _lineRef1Actor  = NULL;
+       _lineRef1Mapper = NULL;
+    _pdLineRef1                = NULL;
+       // line reference 2
+       _ptsLineRef2    = NULL;
+       _lineRef2Actor  = NULL;
+       _lineRef2Mapper = NULL;
+    _pdLineRef2                = NULL;
+
+}
+
+//-------------------------------------------------------------------
+
+wxWidgetMesure2D_Plane::~wxWidgetMesure2D_Plane()
+{
+       // Circle 1
+    if (       _ptsCircle1             != NULL){       _ptsCircle1                     -> Delete(); }
+    if (       _circle1Actor   != NULL){       _circle1Actor           -> Delete(); }
+    if (       _circle1Mapper  != NULL){       _circle1Mapper          -> Delete(); }
+    if (    _pdCircle1         != NULL){       _pdCircle1                      -> Delete(); }
+       // Circle 2
+    if (       _ptsCircle2             != NULL){       _ptsCircle2                     -> Delete(); }
+    if (       _circle2Actor   != NULL){       _circle2Actor           -> Delete(); }
+    if (       _circle2Mapper  != NULL){       _circle2Mapper          -> Delete(); }
+    if (    _pdCircle2         != NULL){       _pdCircle2                      -> Delete(); }
+       // line reference 1
+    if (       _ptsLineRef1    != NULL){       _ptsLineRef1            -> Delete(); }
+    if (       _lineRef1Actor  != NULL){       _lineRef1Actor          -> Delete(); }
+    if (       _lineRef1Mapper != NULL){       _lineRef1Mapper         -> Delete(); }
+     if (   _pdLineRef1                != NULL){       _pdLineRef1                     -> Delete(); }
+       // line reference 2
+    if (       _ptsLineRef2    != NULL){       _ptsLineRef2            -> Delete(); }
+    if (       _lineRef2Actor  != NULL){       _lineRef2Actor          -> Delete(); }
+    if (       _lineRef2Mapper != NULL){       _lineRef2Mapper         -> Delete(); }
+    if (    _pdLineRef2                != NULL){       _pdLineRef2                     -> Delete(); }
+}
+
+//-------------------------------------------------------------------
+
+wxWindow *wxWidgetMesure2D_Plane::CreateWin1a(wxWindow *parent) // virtual
+{
+       wxPanel *panel = new wxPanel(parent,-1);
+
+       _cb_circle              = new wxCheckBox(panel,-1,_T("Circle        ")); 
+       _cb_line                = new wxCheckBox(panel,-1,_T("Rotation Axe ")); 
+
+
+       wxBoxSizer *sizerA = new wxBoxSizer(wxHORIZONTAL);
+       sizerA->Add(_cb_circle);
+       sizerA->Add(_cb_line);
+
+
+       wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
+       sizer->Add( sizerA );
+       sizer->Add( wxWidgetMesure2D::CreateWin1a(panel) );
+
+       panel->SetAutoLayout(true);
+       panel->SetSizer(sizer);
+       panel->SetSize(400,30);
+       panel->Layout();
+//EEDxx2.4
+//     panel->FitInside();
+
+       Connect(_cb_line->GetId()        , wxEVT_COMMAND_CHECKBOX_CLICKED         , (wxObjectEventFunction) &wxWidgetMesure2D_Plane::OnActiveLine                       );
+       Connect(_cb_circle->GetId()      , wxEVT_COMMAND_CHECKBOX_CLICKED         , (wxObjectEventFunction) &wxWidgetMesure2D_Plane::OnActiveCirlcle            );
+
+       return panel;
+}
+
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane::OnActiveCirlcle(wxCommandEvent& event)
+{
+       SetVisibleCircle( _cb_circle->GetValue() );
+       _wxvtk2Dbaseview->RefreshView();
+}
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane::SetVisibleCircle( bool ok )
+{
+       double opacity;
+       if (ok==true)
+       {
+               opacity=1;
+       } else {
+               opacity=0;
+       } 
+       _lineRef1Actor->GetProperty()->SetOpacity( opacity );
+       _lineRef2Actor->GetProperty()->SetOpacity( opacity );
+       _circle1Actor->GetProperty()->SetOpacity( opacity );
+       _circle2Actor->GetProperty()->SetOpacity( opacity );
+}
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane::OnActiveLine(wxCommandEvent& event)
+{
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_wxvtk2Dbaseview;
+       vtkplane2Dview->SetVisibleLine( _cb_line->GetValue() );
+       _wxvtk2Dbaseview->RefreshView();
+}
+
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane::ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview) // virtual
+{
+       wxWidgetMesure2D::ConfigureA(wxvtk2Dbaseview);
+       CircleLine();
+       ConfigureCircleLine();
+       SetVisibleCircle(false);        
+}
+
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane::ConfigureCircleLine()
+{
+       double ang;
+
+       vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_wxvtk2Dbaseview;
+       int sizeIma = vtkplane2Dview->GetImgSize();
+
+       double i,maxPts=20;
+       double k=(360/(maxPts-1)) * (3.1416/180);
+       double x,y,r1=5,r2=10,r3=15;
+       for (i=0;i<maxPts;i++)
+       {
+               x=cos( k*i ) ;
+               y=sin( k*i ) ;
+               _ptsCircle1->SetPoint( (int)i , (sizeIma/2) + x*r1      , (sizeIma/2) + y*r1    , 1 );
+               _ptsCircle2->SetPoint( (int)i , (sizeIma/2) + x*r2      , (sizeIma/2) + y*r2    , 1 );
+       }
+
+       //
+       ang=(45) * (3.1416/180);
+       x=cos( ang ) ;
+       y=sin( ang ) ;
+       _ptsLineRef1->SetPoint( 0 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
+       
+       ang=(45+180) * (3.1416/180);
+       x=cos( ang ) ;
+       y=sin( ang ) ;
+       _ptsLineRef1->SetPoint( 1 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
+
+       //
+       ang=(135) * (3.1416/180);
+       x=cos( ang ) ;
+       y=sin( ang ) ;
+       _ptsLineRef2->SetPoint( 0 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
+       
+       ang=(135+180) * (3.1416/180);
+       x=cos( ang ) ;
+       y=sin( ang ) ;
+       _ptsLineRef2->SetPoint( 1 , (sizeIma/2) + x*r3  , (sizeIma/2) + y*r3    , 1 );
+}
+
+
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane::CircleLine()
+{
+       int i,maxPts=20;
+       vtkCellArray *lines;
+
+       vtkImageViewer2_XYZ *imageViewer2XYZ = _wxvtk2Dbaseview->_imageViewer2XYZ;
+       
+
+// Circle 1 Horizontal
+       _ptsCircle1 = vtkPoints::New();
+       _ptsCircle1->SetNumberOfPoints(maxPts);
+       lines = vtkCellArray::New();
+       lines->InsertNextCell(maxPts);
+       for (i=0;i<maxPts;i++)
+       {
+               lines->InsertCellPoint(i);
+               _ptsCircle1->SetPoint(i, 0      , 0     , 0 );
+       }
+       lines->InsertCellPoint(0);
+       _ptsCircle1->SetPoint(0, -1000  , -1000 , -1000 );
+       _ptsCircle1->SetPoint(1,  1000  ,  1000 ,  1000 );
+
+       _pdCircle1 = vtkPolyData::New();
+    _pdCircle1->SetPoints( _ptsCircle1 );
+    _pdCircle1->SetLines( lines );
+       lines->Delete();  //do not delete lines ??
+       _circle1Actor                                   =       vtkActor::New();
+    _circle1Mapper                                     =       vtkPolyDataMapper::New();
+       _circle1Mapper->SetInput(_pdCircle1);
+       _circle1Mapper->ImmediateModeRenderingOn();
+       _circle1Actor->SetMapper(_circle1Mapper);
+       _circle1Actor->GetProperty()->BackfaceCullingOn();
+       _circle1Actor->GetProperty()->SetDiffuseColor(0,0,1);
+       _circle1Actor->GetProperty()->SetLineWidth(2);
+    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _circle1Actor );
+
+// Circle 2 Horizontal
+       _ptsCircle2 = vtkPoints::New();
+       _ptsCircle2->SetNumberOfPoints(maxPts);
+       lines = vtkCellArray::New();
+       lines->InsertNextCell(maxPts);
+       for (i=0;i<maxPts;i++)
+       {
+               lines->InsertCellPoint(i);
+               _ptsCircle2->SetPoint(i, 0      , 0     , 0 );
+       }
+       _ptsCircle2->SetPoint(0, -1000  , -1000 , -1000 );
+       _ptsCircle2->SetPoint(1,  1000  ,  1000 ,  1000 );
+
+       _pdCircle2 = vtkPolyData::New();
+    _pdCircle2->SetPoints( _ptsCircle2 );
+    _pdCircle2->SetLines( lines );
+       lines->Delete();  //do not delete lines ??
+       _circle2Actor                                   =       vtkActor::New();
+    _circle2Mapper                                     =       vtkPolyDataMapper::New();
+       _circle2Mapper->SetInput(_pdCircle2);
+       _circle2Mapper->ImmediateModeRenderingOn();
+       _circle2Actor->SetMapper(_circle2Mapper);
+       _circle2Actor->GetProperty()->BackfaceCullingOn();
+       _circle2Actor->GetProperty()->SetDiffuseColor(0,0,1);
+       _circle2Actor->GetProperty()->SetLineWidth(2);
+    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _circle2Actor );
+
+// Line Referance 1
+       _ptsLineRef1 = vtkPoints::New();
+       _ptsLineRef1->SetNumberOfPoints(2);
+       _ptsLineRef1->SetPoint(0, -1000 , -1000 , -1000 );
+       _ptsLineRef1->SetPoint(1,  1000 ,  1000 ,  1000 );
+       lines = vtkCellArray::New();
+       lines->InsertNextCell(2);
+       lines->InsertCellPoint(0);
+       lines->InsertCellPoint(1);
+
+       _pdLineRef1 = vtkPolyData::New();
+    _pdLineRef1->SetPoints( _ptsLineRef1 );
+    _pdLineRef1->SetLines( lines );
+       lines->Delete();  //do not delete lines ??
+       _lineRef1Actor                                  =       vtkActor::New();
+    _lineRef1Mapper                                    =       vtkPolyDataMapper::New();
+       _lineRef1Mapper->SetInput(_pdLineRef1);
+       _lineRef1Mapper->ImmediateModeRenderingOn();
+       _lineRef1Actor->SetMapper(_lineRef1Mapper);
+       _lineRef1Actor->GetProperty()->BackfaceCullingOn();
+       _lineRef1Actor->GetProperty()->SetDiffuseColor(0,0,1);
+       _lineRef1Actor->GetProperty()->SetLineWidth(2);
+    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineRef1Actor );
+
+// Line Referance 2
+       _ptsLineRef2 = vtkPoints::New();
+       _ptsLineRef2->SetNumberOfPoints(2);
+       _ptsLineRef2->SetPoint(0, -1000 , -1000 , -1000 );
+       _ptsLineRef2->SetPoint(1,  1000 ,  1000 ,  1000 );
+       lines = vtkCellArray::New();
+       lines->InsertNextCell(2);
+       lines->InsertCellPoint(0);
+       lines->InsertCellPoint(1);
+
+       _pdLineRef2 = vtkPolyData::New();
+    _pdLineRef2->SetPoints( _ptsLineRef2 );
+    _pdLineRef2->SetLines( lines );
+       lines->Delete();  //do not delete lines ??
+       _lineRef2Actor                                  =       vtkActor::New();
+    _lineRef2Mapper                                    =       vtkPolyDataMapper::New();
+       _lineRef2Mapper->SetInput(_pdLineRef2);
+       _lineRef2Mapper->ImmediateModeRenderingOn();
+       _lineRef2Actor->SetMapper(_lineRef2Mapper);
+       _lineRef2Actor->GetProperty()->BackfaceCullingOn();
+       _lineRef2Actor->GetProperty()->SetDiffuseColor(0,0,1);
+       _lineRef2Actor->GetProperty()->SetLineWidth(2);
+    imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineRef2Actor );
+
+
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.h
new file mode 100644 (file)
index 0000000..f8a5898
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef WXWIDGETMESURE2D_PLANE_H_
+#define WXWIDGETMESURE2D_PLANE_H_
+
+#include "wxWidgetMesure2D.h"
+
+class wxWidgetMesure2D_Plane : public wxWidgetMesure2D
+{
+public:
+        wxWidgetMesure2D_Plane(wxWindow *parent);
+        ~wxWidgetMesure2D_Plane();
+       void                    OnActiveLine(wxCommandEvent& event);
+       void                    OnActiveCirlcle(wxCommandEvent& event);
+       virtual void    ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
+       void                    ConfigureCircleLine();
+       void                    CircleLine();
+
+protected:
+       virtual wxWindow                *CreateWin1a(wxWindow *parent);
+private:
+       wxCheckBox                              *_cb_line; 
+       wxCheckBox                              *_cb_circle; 
+
+       // Circle 1
+       vtkPoints                                       *_ptsCircle1;
+       vtkActor                                        *_circle1Actor;
+       vtkPolyDataMapper                       *_circle1Mapper;
+    vtkPolyData                                        *_pdCircle1;
+       // Circle 2
+       vtkPoints                                       *_ptsCircle2;
+       vtkActor                                        *_circle2Actor;
+       vtkPolyDataMapper                       *_circle2Mapper;
+    vtkPolyData                                        *_pdCircle2;
+       // line reference 1
+       vtkPoints                                       *_ptsLineRef1;
+       vtkActor                                        *_lineRef1Actor;
+       vtkPolyDataMapper                       *_lineRef1Mapper;
+    vtkPolyData                                        *_pdLineRef1;
+       // line reference 2
+       vtkPoints                                       *_ptsLineRef2;
+       vtkActor                                        *_lineRef2Actor;
+       vtkPolyDataMapper                       *_lineRef2Mapper;
+    vtkPolyData                                        *_pdLineRef2;
+
+       void SetVisibleCircle( bool ok );
+
+};
+
+#endif /*WXWIDGETMESURE2D_PLANE_H_*/
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane_in_MPR.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane_in_MPR.cxx
new file mode 100644 (file)
index 0000000..af13b0a
--- /dev/null
@@ -0,0 +1,69 @@
+#include "wxWidgetMesure2D_Plane_in_MPR.h"
+
+wxWidgetMesure2D_Plane_in_MPR::wxWidgetMesure2D_Plane_in_MPR(wxWindow *parent)
+:wxWidgetMesure2D_Plane(parent)
+{
+       _vtkplane2Dview=NULL;
+}
+
+//-------------------------------------------------------------------
+
+wxWidgetMesure2D_Plane_in_MPR::~wxWidgetMesure2D_Plane_in_MPR()
+{
+}
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane_in_MPR::OnActiveLink(wxCommandEvent& event)
+{
+       if (_vtkplane2Dview!=NULL)
+       {
+               _vtkplane2Dview->SetActive( _cb_link->GetValue() );
+               _vtkplane2Dview->Refresh();
+               _vtkplane2Dview->RefreshView();
+       }
+}
+
+
+//-------------------------------------------------------------------
+void wxWidgetMesure2D_Plane_in_MPR::SetActiveLink(bool ok)
+{
+       _cb_link->SetValue(ok);
+       if (_vtkplane2Dview!=NULL)
+       {
+               _vtkplane2Dview->SetActive( _cb_link->GetValue() );
+       }
+}
+//-------------------------------------------------------------------
+
+void wxWidgetMesure2D_Plane_in_MPR::SetVtkPlane2DView(vtkPlane2DView *vtkplane2Dview)
+{
+       _vtkplane2Dview = vtkplane2Dview;
+}
+
+//-------------------------------------------------------------------
+
+wxWindow *wxWidgetMesure2D_Plane_in_MPR::CreateWin1a(wxWindow *parent) // virtual
+{
+       wxPanel *panel = new wxPanel(parent,-1);
+
+       _cb_link                = new wxCheckBox(panel,-1,_T("LINK                    ")); 
+       _cb_link->SetValue(true);
+
+       wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
+
+       sizer->Add(_cb_link);
+
+       sizer->Add( wxWidgetMesure2D_Plane::CreateWin1a(panel) );
+
+       panel->SetAutoLayout(true);
+       panel->SetSizer(sizer);
+       panel->SetSize(400,30);
+       panel->Layout();
+
+//EEDxx2.4
+//     panel->FitInside();
+
+       Connect(_cb_link->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxWidgetMesure2D_Plane_in_MPR::OnActiveLink );
+
+       return panel;
+}
+
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane_in_MPR.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane_in_MPR.h
new file mode 100644 (file)
index 0000000..4720867
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef WXWIDGETMESURE2D_PLANE_IN_MPR_H_
+#define WXWIDGETMESURE2D_PLANE_IN_MPR_H_
+
+#include "wxWidgetMesure2D_Plane.h"
+#include "vtkPlane2DView.h"
+
+class wxWidgetMesure2D_Plane_in_MPR : public wxWidgetMesure2D_Plane
+{
+public:
+        wxWidgetMesure2D_Plane_in_MPR(wxWindow *parent);
+        ~wxWidgetMesure2D_Plane_in_MPR();
+       void OnActiveLink(wxCommandEvent& event);
+       void SetVtkPlane2DView(vtkPlane2DView *vtkplane2Dview);
+       void SetActiveLink(bool ok);
+
+protected:
+       virtual wxWindow                *CreateWin1a(wxWindow *parent);
+private:
+       wxCheckBox                              *_cb_link; 
+       vtkPlane2DView                  *_vtkplane2Dview;
+};
+
+
+#endif /*WXWIDGETMESURE2D_PLANE_IN_MPR_H_*/
index b7766c9fdc254c2aab8f9d9ee698ef195dae6ef5..8349290b5f7e7866a84a4a1e0dd23cb86f42fc26 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasMPR.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:45 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/05/14 13:54:31 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
index e3bb62a52321705789067f6783c9347bf816024b..fc6d41a38417bb9daccdea12947897539db6bc12 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasMPR.h,v $
   Language:  C++
-  Date:      $Date: 2009/05/04 07:35:45 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2009/05/14 13:54:31 $
+  Version:   $Revision: 1.6 $
 
   Copyright: (c) 2002, 2003
   License:
index ff6c2550f11fd92efbd3818847542ca0eb1be8fd..863cb944ce1de6d22e26c799e302de41c94a44ed 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualTree_MPR.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:31 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
index 1ae01f4007af61dfaf63e7a1234b92d052406068..c831ea48d1570f9145b250b51761cda3b7d0665f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ManualTree_MPR.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:11 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:31 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
diff --git a/lib/maracasVisuLib/src/kernel/include/CMakeLists.txt b/lib/maracasVisuLib/src/kernel/include/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b03fbeb
--- /dev/null
@@ -0,0 +1,96 @@
+# This directory should only be build if wxWindows and VTK can be found
+
+SET(MaracasKernel_SRCS
+curve.cxx
+curve.hxx
+volume.cxx
+volume.hxx
+marVector.cpp
+marVector.h
+marMatrix.cpp
+marMatrix.h
+marMathConst.h
+marTypes.h
+marAxis.cpp
+marAxis.h
+marContour.cpp
+marContour.h
+marKVolume.cpp
+marKVolume.h
+marDynData.cpp
+marDynData.h
+marExperiment.cpp
+marExperiment.h
+marInterface.cpp
+marInterface.h
+marObject.cpp
+marObject.h
+marParameters.cpp
+marParameters.h
+marDicomBase.cpp
+marDicomBase.h
+axisExtractor.cxx
+axisExtractor.h
+axisExtractor02.cxx
+axisExtractor02.h
+carotidaBifurcacion.cxx
+carotidaBifurcacion.h
+marAxisCT.cpp
+marAxisCT.h
+marInterfaceCT.cpp
+marInterfaceCT.h
+marExperimentCT.cpp
+marExperimentCT.h
+marAxisContours.cpp
+marAxisContours.h
+marContourVO.cpp
+marContourVO.h
+marIsocontour.cpp
+marIsocontour.h
+marPoint.cpp
+marPoint.h
+marLine.cpp
+marLine.h
+vtkDijkstraImageData.cxx
+vtkDijkstraImageData.h
+vtkOtsuImageData.cxx
+vtkOtsuImageData.h
+vtkOtsuSphereSource.cxx
+vtkOtsuSphereSource.h
+itkFM3D.h
+itkFM3D.cxx
+itkVTKImageToImageFilter.h
+itkVTKImageToImageFilter.txx
+itkImageToVTKImageFilter.h
+itkImageToVTKImageFilter.txx 
+vtkJoiner.cxx
+vtkJoiner.h
+vtkSTLExtractor.cpp
+vtkSTLExtractor.h
+marUtils.h
+marUtils.cpp
+marImageData.cpp
+marImageData.h
+)
+
+ADD_LIBRARY(MaracasKernel ${MaracasKernel_SRCS})
+IF(CYGWIN)
+TARGET_LINK_LIBRARIES(MaracasKernel
+       MaracasAlgorithm
+       MaracasSnakeContour
+       ${GDCM_LIBRARIES}
+       ${WXWIDGETS_LIBRARIES}
+        ${MARACAS_ITK_LIBRARIES}
+)
+ELSE(CYGWIN)
+TARGET_LINK_LIBRARIES(MaracasKernel
+       MaracasAlgorithm
+       MaracasSnakeContour
+       ${GDCM_LIBRARIES}
+       ${WXWIDGETS_LIBRARIES}
+       vtkCommon vtkGraphics vtkImaging
+        ${MARACAS_ITK_LIBRARIES}
+)
+ENDIF(CYGWIN)
+#SET_TARGET_PROPERTIES(MaracasKernel PROPERTIES LINK_FLAGS "/nodefaultlib:msvcrt")  
+
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/curve.cxx
rename to lib/maracasVisuLib/src/kernel/include/curve.cxx
index 5d0a9c4a4600cd9a981807d0bebd3ccaee51d2d0..8fadd1399b23fc8abc6ab611b5ad07cf3f0932d9 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: curve.cxx,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:54 $
+ Date:      $Date: 2009/05/14 13:55:07 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/curve.hxx
rename to lib/maracasVisuLib/src/kernel/include/curve.hxx
index 767cc2102cee657b15e14a5cbeb1f83410349d2c..d8118af669e42cd5eb519e4e665aa9bb004bd8fb 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: curve.hxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/gslobj.hxx
rename to lib/maracasVisuLib/src/kernel/include/gslobj.hxx
index 1bc749e723766ce58340358f3e2a942b67b16c16..8091a4e075b9dce98b1d869ad942703473922299 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: gslobj.hxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/itkImageToVTKImageFilter.h
rename to lib/maracasVisuLib/src/kernel/include/itkImageToVTKImageFilter.h
index 0f4dd2057049aec812309740ad79cdc612512781..5b4e4fd82c452280343840394a151a89098d2ac7 100644 (file)
@@ -3,7 +3,7 @@
   Program:   Insight Segmentation & Registration Toolkit
   Module:    $RCSfile: itkImageToVTKImageFilter.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright (c) 2002 Insight Consortium. All rights reserved.
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/itkVTKImageToImageFilter.h
rename to lib/maracasVisuLib/src/kernel/include/itkVTKImageToImageFilter.h
index 194dff81c774d1a334ac1dde179722f66a3b19db..03b26b964ca88aab92ac371cb3cbc6d1770b5864 100644 (file)
@@ -3,7 +3,7 @@
   Program:   Insight Segmentation & Registration Toolkit
   Module:    $RCSfile: itkVTKImageToImageFilter.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright (c) 2002 Insight Consortium. All rights reserved.
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marAxis.cpp
rename to lib/maracasVisuLib/src/kernel/include/marAxis.cpp
index 4a43e144d2dcfc8f2e5e91526a2494dfeb3b0213..e2dba1af19206c139336e4f5061aaecb5ed07f9b 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marAxis.cpp,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marAxis.h
rename to lib/maracasVisuLib/src/kernel/include/marAxis.h
index 7abb691739c301794f10bdcd4c93219b20d1385e..76eb8640294c9b1f3dbad2a55e9a1adffe5e563b 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marAxis.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marAxisCT.h
rename to lib/maracasVisuLib/src/kernel/include/marAxisCT.h
index ece5589fb78cf3e3a98bf493f0109b0aaa60e3cf..b76dbc80639498712574b399ec0aa3c9f88cdb13 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marAxisCT.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/kernel/marAxisContours.cpp
rename to lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp
index df18d766eeb736924b6ebeab45045b88543f4961..5d2b9013a8431c9bd95519930583db5e9510b050 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marAxisContours.cpp,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/kernel/marAxisContours.h
rename to lib/maracasVisuLib/src/kernel/include/marAxisContours.h
index 2e0139d54646839fe6263cf26bdb79c59fe52163..8d6f26686430625328abbdf7b9903dcbcb35efca 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marAxisContours.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marContourVO.cpp
rename to lib/maracasVisuLib/src/kernel/include/marContourVO.cpp
index 23765e51eb749fe1ca4d55b81448038373fc1bea..389cf4e25a3c3c7b375e6bb9de640bc7eac8b916 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marContourVO.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:54 $
+ Date:      $Date: 2009/05/14 13:55:07 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/marContourVO.h
rename to lib/maracasVisuLib/src/kernel/include/marContourVO.h
index 4cb5e7cb599309d68c40955de0d1abf0315bc346..371072debcd40b32884447808116ce37a4229d38 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marContourVO.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marExperiment.cpp
rename to lib/maracasVisuLib/src/kernel/include/marExperiment.cpp
index 830514a868552ff7cb95a43f558d21ab75e7098d..9653fd6f8c01a943ff9ed000fbec4f7ab75dd330 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marExperiment.cpp,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/marExperiment.h
rename to lib/maracasVisuLib/src/kernel/include/marExperiment.h
index 42c5a0999cea1d8f9a7fba38297edca3c787a7d9..c402dff075bb6fce55bfe22fa0c5b93cb88c4d91 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marExperiment.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marExperimentCT.cpp
rename to lib/maracasVisuLib/src/kernel/include/marExperimentCT.cpp
index 1655e946edc79e6ebbc80ad7ddb7b6d622c8044c..fb6dc4f5ca70d7532fb867f9756dcefeefc27bff 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marExperimentCT.cpp,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/marExperimentCT.h
rename to lib/maracasVisuLib/src/kernel/include/marExperimentCT.h
index 7646d68104e437390664352b9eeb73fbcb8f1173..79a92628871018ad4a15cd31a17cef7f65ca5260 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marExperimentCT.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:07 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marInterface.cpp
rename to lib/maracasVisuLib/src/kernel/include/marInterface.cpp
index 0c645867b62e92dd07f58565affb52a0aae193a7..7d180f061f881f38bbd7cdb5256821229e002145 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marInterface.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:55 $
+ Date:      $Date: 2009/05/14 13:55:07 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/kernel/marInterface.h
rename to lib/maracasVisuLib/src/kernel/include/marInterface.h
index c25c5b9a684a743f28644c49ee48c2f8f85919ad..e267c64245d20fd1badb190044fb2cbf083478af 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marInterface.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:08 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marInterfaceCT.cpp
rename to lib/maracasVisuLib/src/kernel/include/marInterfaceCT.cpp
index 4ae171c239887a1c32a54852d0fc948860457bab..4d5d7d58d0af795c88b7bc93c46ba1121412402c 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marInterfaceCT.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:55 $
+ Date:      $Date: 2009/05/14 13:55:08 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/marInterfaceCT.h
rename to lib/maracasVisuLib/src/kernel/include/marInterfaceCT.h
index 0b83a25f13b62a54c61fae308bcad15221cfbcd2..4c129936b62b5dcf565505c3b0d904dd31cfe2d1 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marInterfaceCT.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:08 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/marIsocontour.cpp
rename to lib/maracasVisuLib/src/kernel/include/marIsocontour.cpp
index b0f5e8b2e373a55878ad01c136cc157186349c90..cae4420724c3b6667fad5caadb76b92ddaea7b53 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marIsocontour.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:55 $
+ Date:      $Date: 2009/05/14 13:55:08 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/kernel/marIsocontour.h
rename to lib/maracasVisuLib/src/kernel/include/marIsocontour.h
index a5beb2ae13a489a9b49014ed3e2e3b1585fa45e3..350208a4f6ec0386fe2a016fdbff2b37b9c5cbba 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marIsocontour.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
+  Date:      $Date: 2009/05/14 13:55:08 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 97%
rename from lib/maracasVisuLib/src/kernel/marKVolume.cpp
rename to lib/maracasVisuLib/src/kernel/include/marKVolume.cpp
index 0a43a110e41b5c759fa31cb74160751dfc961080..c94b3e2ad877758ffa839229e15d68185c76a4df 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marKVolume.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:55 $
+ Date:      $Date: 2009/05/14 13:55:08 $
  Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 93%
rename from lib/maracasVisuLib/src/kernel/marKVolume.h
rename to lib/maracasVisuLib/src/kernel/include/marKVolume.h
index cf18aba8aee7f01ab8e4ffbac7a731f1ce3c7c57..a83c5b518a9a32b287e7d94b4d702149e8ee5bf3 100644 (file)
@@ -3,8 +3,8 @@
  Program:   wxMaracas
  Module:    $RCSfile: marKVolume.h,v $
  Language:  C++
- Date:      $Date: 2009/03/24 10:49:23 $
- Version:   $Revision: 1.2 $
+ Date:      $Date: 2009/05/14 13:55:08 $
+ Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
   License:
similarity index 98%
rename from lib/maracasVisuLib/src/kernel/marPoint.cpp
rename to lib/maracasVisuLib/src/kernel/include/marPoint.cpp
index 6d42b270727596e4eefde2341a7c043970598e81..486b6cc6ae3b4adc1d591b02ba522225b6171d31 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marPoint.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:56 $
+ Date:      $Date: 2009/05/14 13:55:08 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 96%
rename from lib/maracasVisuLib/src/kernel/marPoint.h
rename to lib/maracasVisuLib/src/kernel/include/marPoint.h
index 9b6d487a77a5c88942e3e6f8765443a1f28d530f..c5a8961dc70570191410eb924387bc5127182a57 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: marPoint.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:56 $
+  Date:      $Date: 2009/05/14 13:55:08 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marSimpleDicom.cpp
rename to lib/maracasVisuLib/src/kernel/include/marSimpleDicom.cpp
index da0ed21f9741fdfb9487fa61258251b9a890e823..97b70f27fcf591f53119edc354489e41b48fa5a5 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marSimpleDicom.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:56 $
+ Date:      $Date: 2009/05/14 13:55:08 $
  Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/marSimpleDicom.h
rename to lib/maracasVisuLib/src/kernel/include/marSimpleDicom.h
index 8872fe9a26dda41ef38e190492f0fce398f95c4d..eb113e1344927c73175eeb0f8375c13398e88bd8 100644 (file)
@@ -3,7 +3,7 @@
  Program:   wxMaracas
  Module:    $RCSfile: marSimpleDicom.h,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:56 $
+ Date:      $Date: 2009/05/14 13:55:08 $
  Version:   $Revision: 1.1 $
  
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/matrix.cxx
rename to lib/maracasVisuLib/src/kernel/include/matrix.cxx
index 53c9dbe32cd71891c8e4bb9409fb92ac1a7e7f03..2372055edf32a89df5609106f4ddc109c0ed63ad 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: matrix.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:56 $
+  Date:      $Date: 2009/05/14 13:55:08 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
similarity index 99%
rename from lib/maracasVisuLib/src/kernel/vector.cxx
rename to lib/maracasVisuLib/src/kernel/include/vector.cxx
index 28357f97caff95216c3491c20f47bd784bb79fd4..af00aa0a116b421ecb46418fa260b697b5c46fbb 100644 (file)
@@ -3,7 +3,7 @@
   Program:   wxMaracas
   Module:    $RCSfile: vector.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:56 $
+  Date:      $Date: 2009/05/14 13:55:08 $
   Version:   $Revision: 1.1 $
 
   Copyright: (c) 2002, 2003
index ac38b7707ec047a21062f6a813b31053d04e1b63..0b44a63a456a528b643e9889b46a74c72d35ec84 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Insight Segmentation & Registration Toolkit
   Module:    $RCSfile: itkImageToVTKImageFilter.txx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.2 $
 
   Copyright (c) 2002 Insight Consortium. All rights reserved.
   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
index c39e351329888e32ad6e8e6179d084a195e3b1c2..8f359ee047c79e8c5f2be49a7fe5e83361fc5421 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Insight Segmentation & Registration Toolkit
   Module:    $RCSfile: itkVTKImageToImageFilter.txx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:54 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.2 $
 
   Copyright (c) 2002 Insight Consortium. All rights reserved.
   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
index 067f800eb3a426741408a6410469f1ab0abd8fdb..29f1e6fc96354ae3939b32cb1270c8d12e25d74b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marDynData.cpp,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
index c04aee1f22c98e1855d8d09dc3e76d5107669fda..6fc96ff17964412cb9a945b3c9a03a15f4db9154 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marDynData.h,v $
   Language:  C++
-  Date:      $Date: 2009/01/15 11:09:47 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
index 088bfad673a49a3b45fda0e1a06db40ad6de074c..31a91e806eeb3012d473003b8aa2d4e3ab310946 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marObject.cpp,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:55 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
index 3acda83da72f8ca4a14808bc35d285842e2d6e58..da5f04cec313a5e2cb1cad0e1f7f5811ae12c03e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marObject.h,v $
   Language:  C++
-  Date:      $Date: 2009/01/15 11:09:47 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
index 8bf5354adaea26027f8912e69ed129b5b416bb8e..9bb6641c089064ee609f019e18d43e36714a3377 100644 (file)
@@ -3,8 +3,8 @@
  Program:   wxMaracas
  Module:    $RCSfile: marParameters.cpp,v $
  Language:  C++
- Date:      $Date: 2008/10/31 16:32:56 $
- Version:   $Revision: 1.1 $
+ Date:      $Date: 2009/05/14 13:54:43 $
+ Version:   $Revision: 1.2 $
  
   Copyright: (c) 2002, 2003
   License:
index a6b5312663af59d185b5a60b95a9a5e3f1c67199..a4744f5b10bb32ed61aa46be5c518be169db6b99 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marParameters.h,v $
   Language:  C++
-  Date:      $Date: 2009/01/15 11:09:47 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
index 1fbead0aef0ac313cf93d2ab0a4b7937269df823..baf1041a799e51354e5c889394a17ce8e5497b47 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marTypes.h,v $
   Language:  C++
-  Date:      $Date: 2009/01/15 11:09:47 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.7 $
 
   Copyright: (c) 2002, 2003
   License:
index 028e649f9f4910bd3314144ab62fe45ae7edf426..f661e5dc219639e8206c45e2eaa3e1cd3918f501 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: volume.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/01/26 11:22:49 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
index 3e3c056ee43471ec1fcc243ba0840dfaaedcd883..57b9253a830edc23d5a95b2c33cd37ca8b380590 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: volume.hxx,v $
   Language:  C++
-  Date:      $Date: 2009/01/26 11:22:49 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 13:54:43 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License: