From: Juan Prieto Date: Thu, 14 May 2009 13:54:26 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~86 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a4ee3758aa0477f677fb981e2c4d6e29995e8db8;p=creaMaracasVisu.git *** empty log message *** --- diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d134e4a..fd55a3f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,3 +1,3 @@ # Add a SUBDIRS command for each of your libraries SUBDIRS(maracasVisuLib) -SUBDIRS(doxygen) +#SUBDIRS(doxygen) diff --git a/lib/maracasVisuLib/CMakeLists.txt b/lib/maracasVisuLib/CMakeLists.txt index df16642..b5ab09f 100644 --- a/lib/maracasVisuLib/CMakeLists.txt +++ b/lib/maracasVisuLib/CMakeLists.txt @@ -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/CMakeListsWorking.txt b/lib/maracasVisuLib/src/CMakeListsWorking.txt_CP similarity index 100% rename from lib/maracasVisuLib/src/CMakeListsWorking.txt rename to lib/maracasVisuLib/src/CMakeListsWorking.txt_CP diff --git a/lib/maracasVisuLib/src/CMakeLists.txt b/lib/maracasVisuLib/src/CP.txt similarity index 100% rename from lib/maracasVisuLib/src/CMakeLists.txt rename to lib/maracasVisuLib/src/CP.txt diff --git a/lib/maracasVisuLib/src/interface/CMakeLists.txt_CP b/lib/maracasVisuLib/src/interface/CMakeLists.txt_CP new file mode 100644 index 0000000..be0a96d --- /dev/null +++ b/lib/maracasVisuLib/src/interface/CMakeLists.txt_CP @@ -0,0 +1 @@ +SUBDIRS(wxWindows) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.cpp b/lib/maracasVisuLib/src/interface/wxWindows/include/MaracasDll.cpp similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.cpp rename to lib/maracasVisuLib/src/interface/wxWindows/include/MaracasDll.cpp diff --git a/lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.h b/lib/maracasVisuLib/src/interface/wxWindows/include/MaracasDll.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/MaracasDll.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/StdAfx.cpp b/lib/maracasVisuLib/src/interface/wxWindows/include/StdAfx.cpp similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/StdAfx.cpp rename to lib/maracasVisuLib/src/interface/wxWindows/include/StdAfx.cpp diff --git a/lib/maracasVisuLib/src/interface/wxWindows/StdAfx.h b/lib/maracasVisuLib/src/interface/wxWindows/include/StdAfx.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/StdAfx.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/StdAfx.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.cxx similarity index 99% rename from lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.cxx index 98937b6..72b4bcb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.h b/lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.h similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.h index 2d27549..25071c1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/manualContourContainer.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/marDictionary.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/marDictionary.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/marDictionary.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/marDictionary.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/marDictionary.h b/lib/maracasVisuLib/src/interface/wxWindows/include/marDictionary.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/marDictionary.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/marDictionary.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.cxx similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.cxx index 46e3e49..78c539f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.h index 64fa208..ebba711 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.cxx similarity index 99% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.cxx index ac6979e..3787a8b 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.h similarity index 97% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.h index 927fd29..4a0d90c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.cxx similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.cxx index 91ba1f1..8f58704 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.cxx @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.h similarity index 97% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.h index 0f9dc73..13a5471 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.cxx similarity index 97% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.cxx index 961730f..2cc37eb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.h index 0c4d813..c778c2d 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.cxx 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 c8ae24b..50f1bb9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.h 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 bae9bb9..bbf89c6 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasEmptyPanel_2.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.cxx similarity index 99% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.cxx index 374426b..27b3afa 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.h similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.h index ef4520e..0b2b743 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.cxx similarity index 99% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.cxx index 3b5951b..f7d546c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.h index c4260f2..db56590 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasHelpDialog.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.cxx similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.cxx index 4c11e33..93485a3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.h index ee818f6..3328a45 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.cxx similarity index 99% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.cxx index d3d9198..eef3c87 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.cxx @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.h similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.h index 09a650a..0638726 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasImageBrowser02.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.cxx similarity index 99% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.cxx index 51f194f..09abbf0 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.h similarity index 97% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.h index 57f9895..6055f80 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasParametersDialog.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.cxx 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 e07946e..6509a0e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.h 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 fc347fc..4aad363 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasPathology_01.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.cxx similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.cxx index 35b6bf4..4b83a0f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.h index cdc29ed..0710bd3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasProcessingCT.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.cxx similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.cxx index 2bbc8c3..9372e82 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.h index b54c73f..6bc6fea 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantification.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.cxx similarity index 98% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.cxx index 5c944ef..f168758 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.h similarity index 96% rename from lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.h rename to lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.h index eb368d7..c6fa2b4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasQuantificationCT.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.cxx 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 7cee607..f01f3f4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.h 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 106a814..fe955a2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualContour_Panel.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.cxx 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 21d2f0d..9c07293 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.h 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 d50cca5..3cd9992 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualSegmentation_MPR.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.cxx 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 53ab434..eb014d8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.h 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 4b077c1..b87e1d5 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_ManualTree_MPRDlg.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.cxx 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 bb766c2..a9683b8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.h b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.h 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 1a484be..e7452fd 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas_SegmentationFM3D.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h index 2f3f778..7b43bbe 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h @@ -34,7 +34,7 @@ #include "wxVTKRenderWindowInteractor.h" - +#include "InteractorStyleMaracas.h" //-- #include diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx new file mode 100644 index 0000000..dc80df2 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.cxx @@ -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 + //::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 index 0000000..9931956 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InteractorStyleMaracas.h @@ -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_*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx index 39b7e90..0800638 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h index f4f5c3b..9c8f9df 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx index 1cd27c5..9f3af99 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h index 19209df..85d56a7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h @@ -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 index 0000000..b1a9022 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx @@ -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(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 index 0000000..e67b5be --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.h @@ -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 index 0000000..cf3696c --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.cxx @@ -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 index 0000000..0811bde --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCubeModel.h @@ -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 index 0000000..036e596 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.cxx @@ -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 index 0000000..d6e9eda --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.h @@ -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 index 0000000..1640461 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.cxx @@ -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 index 0000000..96cf5a0 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingModel.h @@ -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 index 0000000..0dcd603 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.cxx @@ -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 index 0000000..1a71283 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingSphereModel.h @@ -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 index 0000000..b0cb453 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.cxx @@ -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 index 0000000..9c616d5 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/idAlBeRa.h @@ -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_*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/Copie de wxSTLWidget_03.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/Copie de wxSTLWidget_03.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/Copie de wxSTLWidget_03.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/Copie de wxSTLWidget_03.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/Copie de wxSTLWidget_03.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/Copie de wxSTLWidget_03.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/Copie de wxSTLWidget_03.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/Copie de wxSTLWidget_03.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/chart.cpp similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.cpp rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/chart.cpp diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/chart.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/chart.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.cxx 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 3189621..66256f2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.h 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 1ea8024..986ae7d 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk2DQuantSliceWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.cxx 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 03278f4..4aa26b7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.h 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 c871c1d..4977930 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DQuantSurfaceWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.cxx 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 0acfb7d..845699b 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.h 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 1b5eb98..fd3b4fd 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceSTLWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.cxx 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 103aaa7..f62c3e8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.h 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 06f663a..b58ef21 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtk3DSurfaceWidget.h @@ -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: diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.cxx 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 9efc451..2ce653e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.h 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 a200c24..7de29d4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImagePolyDataSeedConnectivity.h @@ -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 index 0000000..df4cad2 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.cxx_ @@ -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 index 0000000..496d2ba --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkImageViewer2_XYZ.h_ @@ -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_*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.cxx 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 a5698ab..01d92b2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.h 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 cc6d92a..12a97e2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/vtkInteractorStyleCutter.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.cxx 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 39ce6e6..f825f72 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.h 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 1d0317a..e6475c7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxChart.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget_2.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget_2.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget_2.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanelWidget_2.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanel_3_Widget.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanel_3_Widget.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanel_3_Widget.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxEmptyPanel_3_Widget.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageBrowserWdg.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageBrowserWdg.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageBrowserWdg.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageBrowserWdg.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.cxx 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 fa75fac..bfed25d 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.h 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 c01f915..99a7561 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.cxx 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 78ad74f..c74786f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.h 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 1803eb6..d1b5211 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualRegistration3D.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.cxx 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 c242b36..22cf76e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.h 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 ee25c06..54fc60c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxManualSegmentation_MPRWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxParametersDialog.cpp similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.cpp rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxParametersDialog.cpp diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxParametersDialog.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxParametersDialog.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxPathologyWidget_01.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxPathologyWidget_01.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxPathologyWidget_01.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxPathologyWidget_01.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.cxx 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 d16b85a..b8a0a1f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.h 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 1054f8a..9f648eb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.cxx 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 d921c88..0b36284 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.h 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 871c968..f8279e4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidgetCT.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.cxx 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 2b0d35e..4aedb06 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.h 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 5c2add7..907d947 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxQuantificationWidget_base.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxReadingPriorityPanel.cpp similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.cpp rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxReadingPriorityPanel.cpp diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxReadingPriorityPanel.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxReadingPriorityPanel.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSTLWidget_02.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSTLWidget_02.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSTLWidget_02.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSTLWidget_02.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.cxx 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 dd486e1..23b93a4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.h 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 bad33f9..6e631ff 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceMPR.cxx similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.cxx rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceMPR.cxx diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceMPR.h similarity index 100% rename from lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.h rename to lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceMPR.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.cxx 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 6073792..cf4d858 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.h 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 0228951..ea5a22f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceSTLWidget.h @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.cxx 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 99ac246..ef497f6 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.cxx @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.h 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 ea88224..ce04f74 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.h @@ -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 index 0000000..0be3029 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx @@ -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 index 0000000..c095094 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.h @@ -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 index 0000000..4c07bdf --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.cxx @@ -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 (distSetPoint(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 index 0000000..232c3da --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualViewPerpPlaneContour.h @@ -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 index 0000000..93ddbf3 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h @@ -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 index 0000000..8620269 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h @@ -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* GetGreyValuesTransferenceFVector(); + std::vector* GetIntensityValuesTransferenceFVector(); + std::vector* GetRedColorsOfColorTransferenceFVector(); + std::vector* GetGreenColorsOfColorTransferenceFVector(); + std::vector* GetBlueColorsOfColorTransferenceFVector(); + std::vector* 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 greyValuesTransferenceFVector; + std::vector intensityValuesTransferenceFVector; + std::vector redColorsOfColorTransferenceFVector; + std::vector greenColorsOfColorTransferenceFVector; + std::vector blueColorsOfColorTransferenceFVector; + std::vector greyValueColorsOfColorTransferenceFVector; +}; + +#endif /*VTKCLIPPING3DDATAVIEWER_H_*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx index 82f6591..e369dbf 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx @@ -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); //---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h index d7ca0fe..c6623fd 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h @@ -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 index 0000000..875a817 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx @@ -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 index 0000000..ebac223 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h @@ -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 index 0000000..e3a3957 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx @@ -0,0 +1,306 @@ +#include "vtkInfoTextImage.h" + +#include "vtkTextProperty.h" +#include +//------------------------------------------------------------------- +//------------------------------------------------------------------- +//------------------------------------------------------------------- + +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 index 0000000..fb50e35 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.h @@ -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 index 0000000..e65ece5 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx @@ -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 index 0000000..8a27075 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.h @@ -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 index 0000000..fb4e836 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx @@ -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 index 0000000..5c5172e --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.h @@ -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 index 0000000..9dae456 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.cxx @@ -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 index 0000000..7032827 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorScrollZ.h @@ -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 index 0000000..ab60541 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx @@ -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 index 0000000..ed8e78f --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.h @@ -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 index 0000000..f68e2af --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx @@ -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 && iSetVtkInteractorStyleBaseView(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;iGetActive()==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;iSetActive(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 index 0000000..9eb157e --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.h @@ -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 index 0000000..b33cd8e --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx @@ -0,0 +1,83 @@ + + +#include "vtkInteractorStyleBaseView2D.h" +#include + +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 index 0000000..1432c06 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.h @@ -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 index 0000000..0b2e7c2 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.cxx @@ -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 index 0000000..672e0c1 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView3D.h @@ -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 index 0000000..ef2a00a --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx @@ -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 index 0000000..bac1d50 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.h @@ -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 index 0000000..d755bca --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.cxx @@ -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 index 0000000..3c13788 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStylePlane2D.h @@ -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 index 0000000..de3d2b0 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx @@ -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 index 0000000..3d55928 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.h @@ -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 index 0000000..760e2c4 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.h @@ -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 *GetctFunVectorPoint(); + std::vector *GetctFunVectorRed(); + std::vector *GetctFunVectorGreen(); + std::vector *GetctFunVectorBlue(); + +private: + + bool _visiblePosition[3]; + + // outline + vtkOutlineFilter *_outlineData; + vtkPolyDataMapper *_mapOutline; + vtkActor *_outline; + + // + vtkColorTransferFunction *_ctfun; + std::vector _ctFunVectorPoint; + std::vector _ctFunVectorRed; + std::vector _ctFunVectorGreen; + std::vector _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 index 0000000..86e8fa3 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx @@ -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 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 ; iPixelsGetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0); + + pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); + pResult[iPixels] = pTemp[iPixels]; + + for (iWidth=1;iWidthGetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0); + + if (pResult[iPixels]< pTemp[iPixels]) + { + pResult[iPixels] = pTemp[iPixels]; + } + } + + if (deltaPixel!=1) + { + for (itmp=1;itmpDelete(); + } + + _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 index 0000000..c178472 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.h @@ -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 index 0000000..74c925d --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.cxx @@ -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 index 0000000..0ca2551 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.h @@ -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_*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx index a46feff..f3217a2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx @@ -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="< *GetctFunVectorPoint(); - std::vector *GetctFunVectorRed(); - std::vector *GetctFunVectorGreen(); - std::vector *GetctFunVectorBlue(); - -private: - - bool _visiblePosition[3]; - - // outline - vtkOutlineFilter *_outlineData; - vtkPolyDataMapper *_mapOutline; - vtkActor *_outline; - - // - vtkColorTransferFunction *_ctfun; - std::vector _ctFunVectorPoint; - std::vector _ctFunVectorRed; - std::vector _ctFunVectorGreen; - std::vector _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* GetGreyValuesTransferenceFVector(); - std::vector* GetIntensityValuesTransferenceFVector(); - std::vector* GetRedColorsOfColorTransferenceFVector(); - std::vector* GetGreenColorsOfColorTransferenceFVector(); - std::vector* GetBlueColorsOfColorTransferenceFVector(); - std::vector* 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 greyValuesTransferenceFVector; - std::vector intensityValuesTransferenceFVector; - std::vector redColorsOfColorTransferenceFVector; - std::vector greenColorsOfColorTransferenceFVector; - std::vector blueColorsOfColorTransferenceFVector; - std::vector greyValueColorsOfColorTransferenceFVector; -}; #endif // __WX__MPR__BASE__DATA__H diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx index da7729e..8143f0e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx @@ -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: @@ -73,5481 +73,12 @@ #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=0) && (xx=0) && (yy=0) && (zz=0) && (AngX=0) && (AngY=0) && (zGetScalarPointer (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_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=0)&&(jjGetScalarPointer( 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]=0) && (pp[1]=0) && (pp[2]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 ; ilimitA) && (ilimitA) && (jaa){ - aa=radio2-aa; - p[2] = sqrt(aa); - RotatePointOverTheSphere( pp, p,cc); - if ( (pp[0]>=0) && (pp[0]=0) && (pp[1]=0) && (pp[2]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 ; iradio2TMP) - { - if (radio2>aa){ - aa=radio2-aa; - p[2] = sqrt(aa); - RotatePointOverTheSphere( pp, p,cc); - if ( (pp[0]>=0) && (pp[0]=0) && (pp[1]=0) && (pp[2]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 ; iaa){ - aa=radio2-aa; - p[2] = sqrt(aa); - RotatePointOverTheSphere( pp, p,cc); - if ( (pp[0]>=0) && (pp[0]=0) && (pp[1]=0) && (pp[2]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;iGetScalarPointer (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 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