]> Creatis software - creaMaracasVisu.git/commitdiff
#3263 creaMaracasVisu Feature New Normal - ViewerNV sync ParallelScale Camera
authorEduardo DAVILA <davila@ei-ed-606.creatis.insa-lyon.fr>
Thu, 6 Jun 2019 09:42:34 +0000 (11:42 +0200)
committerEduardo DAVILA <davila@ei-ed-606.creatis.insa-lyon.fr>
Thu, 6 Jun 2019 09:42:34 +0000 (11:42 +0200)
189 files changed:
CMakeLists.txt
bbtk/bbs/appli/exampleBars.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleBars.bbs
bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg
bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs
bbtk/bbs/appli/exampleCutModule.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleCutModule.bbs
bbtk/bbs/appli/exampleCutModule2.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleCutModule2.bbs
bbtk/bbs/appli/exampleGaussianSmooth.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleGaussianSmooth.bbs
bbtk/bbs/appli/exampleHistogramView.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleHistogramView.bbs
bbtk/bbs/appli/exampleManualContour.bbg
bbtk/bbs/appli/exampleManualContour.bbs
bbtk/bbs/appli/exampleManualContourModel_Box.bbg
bbtk/bbs/appli/exampleManualContourModel_Box.bbs
bbtk/bbs/appli/exampleOpenDialog.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleOpenDialog.bbs
bbtk/bbs/appli/examplePlaneNPoints.bbg [new file with mode: 0644]
bbtk/bbs/appli/examplePlaneNPoints.bbs
bbtk/bbs/appli/examplePlanesViewerNV_01.bbg [new file with mode: 0644]
bbtk/bbs/appli/examplePlanesViewerNV_01.bbs
bbtk/bbs/appli/examplePlanesViewerNV_02.bbg [new file with mode: 0644]
bbtk/bbs/appli/examplePlanesViewerNV_02.bbs
bbtk/bbs/boxes/ManualPaint2.bbg
bbtk/bbs/boxes/ManualPaint2.bbs
bbtk/bbs/boxes/Ruler01_XY.bbg
bbtk/bbs/boxes/Ruler01_XY.bbs
bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx
bbtk/src/bbcreaMaracasVisuColorLayerImageView.h
bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx
bbtk/src/bbcreaMaracasVisuSetPosition.cxx
bbtk/src/bbcreaMaracasVisuSliceImage.cxx
bbtk/src/bbcreaMaracasVisuTubeFilter.cxx
bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx
bbtk/src/bbmaracasvisuAnimationSphere.cxx
bbtk/src/bbmaracasvisuAxeVolume.cxx
bbtk/src/bbmaracasvisuContourVOI.cxx
bbtk/src/bbmaracasvisuDrawAxe3D.cxx
bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx
bbtk/src/bbmaracasvisuHistogramView.cxx
bbtk/src/bbmaracasvisuImageActor.cxx
bbtk/src/bbmaracasvisuImageChangeInformation.cxx
bbtk/src/bbmaracasvisuPlotterView.cxx
bbtk/src/bbmaracasvisuTransferFunctionView.cxx
bbtk/src/bbmaracasvisuTransferFunctionView.h
lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx
lib/GUI/Base/VolumeRenderer/volumerendererdata.h
lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx
lib/GUI/Wx/VolumeRenderer/wxMaracasMultipleVolumeRendererView.cxx
lib/Kernel/VTKObjects/SurfaceRenderer/CMakeLists.txt
lib/Kernel/VTKObjects/SurfaceRenderer/surfacerenderingimagestencilexport.cxx
lib/Kernel/VTKObjects/SurfaceRenderer/surfacerenderingimagestencilexport.h
lib/Kernel/VTKObjects/SurfaceRenderer/wxMaracasSurfaceRenderingManagerData.cxx
lib/Kernel/VTKObjects/SurfaceRenderer/wxMaracasSurfaceRenderingManagerDataMhd.cxx
lib/Kernel/VTKObjects/ViewerWidgets/imageplanewidget.cxx
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanager.cxx
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h
lib/maracasVisuLib/CMakeLists.txt
lib/maracasVisuLib/src/CutModule/interface/vtkInteractorStyleCutter.cxx
lib/maracasVisuLib/src/CutModule/interface/vtkInteractorStyleCutter.h
lib/maracasVisuLib/src/CutModule/kernel/CutModelData.cxx
lib/maracasVisuLib/src/CutModule/kernel/CutModelManager.cxx
lib/maracasVisuLib/src/CutModule/kernel/CutModelManager.h
lib/maracasVisuLib/src/CutModule/kernel/CutModelPolygon.cxx
lib/maracasVisuLib/src/CutModule/kernel/CutModelSaveBinInfo.cxx
lib/maracasVisuLib/src/interface/wxWindows/CMakeLists.txt
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx
lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasApp02.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ContourView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/LineView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/PointView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageUndoRedo.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContour3DControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModelCircle.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModelCircle.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3VContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewCircle.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewCircle.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewLine.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/BrushFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/baseFilterManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/vtkInteractorManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange2.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotter.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkmyPWCallback_3DPointWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderTabbedPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx [deleted file]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h [deleted file]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewVolCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxWidgetMesure2D_Plane.cxx
lib/maracasVisuLib/src/kernel/PlaneDirectionManagerData.cxx
lib/maracasVisuLib/src/kernel/marDicomBase.cpp
lib/maracasVisuLib/src/kernel/marDynData.cpp
lib/maracasVisuLib/src/kernel/marParameters.cpp
lib/maracasVisuLib/src/kernel/volume.cxx
lib/maracasVisuLib/src/kernel/vtkSTLExtractor.cpp

index d699297bad3e3027e489d303a08c0797c28f9f4e..c74a28ef0544b1e9dc7bf092951bee5fba59e96b 100644 (file)
@@ -52,8 +52,8 @@ ENDIF(BUILD_TESTING)
 #-----------------------------------------------------------------------------
 
 SET(PROJECT_MAJOR_VERSION 1)
-SET(PROJECT_MINOR_VERSION 1)
-SET(PROJECT_BUILD_VERSION 1)
+SET(PROJECT_MINOR_VERSION 2)
+SET(PROJECT_BUILD_VERSION 0)
 
 #==================================
 
@@ -144,6 +144,8 @@ INCLUDE_DIRECTORIES(/usr/lib/x86_64-linux-gnu/gtk-2.0/include/)
 LINK_DIRECTORIES(/usr/lib/x86_64-linux-gnu/)
 #JCP Ubuntu this file not found glibconfig.h, config of wxgtk goes wrong somewhere
 
+
+
 ADD_SUBDIRECTORY(install)
 ADD_SUBDIRECTORY(lib)
 ADD_SUBDIRECTORY(bbtk)
diff --git a/bbtk/bbs/appli/exampleBars.bbg b/bbtk/bbs/appli/exampleBars.bbg
new file mode 100644 (file)
index 0000000..3b3930a
--- /dev/null
@@ -0,0 +1,151 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleBars.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:creaMaracasVisu::ColorBar box example. 
+AUTHOR:eduardo.davila@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+wx:LayoutSplit:s
+ISEXEC:TRUE
+-61.769617:-74.306605:-900.000000
+-22.689617:-84.306605:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutSplit:ss
+ISEXEC:FALSE
+-100.000000:40.000000:-900.000000
+-56.204020:30.000000:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:s1
+ISEXEC:FALSE
+-20.767371:-17.157332:-900.000000
+36.792629:-27.157332:-900.000000
+PORT
+Orientation:"V"
+FIN_BOX
+BOX
+wx:LayoutLine:s2
+ISEXEC:FALSE
+-98.935007:-15.740026:-900.000000
+-41.375007:-25.740026:-900.000000
+PORT
+Orientation:"V"
+FIN_BOX
+BOX
+creaMaracasVisu:SliderMinMax:sliderMM_h
+ISEXEC:FALSE
+-41.534742:24.549538:-900.000000
+12.945258:14.549538:-900.000000
+PORT
+InH:"90"
+PORT
+InMax:"350"
+PORT
+InMin:"0"
+PORT
+InW:"300"
+PORT
+Orientation:"1"
+PORT
+ShowLabels:"1"
+FIN_BOX
+BOX
+creaMaracasVisu:SliderMinMax:sliderMM_v
+ISEXEC:FALSE
+-127.689828:84.008983:-900.000000
+-73.209828:74.008983:-900.000000
+PORT
+InH:"30"
+PORT
+InMax:"350"
+PORT
+InMin:"0"
+PORT
+InW:"300"
+PORT
+Orientation:"0"
+PORT
+ShowLabels:"1"
+FIN_BOX
+BOX
+creaMaracasVisu:ColorBar:colorB_h
+ISEXEC:FALSE
+-9.584941:6.084280:-900.000000
+44.895059:-3.915720:-900.000000
+PORT
+Blues:" 255 0 15 0 0 0"
+PORT
+Greens:" 0 220 220 100 240 55"
+PORT
+InH:"50"
+PORT
+InMax:"350"
+PORT
+InMin:"0"
+PORT
+InW:"300"
+PORT
+Orientation:"1"
+PORT
+Reds:" 0 255 0 255 220 30"
+PORT
+Values:" 0 30 70 130 250 310"
+FIN_BOX
+BOX
+creaMaracasVisu:ColorBar:colorB_v
+ISEXEC:FALSE
+-59.530251:80.986130:-900.000000
+-5.050251:70.986130:-900.000000
+PORT
+Blues:" 255 0 15 0 0 0"
+PORT
+Greens:" 0 220 220 100 240 55"
+PORT
+InH:"50"
+PORT
+InMax:"350"
+PORT
+InMin:"0"
+PORT
+InW:"300"
+PORT
+Orientation:"0"
+PORT
+Reds:" 0 255 0 255 220 30"
+PORT
+Values:" 0 30 70 130 250 310"
+FIN_BOX
+CONNECTIONS:7
+CONNECTION
+s1:Widget:s:Widget1
+NumberOfControlPoints:0
+CONNECTION
+s2:Widget:s:Widget2
+NumberOfControlPoints:0
+CONNECTION
+sliderMM_h:Widget:s1:Widget1
+NumberOfControlPoints:0
+CONNECTION
+colorB_h:Widget:s1:Widget2
+NumberOfControlPoints:0
+CONNECTION
+ss:Widget:s2:Widget1
+NumberOfControlPoints:0
+CONNECTION
+sliderMM_v:Widget:ss:Widget1
+NumberOfControlPoints:0
+CONNECTION
+colorB_v:Widget:ss:Widget2
+NumberOfControlPoints:0
+APP_END
index a402b752c8a8bc2e514a3323206443de6d3f7f79..4a5e033f098a8d85bb2a0ce55ff06b52c112e60a 100644 (file)
@@ -1,94 +1,86 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleBars.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wx
+include creaMaracasVisu
+
+author "eduardo.davila@creatis.insa-lyon.fr"
 description "creaMaracasVisu::ColorBar box example. "
 category "example"
-author "eduardo.davila@creatis.insa-lyon.fr"
 
-load std
-load wx
-load creaMaracasVisu
-
-new LayoutSplit s
-       set s.Orientation H
-new LayoutSplit ss
-       set ss.Orientation H
-
-new LayoutLine s1
-new LayoutLine s2
-
-set s1.Orientation V
-set ss.Orientation H
-set s2.Orientation V
-
-new SliderMinMax sliderMM_h
-set sliderMM_h.Orientation 1
-set sliderMM_h.InW 300
-set sliderMM_h.InH 90
-set sliderMM_h.InMax 350
-set sliderMM_h.InMin 0
-set sliderMM_h.ShowLabels 1
-
-new SliderMinMax sliderMM_v
-set sliderMM_v.Orientation 0
-set sliderMM_v.InW 300
-set sliderMM_v.InH 30
-set sliderMM_v.InMax 350
-set sliderMM_v.InMin 0
-set sliderMM_v.ShowLabels 1
-
-new ColorBar colorB_h
-set colorB_h.Orientation 1
-set colorB_h.InW 300
-set colorB_h.InH 50
-set colorB_h.InMax 350
-set colorB_h.InMin 0
-set colorB_h.Reds " 0 255 0 255 220 30"
-set colorB_h.Greens " 0 220 220 100 240 55"
-set colorB_h.Blues " 255 0 15 0 0 0"
-set colorB_h.Values " 0 30 70 130 250 310"
-
-
-new ColorBar colorB_v
-set colorB_v.Orientation 0
-set colorB_v.InW 300
-set colorB_v.InH 50
-set colorB_v.InMax 350
-set colorB_v.InMin 0
-set colorB_v.Reds " 0 255 0 255 220 30"
-set colorB_v.Greens " 0 220 220 100 240 55"
-set colorB_v.Blues " 255 0 15 0 0 0"
-set colorB_v.Values " 0 30 70 130 250 310"
-
-
-connect s1.Widget                              s.Widget1
-connect  s2.Widget                             s.Widget2
-connect sliderMM_h.Widget              s1.Widget1 
-connect colorB_h.Widget                        s1.Widget2 
-connect ss.Widget                              s2.Widget1 
-connect sliderMM_v.Widget              ss.Widget1 
-connect colorB_v.Widget                        ss.Widget2 
+new wx:LayoutSplit s
+  set s.Orientation "H"
+
+new wx:LayoutSplit ss
+  set ss.Orientation "H"
+
+new wx:LayoutLine s1
+  set s1.Orientation "V"
+
+new wx:LayoutLine s2
+  set s2.Orientation "V"
+
+new creaMaracasVisu:SliderMinMax sliderMM_h
+  set sliderMM_h.InH "90"
+  set sliderMM_h.InMax "350"
+  set sliderMM_h.InMin "0"
+  set sliderMM_h.InW "300"
+  set sliderMM_h.Orientation "1"
+  set sliderMM_h.ShowLabels "1"
+
+new creaMaracasVisu:SliderMinMax sliderMM_v
+  set sliderMM_v.InH "30"
+  set sliderMM_v.InMax "350"
+  set sliderMM_v.InMin "0"
+  set sliderMM_v.InW "300"
+  set sliderMM_v.Orientation "0"
+  set sliderMM_v.ShowLabels "1"
+
+new creaMaracasVisu:ColorBar colorB_h
+  set colorB_h.Blues " 255 0 15 0 0 0"
+  set colorB_h.Greens " 0 220 220 100 240 55"
+  set colorB_h.InH "50"
+  set colorB_h.InMax "350"
+  set colorB_h.InMin "0"
+  set colorB_h.InW "300"
+  set colorB_h.Orientation "1"
+  set colorB_h.Reds " 0 255 0 255 220 30"
+  set colorB_h.Values " 0 30 70 130 250 310"
+
+new creaMaracasVisu:ColorBar colorB_v
+  set colorB_v.Blues " 255 0 15 0 0 0"
+  set colorB_v.Greens " 0 220 220 100 240 55"
+  set colorB_v.InH "50"
+  set colorB_v.InMax "350"
+  set colorB_v.InMin "0"
+  set colorB_v.InW "300"
+  set colorB_v.Orientation "0"
+  set colorB_v.Reds " 0 255 0 255 220 30"
+  set colorB_v.Values " 0 30 70 130 250 310"
+
+
+connect s1.Widget s.Widget1
+
+connect s2.Widget s.Widget2
+
+connect sliderMM_h.Widget s1.Widget1
+
+connect colorB_h.Widget s1.Widget2
+
+connect ss.Widget s2.Widget1
+
+connect sliderMM_v.Widget ss.Widget1
+
+connect colorB_v.Widget ss.Widget2
+
+
 
+# Complex input ports
 exec s
index 79cfb1891785b901da7352d7156ee61a4c41d02c..1b3590f091ada40cf4ce3ca1cb4cb2d95d486ed8 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg
 # ----------------------------------
 
 APP_START
@@ -13,26 +13,28 @@ BOXES:5
 BOX
 creaMaracasVisu:ContourControlPoints_Widget:Box00
 ISEXEC:FALSE
--113.173864:13.069948:-900.000000
--41.998864:3.069948:-900.000000
+-72.595496:17.578656:-900.000000
+-18.145496:7.578656:-900.000000
 FIN_BOX
 BOX
 vtk:LoadHola:Box01
 ISEXEC:FALSE
 -37.427577:74.558110:-900.000000
-8.147423:64.558110:-900.000000
+-1.877577:64.558110:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:ViewerNV:Box02
 ISEXEC:FALSE
 -52.873879:47.230038:-900.000000
-7.766121:37.230038:-900.000000
+10.846121:37.230038:-900.000000
+PORT
+nTypeView:"0"
 FIN_BOX
 BOX
 wx:LayoutSplit:Box03
 ISEXEC:TRUE
--55.547277:-20.199010:-900.000000
--9.972277:-30.199010:-900.000000
+-22.483422:-16.592044:-900.000000
+16.596578:-26.592044:-900.000000
 PORT
 Orientation:"H"
 FIN_BOX
@@ -40,16 +42,13 @@ BOX
 std:MagicBox:Box04
 ISEXEC:TRUE
 -108.718200:-16.931523:-900.000000
--63.143200:-26.931523:-900.000000
+-72.643200:-26.931523:-900.000000
 FIN_BOX
 CONNECTIONS:5
 CONNECTION
 Box01:Out:Box02:In
 NumberOfControlPoints:0
 CONNECTION
-Box02:wxVtkBaseView4:Box00:wxvtkbaseview
-NumberOfControlPoints:0
-CONNECTION
 Box00:Widget_Contour:Box03:Widget1
 NumberOfControlPoints:0
 CONNECTION
@@ -58,4 +57,7 @@ NumberOfControlPoints:0
 CONNECTION
 Box00:BoxChange2:Box04:In
 NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView1:Box00:wxvtkbaseview
+NumberOfControlPoints:0
 APP_END
index e66b3b42dac471fc140e706f29312142122cd266..d5e6af99d395c055b27ea8bf5fd7caa6e323cdb8 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script
-# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs
 # ----------------------------------
 
 # BBTK GEditor Script
@@ -17,28 +17,29 @@ author "Author ??"
 description "Description ??"
 category "<VOID>"
 
-new ContourControlPoints_Widget Box00
+new creaMaracasVisu:ContourControlPoints_Widget Box00
 
-new LoadHola Box01
+new vtk:LoadHola Box01
 
-new ViewerNV Box02
+new creaMaracasVisu:ViewerNV Box02
+  set Box02.nTypeView "0"
 
-new LayoutSplit Box03
+new wx:LayoutSplit Box03
   set Box03.Orientation "H"
 
-new MagicBox Box04
+new std:MagicBox Box04
 
 
 connect Box01.Out Box02.In
 
-connect Box02.wxVtkBaseView4 Box00.wxvtkbaseview
-
 connect Box00.Widget_Contour Box03.Widget1
 
 connect Box02.Widget Box03.Widget2
 
 connect Box00.BoxChange2 Box04.In
 
+connect Box02.wxVtkBaseView1 Box00.wxvtkbaseview
+
 
 
 # Complex input ports
diff --git a/bbtk/bbs/appli/exampleCutModule.bbg b/bbtk/bbs/appli/exampleCutModule.bbg
new file mode 100644 (file)
index 0000000..152161f
--- /dev/null
@@ -0,0 +1,105 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Cutter.. application that helps to clean the image
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+36.250000:60.000000:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:view1
+ISEXEC:FALSE
+-89.230154:33.720365:-900.000000
+-25.510154:23.720365:-900.000000
+PORT
+nTypeView:"6"
+FIN_BOX
+BOX
+creaMaracasVisu:CutModule:cut
+ISEXEC:FALSE
+-8.425873:1.603538:-900.000000
+27.574127:-8.396462:-900.000000
+PORT
+BoxExecute:"1"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:view2
+ISEXEC:FALSE
+-71.799075:-21.894050:-900.000000
+-8.079075:-31.894050:-900.000000
+PORT
+nTypeView:"6"
+FIN_BOX
+BOX
+wx:LayoutLine:layoutline1
+ISEXEC:FALSE
+-94.983439:-90.878949:-900.000000
+-37.423439:-100.878949:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:laytab
+ISEXEC:FALSE
+-88.351604:-61.749353:-900.000000
+-30.791604:-71.749353:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:layoutline2
+ISEXEC:FALSE
+0.000000:-110.000000:-900.000000
+57.560000:-120.000000:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:layoutsplit
+ISEXEC:TRUE
+-100.000000:-140.000000:-900.000000
+-59.325000:-150.000000:-900.000000
+PORT
+Orientation:"H"
+PORT
+Proportion:"80"
+FIN_BOX
+CONNECTIONS:11
+CONNECTION
+reader:Out:view1:In
+NumberOfControlPoints:0
+CONNECTION
+view1:Interactor1:cut:Interactor
+NumberOfControlPoints:0
+CONNECTION
+view1:Renderer1:cut:Renderer
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:cut:In
+NumberOfControlPoints:0
+CONNECTION
+cut:Out:view2:In
+NumberOfControlPoints:0
+CONNECTION
+laytab:Widget:layoutline1:Widget1
+NumberOfControlPoints:0
+CONNECTION
+view1:Widget:laytab:Widget1
+NumberOfControlPoints:0
+CONNECTION
+view2:Widget:laytab:Widget2
+NumberOfControlPoints:0
+CONNECTION
+cut:Widget:layoutline2:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layoutline1:Widget:layoutsplit:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layoutline2:Widget:layoutsplit:Widget2
+NumberOfControlPoints:0
+APP_END
index 64228484c705b7d3ab57a01c3689235fce763d3d..cfff773623c2d39abfe19ff554604242f32c94d9 100644 (file)
@@ -1,81 +1,66 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include wx
 
-description "Cutter.. application that helps to clean the image"
 author "info-dev@creatis.insa-lyon.fr"
+description "Cutter.. application that helps to clean the image"
 category "example"
 
+new vtk:LoadHola reader
 
-include vtk/boxes/bbLoadHola
-load vtk
-load wxvtk
-load creaMaracasVisu
-load std
-load wx
-
-new LoadHola reader
-
-#new FileSelector openFileDialog
- # set openFileDialog.Wildcard  "(*.mhd)|*.mhd"
-#new MetaImageReader reader1
-#   connect openFileDialog.Out reader1.In
-#new ImageCastToUShort image
-#      connect reader1.Out image.In    
-
-new ViewerNV view1
-       set view1.nTypeView "6"
-       connect reader.Out view1.In
-       
-new CutModule cut
-       connect view1.Interactor1 cut.Interactor
-       connect view1.Renderer1 cut.Renderer
-       connect reader.Out cut.In
-       
-new ViewerNV view2
-       set view2.nTypeView "6"
-       connect cut.Out view2.In
-
-#connect view1.BoxChange cut.BoxExecute
-       
-
-new LayoutLine layoutline1     
-       new LayoutTab laytab
-       connect laytab.Widget layoutline1.Widget1       
-               connect view1.Widget laytab.Widget1
-               connect view2.Widget laytab.Widget2
-       
-new LayoutLine layoutline2     
-       connect cut.Widget layoutline2.Widget1  
-       
-new LayoutSplit layoutsplit
-       set layoutsplit.Orientation H
-       set layoutsplit.Proportion 80
-       connect layoutline1.Widget layoutsplit.Widget1 
-       connect layoutline2.Widget layoutsplit.Widget2
-       
-exec layoutsplit
+new creaMaracasVisu:ViewerNV view1
+  set view1.nTypeView "6"
+
+new creaMaracasVisu:CutModule cut
+  set cut.BoxExecute "1"
+
+new creaMaracasVisu:ViewerNV view2
+  set view2.nTypeView "6"
+
+new wx:LayoutLine layoutline1
+
+new wx:LayoutTab laytab
+
+new wx:LayoutLine layoutline2
+
+new wx:LayoutSplit layoutsplit
+  set layoutsplit.Orientation "H"
+  set layoutsplit.Proportion "80"
+
+
+connect reader.Out view1.In
 
-set cut.BoxExecute 1
-exec cut
+connect view1.Interactor1 cut.Interactor
+
+connect view1.Renderer1 cut.Renderer
+
+connect reader.Out cut.In
+
+connect cut.Out view2.In
+
+connect laytab.Widget layoutline1.Widget1
+
+connect view1.Widget laytab.Widget1
+
+connect view2.Widget laytab.Widget2
+
+connect cut.Widget layoutline2.Widget1
+
+connect layoutline1.Widget layoutsplit.Widget1
+
+connect layoutline2.Widget layoutsplit.Widget2
+
+
+
+# Complex input ports
+exec layoutsplit
diff --git a/bbtk/bbs/appli/exampleCutModule2.bbg b/bbtk/bbs/appli/exampleCutModule2.bbg
new file mode 100644 (file)
index 0000000..cef1fdf
--- /dev/null
@@ -0,0 +1,172 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule2.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:13
+BOX
+wx:FileSelector:filselect0
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+39.975000:60.000000:-900.000000
+PORT
+Message:"Select image"
+PORT
+Wildcard:"*.mhd"
+FIN_BOX
+BOX
+vtk:MetaImageReader:gimm
+ISEXEC:FALSE
+-100.000000:40.000000:-900.000000
+-55.325000:30.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImageCastToUShort:image
+ISEXEC:FALSE
+0.000000:10.000000:-900.000000
+45.675000:0.000000:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:VolumeRendering:volrend
+ISEXEC:FALSE
+-48.033456:-80.465195:-900.000000
+-2.808456:-90.465195:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:SurfaceRendering:surrend
+ISEXEC:FALSE
+10.539740:-71.364337:-900.000000
+58.859740:-81.364337:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:view1
+ISEXEC:FALSE
+-100.000000:-80.000000:-900.000000
+-64.125000:-90.000000:-900.000000
+PORT
+nTypeView:"6"
+FIN_BOX
+BOX
+creaMaracasVisu:CutModule2:cut
+ISEXEC:FALSE
+-88.021070:-141.334361:-900.000000
+-52.021070:-151.334361:-900.000000
+PORT
+BoxExecute:"1"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:view2
+ISEXEC:FALSE
+5.967113:-27.766014:-900.000000
+69.687113:-37.766014:-900.000000
+PORT
+nTypeView:"6"
+FIN_BOX
+BOX
+wx:LayoutSplit:layoutsplit1
+ISEXEC:FALSE
+0.000000:-170.000000:-900.000000
+41.775000:-180.000000:-900.000000
+PORT
+Orientation:"V"
+FIN_BOX
+BOX
+wx:LayoutSplit:layoutsplit2
+ISEXEC:FALSE
+17.931142:-200.854573:-900.000000
+59.706142:-210.854573:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutTab:laytab
+ISEXEC:FALSE
+52.128983:-169.610140:-900.000000
+109.688983:-179.610140:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:layoutline1
+ISEXEC:FALSE
+-84.047961:-198.470708:-900.000000
+-26.487961:-208.470708:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:layoutsplit3
+ISEXEC:TRUE
+-15.952039:-244.422747:-900.000000
+25.822961:-254.422747:-900.000000
+PORT
+Orientation:"H"
+PORT
+Proportion:"80"
+PORT
+WinTitle:"Cutting Tool"
+FIN_BOX
+CONNECTIONS:20
+CONNECTION
+filselect0:Out:gimm:In
+NumberOfControlPoints:0
+CONNECTION
+gimm:Out:image:In
+NumberOfControlPoints:0
+CONNECTION
+image:Out:volrend:In1
+NumberOfControlPoints:0
+CONNECTION
+gimm:Out:view1:In
+NumberOfControlPoints:0
+CONNECTION
+view1:Interactor1:cut:Interactor
+NumberOfControlPoints:0
+CONNECTION
+view1:Renderer1:cut:Renderer
+NumberOfControlPoints:0
+CONNECTION
+image:Out:cut:In
+NumberOfControlPoints:0
+CONNECTION
+image:Out:view2:In
+NumberOfControlPoints:0
+CONNECTION
+view1:BoxChange:cut:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+volrend:Widget:layoutsplit1:Widget1
+NumberOfControlPoints:0
+CONNECTION
+surrend:Widget:layoutsplit1:Widget2
+NumberOfControlPoints:0
+CONNECTION
+layoutsplit1:Widget:layoutsplit2:Widget1
+NumberOfControlPoints:0
+CONNECTION
+laytab:Widget:layoutsplit2:Widget2
+NumberOfControlPoints:0
+CONNECTION
+view1:Widget:laytab:Widget2
+NumberOfControlPoints:0
+CONNECTION
+view2:Widget:laytab:Widget1
+NumberOfControlPoints:0
+CONNECTION
+cut:Widget:layoutline1:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layoutline1:Widget:layoutsplit3:Widget2
+NumberOfControlPoints:0
+CONNECTION
+layoutsplit2:Widget:layoutsplit3:Widget1
+NumberOfControlPoints:0
+CONNECTION
+view2:Renderer1:volrend:Renderer
+NumberOfControlPoints:0
+CONNECTION
+view2:Renderer1:surrend:Renderer
+NumberOfControlPoints:0
+APP_END
index 25485edad906b62c9e0c94082ebfaf58743aaae3..6fa9ab103aa222168b86aa047696791e6137377d 100644 (file)
@@ -1,98 +1,99 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
-
-load vtk
-load wxvtk
-load creaMaracasVisu
-load std
-load wx
-
-new FileSelector filselect0
-       set filselect0.Message "Select image"
-       set filselect0.Wildcard "*.mhd"
-       #set filselect0.DefaultDir "C:\Creatis\creaAppli\Data\Images"           
-new MetaImageReader gimm       
-                       connect filselect0.Out gimm.In
-new ImageCastToUShort image
-       connect gimm.Out image.In       
-
-new VolumeRendering volrend
-                connect image.Out volrend.In1
-new SurfaceRendering surrend   
-              # connect image.Out surrend.In0
-
-new ViewerNV view1
-set view1.nTypeView 6
-                connect gimm.Out view1.In
-       
-new CutModule2 cut
-       connect view1.Interactor1 cut.Interactor
-       connect view1.Renderer1 cut.Renderer
-       connect image.Out cut.In
-       
-new ViewerNV view2
-       set view2.nTypeView 6
-       connect image.Out view2.In
-
-connect view1.BoxChange cut.BoxExecute 
-
-new LayoutSplit layoutsplit1
-                set layoutsplit1.Orientation V
-                connect volrend.Widget layoutsplit1.Widget1
-                connect surrend.Widget layoutsplit1.Widget2
-
-                new LayoutSplit layoutsplit2
-                                       set layoutsplit2.Orientation H
-                                connect layoutsplit1.Widget layoutsplit2.Widget1
-                                #connect view1.Widget layoutsplit2.Widget2
-
-                new LayoutTab laytab
-                                connect laytab.Widget layoutsplit2.Widget2 
-                                connect view1.Widget laytab.Widget2
-                       connect view2.Widget laytab.Widget1   
-
-new LayoutLine layoutline1     
-       connect cut.Widget layoutline1.Widget1  
-       
-new LayoutSplit layoutsplit3
-       set layoutsplit3.Orientation H
-       set layoutsplit3.Proportion 80
-                set layoutsplit3.WinTitle "Cutting Tool"
-       connect layoutline1.Widget layoutsplit3.Widget2 
-       connect layoutsplit2.Widget layoutsplit3.Widget1
-       
-exec layoutsplit3
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule2.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wx
+include vtk
+include creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new wx:FileSelector filselect0
+  set filselect0.Message "Select image"
+  set filselect0.Wildcard "*.mhd"
+
+new vtk:MetaImageReader gimm
+
+new vtk:ImageCastToUShort image
+
+new creaMaracasVisu:VolumeRendering volrend
+
+new creaMaracasVisu:SurfaceRendering surrend
+
+new creaMaracasVisu:ViewerNV view1
+  set view1.nTypeView "6"
+
+new creaMaracasVisu:CutModule2 cut
+  set cut.BoxExecute "1"
+
+new creaMaracasVisu:ViewerNV view2
+  set view2.nTypeView "6"
+
+new wx:LayoutSplit layoutsplit1
+  set layoutsplit1.Orientation "V"
+
+new wx:LayoutSplit layoutsplit2
+  set layoutsplit2.Orientation "H"
+
+new wx:LayoutTab laytab
+
+new wx:LayoutLine layoutline1
+
+new wx:LayoutSplit layoutsplit3
+  set layoutsplit3.Orientation "H"
+  set layoutsplit3.Proportion "80"
+  set layoutsplit3.WinTitle "Cutting Tool"
+
+
+connect filselect0.Out gimm.In
 
-set cut.BoxExecute 1
-exec cut
+connect gimm.Out image.In
+
+connect image.Out volrend.In1
+
+connect gimm.Out view1.In
+
+connect view1.Interactor1 cut.Interactor
+
+connect view1.Renderer1 cut.Renderer
+
+connect image.Out cut.In
+
+connect image.Out view2.In
+
+connect view1.BoxChange cut.BoxExecute
+
+connect volrend.Widget layoutsplit1.Widget1
+
+connect surrend.Widget layoutsplit1.Widget2
+
+connect layoutsplit1.Widget layoutsplit2.Widget1
+
+connect laytab.Widget layoutsplit2.Widget2
+
+connect view1.Widget laytab.Widget2
+
+connect view2.Widget laytab.Widget1
+
+connect cut.Widget layoutline1.Widget1
+
+connect layoutline1.Widget layoutsplit3.Widget2
+
+connect layoutsplit2.Widget layoutsplit3.Widget1
 
 connect view2.Renderer1 volrend.Renderer
+
 connect view2.Renderer1 surrend.Renderer
 
-exec volrend
-exec surrend
 
-#connect cut.BoxChange volrend.BoxExecute
-#connect cut.BoxChange volrend.BoxExecute
\ No newline at end of file
+
+# Complex input ports
+exec layoutsplit3
diff --git a/bbtk/bbs/appli/exampleGaussianSmooth.bbg b/bbtk/bbs/appli/exampleGaussianSmooth.bbg
new file mode 100644 (file)
index 0000000..265988b
--- /dev/null
@@ -0,0 +1,213 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleGaussianSmooth.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:creaMaracasVisu::ImageGaussianSmooth box example. 
+AUTHOR:eduardo.davila@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:16
+BOX
+vtk:MetaImageReader:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+45.375000:60.000000:-900.000000
+FIN_BOX
+BOX
+std:PrependPackageDataPath:prependDatapath
+ISEXEC:FALSE
+-11.011355:95.088209:-900.000000
+52.863645:85.088209:-900.000000
+PORT
+In:"vtk/hola.mhd"
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+-83.338572:-22.487918:-900.000000
+-31.938572:-32.487918:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2DImageOriginal
+ISEXEC:FALSE
+91.631632:-110.401163:-900.000000
+144.231632:-120.401163:-900.000000
+FIN_BOX
+BOX
+itk:BinaryThresholdImageFilter:threshold
+ISEXEC:FALSE
+-18.127317:-16.805823:-900.000000
+37.122683:-26.805823:-900.000000
+PORT
+InsideValue:"255"
+PORT
+LowerThreshold:"2000"
+PORT
+OutsideValue:"0"
+PORT
+UpperThreshold:"5000"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2DImageSegmented
+ISEXEC:FALSE
+-48.678506:-77.410383:-900.000000
+7.521494:-87.410383:-900.000000
+FIN_BOX
+BOX
+vtk:ImageGaussianSmooth:smooth
+ISEXEC:FALSE
+0.000000:-110.000000:-900.000000
+50.200000:-120.000000:-900.000000
+PORT
+StdDevX:"1"
+PORT
+StdDevY:"1"
+PORT
+StdDevZ:"1"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2DImageSmooth
+ISEXEC:FALSE
+-117.891897:-134.114508:-900.000000
+-65.616897:-144.114508:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:upLayout
+ISEXEC:FALSE
+30.133721:-194.012809:-900.000000
+87.693721:-204.012809:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewernvImagethreshold3D
+ISEXEC:FALSE
+-115.773120:-240.256768:-900.000000
+-52.053120:-250.256768:-900.000000
+FIN_BOX
+BOX
+vtk:IsoSurfaceExtractor:isoextractorthreshold
+ISEXEC:FALSE
+-72.980106:-269.550509:-900.000000
+-13.605106:-279.550509:-900.000000
+PORT
+Isovalue:"128"
+PORT
+Opacity:"1"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewernvImageSmooth3D
+ISEXEC:FALSE
+75.623093:-232.691315:-900.000000
+139.343093:-242.691315:-900.000000
+FIN_BOX
+BOX
+vtk:IsoSurfaceExtractor:isoextractorsmooth
+ISEXEC:FALSE
+45.200582:-284.585347:-900.000000
+102.800582:-294.585347:-900.000000
+PORT
+Isovalue:"128"
+PORT
+Opacity:"1"
+FIN_BOX
+BOX
+wx:LayoutLine:downLayout
+ISEXEC:FALSE
+-100.000000:-320.000000:-900.000000
+-42.440000:-330.000000:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutSplit:splitUp
+ISEXEC:FALSE
+0.000000:-350.000000:-900.000000
+39.080000:-360.000000:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:mainSplit
+ISEXEC:TRUE
+-100.000000:-380.000000:-900.000000
+-60.111566:-390.000000:-900.000000
+FIN_BOX
+CONNECTIONS:25
+CONNECTION
+prependDatapath:Out:reader:In
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:viewer2DImageOriginal:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2DImageOriginal:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2DImageOriginal:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:threshold:In
+NumberOfControlPoints:0
+CONNECTION
+threshold:Out:viewer2DImageSegmented:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2DImageSegmented:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2DImageSegmented:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+threshold:Out:smooth:In
+NumberOfControlPoints:0
+CONNECTION
+smooth:Out:viewer2DImageSmooth:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2DImageSmooth:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2DImageSmooth:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer2DImageOriginal:Widget:upLayout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+viewer2DImageSegmented:Widget:upLayout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+viewer2DImageSmooth:Widget:upLayout:Widget3
+NumberOfControlPoints:0
+CONNECTION
+threshold:Out:isoextractorthreshold:In
+NumberOfControlPoints:0
+CONNECTION
+viewernvImagethreshold3D:Renderer:isoextractorthreshold:Renderer
+NumberOfControlPoints:0
+CONNECTION
+smooth:Out:isoextractorsmooth:In
+NumberOfControlPoints:0
+CONNECTION
+viewernvImageSmooth3D:Renderer:isoextractorsmooth:Renderer
+NumberOfControlPoints:0
+CONNECTION
+viewernvImagethreshold3D:Widget:downLayout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+viewernvImageSmooth3D:Widget:downLayout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:splitUp:Widget1
+NumberOfControlPoints:0
+CONNECTION
+upLayout:Widget:splitUp:Widget2
+NumberOfControlPoints:0
+CONNECTION
+splitUp:Widget:mainSplit:Widget1
+NumberOfControlPoints:0
+CONNECTION
+downLayout:Widget:mainSplit:Widget2
+NumberOfControlPoints:0
+APP_END
index 9d79d4d3dfcbcbb4b96318525e0bf0cb71dcafec..4d563773aec520a991b032b22e6d3b63633fcead 100644 (file)
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleGaussianSmooth.bbs
+# ----------------------------------
 
-description "creaMaracasVisu::ImageGaussianSmooth box example. "
-category "example"
-author "eduardo.davila@creatis.insa-lyon.fr"
+# BBTK GEditor Script
+# ----------------------
 
 include std
+include itkvtk
 include vtk
+include std
 include wx
-include itk
-include itkvtk
 include wxvtk
+include itk
+
+author "eduardo.davila@creatis.insa-lyon.fr"
+description "creaMaracasVisu::ImageGaussianSmooth box example. "
+category "example"
+
+new vtk:MetaImageReader reader
+
+new std:PrependPackageDataPath prependDatapath
+  set prependDatapath.In "vtk/hola.mhd"
+
+new wx:Slider slider
+
+new wxvtk:Viewer2D viewer2DImageOriginal
+
+new itk:BinaryThresholdImageFilter threshold
+  set threshold.InsideValue "255"
+  set threshold.LowerThreshold "2000"
+  set threshold.OutsideValue "0"
+  set threshold.UpperThreshold "5000"
+
+new wxvtk:Viewer2D viewer2DImageSegmented
+
+new vtk:ImageGaussianSmooth smooth
+  set smooth.StdDevX "1"
+  set smooth.StdDevY "1"
+  set smooth.StdDevZ "1"
+
+new wxvtk:Viewer2D viewer2DImageSmooth
+
+new wx:LayoutLine upLayout
+  set upLayout.Orientation "H"
+
+new wxvtk:Viewer3D viewernvImagethreshold3D
+
+new vtk:IsoSurfaceExtractor isoextractorthreshold
+  set isoextractorthreshold.Isovalue "128"
+  set isoextractorthreshold.Opacity "1"
+
+new wxvtk:Viewer3D viewernvImageSmooth3D
+
+new vtk:IsoSurfaceExtractor isoextractorsmooth
+  set isoextractorsmooth.Isovalue "128"
+  set isoextractorsmooth.Opacity "1"
+
+new wx:LayoutLine downLayout
+  set downLayout.Orientation "H"
+
+new wx:LayoutSplit splitUp
+
+new wx:LayoutSplit mainSplit
+
+
+connect prependDatapath.Out reader.In
+
+connect reader.Out viewer2DImageOriginal.In
 
-new MetaImageReader reader 
-include  std/boxes/bbPrependPackageDataPath.bbs 
-new PrependPackageDataPath prependDatapath 
-  set prependDatapath.In "vtk/hola.mhd" 
-  connect prependDatapath.Out reader.In 
+connect slider.Out viewer2DImageOriginal.Slice
 
-#---------------------------------------------------------------------
+connect slider.BoxChange viewer2DImageOriginal.BoxExecute
 
-new Slider slider
+connect reader.Out threshold.In
 
-#---------------------------------------------------------------------
+connect threshold.Out viewer2DImageSegmented.In
 
-new Viewer2D viewer2DImageOriginal
-  connect reader.Out                   viewer2DImageOriginal.In
-  connect slider.Out                   viewer2DImageOriginal.Slice
-  connect slider.BoxChange     viewer2DImageOriginal.BoxExecute
-    
-#---------------------------------------------------------------------
+connect slider.Out viewer2DImageSegmented.Slice
 
-new BinaryThresholdImageFilter threshold
-  set threshold.LowerThreshold 2000
-  set threshold.UpperThreshold 5000
-  set threshold.InsideValue 255
-  set threshold.OutsideValue 0
-  connect reader.Out threshold.In
+connect slider.BoxChange viewer2DImageSegmented.BoxExecute
 
-new Viewer2D viewer2DImageSegmented
-  connect threshold.Out                viewer2DImageSegmented.In
-  connect slider.Out                   viewer2DImageSegmented.Slice
-  connect slider.BoxChange     viewer2DImageSegmented.BoxExecute
+connect threshold.Out smooth.In
 
-#---------------------------------------------------------------------
+connect smooth.Out viewer2DImageSmooth.In
 
-new ImageGaussianSmooth smooth
-  connect threshold.Out smooth.In
-  set smooth.StdDevX  1
-  set smooth.StdDevY  1
-  set smooth.StdDevZ  1
+connect slider.Out viewer2DImageSmooth.Slice
 
-new Viewer2D viewer2DImageSmooth
-  connect smooth.Out           viewer2DImageSmooth.In
-  connect slider.Out                   viewer2DImageSmooth.Slice
-  connect slider.BoxChange     viewer2DImageSmooth.BoxExecute
+connect slider.BoxChange viewer2DImageSmooth.BoxExecute
 
-#---------------------------------------------------------------------
+connect viewer2DImageOriginal.Widget upLayout.Widget1
 
-new LayoutLine upLayout
-  set upLayout.Orientation H
-  connect viewer2DImageOriginal.Widget                 upLayout.Widget1
-  connect viewer2DImageSegmented.Widget                upLayout.Widget2
-  connect viewer2DImageSmooth.Widget           upLayout.Widget3
+connect viewer2DImageSegmented.Widget upLayout.Widget2
 
+connect viewer2DImageSmooth.Widget upLayout.Widget3
 
-#---------------------------------------------------------------------
+connect threshold.Out isoextractorthreshold.In
 
-new Viewer3D  viewernvImagethreshold3D
-#  set viewernvImagethreshold3D.nTypeView "5" 
+connect viewernvImagethreshold3D.Renderer isoextractorthreshold.Renderer
 
-new IsoSurfaceExtractor  isoextractorthreshold
-  connect threshold.Out isoextractorthreshold.In
-  set isoextractorthreshold.Opacity 1
-  set isoextractorthreshold.Isovalue 128
-  connect viewernvImagethreshold3D.Renderer            isoextractorthreshold.Renderer
+connect smooth.Out isoextractorsmooth.In
 
+connect viewernvImageSmooth3D.Renderer isoextractorsmooth.Renderer
 
-#---------------------------------------------------------------------
-new Viewer3D  viewernvImageSmooth3D
-#  set viewernvImageSmooth3D.nTypeView "5" 
+connect viewernvImagethreshold3D.Widget downLayout.Widget1
 
-new IsoSurfaceExtractor  isoextractorsmooth
-  connect smooth.Out isoextractorsmooth.In
-  set isoextractorsmooth.Opacity 1
-  set isoextractorsmooth.Isovalue 128
-  connect viewernvImageSmooth3D.Renderer               isoextractorsmooth.Renderer
+connect viewernvImageSmooth3D.Widget downLayout.Widget2
 
+connect slider.Widget splitUp.Widget1
 
-#---------------------------------------------------------------------
+connect upLayout.Widget splitUp.Widget2
 
-new LayoutLine downLayout
- set downLayout.Orientation H
-  connect viewernvImagethreshold3D.Widget              downLayout.Widget1
-  connect viewernvImageSmooth3D.Widget         downLayout.Widget2
+connect splitUp.Widget mainSplit.Widget1
 
-#---------------------------------------------------------------------
-new LayoutSplit splitUp
-  connect slider.Widget                splitUp.Widget1
-  connect upLayout.Widget              splitUp.Widget2
+connect downLayout.Widget mainSplit.Widget2
 
-new LayoutSplit mainSplit
-  connect splitUp.Widget               mainSplit.Widget1
-  connect downLayout.Widget    mainSplit.Widget2
 
-#---------------------------------------------------------------------
 
-exec isoextractorthreshold
-exec isoextractorsmooth
+# Complex input ports
 exec mainSplit
diff --git a/bbtk/bbs/appli/exampleHistogramView.bbg b/bbtk/bbs/appli/exampleHistogramView.bbg
new file mode 100644 (file)
index 0000000..06df981
--- /dev/null
@@ -0,0 +1,40 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleHistogramView.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:creaMaracasVisu::HistogramView box example. 
+AUTHOR:eduardo.davila@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:MetaImageReader:reader
+ISEXEC:FALSE
+-32.252498:44.574673:-900.000000
+13.122502:34.574673:-900.000000
+FIN_BOX
+BOX
+std:PrependPackageDataPath:prependDatapath
+ISEXEC:FALSE
+-46.088890:84.729742:-900.000000
+17.786110:74.729742:-900.000000
+PORT
+In:"vtk/hola.mhd"
+FIN_BOX
+BOX
+creaMaracasVisu:HistogramView:histogramview
+ISEXEC:TRUE
+-29.427462:2.937409:-900.000000
+19.672538:-7.062591:-900.000000
+FIN_BOX
+CONNECTIONS:2
+CONNECTION
+prependDatapath:Out:reader:In
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:histogramview:In
+NumberOfControlPoints:0
+APP_END
index 164b04551264f44c54b7f60637271f598608428c..c112884d37bdd9a2d52555a00b5878b78335fa7b 100644 (file)
@@ -1,47 +1,34 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleHistogramView.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include std
+include creaMaracasVisu
+
+author "eduardo.davila@creatis.insa-lyon.fr"
 description "creaMaracasVisu::HistogramView box example. "
 category "example"
-author "eduardo.davila@creatis.insa-lyon.fr"
 
+new vtk:MetaImageReader reader
 
+new std:PrependPackageDataPath prependDatapath
+  set prependDatapath.In "vtk/hola.mhd"
 
-load wx
-load std
-load creaMaracasVisu
-load vtk
+new creaMaracasVisu:HistogramView histogramview
 
-new MetaImageReader reader
-include  std/boxes/bbPrependPackageDataPath.bbs
-new PrependPackageDataPath prependDatapath
-  set prependDatapath.In "vtk/hola.mhd"
-  connect prependDatapath.Out reader.In
 
-new HistogramView histogramview
+connect prependDatapath.Out reader.In
 
-print $prependDatapath.Out$\n
 connect reader.Out histogramview.In
+
+
+
+# Complex input ports
 exec histogramview
index 5c72c2aea705d010a02bf4c5f9c4bb562146a95e..33ab8f2bc318cfbe3365e0fd6c5a40b28c28d924 100644 (file)
@@ -48,7 +48,7 @@ ISEXEC:TRUE
 -48.256510:-25.995767:-900.000000
 -2.681510:-35.995767:-900.000000
 FIN_BOX
-CONNECTIONS:7
+CONNECTIONS:6
 CONNECTION
 Box00:Out:Box01:In
 NumberOfControlPoints:0
@@ -62,9 +62,6 @@ CONNECTION
 Box01:wxVtkBaseView4:Box08:wxvtkbaseview
 NumberOfControlPoints:0
 CONNECTION
-Box01:Renderer4:Box08:vtkRenderer
-NumberOfControlPoints:0
-CONNECTION
 Box08:BoxChange2:Box09:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
index 1379228e51fb9d2b0908ec051f43aeeb46551ade..1bd7647cbcd0e2aa6fc134f733deabb3897f66be 100644 (file)
@@ -39,7 +39,7 @@ connect Box01.Widget Box05.Widget2
 
 connect Box01.wxVtkBaseView4 Box08.wxvtkbaseview
 
-connect Box01.Renderer4 Box08.vtkRenderer
+#connect Box01.Renderer4 Box08.vtkRenderer
 
 connect Box08.BoxChange2 Box09.BoxExecute
 
index 91749a33bdd040161360040ed961bd304c1cc87a..2ba70e25980b5764a81bf6dbed3ae754c99ecfae 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbg
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbg
 # ----------------------------------
 
 APP_START
@@ -14,25 +14,25 @@ BOX
 creaMaracasVisu:ShowNPoints:Box00
 ISEXEC:FALSE
 -39.494457:11.050643:-900.000000
-8.825543:1.050643:-900.000000
+21.145543:1.050643:-900.000000
 FIN_BOX
 BOX
 vtk:LoadHola:Box01
 ISEXEC:FALSE
-9.258012:83.442946:-900.000000
-54.833012:73.442946:-900.000000
+58.553215:97.570230:-900.000000
+94.103215:87.570230:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:ViewerNV:Box02
 ISEXEC:FALSE
 20.955874:40.973496:-900.000000
-81.595874:30.973496:-900.000000
+84.675874:30.973496:-900.000000
 FIN_BOX
 BOX
 wx:LayoutSplit:Box03
 ISEXEC:TRUE
 13.204164:-71.936977:-900.000000
-58.779164:-81.936977:-900.000000
+52.284164:-81.936977:-900.000000
 PORT
 Orientation:"H"
 FIN_BOX
@@ -40,7 +40,7 @@ BOX
 creaMaracasVisu:ManualContourModel_Box:Box04
 ISEXEC:FALSE
 -49.983835:-14.091828:-900.000000
-21.191165:-24.091828:-900.000000
+2.116165:-24.091828:-900.000000
 PORT
 OpenClose:"false"
 FIN_BOX
@@ -48,7 +48,7 @@ BOX
 creaMaracasVisu:DrawAxe3D:Box05
 ISEXEC:FALSE
 -52.874467:-40.107511:-900.000000
--7.299467:-50.107511:-900.000000
+-15.174467:-50.107511:-900.000000
 PORT
 Colour:"1 1 0"
 FIN_BOX
@@ -56,19 +56,19 @@ BOX
 vtk:Transform:Box06
 ISEXEC:FALSE
 -57.714085:25.260177:-900.000000
--12.139085:15.260177:-900.000000
+-22.139085:15.260177:-900.000000
 FIN_BOX
 BOX
 vtk:ImageVtkProperties:Box07
 ISEXEC:FALSE
 -40.107511:44.925230:-900.000000
-5.467489:34.925230:-900.000000
+5.242489:34.925230:-900.000000
 FIN_BOX
 BOX
 vtk:UpdateRender:Box08
 ISEXEC:FALSE
 -36.735108:-55.042440:-900.000000
-8.839892:-65.042440:-900.000000
+3.589892:-65.042440:-900.000000
 PORT
 Active:"true"
 FIN_BOX
@@ -76,19 +76,19 @@ BOX
 vtk:vtkImageDataPointerRelay:Box09
 ISEXEC:FALSE
 -6.137882:66.826620:-900.000000
-65.037118:56.826620:-900.000000
+46.037118:56.826620:-900.000000
 FIN_BOX
 BOX
 creaImageIO:ImagesChooserDialogBox:Box10
 ISEXEC:FALSE
--43.926443:95.650480:-900.000000
-27.248557:85.650480:-900.000000
+-22.885808:101.962671:-900.000000
+28.589192:91.962671:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:ImageChangeInformation:Box11
 ISEXEC:FALSE
 -48.435663:82.829799:-900.000000
-22.739337:72.829799:-900.000000
+3.089337:72.829799:-900.000000
 FIN_BOX
 CONNECTIONS:22
 CONNECTION
@@ -152,9 +152,9 @@ CONNECTION
 Box09:Out:Box00:Image
 NumberOfControlPoints:0
 CONNECTION
-Box10:Out:Box11:In
+Box11:Out:Box09:In
 NumberOfControlPoints:0
 CONNECTION
-Box11:Out:Box09:In
+Box01:Out:Box11:In
 NumberOfControlPoints:0
 APP_END
index 9b7d180396a3e39e4ffcedb247e6c013709a818d..6f92ad6403583a4ebb86ddc374dbc35ab0764ab0 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script
-# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbs
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbs
 # ----------------------------------
 
 # BBTK GEditor Script
@@ -86,10 +86,10 @@ connect Box09.Out Box02.In
 
 connect Box09.Out Box00.Image
 
-connect Box10.Out Box11.In
-
 connect Box11.Out Box09.In
 
+connect Box01.Out Box11.In
+
 
 
 # Complex input ports
diff --git a/bbtk/bbs/appli/exampleOpenDialog.bbg b/bbtk/bbs/appli/exampleOpenDialog.bbg
new file mode 100644 (file)
index 0000000..5bc22b4
--- /dev/null
@@ -0,0 +1,29 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleOpenDialog.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:2
+BOX
+creaMaracasVisu:OpenImageDialog:diag
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+43.075000:60.000000:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:TRUE
+-8.078183:42.109680:-900.000000
+55.641817:32.109680:-900.000000
+FIN_BOX
+CONNECTIONS:1
+CONNECTION
+diag:Out:Box01:In
+NumberOfControlPoints:0
+APP_END
index 1a5b554e3631336cc1833b96593dfea391215566..3cedd8f2c59b5353e86459c01712a88cf9ca5423 100644 (file)
@@ -1,32 +1,27 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
-
-load std
-load wx
-load creaMaracasVisu
-
-new OpenImageDialog diag
-
-exec diag
\ No newline at end of file
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleOpenDialog.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:OpenImageDialog diag
+
+new creaMaracasVisu:ViewerNV Box01
+
+
+connect diag.Out Box01.In
+
+
+
+# Complex input ports
+exec Box01
diff --git a/bbtk/bbs/appli/examplePlaneNPoints.bbg b/bbtk/bbs/appli/examplePlaneNPoints.bbg
new file mode 100644 (file)
index 0000000..6ab8822
--- /dev/null
@@ -0,0 +1,194 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlaneNPoints.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION: 3points -> 1-plane 
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:14
+BOX
+wx:FileSelector:openFileDialog
+ISEXEC:FALSE
+-71.844270:101.006474:-900.000000
+-25.744270:91.006474:-900.000000
+PORT
+Wildcard:"(*.mhd)|*.mhd"
+FIN_BOX
+BOX
+vtk:MetaImageReader:reader
+ISEXEC:FALSE
+-69.371653:76.678391:-900.000000
+-23.996653:66.678391:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-45.753456:-110.244621:-900.000000
+-6.128456:-120.244621:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:TransferFunctionView:transferfunc
+ISEXEC:FALSE
+-104.537533:28.400350:-900.000000
+-52.362533:18.400350:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewernv
+ISEXEC:FALSE
+14.746982:-12.565354:-900.000000
+78.466982:-22.565354:-900.000000
+PORT
+nTypeView:"6 1 2 0"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints:showpoints
+ISEXEC:FALSE
+-22.483814:-50.506036:-900.000000
+38.156186:-60.506036:-900.000000
+PORT
+Radio:"1"
+FIN_BOX
+BOX
+creaMaracasVisu:ImageActor:imgactor
+ISEXEC:FALSE
+-15.503237:-152.350307:-900.000000
+25.446763:-162.350307:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:view2d
+ISEXEC:FALSE
+-15.299387:-191.047245:-900.000000
+23.780613:-201.047245:-900.000000
+FIN_BOX
+BOX
+wx:CommandButton:execplanes
+ISEXEC:FALSE
+-122.135259:-88.324409:-900.000000
+-73.735259:-98.324409:-900.000000
+PORT
+Label:"Refresh planes"
+FIN_BOX
+BOX
+wx:LayoutLine:layoutline0
+ISEXEC:FALSE
+-100.000000:-200.000000:-900.000000
+-42.440000:-210.000000:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:layoutline1
+ISEXEC:FALSE
+0.000000:-230.000000:-900.000000
+57.560000:-240.000000:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:mainSplit
+ISEXEC:TRUE
+-100.000000:-260.000000:-900.000000
+-60.300000:-270.000000:-900.000000
+PORT
+Orientation:"H"
+PORT
+Proportion:"10"
+FIN_BOX
+BOX
+vtk:LoadHola:Box12
+ISEXEC:FALSE
+7.751619:76.570867:-900.000000
+43.301619:66.570867:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box13
+ISEXEC:FALSE
+-12.289151:51.614436:-900.000000
+39.885849:41.614436:-900.000000
+FIN_BOX
+CONNECTIONS:28
+CONNECTION
+openFileDialog:Out:reader:In
+NumberOfControlPoints:0
+CONNECTION
+transferfunc:ColorFunction:viewernv:ColorFunction
+NumberOfControlPoints:0
+CONNECTION
+transferfunc:WindowLevel:viewernv:WindowLevel
+NumberOfControlPoints:0
+CONNECTION
+transferfunc:ColorLevel:viewernv:ColorLevel
+NumberOfControlPoints:0
+CONNECTION
+showpoints:lstPointsX:planes:PointsX
+NumberOfControlPoints:0
+CONNECTION
+showpoints:lstPointsY:planes:PointsY
+NumberOfControlPoints:0
+CONNECTION
+showpoints:lstPointsZ:planes:PointsZ
+NumberOfControlPoints:0
+CONNECTION
+viewernv:BoxChange:showpoints:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewernv:Point:showpoints:In
+NumberOfControlPoints:0
+CONNECTION
+viewernv:Renderer1:showpoints:Renderer
+NumberOfControlPoints:0
+CONNECTION
+planes:Image3Pts:imgactor:In
+NumberOfControlPoints:0
+CONNECTION
+viewernv:Renderer1:imgactor:Renderer
+NumberOfControlPoints:0
+CONNECTION
+planes:Transform3Pts:imgactor:Transform
+NumberOfControlPoints:0
+CONNECTION
+execplanes:BoxChange:planes:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+execplanes:BoxChange:view2d:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+execplanes:BoxChange:imgactor:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+showpoints:Widget:layoutline0:Widget1
+NumberOfControlPoints:0
+CONNECTION
+execplanes:Widget:layoutline0:Widget2
+NumberOfControlPoints:0
+CONNECTION
+transferfunc:Widget:layoutline0:Widget3
+NumberOfControlPoints:0
+CONNECTION
+viewernv:Widget:layoutline1:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layoutline0:Widget:mainSplit:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layoutline1:Widget:mainSplit:Widget2
+NumberOfControlPoints:0
+CONNECTION
+planes:Image3Pts:view2d:In
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box13:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:transferfunc:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:showpoints:Image
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:viewernv:In
+NumberOfControlPoints:0
+APP_END
index 047824aa9e2b63d18f929353878161f23ded8e43..28a67f675fbfd40e3020cdbc98baf2326cab7e70 100644 (file)
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlaneNPoints.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wx
+include vtk
+include creaMaracasVisu
+include wxvtk
 
-description " 3points -> 1-plane "
 author "info-dev@creatis.insa-lyon.fr"
+description " 3points -> 1-plane "
 category "example"
 
-include vtk/boxes/bbLoadHola
-load vtk
-load wxvtk
-load creaMaracasVisu
-load std
-load wx
-
-//new LoadHola reader
-
-new FileSelector openFileDialog
-  set openFileDialog.Wildcard  "(*.mhd)|*.mhd"
-new MetaImageReader reader
-   connect openFileDialog.Out reader.In
-   
-new ImagePlanes planes
-connect reader.Out planes.In
-
-#new Viewer3D viewer
-
-#connect planes.PlaneX viewer.Obs1
-#connect planes.PlaneY viewer.Obs2
-#connect planes.PlaneZ viewer.Obs3
-#connect planes.Plane3Pts viewer.Obs4
-#set viewer.WinTitle "Show N Points"
-#set viewer.WinWidth 350
-#set viewer.WinHeight 400
-
-new TransferFunctionView transferfunc
-       connect reader.Out transferfunc.In
-
-new ViewerNV viewernv
-       set viewernv.nTypeView "6 1 2 0"
-       #set viewernv.nTypeView "6"
-       connect reader.Out viewernv.In
-       connect transferfunc.ColorFunction viewernv.ColorFunction
-       connect transferfunc.WindowLevel viewernv.WindowLevel
-       connect transferfunc.ColorLevel viewernv.ColorLevel     
-       
-new ShowNPoints showpoints
-       connect reader.Out showpoints.Image
-       connect showpoints.lstPointsX planes.PointsX
-       connect showpoints.lstPointsY planes.PointsY
-       connect showpoints.lstPointsZ planes.PointsZ
-       #set planes.PointsX "10 10 50"
-       #set planes.PointsY "10 50 20"
-       #set planes.PointsZ "10 10 30"
-       connect viewernv.BoxChange showpoints.BoxExecute
-       connect viewernv.Point showpoints.In
-       connect viewernv.Renderer1 showpoints.Renderer
-       set showpoints.Radio 1
-
-new ImageActor imgactor
-       connect planes.Image3Pts imgactor.In
-       connect viewernv.Renderer1 imgactor.Renderer
-       connect planes.Transform3Pts imgactor.Transform
-
-new Viewer2D view2d
-new CommandButton execplanes
-       set execplanes.Label "Refresh planes"
-       connect execplanes.BoxChange planes.BoxExecute  
-       connect execplanes.BoxChange view2d.BoxExecute  
-       connect execplanes.BoxChange imgactor.BoxExecute
-       #connect execplanes.BoxChange viewer.BoxExecute 
-               
-new LayoutLine layoutline0
+new wx:FileSelector openFileDialog
+  set openFileDialog.Wildcard "(*.mhd)|*.mhd"
+
+new vtk:MetaImageReader reader
+
+new vtk:ImagePlanes planes
+
+new creaMaracasVisu:TransferFunctionView transferfunc
+
+new creaMaracasVisu:ViewerNV viewernv
+  set viewernv.nTypeView "6 1 2 0"
+
+new creaMaracasVisu:ShowNPoints showpoints
+  set showpoints.Radio "1"
+
+new creaMaracasVisu:ImageActor imgactor
+
+new wxvtk:Viewer2D view2d
+
+new wx:CommandButton execplanes
+  set execplanes.Label "Refresh planes"
+
+new wx:LayoutLine layoutline0
+
+new wx:LayoutLine layoutline1
+
+new wx:LayoutSplit mainSplit
+  set mainSplit.Orientation "H"
+  set mainSplit.Proportion "10"
+
+new vtk:LoadHola Box12
+
+new vtk:vtkImageDataPointerRelay Box13
+
+
+connect openFileDialog.Out reader.In
+
+connect transferfunc.ColorFunction viewernv.ColorFunction
+
+connect transferfunc.WindowLevel viewernv.WindowLevel
+
+connect transferfunc.ColorLevel viewernv.ColorLevel
+
+connect showpoints.lstPointsX planes.PointsX
+
+connect showpoints.lstPointsY planes.PointsY
+
+connect showpoints.lstPointsZ planes.PointsZ
+
+connect viewernv.BoxChange showpoints.BoxExecute
+
+connect viewernv.Point showpoints.In
+
+connect viewernv.Renderer1 showpoints.Renderer
+
+connect planes.Image3Pts imgactor.In
+
+connect viewernv.Renderer1 imgactor.Renderer
+
+connect planes.Transform3Pts imgactor.Transform
+
+connect execplanes.BoxChange planes.BoxExecute
+
+connect execplanes.BoxChange view2d.BoxExecute
+
+connect execplanes.BoxChange imgactor.BoxExecute
+
 connect showpoints.Widget layoutline0.Widget1
+
 connect execplanes.Widget layoutline0.Widget2
+
 connect transferfunc.Widget layoutline0.Widget3
 
-new LayoutLine layoutline1
 connect viewernv.Widget layoutline1.Widget1
 
-new LayoutSplit mainSplit
-set mainSplit.Orientation H
-set mainSplit.Proportion 10
 connect layoutline0.Widget mainSplit.Widget1
-connect layoutline1.Widget mainSplit.Widget2
 
-exec mainSplit
+connect layoutline1.Widget mainSplit.Widget2
 
 connect planes.Image3Pts view2d.In
+
+connect Box12.Out Box13.In
+
+connect Box13.Out transferfunc.In
+
+connect Box13.Out planes.In
+
+connect Box13.Out showpoints.Image
+
+connect Box13.Out viewernv.In
+
+
+
+# Complex input ports
+exec mainSplit
diff --git a/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg b/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg
new file mode 100644 (file)
index 0000000..e700cae
--- /dev/null
@@ -0,0 +1,49 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of the box vtk::ImagePlanes.
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+35.550000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:TRUE
+-55.397404:-18.807244:-900.000000
+-15.772404:-28.807244:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewer
+ISEXEC:FALSE
+0.000000:10.000000:-900.000000
+63.720000:0.000000:-900.000000
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleImagePlanes"
+PORT
+WinWidth:"350"
+PORT
+nTypeView:"7"
+FIN_BOX
+CONNECTIONS:3
+CONNECTION
+reader:Out:viewer:In
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+viewer:Interactor1:planes:Interactor
+NumberOfControlPoints:0
+APP_END
index 6ed13fb1037accea96a87ac18ffa84acadaef2ab..c475ccc03c6a774a0fc0190879a85becf547695d 100644 (file)
@@ -1,49 +1,38 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_01.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
 
-description "Example of the box vtk::ImagePlanes."
 author "laurent.guigues@creatis.insa-lyon.fr"
+description "Example of the box vtk::ImagePlanes."
 category "example"
 
-include vtk/boxes/bbLoadHola
-load vtk
-load creaMaracasVisu
+new vtk:LoadHola reader
 
-new LoadHola reader
-new ImagePlanes planes
-new ViewerNV viewer
-connect reader.Out viewer.In
+new vtk:ImagePlanes planes
+
+new creaMaracasVisu:ViewerNV viewer
+  set viewer.WinHeight "400"
+  set viewer.WinTitle "ExampleImagePlanes"
+  set viewer.WinWidth "350"
   set viewer.nTypeView "7"
 
+
+connect reader.Out viewer.In
+
 connect reader.Out planes.In
+
 connect viewer.Interactor1 planes.Interactor
 
-load std
-set viewer.WinTitle "ExampleImagePlanes"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-#set viewer.Slice 20
 
+
+# Complex input ports
 exec planes
diff --git a/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg b/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg
new file mode 100644 (file)
index 0000000..6ee0340
--- /dev/null
@@ -0,0 +1,55 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of the box vtk::ImagePlanes.
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+35.550000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-63.636100:34.318141:-900.000000
+-24.011100:24.318141:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewer
+ISEXEC:TRUE
+-16.761485:-12.159251:-900.000000
+46.958515:-22.159251:-900.000000
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleImagePlanes"
+PORT
+WinWidth:"350"
+PORT
+nTypeView:"6"
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+reader:Out:viewer:In
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+APP_END
index c79607ece40d24a45cec4d0e2e893484aeca2e69..d2723b01b69e15988e02a1793e20286746e6d7b4 100644 (file)
@@ -1,51 +1,42 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */ 
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_02.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
 
-description "Example of the box vtk::ImagePlanes."
 author "laurent.guigues@creatis.insa-lyon.fr"
+description "Example of the box vtk::ImagePlanes."
 category "example"
 
-include vtk/boxes/bbLoadHola
-load vtk
-load creaMaracasVisu
+new vtk:LoadHola reader
 
-new LoadHola reader
-new ImagePlanes planes
-new ViewerNV viewer
-connect reader.Out viewer.In
+new vtk:ImagePlanes planes
+
+new creaMaracasVisu:ViewerNV viewer
+  set viewer.WinHeight "400"
+  set viewer.WinTitle "ExampleImagePlanes"
+  set viewer.WinWidth "350"
   set viewer.nTypeView "6"
 
+
+connect reader.Out viewer.In
+
 connect reader.Out planes.In
+
 connect planes.PlaneX viewer.Obs1
+
 connect planes.PlaneY viewer.Obs2
+
 connect planes.PlaneZ viewer.Obs3
 
-load std
-set viewer.WinTitle "ExampleImagePlanes"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-#set viewer.Slice 20
 
+
+# Complex input ports
 exec viewer
index 503acadbe98e573dfaa53defb7533c159721148b..94d6d33f574b194c10cbbae84472eeed324a8971 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbg
 # ----------------------------------
 
 APP_START
@@ -76,12 +76,12 @@ COMPLEX_PORT
 colorBarPosition
 -192.926981:179.217332:-900.000000
 FIN_COMPLEX_PORT
-BOXES:17
+BOXES:24
 BOX
 creaMaracasVisu:ManualPaint_Model:Box00
 ISEXEC:FALSE
--75.289692:-71.460987:-900.000000
--14.649692:-81.460987:-900.000000
+-95.174180:-58.098371:-900.000000
+-34.534180:-68.098371:-900.000000
 PORT
 2D3D:"1"
 PORT
@@ -119,13 +119,13 @@ BOX
 std:StringSelect:Box02
 ISEXEC:FALSE
 -37.673227:82.948986:-900.000000
-7.901773:72.948986:-900.000000
+4.486773:72.948986:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:ColorLayerImageView:Box03
 ISEXEC:FALSE
--110.108419:-104.278922:-900.000000
--38.933419:-114.278922:-900.000000
+64.897021:-66.295426:-900.000000
+134.777021:-76.295426:-900.000000
 PORT
 TypeControlsInterface:"2"
 PORT
@@ -135,7 +135,7 @@ BOX
 std:TransposeVectorVectorString:Box04
 ISEXEC:FALSE
 -31.305556:125.161505:-900.000000
-39.869444:115.161505:-900.000000
+22.919444:115.161505:-900.000000
 PORT
 In0:"Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
 PORT
@@ -153,7 +153,7 @@ BOX
 std:GetVectorStringElement:Box05
 ISEXEC:FALSE
 -86.200317:53.438683:-900.000000
--15.025317:43.438683:-900.000000
+-36.800317:43.438683:-900.000000
 PORT
 I:"1"
 FIN_BOX
@@ -167,7 +167,7 @@ BOX
 std:GetVectorStringElement:Box11
 ISEXEC:FALSE
 -71.696483:40.964713:-900.000000
--0.521483:30.964713:-900.000000
+-22.296483:30.964713:-900.000000
 PORT
 I:"2"
 FIN_BOX
@@ -175,7 +175,7 @@ BOX
 std:GetVectorStringElement:Box12
 ISEXEC:FALSE
 -58.354926:28.065688:-900.000000
-12.820074:18.065688:-900.000000
+-8.954926:18.065688:-900.000000
 PORT
 I:"3"
 FIN_BOX
@@ -183,7 +183,7 @@ BOX
 std:ConcatStrings:Box13
 ISEXEC:FALSE
 -37.058068:-18.986769:-900.000000
-8.516932:-28.986769:-900.000000
+2.666932:-28.986769:-900.000000
 PORT
 In2:" "
 FIN_BOX
@@ -191,7 +191,7 @@ BOX
 std:GetVectorStringElement:Box14
 ISEXEC:FALSE
 -22.770985:-0.972910:-900.000000
-48.404015:-10.972910:-900.000000
+26.629015:-10.972910:-900.000000
 PORT
 I:"5"
 FIN_BOX
@@ -199,7 +199,7 @@ BOX
 std:GetVectorStringElement:Box15
 ISEXEC:FALSE
 -40.934702:12.586010:-900.000000
-30.240298:2.586010:-900.000000
+8.465298:2.586010:-900.000000
 PORT
 I:"4"
 FIN_BOX
@@ -207,7 +207,7 @@ BOX
 std:TransposeVectorVectorString:Box17
 ISEXEC:FALSE
 -117.618980:121.580114:-900.000000
--46.443980:111.580114:-900.000000
+-63.393980:111.580114:-900.000000
 PORT
 In0:"Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
 FIN_BOX
@@ -226,8 +226,8 @@ FIN_BOX
 BOX
 wx:LayoutLine:Box19
 ISEXEC:FALSE
--172.905988:-105.174791:-900.000000
--115.345988:-115.174791:-900.000000
+-182.190843:-97.578092:-900.000000
+-124.630843:-107.578092:-900.000000
 PORT
 Orientation:"H"
 FIN_BOX
@@ -235,17 +235,65 @@ BOX
 std:MagicBox:Box20
 ISEXEC:FALSE
 -82.351641:163.241009:-900.000000
--36.776641:153.241009:-900.000000
+-46.276641:153.241009:-900.000000
 FIN_BOX
 BOX
 std:GetVectorStringElement:Box21
 ISEXEC:FALSE
 -1.581707:-33.301126:-900.000000
-69.593293:-43.301126:-900.000000
+47.818293:-43.301126:-900.000000
 PORT
 I:"6"
 FIN_BOX
-CONNECTIONS:59
+BOX
+vtk:vtkImageDataPointerRelay:Box22
+ISEXEC:FALSE
+174.217065:39.039232:-900.000000
+226.392065:29.039232:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box23
+ISEXEC:FALSE
+39.953010:-129.847284:-900.000000
+80.278010:-139.847284:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MagicBox:Box24
+ISEXEC:FALSE
+70.058448:54.161651:-900.000000
+106.133448:44.161651:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box25
+ISEXEC:FALSE
+105.814564:70.785341:-900.000000
+141.889564:60.785341:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box26
+ISEXEC:FALSE
+130.034953:54.490000:-900.000000
+166.109953:44.490000:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box27
+ISEXEC:FALSE
+90.902525:-130.949226:-900.000000
+131.227525:-140.949226:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box28
+ISEXEC:FALSE
+141.007963:-130.644372:-900.000000
+181.332963:-140.644372:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+CONNECTIONS:69
 CONNECTION
 Box01:Out:Box02:In
 NumberOfControlPoints:0
@@ -286,9 +334,6 @@ CONNECTION
 Box03:Widget:Box09:Widget2
 NumberOfControlPoints:0
 CONNECTION
-Box00:Out:Box03:In
-NumberOfControlPoints:0
-CONNECTION
 Box05:Out:Box00:Active
 NumberOfControlPoints:0
 CONNECTION
@@ -388,21 +433,9 @@ CONNECTION
 Image_ManualPaint_Model:Image_ManualPaint_Model:Box00:Image
 NumberOfControlPoints:0
 CONNECTION
-Image2_ManualPaint_Model:Image2_ManualPaint_Model:Box00:Image2
-NumberOfControlPoints:0
-CONNECTION
 BoxExecute_ManualPaint_Model:BoxExecute_ManualPaint_Model:Box00:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
-wxvtkbaseview1:wxvtkbaseview1:Box03:WxVtkBaseView
-NumberOfControlPoints:0
-CONNECTION
-wxvtkbaseview2:wxvtkbaseview2:Box03:WxVtkBaseView1
-NumberOfControlPoints:0
-CONNECTION
-wxvtkbaseview3:wxvtkbaseview3:Box03:WxVtkBaseView2
-NumberOfControlPoints:0
-CONNECTION
 Box09:Widget:widgetOut:widgetOut
 NumberOfControlPoints:0
 CONNECTION
@@ -423,4 +456,49 @@ NumberOfControlPoints:0
 CONNECTION
 colorBarPosition:colorBarPosition:Box03:ColorBarPosition
 NumberOfControlPoints:0
+CONNECTION
+Image2_ManualPaint_Model:Image2_ManualPaint_Model:Box22:In
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box00:Image2
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview1:wxvtkbaseview1:Box24:In
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box03:WxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview2:wxvtkbaseview2:Box25:In
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:Box03:WxVtkBaseView1
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview3:wxvtkbaseview3:Box26:In
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box03:WxVtkBaseView2
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box23:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box23:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:Box27:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box28:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box27:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box28:BoxExecute
+NumberOfControlPoints:0
 APP_END
index cae9275f73d517323a2d02352254e0545aa80467..1f931bcea850de4d19955981fa27eeeabff3571b 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbs
 # ----------------------------------
 
 include std
@@ -8,6 +8,7 @@ include itkvtk
 include creaMaracasVisu
 include wx
 include std
+include vtk
 
 define ManualPaint2 creaMaracasVisu
 
@@ -83,6 +84,23 @@ new std:MagicBox Box20
 new std:GetVectorStringElement Box21
   set Box21.I "6"
 
+new vtk:vtkImageDataPointerRelay Box22
+
+new vtk:UpdateRender Box23
+  set Box23.Active "true"
+
+new std:MagicBox Box24
+
+new std:MagicBox Box25
+
+new std:MagicBox Box26
+
+new vtk:UpdateRender Box27
+  set Box27.Active "true"
+
+new vtk:UpdateRender Box28
+  set Box28.Active "true"
+
 
 connect Box01.Out Box02.In
 connect Box04.Out0 Box02.In0
@@ -97,7 +115,6 @@ connect Box04.Out8 Box02.In8
 connect Box04.Out9 Box02.In9
 connect Box02.Out Box05.In
 connect Box03.Widget Box09.Widget2
-connect Box00.Out Box03.In
 connect Box05.Out Box00.Active
 connect Box02.Out Box11.In
 connect Box11.Out Box00.DistanceFill
@@ -127,6 +144,17 @@ connect Box20.Out Box17.In0
 connect Box20.Out Box04.In0
 connect Box02.Out Box21.In
 connect Box21.Out Box00.ToleranceFill
+connect Box22.Out Box00.Image2
+connect Box22.Out Box03.In
+connect Box24.Out Box03.WxVtkBaseView
+connect Box25.Out Box03.WxVtkBaseView1
+connect Box26.Out Box03.WxVtkBaseView2
+connect Box24.Out Box23.Renderer
+connect Box00.BoxChange Box23.BoxExecute
+connect Box25.Out Box27.Renderer
+connect Box26.Out Box28.Renderer
+connect Box00.BoxChange Box27.BoxExecute
+connect Box00.BoxChange Box28.BoxExecute
 
 # Complex input ports
 input TitleOptions Box20.In " "
@@ -137,13 +165,13 @@ input MinRange_ManualPaint_Model Box04.In4 " "
 input MaxRange_ManualPaint_Model Box04.In5 " "
 input Point_ManualPaint_Model Box00.Point " "
 input Image_ManualPaint_Model Box00.Image " "
-input Image2_ManualPaint_Model Box00.Image2 " "
 input BoxExecute_ManualPaint_Model Box00.BoxExecute " "
-input wxvtkbaseview1 Box03.WxVtkBaseView " "
-input wxvtkbaseview2 Box03.WxVtkBaseView1 " "
-input wxvtkbaseview3 Box03.WxVtkBaseView2 " "
 input Tolerance_Fill_ManualPaint_Model Box04.In6 " "
 input colorBarPosition Box03.ColorBarPosition " "
+input Image2_ManualPaint_Model Box22.In " "
+input wxvtkbaseview1 Box24.In " "
+input wxvtkbaseview2 Box25.In " "
+input wxvtkbaseview3 Box26.In " "
 
 # Complex output ports
 output widgetOut Box09.Widget " "
index 3dfe5e6246843d7bdd458186334c39a40b072815..a11941aacaea03b152fc5d07fa51b9c34e6a85cf 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY.bbg
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY.bbg
 # ----------------------------------
 
 APP_START
@@ -44,30 +44,30 @@ COMPLEX_PORT
 wxvtkbaseview
 105.349495:86.477605:-900.000000
 FIN_COMPLEX_PORT
-BOXES:19
+BOXES:20
 BOX
 vtk:ImageVtkProperties:Box00
 ISEXEC:FALSE
 -162.336304:62.553214:-900.000000
--116.761304:52.553214:-900.000000
+-116.986304:52.553214:-900.000000
 FIN_BOX
 BOX
 std:ConcatStrings:Box03
 ISEXEC:FALSE
 -102.095937:63.057960:-900.000000
--56.520937:53.057960:-900.000000
+-62.370937:53.057960:-900.000000
 FIN_BOX
 BOX
 std:ConcatStrings:Box05
 ISEXEC:FALSE
 -153.040731:-106.636945:-900.000000
--107.465731:-116.636945:-900.000000
+-113.315731:-116.636945:-900.000000
 FIN_BOX
 BOX
 vtk:UpdateRender:Box07
 ISEXEC:FALSE
 117.890633:-108.600457:-900.000000
-163.465633:-118.600457:-900.000000
+158.215633:-118.600457:-900.000000
 PORT
 Active:"true"
 FIN_BOX
@@ -75,7 +75,7 @@ BOX
 std:GetVectorFloatElement:Box14
 ISEXEC:FALSE
 -206.131681:2.977152:-900.000000
--134.956681:-7.022848:-900.000000
+-157.406681:-7.022848:-900.000000
 PORT
 I:"0"
 FIN_BOX
@@ -83,7 +83,7 @@ BOX
 std:ConcatStrings:Box16
 ISEXEC:FALSE
 122.643426:-194.996817:-900.000000
-168.218426:-204.996817:-900.000000
+162.368426:-204.996817:-900.000000
 PORT
 In2:"p  ("
 PORT
@@ -97,25 +97,25 @@ BOX
 std:Mul:Box17
 ISEXEC:FALSE
 -224.173311:-46.164514:-900.000000
--191.398311:-56.164514:-900.000000
+-194.373311:-56.164514:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box18
 ISEXEC:FALSE
 -226.697757:58.736032:-900.000000
--181.122757:48.736032:-900.000000
+-190.622757:48.736032:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box19
 ISEXEC:FALSE
 -11.287735:-51.026800:-900.000000
-34.287265:-61.026800:-900.000000
+24.787265:-61.026800:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box20
 ISEXEC:FALSE
 112.639656:-54.547113:-900.000000
-158.214656:-64.547113:-900.000000
+148.714656:-64.547113:-900.000000
 PORT
 BoxProcessMode:"Reactive"
 FIN_BOX
@@ -123,13 +123,13 @@ BOX
 std:MagicBox:Box26
 ISEXEC:FALSE
 27.050629:-105.869439:-900.000000
-72.625629:-115.869439:-900.000000
+63.125629:-115.869439:-900.000000
 FIN_BOX
 BOX
 vtk:Text2D:Box22
 ISEXEC:FALSE
 76.588028:-260.395303:-900.000000
-109.363028:-270.395303:-900.000000
+109.288028:-270.395303:-900.000000
 PORT
 Color:"0 1 1"
 FIN_BOX
@@ -137,13 +137,13 @@ BOX
 std:MagicBox:Box23
 ISEXEC:FALSE
 -50.113589:33.218740:-900.000000
--4.538589:23.218740:-900.000000
+-14.038589:23.218740:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:DrawAxe3D:Box25
 ISEXEC:FALSE
 -58.274452:-271.614376:-900.000000
--12.699452:-281.614376:-900.000000
+-20.574452:-281.614376:-900.000000
 PORT
 Colour:"0 1 1"
 PORT
@@ -157,7 +157,7 @@ BOX
 vtk:Transform:Box27
 ISEXEC:FALSE
 -127.484254:-220.579013:-900.000000
--81.909254:-230.579013:-900.000000
+-91.909254:-230.579013:-900.000000
 PORT
 RotateWXYZ:"45 0 0 1"
 FIN_BOX
@@ -165,7 +165,7 @@ BOX
 creaMaracasVisu:ChInfo3Dto2DRuler:Box28
 ISEXEC:FALSE
 -67.559786:-150.667179:-900.000000
--21.984786:-160.667179:-900.000000
+-23.234786:-160.667179:-900.000000
 PORT
 Direction:"0"
 FIN_BOX
@@ -173,21 +173,27 @@ BOX
 vtk:Transform:Box29
 ISEXEC:FALSE
 -157.550533:-151.214722:-900.000000
--111.975533:-161.214722:-900.000000
+-121.975533:-161.214722:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box30
 ISEXEC:FALSE
 87.518493:10.369667:-900.000000
-158.693493:0.369667:-900.000000
+133.668493:0.369667:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box31
 ISEXEC:FALSE
 -34.175716:55.173035:-900.000000
-11.399284:45.173035:-900.000000
+1.899284:45.173035:-900.000000
 FIN_BOX
-CONNECTIONS:39
+BOX
+wx:OutputText:Box32
+ISEXEC:FALSE
+-220.624234:-223.740652:-900.000000
+-183.849234:-233.740652:-900.000000
+FIN_BOX
+CONNECTIONS:41
 CONNECTION
 Box00:Spacing:Box05:In1
 NumberOfControlPoints:0
@@ -305,4 +311,10 @@ NumberOfControlPoints:0
 CONNECTION
 Box14:Out:Box17:In2
 NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box32:In
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box32:BoxExecute
+NumberOfControlPoints:0
 APP_END
index 055a8bbc682443c30a23cff7e426302f009e8de0..e112381aef56120a0930399d07e3b3850d5c7d08 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY.bbs
+# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY.bbs
 # ----------------------------------
 
 include std
@@ -8,6 +8,7 @@ include itkvtk
 include vtk
 include std
 include creaMaracasVisu
+include wx
 
 define Ruler01_XY creaMaracasVisu
 
@@ -16,57 +17,59 @@ description "Description ??"
 
 category "<VOID>"
 
-new ImageVtkProperties Box00
+new vtk:ImageVtkProperties Box00
 
-new ConcatStrings Box03
+new std:ConcatStrings Box03
 
-new ConcatStrings Box05
+new std:ConcatStrings Box05
 
-new UpdateRender Box07
+new vtk:UpdateRender Box07
   set Box07.Active "true"
 
-new GetVectorFloatElement Box14
+new std:GetVectorFloatElement Box14
   set Box14.I "0"
 
-new ConcatStrings Box16
+new std:ConcatStrings Box16
   set Box16.In2 "p  ("
   set Box16.In4 "u) "
   set Box16.In5 " ang="
   set Box16.In7 "  ."
 
-new Mul Box17
+new std:Mul Box17
 
-new MagicBox Box18
+new std:MagicBox Box18
 
-new MagicBox Box19
+new std:MagicBox Box19
 
-new MagicBox Box20
+new std:MagicBox Box20
   set Box20.BoxProcessMode "Reactive"
 
-new MagicBox Box26
+new std:MagicBox Box26
 
-new Text2D Box22
+new vtk:Text2D Box22
   set Box22.Color "0 1 1"
 
-new MagicBox Box23
+new std:MagicBox Box23
 
-new DrawAxe3D Box25
+new creaMaracasVisu:DrawAxe3D Box25
   set Box25.Colour "0 1 1"
   set Box25.lstPointX "0 286.1111"
   set Box25.lstPointY "0 0"
   set Box25.lstPointZ "-900 -900"
 
-new Transform Box27
+new vtk:Transform Box27
   set Box27.RotateWXYZ "45 0 0 1"
 
-new ChInfo3Dto2DRuler Box28
+new creaMaracasVisu:ChInfo3Dto2DRuler Box28
   set Box28.Direction "0"
 
-new Transform Box29
+new vtk:Transform Box29
 
-new wxVtkBaseView_Info Box30
+new creaMaracasVisu:wxVtkBaseView_Info Box30
 
-new MagicBox Box31
+new std:MagicBox Box31
+
+new wx:OutputText Box32
 
 
 connect Box00.Spacing Box05.In1
@@ -100,6 +103,8 @@ connect Box30.Direction Box28.Direction
 connect Box30.vtkRenderer Box19.In
 connect Box03.Out Box29.Translate
 connect Box14.Out Box17.In2
+connect Box05.Out Box32.In
+connect Box26.Out Box32.BoxExecute
 
 # Complex input ports
 input SizeReal Box18.In " "
index 0fc2242b4f08dce552bb5ecdcb128a5af1cb911f..46f8d7076f46bd6b20d3b10160081b595a14ac0a 100644 (file)
@@ -76,6 +76,9 @@ void ColorLayerImageView::Process()
     bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
     bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
 
+printf("EED ColorLayerImageView::Process A ptrLookupTable:%p\n",clivp->GetColorLayerImageViewManager()->GetLookupTable(0));
+printf("EED ColorLayerImageView::Process B ptrLookupTable:%p\n",bbGetOutputLookupTable() );
+
         if (firsttime==true)
         {
                firsttime=false;
index 9b8cdc43fe22d2661060d8aaa526804993c078d9..73656fc52dcf1ab2597536e0e181e5f169d6e1c3 100644 (file)
@@ -35,6 +35,9 @@
 #include "wxVtkBaseView.h"
 #include <vtkScalarsToColors.h>
 
+#include <vtkScalarsToColors.h>
+
+
 namespace bbcreaMaracasVisu
 {
 
@@ -102,7 +105,6 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColorLayerImageView,bbtk::WxBlackBox);
   BBTK_OUTPUT(ColorLayerImageView,NewImage,"Image with correct Spacing",vtkImageData*,"");
   BBTK_OUTPUT(ColorLayerImageView,LookupTable,"LookupTable",vtkScalarsToColors*,"");
 
-
 BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView);
 //=====
 // Don't edit this file. This file is generated from xml description..
index e31a64df99e6ab1b6b8a3e7b486148c8d1a3c0eb..e97b39033a1cbc0bca71a1c5829bbbdd25e8c775 100644 (file)
@@ -34,8 +34,10 @@ void ManualPaint_Model::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
+
        if (bbGetInputImage()!=NULL)
        {  
+
                manualpaintmodel->SetActive( bbGetInputActive() );
                manualpaintmodel->SetTool( bbGetInputTool() );
                manualpaintmodel->Set2D3D( bbGetInput2D3D() );
@@ -48,11 +50,14 @@ void ManualPaint_Model::Process()
                manualpaintmodel->SetDistanceFill( bbGetInputDistanceFill() );          
                manualpaintmodel->SetRangeMin( bbGetInputRange()[0] );
                manualpaintmodel->SetRangeMax( bbGetInputRange()[1] );
+
                if (bbGetInputPoint().size()==3)
                {
                        manualpaintmodel->PaintImage( bbGetInputPoint()[0] , bbGetInputPoint()[1] , bbGetInputPoint()[2] );
                } // if Points
 
+
+
                if ( bbGetInputByLstPointsX().size()!=0 )
                {
                        int i,size = bbGetInputByLstPointsX().size();
@@ -67,7 +72,13 @@ void ManualPaint_Model::Process()
 //                     int ia,ja,ka;
 //                     int ii,jj,kk;
                        int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        bbGetInputByImagePoints()->GetWholeExtent(ext);
+#else
+                       bbGetInputByImagePoints()->GetExtent(ext);
+#endif
+
                        int dimX=ext[1]-ext[0]+1;
                        int dimY=ext[3]-ext[2]+1;
                        int dimZ=ext[5]-ext[4]+1;
@@ -105,9 +116,13 @@ void ManualPaint_Model::Process()
 
                        printf("ManualPaint_Model %d%\n", 100 );
                } // if ByImagePoints
+
+
+
         } else {
                printf("EED Warning: Image not set. Box creaMaracasVisu::ManualPaint_Model (BBTK) \n");
-       } // if 
+       } // if bbGetInputImage()
+
 
        if (bbGetInputImage2()!=NULL)
        { 
@@ -117,6 +132,7 @@ void ManualPaint_Model::Process()
        } else { 
                bbSetOutputOut( NULL );
        } 
+
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 8b23084c1cf2beb7f53e58f73d596bdb90dbe297..d9a57e1c9e203ca4ebb3704981f7c443eb6003c5 100644 (file)
@@ -32,6 +32,7 @@ void SetPosition::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
+
        if (bbGetInputwxVtkBaseView()!=NULL)
        {
                vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
@@ -41,7 +42,14 @@ void SetPosition::Process()
                        vtkmprbasedata->SetY( bbGetInputPoint()[1] );
                        vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
                        wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refres
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+#else
+                       bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
+#endif 
+                       
+                       
                } // if bbGetInputPosition
        } // bbGetInputwxVtkBaseView
 }
index 10306c6f34b3fc7a16292bc9746365c101369cc2..a354dfa3fe47d249e4101949d46ef4870980fa52 100644 (file)
@@ -39,7 +39,14 @@ void SliceImage::Process()
        //std::cout<<"MSJ: test SliceImage::Process()"<<this<<std::endl;
        if ( bbGetInputIn()!=NULL )
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
          imageReslice->SetInput( bbGetInputIn() );
+#else
+         imageReslice->SetInputData( bbGetInputIn() );
+#endif
+
          imageReslice->SetInformationInput(bbGetInputIn() );
 
          double slice=bbGetInputSlice();
@@ -95,9 +102,18 @@ void SliceImage::Process()
          } 
          imageReslice->SetOutputDimensionality(2);
          imageReslice->SetInterpolationModeToLinear();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
          imagedata = imageReslice->GetOutput();
          imagedata->Update();
          imagedata->UpdateInformation();       
+#else
+         imageReslice->Update();
+         imagedata = imageReslice->GetOutput();
+#endif
+
        }
   bbSetOutputOut( imagedata );
 }
index dbb0a9e457551b8ab38f588d65e0fe566418746b..e3989b55f32b3b274128bc5fdc82736f6db175f9 100644 (file)
@@ -176,7 +176,14 @@ namespace bbcreaMaracasVisu
                
                vtkSmartPointer<vtkTubeFilter> tube = vtkSmartPointer<vtkTubeFilter>::New();
                tube->CappingOn();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                tube->SetInput(polyData);
+#else
+               tube->SetInputData(polyData);
+#endif
+
                tube->SetNumberOfSides(nTv);
                tube->SetVaryRadiusToVaryRadiusByAbsoluteScalar();
                
index b58742c5c63e1d1db6fa6b147461e41be4570a88..bb4e3c23071fb7ddd6c22f86537db2b023963673 100644 (file)
@@ -307,7 +307,12 @@ void TubeTreeFilter::DrawOneTube(int iGeneral,int numPoints, int iTube)
 
 
        vtkSmartPointer<vtkTubeFilter> tube = vtkSmartPointer<vtkTubeFilter>::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        tube->SetInput(polyData);
+#else
+       tube->SetInputData(polyData);
+#endif
        tube->SetNumberOfSides(nTv);
        tube->SetVaryRadiusToVaryRadiusByAbsoluteScalar();
         tube->CappingOn();
index dba7dcdf2873d06fc6197423c3a0c8901291205d..887cd0ef0f7ed1c7312dfae79be8cbb579a7555c 100644 (file)
@@ -60,7 +60,12 @@ void AnimationSphere::Process()
                        vtksphere->SetRadius( 1  ); 
 
                vtkPolyDataMapper       *sphereMapper   = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        sphereMapper->SetInput( vtksphere->GetOutput() );
+#else
+                       sphereMapper->SetInputData( vtksphere->GetOutput() );
+#endif
 
                sphereActor             = vtkActor::New();
                        sphereActor->SetMapper(sphereMapper);
@@ -144,7 +149,14 @@ void AnimationSphere::Process()
                                w2i = vtkWindowToImageFilter::New();
                                png = vtkPNGWriter::New();
                                w2i->SetInput( bbGetInputRenderer()->GetRenderWindow() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                png->SetInput( w2i->GetOutput() );     
+#else
+                               png->SetInputData( w2i->GetOutput() );     
+#endif
+
                                png->SetFileName( newFileName.c_str() );
                                png->Write();
                                png->Delete();
index 24d2ef0a68db885ac7d427e50d2709d917c5e0a7..1a72bb5e4a55e8daf80b77784cd5c8f716081092 100644 (file)
@@ -91,8 +91,13 @@ void AxeVolume::Process()
        mimage->SetDimensions(bbGetInputIn()->GetDimensions());
        mimage->SetExtent(bbGetInputIn()->GetExtent());
        mimage->SetOrigin(bbGetInputIn()->GetOrigin());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        mimage->SetScalarType( outputformat );
        mimage->AllocateScalars();
+#else
+       mimage->AllocateScalars( outputformat , 1);
+#endif
 
     int sizeLstPointR  = bbGetInputlstPointR().size();
        int iAxe,sizeAxe        = bbGetInputlstPointX().size();
index 536d67833e6ab35e184e288bcecc4b682c668bef..5ed739c404743cfc4bf63649f7641d0b08e93f42 100644 (file)
@@ -64,13 +64,21 @@ END_EVENT_TABLE( );
                        initializeVOIWidget();
                }                       
   }
-   void wxWidgetVOI::initializeVOIWidget(){
+
+   void wxWidgetVOI::initializeVOIWidget()
+       {
           wxSizer* sizer = this->GetSizer();
 
 
 /// \TODO fix deprecated warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated (declared at /usr/include/wx-2.8/wx/sizer.h:513)               
-               if(mcontourvoiwidget!=NULL){
-                       sizer->Remove(  mcontourvoiwidget );    
+               if(mcontourvoiwidget!=NULL)
+               {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                       sizer->Remove( mcontourvoiwidget );     
+#else
+                       sizer->Detach( mcontourvoiwidget );     
+#endif
                        mcontourvoiwidget->Destroy();
                }
 
@@ -84,10 +92,13 @@ END_EVENT_TABLE( );
                this->Refresh();
   }
 
-  void wxWidgetVOI::setBaseView(wxVtkBaseView * wxvtkbaseview){
+  void wxWidgetVOI::setBaseView(wxVtkBaseView * wxvtkbaseview)
+       {
          this->wxvtkbaseview = wxvtkbaseview;
   }
-  void wxWidgetVOI::setImageData(vtkImageData * imagedata){
+
+  void wxWidgetVOI::setImageData(vtkImageData * imagedata)
+       {
          this->imagedata = imagedata;
   }
 
index fa7a0cfe5c7ebf9fed64923660ecd44af0e51a30..f7be326c61962da3983b7cab719e1fe130671dd1 100644 (file)
@@ -120,7 +120,13 @@ void DrawAxe3D::bbUserSetDefaultValues()
                polydatamapper = vtkPolyDataMapper::New();
                mvtkactor      = vtkActor::New();
                
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                polydatamapper->SetInput(mallData);
+#else
+               polydatamapper->SetInputData(mallData);
+#endif
+
                mvtkactor->SetMapper(polydatamapper);
                bbSetOutputOut(mvtkactor);
        }
index fec824099408a2b00eace62478298500b02845c7..33bb1d776f08bac7cbcf4ca07a452cc746da09f7 100644 (file)
@@ -49,7 +49,12 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
        vtkActor                        *vtkactor               = vtkActor::New();
 
 //     polydatamapper->ScalarVisibilityOff();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        polydatamapper->SetInput(polydata);
+#else
+       polydatamapper->SetInputData(polydata);
+#endif
        vtkactor->SetMapper(polydatamapper);
 
        vecVtkPolyData.push_back( polydata );
index a3101688aea46ff005d287fcd95816e711111bb7..f9c399481a5045b8635e65d305bd48db13e8c95d 100644 (file)
@@ -36,14 +36,12 @@ BBTK_BLACK_BOX_IMPLEMENTATION(HistogramView,bbtk::WxBlackBox);
 //------------------------------------------------
 void HistogramView::Process()
 {
-printf("EED HistogramView::Process Start \n");
        if (firsttime==true)
        {
                firsttime=false;
        //      histogram_wxwidget = new Histogram( wxpanel , -1, wxPoint(0,0), wxSize(400,400),wxNO_BORDER );
                _histogramMinMaxLevel->Configure( bbGetInputIn() );
        }
-printf("EED HistogramView::Process End \n");
 }
 
 //------------------------------------------------
@@ -88,4 +86,3 @@ void HistogramView::CreateWidget(wxWindow* parent)
 }
 // EO namespace bbcreaMaracasVisu
 
-
index 40b3f246fecf3c9d9592807c411964badde4d7f5..fb2df56c67176eedda5687e2f11db4be6c6d8965 100644 (file)
@@ -47,12 +47,18 @@ printf("EED ImageActor::Process Start\n");
                vtkRenderer *render                             = bbGetInputRenderer();
                vtkImageData *img                               = bbGetInputIn();
                vtkLinearTransform* transform   = bbGetInputTransform();
-
-               if(img != NULL)
+                               
+                               
+       if(img != NULL)
                {
                        if (bbGetInputLookupTable()==NULL)
                        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                imageactor->SetInput( img );    
+#else
+                               imageactor->SetInputData( img );        
+#endif
                        } else {
 /*
                                vtkLookupTable *table = vtkLookupTable::New();
@@ -115,9 +121,17 @@ vtkLookupTable *table = vtkLookupTable::New();
 //                             imageshiftscale->SetOutputScalarTypeToUnsignedChar();
 
 //                             color->SetInput( imageshiftscale->GetOutput() );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                color->SetInput( img );
                                color->Update();
                                imageactor->GetMapper()->SetInput( color->GetOutput() );
+#else
+                               color->SetInputData( img );
+                               imageactor->GetMapper()->SetInputData( color->GetOutput() );
+#endif
                                imageactor->GetProperty()->SetInterpolationTypeToNearest();
                        }
 
index b956413ec6464a5ec823f63f58958306be973b12..f32c600b64234a71e479fa267a9e330576a63b1b 100644 (file)
@@ -44,7 +44,14 @@ void ImageChangeInformation::Process()
                }
                mchange = vtkImageChangeInformation::New();
                img->GetExtent( ext );  
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mchange->SetInput( img );
+#else
+               mchange->SetInputData( img );
+#endif
+
                mchange->SetOutputExtentStart(0,0,0);
                if (bbGetInputNewSpacing().size()==3)
                {
@@ -73,6 +80,7 @@ void ImageChangeInformation::Process()
                mchange->Update();    //important
                bbSetOutputOut( mchange->GetOutput() );
        }  // if img
+
 }
 
 
index 5023801c481565e15186f608aecbce50656dacb4..af7cecc2c73a004e467ead2ee84393bb63bcfb83 100644 (file)
@@ -42,10 +42,7 @@ void PlotterView::Process()
 //     if (firsttime==true)
 //     {
 //             firsttime=false;
-               
-       
-       printf("EED PlotterView::Process %d %d \n ", bbGetInputInY().size(),bbGetInputInY2().size());
-       
+                       
        pGraphicalFunction *pGF = mwxwidget->getFunction(0);
        pGraphicalFunction *pGF2 = mwxwidget->getFunction(1);
 
@@ -110,6 +107,7 @@ void PlotterView::Process()
                } // if bbGetInputInY
                
 //     } // if firsttime
+
        
        if (pGF!=NULL)  
        {
@@ -134,14 +132,18 @@ void PlotterView::Process()
                }               
        }// if pGF
 
-
        if (pGF2!=NULL) 
        {
                // -Erasing  points-
                int i,sizePoints                = pGF2->getSizePoints();
                for (i=0; i<sizePoints;i++)
                {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        pGF2->deletePointAt(1);   //  EED here NOT 0 is 1
+#else
+                       pGF2->deletePointAt(0);   //  EED here NOT 0 is 1
+#endif
                } // for i
                // -Add Points-
                double px;
@@ -155,30 +157,23 @@ void PlotterView::Process()
                                px = i;
                        }       
                        pGF2->AddNewPoint( px, bbGetInputInY2()[i] );
-               }               
+               }  // for       
        }// if pGF
-               
        mwxwidget->UpdateAll();
-       
-       
 }
 
        
 //---------------------------------------------------
 void PlotterView::CreateWidget(wxWindow* parent)
 {
-   bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<<std::endl);
-    
-   mwxwidget = new pPlotterWindow( parent , -1,wxDefaultPosition,  wxDefaultSize,  0 );
-   mwxwidget->AddLayer(new pPlotterScaleX());
-   mwxwidget->AddLayer(new pPlotterScaleY());
-
+       bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<<std::endl);
+       mwxwidget = new pPlotterWindow( parent , -1,wxDefaultPosition,  wxDefaultSize,  0 );
+       mwxwidget->AddLayer(new pPlotterScaleX());
+       mwxwidget->AddLayer(new pPlotterScaleY());
        mwxwidget->setMinScrY(0);
        mwxwidget->setMaxScrY(5000);
-
-       
-          bbtkDebugDecTab("Core",9);
-   bbSetOutputWidget( mwxwidget );
+       bbtkDebugDecTab("Core",9);
+       bbSetOutputWidget( mwxwidget );
 }
 
 //---------------------------------------------------
index ca7fa29fa7413104d3910684d0a77424bf1fe457..640d4f02c7ce13642dacee0ecb9f36cbd7249ece 100644 (file)
@@ -106,8 +106,12 @@ void TransferFunctionView::onColorChange()
                _ctfun->AddRGBPoint( greylevelcolors[i] , red[i],green[i], blue[i]);
        }               
 
-       
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _tfun->Update();
+#else
+  //...
+#endif
        bbSetOutputOpacityFunction(_tfun);
        bbSetOutputColorFunction(_ctfun );
        bbSetOutputActive( mwxwidget->GetActive() );
index 665858503caa9a13c20e2e2a039b702f19051fdf..3bbcf899e72851ea8476de624a0f283d63558d51 100644 (file)
@@ -70,11 +70,11 @@ class /*BBTK_EXPORT*/ TransferFunctionView
 
   private:
        //HistogramWidget *mwxwidget;
-         HistogramDialogComboBox *mwxwidget;
-       vtkImageData* _currentimg;
+         HistogramDialogComboBox       *mwxwidget;
+       vtkImageData*                           _currentimg;
        
-       vtkPiecewiseFunction* _tfun;
-       vtkColorTransferFunction* _ctfun;
+       vtkPiecewiseFunction*           _tfun;
+       vtkColorTransferFunction*       _ctfun;
 };
 
 
index 52e7c866cd7c2fc47b79919ef6ec187d1bb3f831..74ee8a75c7839fafbe2d17c5580eaaa5d982714d 100644 (file)
 #include "volumerendererdata.h"
 #include "vtkObjectFactory.h"
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 vtkCxxRevisionMacro(VolumeRendererData, "$Revision: 1.11 $");
+#else
+  //...
+#endif
+
 vtkStandardNewMacro(VolumeRendererData);
 
 VolumeRendererData::VolumeRendererData()
index 4d6f3e4ca7bc05dfe1f47ad15e08a8fe88760043..67194c75782681cab59b335178267e87807a0ed7 100644 (file)
@@ -37,7 +37,14 @@ class VolumeRendererData : public vtkObject
 {
 public:
     static VolumeRendererData *New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     vtkTypeRevisionMacro(VolumeRendererData,vtkObject);
+#else
+    vtkTypeMacro(VolumeRendererData,vtkObject);
+#endif
+
     //
 
     vtkSetObjectMacro(ImageData, vtkImageData);
index 4f544318ab6a6e849e08548cce97345543886759..8f969e4dd679ed95e2a7ff4babb68960d7abd921 100644 (file)
@@ -289,7 +289,14 @@ ToolBar::ToolBar(wxWindow * parent,std::string iconsdir)
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0,  wxString(_T("Open File")),  wxITEM_NORMAL );
+#endif
+
        
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index c70043ebd797040fa2d5a00368fad2dc44666228..4560348f8f9a405b25dd3677e7be15de2e6f7bb7 100644 (file)
@@ -230,7 +230,15 @@ ToolBarMultipleVolumeRenderer::ToolBarMultipleVolumeRenderer(wxWindow * parent,s
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0 , wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
+
 
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index 642301603acc0aa52f9f6baea6d265db23a4b671..9866ea17098d481d9a663a7dfd2646275f5d3ab7 100644 (file)
@@ -108,7 +108,7 @@ IF ( BUILD_${LIBRARY_NAME} )
       ${WXWIDGETS_LIBRARIES}
   #    ${KWWidgets_LIBRARIES}
       ${VTK_LIBRARIES}
-      creaMaracasVisu
+##EED-creaMaracasVisu-SHARED      creaMaracasVisu
       #${ITK_LIBRARIES}
   #    ${GDCM_LIBRARIES}
   #    ${BOOST_LIBRARIES}
index 5b7473843715a932269b3da5b6cd45cdca4a5485..a8a27e14400cfedd03b44b58c3fd9781d623cf4f 100644 (file)
 
 #include "surfacerenderingimagestencilexport.h"
 
-#include "vtkObjectFactory.h"
 #include "vtkMetaImageWriter.h"
 
 #include "math.h"
 
+
 vtkStandardNewMacro(SurfaceRenderingImageStencilExport)
 
 SurfaceRenderingImageStencilExport::SurfaceRenderingImageStencilExport()
@@ -37,22 +37,33 @@ SurfaceRenderingImageStencilExport::SurfaceRenderingImageStencilExport()
     ImageOutput = 0;
 }
 
-SurfaceRenderingImageStencilExport::~SurfaceRenderingImageStencilExport(){
+SurfaceRenderingImageStencilExport::~SurfaceRenderingImageStencilExport()
+{
 
-    if(ImageOutput){
+    if(ImageOutput)
+       {
         ImageOutput->Delete();
     }
 }
 
-void SurfaceRenderingImageStencilExport::Update(){
-    this->Execute(0);
-}
 
-void SurfaceRenderingImageStencilExport::Execute(vtkImageData *data){
 
-    vtkPolyData* polydata = (vtkPolyData*)this->GetInput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+
+       void SurfaceRenderingImageStencilExport::Update(){
+           this->Execute(0);
+       }
+
+
+       // This method is much too long, and has to be broken up!
+       // Furthermore we are loosing the normals !!!
+       void SurfaceRenderingImageStencilExport::Execute(vtkImageData *data){
+       {
 
     vtkSmartPointer<vtkPolyDataToImageStencil> polytostencil = vtkSmartPointer<vtkPolyDataToImageStencil>::New();
+
+    vtkPolyData* polydata = (vtkPolyData*)this->GetInput();
     polytostencil->SetInput(polydata);
     polytostencil->Update();
 
@@ -63,33 +74,116 @@ void SurfaceRenderingImageStencilExport::Execute(vtkImageData *data){
     imagein->SetScalarTypeToUnsignedShort();    
     imagein->AllocateScalars();
 
-
     int* extent = imagein->GetExtent();
 
-    for (int x = extent[0]; x <= extent[1]; x++){
-        for (int y = extent[2]; y <= extent[3]; y++){
-            for (int z  =extent[4]; z <= extent[5]; z++){
+       int x, y, z;
+    for (x = extent[0]; x <= extent[1]; x++){
+        for (y = extent[2]; y <= extent[3]; y++){
+            for (z  =extent[4]; z <= extent[5]; z++){
                 unsigned short* pixel = static_cast<unsigned short*>(imagein->GetScalarPointer(x,y,z));
                 *pixel = 0;
-            }
-        }
-    }
+            }  // for x
+        } // for y 
+    } // for z
 
     vtkSmartPointer<vtkImageStencil> stencil = vtkSmartPointer<vtkImageStencil>::New();
+
     stencil->SetInput(imagein);
     stencil->SetStencil(polytostencil->GetOutput());
+
     stencil->ReverseStencilOn();
     stencil->SetBackgroundValue(128);
     stencil->Update();
 
-    if(ImageOutput){
+    if(ImageOutput)
+       {
         ImageOutput->Delete();
     }
     ImageOutput = vtkImageData::New();
     ImageOutput->DeepCopy(stencil->GetOutput());
 
-}
+       }
+
+#else
+
+int SurfaceRenderingImageStencilExport::RequestData(  vtkInformation *vtkNotUsed(request),  vtkInformationVector **inputVector,  vtkInformationVector *outputVector)
+{
+
+       // get the info objects
+       vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+       vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+       // get the input and output
+       vtkPolyData *input = vtkPolyData::SafeDownCast(    inInfo->Get(vtkDataObject::DATA_OBJECT()));
+       vtkPolyData *output = vtkPolyData::SafeDownCast(    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+
+    vtkSmartPointer<vtkPolyDataToImageStencil> polytostencil = vtkSmartPointer<vtkPolyDataToImageStencil>::New();
+
+//    vtkPolyData* polydata = (vtkPolyData*)this->GetInput();
+    vtkPolyData* polydata = input;
+    polytostencil->SetInputData(polydata);
+    polytostencil->Update();
+
+    double *bounds = polydata->GetBounds();
+    vtkSmartPointer<vtkImageData> imagein = vtkSmartPointer<vtkImageData>::New();
+
+    imagein->SetExtent(bounds[0] - 1, bounds[1] + 1, bounds[2] - 1, bounds[3] + 1, bounds[4] - 1, bounds[5] + 1);
+    imagein->AllocateScalars(VTK_UNSIGNED_SHORT,1);
 
-vtkImageData* SurfaceRenderingImageStencilExport::GetOutput(){
-    return ImageOutput;
+
+    int* extent = imagein->GetExtent();
+
+       int x,y,z;
+    for (x = extent[0]; x <= extent[1]; x++){
+        for (y = extent[2]; y <= extent[3]; y++){
+            for (z  =extent[4]; z <= extent[5]; z++){
+                unsigned short* pixel = static_cast<unsigned short*>(imagein->GetScalarPointer(x,y,z));
+                *pixel = 0;
+            } // for z
+        }  // for y
+    }  // for z
+
+    vtkSmartPointer<vtkImageStencil> stencil = vtkSmartPointer<vtkImageStencil>::New();
+
+    stencil->SetInputData(imagein);
+    stencil->SetStencilData(polytostencil->GetOutput());
+
+    stencil->ReverseStencilOn();
+    stencil->SetBackgroundValue(128);
+    stencil->Update();
+
+//    if(ImageOutput)
+//     {
+//       ImageOutput->Delete();
+//    }
+//    ImageOutput = vtkImageData::New();
+//    ImageOutput->DeepCopy(stencil->GetOutput());
+
+       output->ShallowCopy( stencil->GetOutput() );
+       stencil->Delete();
+
+
+       return 1;
 }
+
+#endif
+
+
+
+
+
+
+
+//-------------------------------------------------------------------------------------------
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkImageData* SurfaceRenderingImageStencilExport::GetOutputData()
+  {
+     return ImageOutput;
+  }
+#else
+  // ..
+#endif
+
index 94b8ee3dfd8a943f3d0f66486540a94286e6e914..249c000f4c6000c0075338b99cd2c12704ef9adc 100644 (file)
 #ifndef SURFACERENDERINGIMAGESTENCILEXPORT_H
 #define SURFACERENDERINGIMAGESTENCILEXPORT_H
 
-#include <vtkDataSetToImageFilter.h>
+#include "vtkObjectFactory.h"
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+  #include <vtkDataSetToImageFilter.h>
+#else
+  #include "vtkImageAlgorithm.h"
+  #include "vtkDataObject.h"
+  #include "vtkInformation.h"
+  #include "vtkDemandDrivenPipeline.h"
+  #include "vtkInformationVector.h"
+#endif
+
 #include <vtkSmartPointer.h>
 #include <vtkPolyDataToImageStencil.h>
 #include <vtkImageStencil.h>
 #include <vtkImageData.h>
 #include <vtkPolyData.h>
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 class SurfaceRenderingImageStencilExport : public vtkDataSetToImageFilter
+#else
+class SurfaceRenderingImageStencilExport : public vtkImageAlgorithm
+#endif
 {
 public:
     static SurfaceRenderingImageStencilExport *New();
 
+#if VTK_MAJOR_VERSION <= 5
     vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkDataSetToImageFilter)
-
     virtual void Update();
-    vtkImageData* GetOutput();
+    virtual vtkImageData* GetOutputData();
+#else
+    vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkImageAlgorithm)
+#endif
+
+
 protected:
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+  // Usual data generation method
     virtual void Execute(vtkImageData *data);
+#else
+  virtual int RequestData(  vtkInformation *vtkNotUsed(request),  vtkInformationVector **inputVector,  vtkInformationVector *outputVector);    
+#endif
 
 private:
 
index 18ff1c1097c340ad3cbd5a20da5917c0acb245df..8214c12af211f56254e8d59247e0d9e8aeb9bdfc 100644 (file)
@@ -91,7 +91,13 @@ vtkProp3D* wxMaracasSurfaceRenderingManagerData::getProp3D(std::string filename)
         }
 
         _dataMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         _dataMapper->SetInput(polydata);
+#else
+        _dataMapper->SetInputData(polydata);
+#endif
 
         vtkActor* dataActor = vtkActor::New();
         dataActor->SetMapper(_dataMapper);
@@ -195,20 +201,35 @@ void wxMaracasSurfaceRenderingManagerData::saveProp3DSTL(const char* filename){
             vtkSmartPointer<vtkPLYWriter> plywriter =
             vtkSmartPointer<vtkPLYWriter>::New();
               plywriter->SetFileName(filename);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
               plywriter->SetInput(_dataMapper->GetInput());
+#else
+              plywriter->SetInputData(_dataMapper->GetInput());
+#endif
               plywriter->Write();
         }else if(ext.compare(STL) == 0){
             vtkSmartPointer<vtkSTLWriter> stlWriter =
             vtkSmartPointer<vtkSTLWriter>::New();
               stlWriter->SetFileName(filename);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
               stlWriter->SetInput(_dataMapper->GetInput());
+#else
+              stlWriter->SetInputData(_dataMapper->GetInput());
+#endif
               stlWriter->SetFileTypeToBinary();
               stlWriter->Write();
         }else if(ext.compare(VTK) == 0){
             vtkSmartPointer<vtkPolyDataWriter> polydataWriter =
             vtkSmartPointer<vtkPolyDataWriter>::New();
               polydataWriter->SetFileName(filename);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
               polydataWriter->SetInput(_dataMapper->GetInput());
+#else
+              polydataWriter->SetInputData(_dataMapper->GetInput());
+#endif
               polydataWriter->SetFileTypeToBinary();
               polydataWriter->Write();
         }else{
@@ -224,13 +245,23 @@ void wxMaracasSurfaceRenderingManagerData::enableBoxWidget(bool enable){
 void wxMaracasSurfaceRenderingManagerData::exportImageStencil(const char* filename){
     if(_dataMapper){
         vtkSmartPointer< SurfaceRenderingImageStencilExport> stencilexport = vtkSmartPointer< SurfaceRenderingImageStencilExport >::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         stencilexport->SetInput( _dataMapper->GetInput());
+#else
+        stencilexport->SetInputData( _dataMapper->GetInput());
+#endif
         stencilexport->Update();
         vtkImageData* imgstencil = stencilexport->GetOutput();
 
         vtkSmartPointer<vtkMetaImageWriter> metawriter = vtkSmartPointer<vtkMetaImageWriter>::New();
         metawriter->SetFileName(filename);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         metawriter->SetInput(imgstencil);
+#else
+        metawriter->SetInputData(imgstencil);
+#endif
         metawriter->Write();
     }else{
         cout<<"No poly data set to data mapper."<<endl;
index 2e3f64ff3286cba702d61e439300cc8f2109ecf9..5396f21bca18be4ebce31c87e12c456d9673cbda 100644 (file)
@@ -39,22 +39,42 @@ wxMaracasSurfaceRenderingManagerDataMhd::wxMaracasSurfaceRenderingManagerDataMhd
        _prop3D=NULL;                   
 
         _tresholdFilter = vtkImageThreshold::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         _tresholdFilter->SetInput(this->_imagedata);
+#else
+        _tresholdFilter->SetInputData(this->_imagedata);
+#endif
         _tresholdFilter->SetInValue(255);        
         _tresholdFilter->SetOutValue(0);
 
 
        _cubesFilter = vtkMarchingCubes::New(); 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         _cubesFilter->SetInput(_tresholdFilter->GetOutput());
+#else
+        _cubesFilter->SetInputData(_tresholdFilter->GetOutput());
+#endif
         //_cubesFilter->ComputeGradientsOn();
         _cubesFilter->ComputeScalarsOn();
         _cubesFilter->ComputeNormalsOn();
         _cubesFilter->SetNumberOfContours( 1 );
        _cleanFilter = vtkCleanPolyData::New();         
-       _cleanFilter->SetInput ( _cubesFilter->GetOutput() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       _cleanFilter->SetInput( _cubesFilter->GetOutput() );
+#else
+       _cleanFilter->SetInputData( _cubesFilter->GetOutput() );
+#endif
 
         _smooth = vtkSmoothPolyDataFilter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         _smooth->SetInput(_cleanFilter->GetOutput());
+#else
+        _smooth->SetInputData(_cleanFilter->GetOutput());
+#endif
         _smooth->SetNumberOfIterations(6);
         _smooth->SetRelaxationFactor(0.3);
         //_smooth->FeatureEdgeSmoothingOff();
@@ -70,16 +90,31 @@ wxMaracasSurfaceRenderingManagerDataMhd::wxMaracasSurfaceRenderingManagerDataMhd
             _boxWidgetS1->SetInteractor( interactor );
             _boxWidgetS1->SetPlaceFactor(1.25);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
             _boxWidgetS1->SetInput( this->_imagedata );
+#else
+            _boxWidgetS1->SetInputData( this->_imagedata );
+#endif
             _boxWidgetS1->PlaceWidget();
             boxSurfaceObserver* observer = boxSurfaceObserver::New();
 
             vtkStripper* striper = vtkStripper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
             striper->SetInput( _smooth->GetOutput() );
+#else
+            striper->SetInputData( _smooth->GetOutput() );
+#endif
             //striper->SetInput( _cleanFilter->GetOutput() );
 
             striper->Update();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
             _boxWidgetS1->SetInput(striper->GetOutput());
+#else
+            _boxWidgetS1->SetInputData(striper->GetOutput());
+#endif
             //_boxWidgetS1->PlaceWidget();
 
 
@@ -94,10 +129,20 @@ wxMaracasSurfaceRenderingManagerDataMhd::wxMaracasSurfaceRenderingManagerDataMhd
             _boxWidgetS1->GetPlanes( _tissuePlanes );
 
             _tissueClipper = vtkClipPolyData::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
             _tissueClipper->SetInput( striper->GetOutput() );
+#else
+            _tissueClipper->SetInputData( striper->GetOutput() );
+#endif
             _tissueClipper->SetClipFunction( _tissuePlanes );
             _tissueClipper->InsideOutOn( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
             _dataMapper->SetInput( _tissueClipper->GetOutput() );
+#else
+            _dataMapper->SetInputData( _tissueClipper->GetOutput() );
+#endif
             observer->SetPlanes( _tissuePlanes );
             observer->SetActor( dataActor );
             _boxWidgetS1->AddObserver( vtkCommand::InteractionEvent             , observer );
@@ -107,7 +152,12 @@ wxMaracasSurfaceRenderingManagerDataMhd::wxMaracasSurfaceRenderingManagerDataMhd
             _boxWidgetS1->EnabledOff();
        }else{          
                 //_dataMapper->SetInput(_cleanFilter->GetOutput());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
             _dataMapper->SetInput(_smooth->GetOutput());
+#else
+            _dataMapper->SetInputData(_smooth->GetOutput());
+#endif
        }
        
        dataActor->SetMapper(_dataMapper);      
index 3e044e99c19a4e7343687ef8938eb4e5625807f5..fd7b1212bdc5297136157fde3e2e0db692187c5f 100644 (file)
@@ -80,21 +80,43 @@ bool ImagePlaneWidget::showImageActors(bool show){
 
 void ImagePlaneWidget::initializeImageActors(){
 
-    int *w_ext = _img->GetWholeExtent();
     //cout<<w_ext[0]<<" "<<w_ext[1]<<" "<<w_ext[2]<<" "<<w_ext[3]<<" "<<w_ext[4]<<" "<<w_ext[5]<<" "<<endl;
     _imageactorx = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+    int *w_ext = _img->GetWholeExtent();
     _imageactorx->SetInput(_img);
+#else
+    int *w_ext = _img->GetExtent();
+    _imageactorx->SetInputData(_img);
+#endif
+
     xslice =  (w_ext[4] + w_ext[5])/2;
     _imageactorx->SetDisplayExtent(w_ext[0], w_ext[1], w_ext[2], w_ext[3], xslice, xslice);
 
 
     _imageactory = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _imageactory->SetInput(_img);
+#else
+    _imageactory->SetInputData(_img);
+#endif
+
     yslice =  (w_ext[2] + w_ext[3])/2;
     _imageactory->SetDisplayExtent(w_ext[0], w_ext[1], yslice, yslice, w_ext[4], w_ext[5]);
 
     _imageactorz = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _imageactorz->SetInput(_img);
+#else
+    _imageactorz->SetInputData(_img);
+#endif
+
     zslice =  (w_ext[0] + w_ext[1])/2;
     _imageactorz->SetDisplayExtent(zslice, zslice, w_ext[2], w_ext[3], w_ext[4], w_ext[5]);
 
@@ -112,7 +134,14 @@ void ImagePlaneWidget::setImage(vtkImageData* img){
 
     // Set input X,Y and Z plane
     _xwidget->Off( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _xwidget->SetInput( _img );
+#else
+    _xwidget->SetInputData( _img );
+#endif
+
     _xwidget->SetPlaneOrientationToXAxes( );
     _xwidget->SetSliceIndex( sliceX );
     _xwidget->TextureInterpolateOff();
@@ -122,7 +151,14 @@ void ImagePlaneWidget::setImage(vtkImageData* img){
     _xwidget->GetTextProperty()->SetColor(0.3, 0.3, 0.3);
 
     _ywidget->Off( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _ywidget->SetInput( _img );
+#else
+    _ywidget->SetInputData( _img );
+#endif
+
     _ywidget->SetPlaneOrientationToYAxes( );
     _ywidget->SetSliceIndex( sliceY );
     _ywidget->TextureInterpolateOff();
@@ -132,7 +168,16 @@ void ImagePlaneWidget::setImage(vtkImageData* img){
     _ywidget->On( );
 
     _zwidget->Off( );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _zwidget->SetInput( _img );
+#else
+    _zwidget->SetInputData( _img );
+#endif
+
+
     _zwidget->SetPlaneOrientationToZAxes( );
     _zwidget->SetSliceIndex( sliceZ );
     _zwidget->TextureInterpolateOff();
@@ -167,7 +212,8 @@ void ImagePlaneWidget::showPlanes(bool show){
 }
 
 
-void ImagePlaneWidget::invariant(){
+void ImagePlaneWidget::invariant()
+{
     if(_img == NULL){
         throw "Image data is not initialized";
     }
@@ -177,20 +223,44 @@ void ImagePlaneWidget::invariant(){
 }
 
 
-void ImagePlaneWidget::setSliceXImageActor(int value){
+void ImagePlaneWidget::setSliceXImageActor(int value)
+{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     int *w_ext = _img->GetWholeExtent();
+#else
+    int *w_ext = _img->GetExtent();
+#endif
+
     xslice = value;
     _imageactorx->SetDisplayExtent(w_ext[0], w_ext[1], w_ext[2], w_ext[3], xslice, xslice);
     m_Interactor->Render();
 }
-void ImagePlaneWidget::setSliceYImageActor(int value){
+
+void ImagePlaneWidget::setSliceYImageActor(int value)
+{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     int *w_ext = _img->GetWholeExtent();
+#else
+    int *w_ext = _img->GetExtent();
+#endif
     yslice = value;
     _imageactory->SetDisplayExtent(w_ext[0], w_ext[1], yslice, yslice, w_ext[4], w_ext[5]);
     m_Interactor->Render();
 }
-void ImagePlaneWidget::setSliceZImageActor(int value){
+
+
+void ImagePlaneWidget::setSliceZImageActor(int value)
+{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     int *w_ext = _img->GetWholeExtent();
+#else
+    int *w_ext = _img->GetExtent();
+#endif
+
     zslice = value;
     _imageactorz->SetDisplayExtent(zslice, zslice, w_ext[2], w_ext[3], w_ext[4], w_ext[5]);
     m_Interactor->Render();
index 27c4d2be6e4173fbafcaa0fbe3a8f6a67d3bd591..1678768c46e24e734c62821b28765b89f090f1ec 100644 (file)
@@ -56,14 +56,17 @@ using namespace std;
 /**
 **     Start of the manager class
 **/
-VolumeRendererManager::VolumeRendererManager(){
-        _renderer = NULL;
-        _idCount=0;
+VolumeRendererManager::VolumeRendererManager()
+{
+    _renderer  = NULL;
+    _idCount   = 0;
 }
-VolumeRendererManager::~VolumeRendererManager(){
-    _renderer = 0;
-    _idCount=0;
-    image = 0;
+
+VolumeRendererManager::~VolumeRendererManager()
+{
+    _renderer  = 0;
+    _idCount   = 0;
+    image              = 0;
     for(unsigned i = 0; i < prop3Dvect.size();i++){
         prop3Dvect[i]->Delete();
     }
@@ -73,7 +76,8 @@ VolumeRendererManager::~VolumeRendererManager(){
 /**
 **     Sets the renderer to manage the prop3D from the view
 **/
-void VolumeRendererManager::setRenderer(vtkRenderer*  renderer){
+void VolumeRendererManager::setRenderer(vtkRenderer*  renderer)
+{
         _renderer = renderer;
 }
 
@@ -87,7 +91,8 @@ vtkRenderer* VolumeRendererManager::getRenderer(){
 /**
 ** Updates Volume
 **/
-void VolumeRendererManager::Update(int ppid){
+void VolumeRendererManager::Update(int ppid)
+{
         VolumeRendererManagerData* data = this->getViewData(ppid);
         data->Update();
         _renderer->Render();
@@ -103,20 +108,33 @@ void VolumeRendererManager::Update(int ppid){
               if this flag is set to false and the volume has multiple components, vtkImageAppendComponents is used to create
               a single representation of the image.
 */
-int VolumeRendererManager::addVolume(vtkImageData* img, vtkRenderWindowInteractor* interactor, bool independentcomponents){
-    if(img->GetNumberOfScalarComponents() > 1 && !independentcomponents){
-
-
+int VolumeRendererManager::addVolume(vtkImageData* img, vtkRenderWindowInteractor* interactor, bool independentcomponents)
+{
+    if(img->GetNumberOfScalarComponents() > 1 && !independentcomponents)
+       {
         image = img;
 
-
         vtkSmartPointer< vtkImageLuminance > luminance = vtkSmartPointer< vtkImageLuminance >::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         luminance->SetInput(img);
+#else
+        luminance->SetInputData(img);
+#endif
+
         luminance->Update();
 
         vtkSmartPointer< vtkImageAppendComponents > append = vtkSmartPointer< vtkImageAppendComponents >::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         append->SetInput(0, img);
         append->SetInput(1, luminance->GetOutput());
+#else
+        append->SetInputData(0, img);
+        append->SetInputData(1, luminance->GetOutput());
+#endif
+
         append->Update();
 
 
@@ -301,12 +319,19 @@ void VolumeRendererManager::GetImages(vtkImageData* img, vector<vtkImageData* >&
 
     for(unsigned i = 0; i < img->GetNumberOfScalarComponents(); i++){
         vectimg.push_back(vtkImageData::New());
-        vectimg[i]->SetNumberOfScalarComponents(1);
         vectimg[i]->SetExtent(img->GetExtent());
         vectimg[i]->SetSpacing(img->GetSpacing());
         vectimg[i]->SetOrigin(img->GetOrigin());
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+        vectimg[i]->SetNumberOfScalarComponents(1);
         vectimg[i]->SetScalarType(img->GetScalarType());
         vectimg[i]->AllocateScalars();
+#else
+        vectimg[i]->AllocateScalars(img->GetScalarType(),1);
+#endif
+
     }
 
     int *extent = img->GetExtent();
@@ -446,7 +471,13 @@ vtkImageData* VolumeRendererManager::getImageData(std::string filename){
                 vtkImageData* img = reader->GetOutput();
 
                 vtkImageCast* cast = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                 cast->SetInput(img);
+#else
+                cast->SetInputData(img);
+#endif
+
                 cast->SetOutputScalarTypeToUnsignedShort();
                 cast->Update();
                 //reader->Delete();
index 00d115b0bc25ab3b531f42af412fb8dd40c615e2..6db6e9142886ae10494201d18cbf4231f2d27826 100644 (file)
 #include "boxSurfaceObserver.h"
 #include "vtkProperty.h"
 
-#include <vtkVolumeRayCastMapper.h>
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include <vtkVolumeRayCastMapper.h>
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+  //...
+#else
+#include <vtkGPUVolumeRayCastMapper.h>
+#endif
 
 // EED This is code for Juan Carlos Prieto TESTES
 //#if VTK_MAJOR_VERSION >= 5
 
 using namespace std;
 
-VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, bool usegpu){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, bool usegpu)
+{
     Initialize(vol, "", usegpu);
 }
 
-VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, std::string dataname){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, std::string dataname)
+{
 
     Initialize(vol, dataname);
 
 
 }
 
-VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, vtkRenderer* render, std::string dataname){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, vtkRenderer* render, std::string dataname)
+{
 
     Initialize(vol, dataname);
     render->AddActor(this->getProp3D());
 
 }
 
-void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string dataname, bool usegpu){
-    _id = 0;
-    _vol = vol;
-    _dataname = dataname;
-
+void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string dataname, bool usegpu)
+{
+    _id                        = 0;
+    _vol                       = vol;
+    _dataname          = dataname;
 
-    _volumePlanes  = vtkPlanes::New();
+    _volumePlanes      = vtkPlanes::New();
 
     _volumeProperty = vtkVolumeProperty::New();
     _volumeProperty->SetInterpolationTypeToLinear();
@@ -99,10 +115,14 @@ void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string datana
     _newvol->SetProperty(_volumeProperty );    
 
 
-    _compositeFunction = 0;
-    _MIPFunction = 0;
+#if (VTK_MAJOR_VERSION <= 7) 
+    _compositeFunction         = 0;
+    _MIPFunction               = 0;
+#else 
+       // ..
+#endif
 
-    BoxWidget = 0;
+    BoxWidget                  = 0;
 
 /* EED9Juin2011
     if(usegpu && _vol->GetDataDimension() > 2){
@@ -151,20 +171,28 @@ void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string datana
 
 #if VTK_MAJOR_VERSION >= 6
        cout<<"using SmartVolumeRenderingMapper render GPU"<<endl;
-       vtkSmartVolumeMapper * smartvolumemapper                        = vtkSmartVolumeMapper::New();
+       vtkSmartVolumeMapper * smartvolumemapper = vtkSmartVolumeMapper::New();
        VolumeMapper                                                    = smartvolumemapper;
-       smartvolumemapper->AutoAdjustSampleDistancesOn();
+//       smartvolumemapper->AutoAdjustSampleDistancesOn();
 #else
        _compositeFunction                                              = vtkVolumeRayCastCompositeFunction::New();
-       _MIPFunction                                                    = vtkVolumeRayCastMIPFunction::New();
-       vtkVolumeRayCastMapper* volumeMapper                            = vtkVolumeRayCastMapper::New();
-       VolumeMapper                                                    = volumeMapper;
+       _MIPFunction                                                            = vtkVolumeRayCastMIPFunction::New();
+       vtkVolumeRayCastMapper* volumeMapper            = vtkVolumeRayCastMapper::New();
+       VolumeMapper                                                            = volumeMapper;
        volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
        volumeMapper->AutoAdjustSampleDistancesOn();
 #endif
        VolumeMapper->SetClippingPlanes( _volumePlanes );
        _newvol->SetMapper(VolumeMapper );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        VolumeMapper->SetInput( _vol );
+#else
+       VolumeMapper->SetInputData( _vol );
+#endif
+
+
        VolumeMapper->Update();
        _newvol->Update();
 }
@@ -178,10 +206,16 @@ VolumeRendererManagerData::~VolumeRendererManagerData()
         _volumeProperty->Delete();
         _newvol->Delete();
 
+               
+#if (VTK_MAJOR_VERSION <= 7) 
         if(_compositeFunction)
             _compositeFunction->Delete();
         if(_MIPFunction)
             _MIPFunction->Delete();
+#else 
+       // ..
+#endif
+               
         if(VolumeMapper)
             VolumeMapper->Delete();
 
@@ -212,7 +246,13 @@ void VolumeRendererManagerData::EnableBoundingBox(vtkRenderWindowInteractor* int
         BoxWidget->SetInteractor( interactor );
         BoxWidget->SetPlaceFactor(1.01);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         BoxWidget->SetInput( _vol );
+#else
+        BoxWidget->SetInputData( _vol );
+#endif
+
         BoxWidget->InsideOutOn();
         BoxWidget->PlaceWidget();
 
@@ -301,13 +341,21 @@ void VolumeRendererManagerData::setVolumeOpacity(std::vector<double> greylevel,d
 /**
 **     Check if the variables are setted correctly
 **/
-void VolumeRendererManagerData::checkInvariant()throw (char *){
-        if(!_compositeFunction){
-                throw "No composite function initialized";
-        }
-        if(!_MIPFunction){
-                throw "No MIP function initialized";
-        }
+void VolumeRendererManagerData::checkInvariant()throw (char *)
+{
+#if (VTK_MAJOR_VERSION <= 7) 
+       if(!_compositeFunction)
+       {
+               throw "No composite function initialized";
+       }
+    if(!_MIPFunction)
+       {
+               throw "No MIP function initialized";
+       }
+#else 
+       // ..
+#endif
+
         if(!VolumeMapper){
                 throw "No volume mapper initialized";
         }
@@ -372,24 +420,46 @@ void VolumeRendererManagerData::changeCompositeMIPFunction(int function)
         //checkInvariant();
         if(VolumeMapper!=NULL){
 #if VTK_MAJOR_VERSION >= 6
-           if(dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper))
-           {
-                vtkVolumeRayCastMapper* volumemapper = dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper);
-                if(function == 0){
-                        volumemapper->SetVolumeRayCastFunction(_compositeFunction);
-                }else{
-                        volumemapper->SetVolumeRayCastFunction(_MIPFunction);
-                }
-            }else if(dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper)){
-                vtkGPUVolumeRayCastMapper* volumemapper = dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper);
-                if(function == 0){
-                    volumemapper->SetBlendModeToComposite();
-                }else if(function == 1){
-                    volumemapper->SetBlendModeToMaximumIntensity();
-                }else if(function == 2){
-                    volumemapper->SetBlendModeToMinimumIntensity();
-                }
-            }
+
+       #if (VTK_MAJOR_VERSION <= 7) 
+                          if(dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper))
+                          {
+                                       vtkVolumeRayCastMapper* volumemapper = dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper);
+                                       if(function == 0) {
+                                                       volumemapper->SetVolumeRayCastFunction(_compositeFunction);
+                                       } else {
+                                                       volumemapper->SetVolumeRayCastFunction(_MIPFunction);
+                                       }
+                               } else if(dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper)){
+                                       vtkGPUVolumeRayCastMapper* volumemapper = dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper);
+                                       if(function == 0) {
+                                               volumemapper->SetBlendModeToComposite();
+                                       } else if(function == 1) {
+                                               volumemapper->SetBlendModeToMaximumIntensity();
+                                       } else if(function == 2) {
+                                               volumemapper->SetBlendModeToMinimumIntensity();
+                                       }
+                               }
+                               
+       #else 
+                          if(dynamic_cast<vtkFixedPointVolumeRayCastMapper*>(VolumeMapper))
+                          {
+                                       vtkFixedPointVolumeRayCastMapper* volumemapper = dynamic_cast<vtkFixedPointVolumeRayCastMapper*>(VolumeMapper);
+                                        // ...  for composote or MIP
+                               } else if(dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper)){
+                                       vtkGPUVolumeRayCastMapper* volumemapper = dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper);
+                                       if(function == 0) {
+                                               volumemapper->SetBlendModeToComposite();
+                                       } else if(function == 1) {
+                                               volumemapper->SetBlendModeToMaximumIntensity();
+                                       } else if(function == 2) {
+                                               volumemapper->SetBlendModeToMinimumIntensity();
+                                       }
+                               }
+       #endif
+
+                       
+                       
 #else
             vtkVolumeRayCastMapper* volumemapper = dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper);
             if(function == 0){
index a26f18a95df35da05d8cee06bbe861f491a25210..bcf6ea25b89d1677a8da10bf8779e0cfb3525f02 100644 (file)
 #define VolumeRendererManagerData_H_
 
 #include "vtkCommand.h"
-#include <vtkVolumeRayCastCompositeFunction.h>
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastCompositeFunction.h"
+       #include "vtkVolumeRayCastMIPFunction.h"
+#else 
+       // ..
+#endif
+
+
 #include <vtkPlanes.h>
 #include <vtkVolumeMapper.h>
 
@@ -38,7 +46,6 @@
 #include <vtkImageData.h>
 #include <vtkProp3D.h>
 #include <vtkRenderer.h>
-#include <vtkVolumeRayCastMIPFunction.h>
 #include <vtkLookupTable.h>
 #include <vtkBoxWidget.h>
 #include <vtkAbstractMapper.h>
@@ -196,14 +203,18 @@ private:
          */
         int _id;
 
+#if (VTK_MAJOR_VERSION <= 7) 
         vtkVolumeRayCastCompositeFunction      *_compositeFunction;
-        vtkPlanes                                                      *_volumePlanes;
-       
+        vtkVolumeRayCastMIPFunction                    *_MIPFunction;
+#else 
+               //..
+#endif
+
+        vtkPlanes                                                      *_volumePlanes; 
         vtkVolumeProperty                                      *_volumeProperty;
         vtkVolume                                                      *_newvol;
         vtkPiecewiseFunction                           *_tfun;
         vtkColorTransferFunction                       *_ctfun;
-        vtkVolumeRayCastMIPFunction                    *_MIPFunction;
         /**
         ** boxwidget to control the volume
         **/
index fe7909c9be782b8c27157cc3140f8bd140843fbc..d4896a4fce372c711f44b5d0a99de1ca535b2b8d 100644 (file)
@@ -164,11 +164,13 @@ IF ( BUILD_${LIBRARY_NAME} )
                #creaMaracasVisu_CutModule_interface
 
 
-             BaseVolumeRenderer
-             BaseSurfaceRenderer
-             KernelVolumeRenderer
-             KernelViewerWidgets
-             KernelSurfaceRenderer
+            BaseVolumeRenderer
+            BaseSurfaceRenderer
+            KernelVolumeRenderer
+            KernelViewerWidgets
+            KernelSurfaceRenderer
+                       GUIWxSurfaceRenderer
+                       GUIWxVolumeRenderer
 
 #EED CM
             #KernelVolumeRenderer
@@ -199,6 +201,9 @@ IF ( BUILD_${LIBRARY_NAME} )
 
 
   # CREATE THE TARGET
+set (${LIBRARY_NAME}_SHARED SHARED)
+message(EED mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm  "${${LIBRARY_NAME}_SHARED}" )
+message(EED mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm  ${LIBRARY_NAME} )
   ADD_LIBRARY (${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
 
   # LINK
index 10b680f881591961e3cf2a6b84aad0861d19574c..b118ce09a032292da29a0b5023e5a51f9313df1a 100644 (file)
 #include <vtkProperty2D.h>
 #include <vtkCamera.h>
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 vtkCxxRevisionMacro(vtkInteractorStyleCutter, "$Revision: 1.2 $");
+#else
+// ..
+#endif
 vtkStandardNewMacro(vtkInteractorStyleCutter);
 
 //----------------------------------------------------------------------------
@@ -72,7 +77,12 @@ vtkInteractorStyleCutter::vtkInteractorStyleCutter()
   pd->SetLines( Lines );
    
   vtkPolyDataMapper2D *bboxMapper = vtkPolyDataMapper2D::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   bboxMapper->SetInput( pd );
+#else
+  bboxMapper->SetInputData( pd );
+#endif
    
   this->BboxActor = vtkActor2D::New();
   this->BboxActor->SetMapper( bboxMapper );
index 2dc81e89689295ef70e1c2141c3a594ba62cf067..18600cf6eabd7ce54bebaf7741efeff858c69ff5 100644 (file)
@@ -60,7 +60,15 @@ public:
   // Description:
   // Instantiate the object.
   static vtkInteractorStyleCutter *New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   vtkTypeRevisionMacro(vtkInteractorStyleCutter, vtkInteractorStyle);
+#else
+  vtkTypeMacro(vtkInteractorStyleCutter, vtkInteractorStyle);
+#endif
+
+
   void PrintSelf(ostream& os, vtkIndent indent);
   bool Finished();
   
index 95e1234b460b7390183964a3a7751c98e6f65203..ccd36989a479e62849484c255e0a17ff5b793999 100644 (file)
@@ -168,12 +168,29 @@ void CutModelData::ShowViewBox(bool check)throw( CutModelException){
 void CutModelData::ChangeShape(int selection)throw( CutModelException){
        checkInvariant();
        
-       if(selection == 0){
+       if(selection == 0)
+       {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _Mapper->SetInput(_spherefigure->getPolyData());
+#else
+               _Mapper->SetInputData(_spherefigure->getPolyData());
+#endif
        }else if(selection == 1){
+
+#if VTK_MAJOR_VERSION <= 5
                _Mapper->SetInput(_cylinderfigure->getPolyData());
+#else
+               _Mapper->SetInputData(_cylinderfigure->getPolyData());
+#endif
+
        }else if(selection == 2){
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _Mapper->SetInput(_cubefigure->getPolyData());
+#else
+               _Mapper->SetInputData(_cubefigure->getPolyData());
+#endif
        }else{
                throw CutModelException("Shape type not found");
        }
index 17c633a2d85df361d7174369edb3541c1f352e3f..05e92d879559024a916ed787b3334c773ca60227 100644 (file)
@@ -84,8 +84,12 @@ void CutModelManager::setImageData(vtkImageData* img){
                _img2 = vtkImageData::New();
                _img2->SetExtent(_img->GetExtent());
                _img2->SetSpacing(_img->GetSpacing());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _img2->AllocateScalars();
-
+#else
+  //...
+#endif
                _img2->DeepCopy(_img);
        }
        else
@@ -98,7 +102,12 @@ void CutModelManager::setImageData(vtkImageData* img){
                _img = vtkImageData::New();
                _img->SetExtent(_img2->GetExtent());
                _img->SetSpacing(_img2->GetSpacing());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _img->AllocateScalars();
+#else
+  //...
+#endif
 
                _img->DeepCopy(_img2);
        }
@@ -401,13 +410,23 @@ void CutModelManager::UpdatePolygon(bool mode)
                        sample->CappingOn();                    
 
                        contour = vtkContourFilter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        contour->SetInput((vtkDataObject *)sample->GetOutput());
+#else
+                       contour->SetInputData((vtkDataObject *)sample->GetOutput());
+#endif
                        contour->SetValue(0,1);
 
                        actor = contour->GetOutput();
 
                        actor3D = vtkActor::New();                      
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        mapper->SetInput(actor);                         
+#else
+                       mapper->SetInputData(actor);                     
+#endif
                        mapper->SetScalarModeToUseCellData();
                        actor3D->SetMapper( mapper);
                        _render->AddActor(actor3D);                     
index 88553021b0a32023622e76e65d49af8b03614aeb..674bde438914a2c60eb7bf1546bb2e58c39a2a0e 100644 (file)
@@ -65,7 +65,7 @@ PURPOSE.  See the above copyright notice for more information.
 #include "CutModelPolygon.h"
 #include "vtkInteractorStyleTrackballCamera.h"
 #include "vtkInteractorStyleCutter.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "vtkImplicitSelectionLoop.h"
 #include "vtkPolyDataMapper.h"
 #include "vtkSampleFunction.h"
index 4908c725a1d176a09b904027b9f69174689b55d7..1f7482fc50dab29386a3bfd147df03cba095f487 100644 (file)
@@ -115,7 +115,12 @@ void CutModelPolygon::cutInputImage(std::vector<double> vectorOutX,std::vector<d
        initializeOutputImage();
 
        int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _inImage->GetWholeExtent(ext);
+#else
+       _inImage->GetExtent(ext);
+#endif
        int dimX=ext[1]-ext[0]+1;
        int dimY=ext[3]-ext[2]+1;
        int dimZ=ext[5]-ext[4]+1;
@@ -183,7 +188,12 @@ void CutModelPolygon::cutInputImage(std::vector<double> vectorOutX,std::vector<d
        }// for i
 
        _inImage->Modified();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _inImage->Update();
+#else
+       // ..
+#endif
 
 }
 
index 46b6fe6fc001581f3eaaec6b45133bf28df64dd5..06c9eeafdb0b1386c2d41451f2d3d6b90260507f 100644 (file)
@@ -67,7 +67,14 @@ CutModelSaveBinInfo::~CutModelSaveBinInfo(){
 void CutModelSaveBinInfo::savePolyData(vtkPolyData* polydata){
        vtkPolyDataWriter * writer = vtkPolyDataWriter ::New();
        writer->SetFileName(_stdFilename.c_str());      
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        writer->SetInput(polydata);
+#else
+       writer->SetInputData(polydata);
+#endif
+
        writer->SetFileTypeToBinary();
        writer->Write();
        writer->Delete();
@@ -80,7 +87,12 @@ vtkTransform* CutModelSaveBinInfo::getPolyDataTransform()throw( CutModelExceptio
        vtkPolyData* poly = reader->GetOutput();
 
        vtkPolyDataMapper* mapper       = vtkPolyDataMapper::New();     
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        mapper->SetInput(poly);
+#else
+       mapper->SetInputData(poly);
+#endif
        vtkActor* actor = vtkActor::New();
        actor->SetMapper(mapper);
        vtkMatrix4x4* actmatrix = actor->GetMatrix();
index 23449a77213fb9e47189a527576fc322a68bcd2e..fb4cbf4f2de6c57caee320faec5d7da8a144af99 100644 (file)
@@ -85,8 +85,8 @@ SET(MARACAS_LIB_SRCS
   
   
        
-  widgets/wxVTKRenderWindowInteractor.cxx
-  widgets/wxVTKRenderWindowInteractor.h
+##  widgets/wxVTKRenderWindowInteractor.cxx
+##  widgets/wxVTKRenderWindowInteractor.h
   widgets/wxVTKRenderWindowInteractorEditContour.cxx
   widgets/wxVTKRenderWindowInteractorEditContour.h
   widgets/vtk3DSurfaceWidget.cxx
@@ -177,8 +177,8 @@ SET(MARACAS_LIB_SRCS_02
   wxMaracasHelpDialog.h
   wxMaracasQuantification.cxx
   wxMaracasQuantification.h
-  widgets/wxVTKRenderWindowInteractor.cxx
-  widgets/wxVTKRenderWindowInteractor.h
+##  widgets/wxVTKRenderWindowInteractor.cxx
+##  widgets/wxVTKRenderWindowInteractor.h
   widgets/wxVTKRenderWindowInteractorEditContour.cxx
   widgets/wxVTKRenderWindowInteractorEditContour.h
   widgets/vtk3DSurfaceWidget.cxx
index 3ab512b57199daf2bb825554452667a0bbcdfce9..010ec0c533cb3ca0b73357c5e14b7ed894ab3a2d 100644 (file)
@@ -122,11 +122,22 @@ void wxMaracasCoutourTool::Init(wxVtkBaseView *wxvtkbaseview, vtkImageData* imag
        table->SetRampToLinear();
        table->Build();
        
-       vtkImageMapToColors  *mapperImage = vtkImageMapToColors::New();
+       vtkImageMapToColors  *mapperImage       = vtkImageMapToColors::New();
+       vtkImageActor *actorImage                       = vtkImageActor::New();
+
        mapperImage->SetLookupTable(table);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        mapperImage->SetInput( imagedataMaskResult );
-       vtkImageActor *actorImage       = vtkImageActor::New();
        actorImage->SetInput( mapperImage->GetOutput() );
+#else
+       mapperImage->SetInputData( imagedataMaskResult );
+       actorImage->SetInputData( mapperImage->GetOutput() );
+#endif
+
+
        actorImage->SetOpacity(1);
        
        wxvtkbaseview->GetRenderer()->AddActor(actorImage);     
@@ -488,17 +499,31 @@ void wxMaracasCoutourTool::InitVtkImagesResult()
 
          imagedataValueResult = vtkImageData::New();
 //       imagedataValueResult->SetScalarType(scalartype);
-         imagedataValueResult->SetScalarTypeToUnsignedShort();
          imagedataValueResult->SetSpacing(spc);
          imagedataValueResult->SetDimensions( newDim );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+         imagedataValueResult->SetScalarTypeToUnsignedShort();
          imagedataValueResult->AllocateScalars();
+#else
+         imagedataValueResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
 
          imagedataMaskResult  = vtkImageData::New();
 //       imagedataMaskResult->SetScalarType(scalartype);
-         imagedataMaskResult->SetScalarTypeToUnsignedShort();
          imagedataMaskResult->SetSpacing(spc);
          imagedataMaskResult->SetDimensions( newDim );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+         imagedataMaskResult->SetScalarTypeToUnsignedShort();
          imagedataMaskResult->AllocateScalars();
+#else
+         imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
 
   }
 
index c08f5d977fa6307339d3bcfb6c9b189681d9a98d..da3d19b816e7aab56e211799800c3660d91ba27c 100644 (file)
@@ -51,7 +51,14 @@ void ContourExtractData::SetImage( vtkImageData* imagedata)
 
        // RaC 20-11-09 Changes in InitLstContoursLinesYPoints
        int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->imagedata->GetWholeExtent(ext);
+#else
+       this->imagedata->GetExtent(ext);
+#endif
+
        _sizeImageY = ext[3]-ext[2]+1;
 
        // init vtk image result : valuesImage maskImage  
@@ -463,8 +470,15 @@ void ContourExtractData::CalculateImageResult()
 
                imagedataValueResult->Modified();
                imagedataMaskResult->Modified();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imagedataValueResult->Update();
                imagedataMaskResult->Update();
+#else
+  //...
+#endif
+
        } // if
 
 }
@@ -561,14 +575,20 @@ void ContourExtractData::InitVtkImagesResult()
                imagedataValueResult->Delete();
        }
        imagedataValueResult = vtkImageData::New();
+       imagedataValueResult->SetSpacing(spc);
+       imagedataValueResult->SetDimensions( newDim );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 
 //EED 2017-12-18
        imagedataValueResult->SetScalarType(scalartype);
        //imagedataValueResult->SetScalarTypeToUnsignedShort();
-
-       imagedataValueResult->SetSpacing(spc);
-       imagedataValueResult->SetDimensions( newDim );
        imagedataValueResult->AllocateScalars();
+#else
+       imagedataValueResult->AllocateScalars(scalartype,1);
+#endif
+
 
        if (imagedataMaskResult!=NULL)
        {
@@ -576,14 +596,20 @@ void ContourExtractData::InitVtkImagesResult()
        }
        imagedataMaskResult  = vtkImageData::New();
 
-//EED 2017-12-18
-//     imagedataMaskResult->SetScalarType(scalartype);
-//     imagedataMaskResult->SetScalarTypeToUnsignedShort();
-       imagedataMaskResult->SetScalarTypeToUnsignedChar();
 
        imagedataMaskResult->SetSpacing(spc);
        imagedataMaskResult->SetDimensions( newDim );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+    //EED 2017-12-18
+    //imagedataMaskResult->SetScalarTypeToUnsignedShort();
+       imagedataMaskResult->SetScalarTypeToUnsignedChar();
        imagedataMaskResult->AllocateScalars();
+#else
+       imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
 }
 
 
index 50bea15fde84b4aa28aef13a382bd61c846bc177..ce5f0463d1300f70c288183d5453852e890c9904 100644 (file)
@@ -93,7 +93,12 @@ wxString getExecutablePath()
     char* slash;
 
 #if defined(WIN32)
-    GetModuleFileName(NULL, buf, 511);
+
+    wchar_t buf2[512];
+    long result = GetModuleFileName(NULL, buf2, 511);
+       int ret = wcstombs ( buf, buf2, sizeof(pname) );        
+//    GetModuleFileName(NULL, buf, 511);
+
     slash = strrchr(buf, '\\');
     if (slash)
     {
index a7580682e1bbfd8a4a771afd741564784bab3bef..d79354eedaa0441fdcf71fea82fca1e58decbb0e 100644 (file)
@@ -69,7 +69,15 @@ void ContourView::CreateNewContour(vtkPolyData *contour, int type)
        contour_mapped.push_back(vtkPolyDataMapper::New());
        contour_mapped.back()->ImmediateModeRenderingOn();
        contour_mapped.back()->ScalarVisibilityOff( );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        contour_mapped.back()->SetInput(contour);
+#else
+       contour_mapped.back()->SetInputData(contour);
+#endif
+
 
        contour_actor.push_back(vtkActor::New());
        contour_actor.back()->SetMapper(contour_mapped.back());
index c4fd4408662f8c1710fe8fa4d2e0c1b5944c52ab..253fa58ab8f1e021f41c8308b5ea309b9c76b8f0 100644 (file)
@@ -85,9 +85,14 @@ void LineView::CreateNewLine(double x1, double y1, double z1, double x2, double
        aLineGrid->Allocate(1,1);
        aLineGrid->InsertNextCell(aLine->GetCellType(),aLine->GetPointIds());
        aLineGrid->SetPoints(pointsLine);
-
        
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        contour_mapped.back()->SetInput(aLineGrid);
+#else
+       contour_mapped.back()->SetInputData(aLineGrid);
+#endif
+
        contour_mapped.back()->ImmediateModeRenderingOn();
 
        contour_actor.back()->SetMapper(contour_mapped.back());
index 476902d8af88a62a2154625a8a48ad8416e3aaa3..7c17ffb89f0b09f299b72727a635b631a5f31fdf 100644 (file)
@@ -71,7 +71,14 @@ void PointView::CreateNewPoint(double x, double y, int type)
        point_mapped.push_back(vtkPolyDataMapper::New());
 //     point_mapped.back()->ImmediateModeRenderingOn();
        //point_mapped.back()->ScalarVisibilityOff( );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        point_mapped.back()->SetInput(aSphere->GetOutput());
+#else
+       point_mapped.back()->SetInputData(aSphere->GetOutput());
+#endif
 
        point_actor.push_back(vtkActor::New());
        point_actor.back()->SetMapper(point_mapped.back());
index 07634e33399c311890428c732c515f1a07893f09..3d848abee2afa6857b50a3fca8f74a69b46af89b 100644 (file)
@@ -330,8 +330,8 @@ void ColorLayerImageView::ConfigLookupTable()  // virtual
                {
                if (GetBaseColorNb() != (int)_grey_level_boundary.size()-1)
                {
-                               std::cout << "CM ColorLayerImageView::ConfigLookupTable : ERROR!!! Inconsistency between the sizes of vectors _base_color and _grey_level_boundary. _base_color.size()/3 (=" <<_base_color.size()/3 << ") should be equal to _grey_level_boundary.size()+1 (=" << _grey_level_boundary.size()<<"+1)." << std::endl;
-                               std::cout << "CM The default values for the base colors and the grey level boundaries will be set." << std::endl;
+//EED                          std::cout << "CM ColorLayerImageView::ConfigLookupTable : ERROR!!! Inconsistency between the sizes of vectors _base_color and _grey_level_boundary. _base_color.size()/3 (=" <<_base_color.size()/3 << ") should be equal to _grey_level_boundary.size()+1 (=" << _grey_level_boundary.size()<<"+1)." << std::endl;
+//EED                          std::cout << "CM The default values for the base colors and the grey level boundaries will be set." << std::endl;
                                SetDefaultGreyLevelBoundary();     
                } // if 
                } // _color_type 
@@ -340,8 +340,8 @@ void ColorLayerImageView::ConfigLookupTable()  // virtual
                {
                if (GetBaseColorNb() != (int)_grey_level_boundary.size())
                {
-                               std::cout << "CM ColorLayerImageView::ConfigLookupTable : ERROR!!! Inconsistency between the sizes of vectors _base_color and _grey_level_boundary. _base_color.size()/3 (=" <<_base_color.size()/3 << ") should be equal to _grey_level_boundary.size() (=" << _grey_level_boundary.size()<<")." << std::endl;
-                               std::cout << "CM The default values for the base colors and the grey level boundaries will be set." << std::endl;
+//EED                          std::cout << "CM ColorLayerImageView::ConfigLookupTable : ERROR!!! Inconsistency between the sizes of vectors _base_color and _grey_level_boundary. _base_color.size()/3 (=" <<_base_color.size()/3 << ") should be equal to _grey_level_boundary.size() (=" << _grey_level_boundary.size()<<")." << std::endl;
+//EED                          std::cout << "CM The default values for the base colors and the grey level boundaries will be set." << std::endl;
                                SetDefaultGreyLevelBoundary();     
                } // if 
                } // _color_type 
@@ -451,7 +451,16 @@ void ColorLayerImageView::ConfigLookupTable()  // virtual
 //----------------------------------------------------------------------------
 int ColorLayerImageView::GrayLevel_TO_colorTableIndex( double VALUE )
 {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   GetImage()->Update();
+#else
+  //...
+#endif
+
+
+
 
 //EED 20 oct 2015
 //  GetImage()->GetScalarRange(_range);
index 9f5de8ad3c63ee107d81ba23cb9a432b48b64706..1ba779ef890db57b2a421fa1e0e44174dae30cc6 100644 (file)
@@ -408,6 +408,19 @@ vtkImageData* ColorLayerImageViewManager::GetImageChangeInformation(int id)
        return NULL;
 }
 
+//----------------------------------------------------------------------------
+vtkLookupTable*        ColorLayerImageViewManager::GetLookupTable(int id)
+{
+printf("EED ColorLayerImageViewManager::GetLookupTable 0 \n");
+       if (_colorLayerImageViewLst[id]!=NULL)
+       {
+printf("EED ColorLayerImageViewManager::GetLookupTable 1 \n");
+          return _colorLayerImageViewLst[id]->GetThresholdTable( );
+       } // if 
+printf("EED ColorLayerImageViewManager::GetLookupTable 2 \n");
+       return NULL;
+}
+
 //----------------------------------------------------------------------------
 void ColorLayerImageViewManager::GetDimensionBase(int id,int *dim)
 {
@@ -457,16 +470,6 @@ void ColorLayerImageViewManager::SetNewSpacingLayer(double *spc)
   } // for 
 }
 
-//----------------------------------------------------------------------------
-vtkScalarsToColors* ColorLayerImageViewManager::GetLookupTable(int id)
-{
-       vtkScalarsToColors* lookuptable;
-       if (_colorLayerImageViewLst[id]!=NULL)
-       {
-          lookuptable = _colorLayerImageViewLst[id]->GetLookupTable( );
-       } // if 
-       return lookuptable;
-}
 
 // EOF
 
index 6589398626a2ebd8071425533952aec846c8f475..6a4f95f57b6d1899d0d27790da79c6891144d8fc 100644 (file)
@@ -76,9 +76,8 @@ class  ColorLayerImageViewManager
          void                          GetDimensionOriginalLayer       (int id,int     *dim);
          void                          GetSpcOriginalLayer                     (int id,double  *spc);
          void                          SetNewSpacingLayer                      (double *spc);
-         vtkScalarsToColors* GetLookupTable(int id);
-
 
+         vtkLookupTable*       GetLookupTable(int id);
   private:
 
        std::vector< ColorLayerImageView* >     _colorLayerImageViewLst;
index ce2da483f3ec559d4639eed7cda810679e284a68..b7495217b91066e559d7bcac9c55366a34e42091 100644 (file)
@@ -218,7 +218,7 @@ ColorLayerImageViewPanel::ColorLayerImageViewPanel(wxWindow* parent, int min, in
                sizer                                                   = new wxFlexGridSizer(2);
                _interpolationCheckBox = new wxCheckBox(this, -1, _T("Interpolate") );
                _interpolationCheckBox->SetValue(true);
-               _opacity = new wxSlider(this, wxID_ANY, opacity, 0, 100, wxDefaultPosition, wxSize(2,40), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+               _opacity = new wxSlider(this, wxID_ANY, opacity, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
 
                Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &ColorLayerImageViewPanel::onThresholdInterpolation );
                Connect( _opacity->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &ColorLayerImageViewPanel::onChangeOpacity );
index 5fd366cd9ce03bc4f4bf3c44684e1707702fd12b..f63a57ae9f68f0aef62277d9b1eed7a3e9957e0d 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "wxMPRBaseData.h"
 #include "wxVtk2DBaseView.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "vtkTextProperty.h"
 
 
@@ -192,8 +192,15 @@ void LayerImageBase::SetImage(vtkImageData* image)
        spcBase[5]=0;
 
        _image = image;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _image->Update();
        _image->GetWholeExtent(ext);
+#else
+       _image->GetExtent(ext);
+#endif
+
        dimensionOriginalLayer[0] = ext[1]-ext[0]+1;
        dimensionOriginalLayer[1] = ext[3]-ext[2]+1;
        dimensionOriginalLayer[2] = ext[5]-ext[4]+1;
@@ -206,7 +213,14 @@ void LayerImageBase::SetImage(vtkImageData* image)
                vtkImageData    *imagebase              =       GetwxVtkBaseView()->GetVtkBaseData()->GetImageData();
                if (imagebase!=NULL) 
                {       
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        imagebase->GetWholeExtent(ext);
+#else
+                       imagebase->GetExtent(ext);
+#endif
+
                        dimBase[0]=ext[1]-ext[0]+1;                             
                        dimBase[1]=ext[3]-ext[2]+1;                             
                        dimBase[2]=ext[5]-ext[4]+1;                             
@@ -222,9 +236,17 @@ void LayerImageBase::SetImage(vtkImageData* image)
                } // if imagebase
        } // if wxvtkbaseview
        _image->GetScalarRange( _range );
-       _thresholdTable = vtkLookupTable::New();
+//     _thresholdTable = vtkLookupTable::New();
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _imageChangeInformation->SetInput(_image);
+#else
+       _imageChangeInformation->SetInputData(_image);
+       _imageChangeInformation->Update();
+#endif
+
 }
 
 //------------------------------------------------------------------------------
@@ -238,9 +260,9 @@ void LayerImageBase::SetSpcOriginalLayer(double spc[3])
 //------------------------------------------------------------------------------
 void LayerImageBase::SetNewSpacingLayer(double spc[3])
 {
-       _newSpcLayer[0]=spc[0];
-       _newSpcLayer[1]=spc[1];
-       _newSpcLayer[2]=spc[2];
+       _newSpcLayer[0] = spc[0];
+       _newSpcLayer[1] = spc[1];
+       _newSpcLayer[2] = spc[2];
        _imageChangeInformation->SetOutputSpacing( _newSpcLayer );  
 
 }
@@ -364,6 +386,7 @@ void LayerImageBase::Refresh()
 //----------------------------------------------------------------------------
 vtkLookupTable* LayerImageBase::GetThresholdTable()
 {
+printf("EED LayerImageBase::GetThresholdTable\n");
        return _thresholdTable;
 }
 
@@ -475,7 +498,14 @@ void LayerImageBase::onThreshold()
                }  // !GetActorPresent()
 
                ConfigLookupTable();  // virtual method
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _imageReslicer->SetInput( GetImage() );
+#else
+               _imageReslicer->SetInputData( GetImage() );
+#endif
+
                _imageReslicer->SetInformationInput( GetImage() );
 
                if (directionViewer==0)
@@ -501,27 +531,43 @@ void LayerImageBase::onThreshold()
                _imageReslicer->SetInterpolationModeToNearestNeighbor();
                _imageReslicer->Modified();
 
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               // ..
+#else
+               _imageReslicer->Update();
+#endif
                vtkImageData *img = _imageReslicer->GetOutput();
 //             img->Update();
 //             img->UpdateInformation();
-
 //             _thresholdTable->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _thresholdMapper->SetInput( img );
+#else
+               _thresholdMapper->SetInputData( img );
+#endif
+
                _thresholdMapper->SetLookupTable( _thresholdTable );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _thresholdActor->SetInput( _thresholdMapper->GetOutput() );
+#else
+               _thresholdMapper->Update();
+               _thresholdActor->SetInputData( _thresholdMapper->GetOutput() );
+#endif
+               
                _thresholdActor->SetOpacity(_opacity);
-
                _scalarbarActor->SetLookupTable( _thresholdTable );
 //             _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
                _scalarbarActor->SetTitle("Value");
                _scalarbarActor->SetNumberOfLabels(4);
                int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
                _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
-
 //             _scalarbarActor->SetTextPad(4);  ??
-
-
                } // _image
 }
 
@@ -571,15 +617,8 @@ void LayerImageBase::onThresholdRemove()
                wxVtkBaseView * baseView = _baseView;
                baseView->GetRenderer()->RemoveActor( _thresholdActor );
                baseView->GetRenderer()->RemoveActor( _scalarbarActor );
-
                _actorPresent = false;
-       }
-}
-
-//----------------------------------------------------------------------------
-vtkLookupTable *LayerImageBase::GetvtkLookupTable()
-{
-    return _thresholdTable;
+       }  // if _actorPresent
 }
 
 //----------------------------------------------------------------------------
@@ -603,8 +642,5 @@ vtkScalarsToColors* LayerImageBase::GetLookupTable()
        return _thresholdTable;
 }
 
-
-
-
 // EOF
 
index ac329685949d6210ac67b99ae89a2ccfb0cea900..f5abbb6b61cc6add81fd915486288db483203e15 100644 (file)
@@ -47,7 +47,6 @@
 #include "InteractorStyleMaracas.h"
 #include "vtkImageChangeInformation.h"
 
-
 //----------------------------------------------------------------------------------
 //----------------------------------------------------------------------------------
 //----------------------------------------------------------------------------------
@@ -102,7 +101,8 @@ class LayerImageBase
                void onThresholdRemove();
                wxVtkBaseView *GetwxVtkBaseView();
                void Refresh();
-               vtkLookupTable *GetvtkLookupTable();
+               vtkLookupTable *GetThresholdTable();
+
                vtkImageReslice *GetvtkImageReslice();
                virtual int GetX();
                virtual int GetY();
@@ -145,7 +145,6 @@ class LayerImageBase
                void                                            CleanXYZ(double &x, double &y, double &z);
 
   protected:
-               vtkLookupTable                          *GetThresholdTable();
                double                                          _range[2];
                std::vector<double>             _rangeForColorBar;
                std::vector<int>                        _colorBarPosition;
index d221713dba5553bac5ab3eb6d48f68398f77254e..3cdf1e0b73b9c7108ad9da1b5a4df5cd1e74fc8d 100644 (file)
@@ -225,6 +225,13 @@ void WidgetShowNPoints::RefreshPoint(int id)
        lstActorsSphere[id]->GetProperty()->SetOpacity( mopacity );
        lstSourceSphere[id]->SetRadius( radio );
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       // ..
+#else
+       lstSourceSphere[id]->Update();
+#endif
+
        lstActorsText[id]->SetInput( label.c_str()  );
        lstActorsText[id]->SetPosition(  radio+spc[0]*x , spc[1]*y , spc[2]*z );
 }
@@ -251,7 +258,15 @@ void WidgetShowNPoints::AddVtkPoint()
        //NTU: For updating points
        lstSourceSphere.push_back(vtksphere);
        vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        sphereMapper->SetInput( vtksphere->GetOutput() );
+#else
+       vtksphere->Update();
+       sphereMapper->SetInputData( vtksphere->GetOutput() );
+#endif
+
        vtkActor *sphereActor   = vtkActor::New();
        sphereActor->SetMapper(sphereMapper);
        sphereActor->SetOrigin(0, 0, 0);
@@ -356,6 +371,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
 //------------------------------------------------------------------------
        void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event)
        {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                             _T("Save points .."),
                                             _T(""),
@@ -363,7 +381,17 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
                                             _T("(*.xls)|*.xls"),
                                             wxSAVE | wxOVERWRITE_PROMPT,
                                             wxDefaultPosition);
-               //EED
+#else
+               wxFileDialog* FD = new wxFileDialog( 0,
+                                            _T("Save points .."),
+                                            _T(""),
+                                            _T(""),
+                                            _T("(*.xls)|*.xls"),
+                                            wxFD_SAVE | wxFD_OVERWRITE_PROMPT,
+                                            wxDefaultPosition);
+#endif
+
+
 
                int result_FD = FD->ShowModal();
                
@@ -381,6 +409,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
 //------------------------------------------------------------------------
        void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event)
        {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                              _T("Load points .."),
                                              _T(""),
@@ -388,6 +419,15 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
                                              _T("(*.xls)|*.xls"),
                                              wxOPEN | wxFILE_MUST_EXIST,
                                              wxDefaultPosition);
+#else
+               wxFileDialog* FD = new wxFileDialog( 0,
+                                             _T("Load points .."),
+                                             _T(""),
+                                             _T(""),
+                                             _T("(*.xls)|*.xls"),
+                                             wxFD_OPEN | wxFD_FILE_MUST_EXIST,
+                                             wxDefaultPosition);
+#endif
                int i;
                //EED
                int result_FD = FD->ShowModal();
index 9c3760aea88a0b4b5d74ea7e1140dd4ecc22177a..85cf750d225c60ba2c6f0ede3124e1b08d46c263 100644 (file)
@@ -31,14 +31,20 @@ void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* ca
        vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
        boxwidget->GetPlanes(_planes);
 
+       if ((_mCubes!=NULL)&&(_tissueStripper!=NULL)&&(_tissueClipper!=NULL))
+       {
+                       _mCubes->Update();
+                       _tissueStripper->Update();
+                       _tissueClipper->Update();
+       } // if surface
+
+
        if ( _vtkVolumeRayCastMapper != NULL )
        {
                _vtkVolumeRayCastMapper->RemoveAllClippingPlanes();
-//             vtkPlanes *planes = vtkPlanes::New();
-//             boxwidget->GetPlanes(planes);
-//             _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
                _vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
-       }
+       } // if volume
+
 
 //     _actor->VisibilityOn();
 
@@ -53,7 +59,22 @@ void boxSurfaceObserver::SetActor(vtkProp *actor){
 }
 
 //-------------------------------------------------------------------
-void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
+#if (VTK_MAJOR_VERSION <= 7) 
+       void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
+#else 
+       void boxSurfaceObserver::SetvtkFixedPointVolumeRayCastMapper(vtkFixedPointVolumeRayCastMapper *vtkvolumeraycastmapper)
+#endif
 {
        _vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
 }
+
+//-------------------------------------------------------------------
+void boxSurfaceObserver::SetFilters(vtkAlgorithm *mCubes , vtkAlgorithm *tissueStripper , vtkAlgorithm *tissueClipper)
+{
+       _mCubes                 = mCubes;
+       _tissueStripper = tissueStripper;
+       _tissueClipper  = tissueClipper;
+
+
+}
+
index 11e4d591ac221ac662a473e05d0715761acd8199..21d8338973775204c94fae6f46791a107e7305ff 100644 (file)
 
 #include "vtkPlanes.h"
 #include "vtkProp.h"
-#include "vtkVolumeRayCastMapper.h"
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastMapper.h"
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
+
 #include "vtkObject.h"
 #include "vtkCommand.h"
 
 class boxSurfaceObserver : public vtkCommand
 {
        public:
-               vtkPlanes                                       *_planes;
-               vtkProp                                         *_actor;
-               vtkVolumeRayCastMapper          *_vtkVolumeRayCastMapper;
+               vtkPlanes                                                       *_planes;
+               vtkProp                                                         *_actor;
+
+               vtkAlgorithm                                            *_mCubes;
+               vtkAlgorithm                                            *_tissueStripper;
+               vtkAlgorithm                                            *_tissueClipper;
+#if (VTK_MAJOR_VERSION <= 7) 
+               vtkVolumeRayCastMapper                          *_vtkVolumeRayCastMapper;
+#else 
+               vtkFixedPointVolumeRayCastMapper        *_vtkVolumeRayCastMapper;
+#endif
 
                boxSurfaceObserver() 
                {  
-                       _vtkVolumeRayCastMapper = NULL;
+                       _mCubes                                                         = NULL;
+                       _tissueStripper                                         = NULL;
+                       _tissueClipper                                          = NULL;
+                       _vtkVolumeRayCastMapper                         = NULL;
+                       
                }
 
                virtual char const *GetClassName() const { return "boxSurfaceObserver";}
 
                static boxSurfaceObserver *New(){
-                       boxSurfaceObserver result;
-                       result = new boxSurfaceObserver();
+                       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);
+#if (VTK_MAJOR_VERSION <= 7) 
                void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
+#else 
+               void SetvtkFixedPointVolumeRayCastMapper(vtkFixedPointVolumeRayCastMapper *vtkvolumeraycastmapper);
+#endif
+               void SetFilters(vtkAlgorithm *_mCubes , vtkAlgorithm *_tissueStripper , vtkAlgorithm *_tissueClipper);
 };
 
 
-
 #endif /*BOXSURFACEOBSERVER_H_*/
index 1945d318318644aafea2def163daea17ef27ff67..3e39e532942506600d6d26e3760dddad875f0881 100755 (executable)
@@ -91,13 +91,30 @@ void ImageInfoUR::LoadImagesToMemory(const StringType& gPath) {
                        VTKMetaImageReaderPointerType::New();
        readerUndo->SetFileName(undoImagePath.c_str());
        this->m_UndoImage = readerUndo->GetOutput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_UndoImage->Update();
+#else
+       // ..
+#endif
        //Loading Redo Image
        VTKMetaImageReaderPointerType readerRedo =
                        VTKMetaImageReaderPointerType::New();
        readerRedo->SetFileName(redoImagePath.c_str());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       // ..
+#else
+       readerRedo->Update();
+#endif
+
        this->m_RedoImage = readerRedo->GetOutput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_RedoImage->Update();
+#else
+       // ...
+#endif
        //Updating status
        this->m_OnMemory = true;
 }
@@ -135,7 +152,12 @@ void ImageInfoUR::RemoveImagesFromDisk(const StringType& gPath) {
 void ImageInfoUR::SaveImageAsMHD(const StringType& filename,
                VTKImageDataPointerType image) {
        VTKMetaImageWriterPointerType w = VTKMetaImageWriterPointerType::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        w->SetInput(image);
+#else
+       w->SetInputData(image);
+#endif
        w->SetCompression(false);
        w->SetFileDimensionality(image->GetDataDimension());
        w->SetFileName(filename.c_str());
index ab2219edbe40fe24aaaef4fd9efb43b7578f71e0..4e981c4e89e18d2bb35d4e7efd1be201636324db 100755 (executable)
@@ -70,7 +70,14 @@ void ImageUndoRedo::Redo( )
 void ImageUndoRedo::SetImage( VTKImageDataPointerType image )
 {
        this->m_CurrentImage = image;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_CurrentImage->Update( );
+#else
+       // ..
+#endif
+
        this->UpdateUndoImage( );
 }
 // ----------------------------------------------------------------------------------
@@ -97,10 +104,20 @@ void ImageUndoRedo::SetURImages( ImageMManagerType* imMManager )
 // ----------------------------------------------------------------------------------
 void ImageUndoRedo::UpdateUndoImage( )
 {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_CurrentImage->Update( );
+#else
+       // ...
+#endif
        this->m_UndoImage = VTKImageDataPointerType::New( );
        this->m_UndoImage->DeepCopy( m_CurrentImage );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_UndoImage->Update( );
+#else
+       // ..
+#endif
 }
 // ----------------------------------------------------------------------------------
 ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
@@ -110,9 +127,21 @@ ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
        extract->SetVOI( region.minX, region.maxX, region.minY, region.maxY,
                region.minZ, region.maxZ );
        extract->SetSampleRate( 1, 1, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        extract->SetInput( img );
+#else
+       extract->SetInputData( img );
+#endif
        VTKImageDataPointerType imgResult = extract->GetOutput( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        imgResult->Update( );
+#else
+       // ..
+#endif
+
        return ( imgResult );
 }
 // ----------------------------------------------------------------------------------
index ea2808be1fdd6bae7712287db1c347dc166640fc..932e1c7c6d10cb3d2e947a5fe0534a15399870b1 100644 (file)
@@ -113,7 +113,7 @@ void wxVtk2DView_TMP::Configure() // virtual
        interactorstylebaseview = vtkInteractorStyleBaseView2D::New();
 
     SetInteractorStyleBaseView(interactorstylebaseview);
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        interactorstylebaseview->SetInteractor ( iren );
        iren->SetInteractorStyle(interactorstylebaseview);
        interactorstylebaseview->SetwxVtkBaseView(this);  
@@ -124,7 +124,7 @@ void wxVtk2DView_TMP::SetWxVTKRenderWindowInteractor( wxVTKRenderWindowInteracto
        _wxVTKiren = wxVTKiren;
 }
 //----------------------------------------------------------------------------
-wxVTKRenderWindowInteractor *wxVtk2DView_TMP::GetWxVTKRenderWindowInteractor() // virtual
+crea::wxVTKRenderWindowInteractor *wxVtk2DView_TMP::GetWxVTKRenderWindowInteractor() // virtual
 {
        return _wxVTKiren;
 }
@@ -526,9 +526,10 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
         _pts->SetPoint(2, XX   , YY    , p0[2]);
         _pts->SetPoint(3, p0[0]        , YY    , p0[2]);
         _imageViewer->Render();
-      }
+      } // if
     }
-  if ( event == vtkCommand::LeftButtonReleaseEvent ){
+  if ( event == vtkCommand::LeftButtonReleaseEvent )
+       {
        _bboxEnabled = false;
     //EED} else if ( event == vtkCommand::MouseWheelForwardEvent ){
     } else if ( event == wxEVT_MOUSEWHEEL+10000 ){
@@ -545,7 +546,7 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
         } else {
           //neither ctrl nor shift has been pressed:
           slice += 5;
-        }
+        } // if
 
         slice = slice > min ? slice : min;
         slice = slice < max ? slice : max;
@@ -571,7 +572,8 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
     } else if ( event == wxEVT_MOUSEWHEEL+10001 ){
 
 //      _sliceEnabled = false;
-        if( _wxVTKiren->GetControlKey () ){
+        if( _wxVTKiren->GetControlKey () )
+               {
           slice -= 10;
         } else if( _wxVTKiren->GetShiftKey () ) {
           slice--;
@@ -579,35 +581,33 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
           //neither ctrl nor shift has been pressed:
           slice -= 5;
                  slice = (slice /5) * 5;
-        }
+        } // if
 
         slice = slice > min ? slice : min;
         slice = slice < max ? slice : max;
 
-
 #if (VTK_MAJOR_VERSION >= 5)
                _imageViewer->SetSlice( slice );
 #else
                _imageViewer->SetZSlice( slice );
 #endif
 
-
         //This is not nedeed any more since vtkImageViewer2.cxx -r1.9
         //imageViewer->GetRenderer()->ResetCameraClippingRange();
 
                wxMouseEvent mouseEvent;
                mouseEvent.m_wheelRotation=-130;
-               if (_intVtkPanWid!=NULL) { 
+               if (_intVtkPanWid!=NULL) 
+               { 
                        _intVtkPanWid->CallBackOnMouseWheel(mouseEvent);
-               }
+               } // if
         _imageViewer->Render();
-
     }
-
 }
-//----------------------------------------------------------------------------
-void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
 
+//----------------------------------------------------------------------------
+void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData)
+{
   wxImageViewerWidget::ConstructVTK(imageData);
   _interactorStyle2DMaracas->SetObserver(_Observer);
 
@@ -619,7 +619,6 @@ void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
   _pts->SetPoint(2,  1000      ,  1000 ,  1000 );
   _pts->SetPoint(3, -1000      ,  1000 ,     0 );
 
-
   vtkCellArray *lines = vtkCellArray::New();
   lines->InsertNextCell(5);
   lines->InsertCellPoint(0);
@@ -633,7 +632,6 @@ void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
   _pd->SetLines( lines );
   lines->Delete();  //do not delete lines ??
 
-
        _bboxActor                                              =       vtkActor::New();
     _bboxMapper                                                =       vtkPolyDataMapper::New();
 
@@ -650,6 +648,7 @@ void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
 }
 
 //----------------------------------------------------------------------------
-bool wxImageViewerWidgetRoi::GetRoiSelected(){
+bool wxImageViewerWidgetRoi::GetRoiSelected()
+{
        return _RoiSelected;
 }
index abcaa02ba16b1e6d306b656c7675f3fde2272593..10d1bcb0f56fcbecba51758e7c51cf9808a53217 100644 (file)
@@ -66,11 +66,11 @@ class wxVtk2DView_TMP : public wxVtkBaseView{
 public:
        wxVtk2DView_TMP(vtkImageViewer2 *imageviewer2);
        ~wxVtk2DView_TMP();
-       virtual vtkRenderer             *GetRenderer(); 
-       virtual vtkRenderWindow *GetRenWin();
-       virtual void                    Configure();
-       void                                    SetWxVTKRenderWindowInteractor( wxVTKRenderWindowInteractor *wxVTKiren);
-       virtual wxVTKRenderWindowInteractor *GetWxVTKRenderWindowInteractor();
+       virtual vtkRenderer                     *GetRenderer(); 
+       virtual vtkRenderWindow         *GetRenWin();
+       virtual void                            Configure();
+       void                                            SetWxVTKRenderWindowInteractor( wxVTKRenderWindowInteractor *wxVTKiren);
+       virtual crea::wxVTKRenderWindowInteractor *GetWxVTKRenderWindowInteractor();
 
 private:
        wxVTKRenderWindowInteractor *_wxVTKiren;
index a82afc9645190281efa07aa7ba7150cf07e54891..5815971523b9cb04a3334465ef87b9722e6e3145 100644 (file)
@@ -42,7 +42,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 #include <vector>
 #include "wxVtkBaseView.h"
index 8bf041127c9eeafcce1336488f22711392fd6986..2682cae3a4beeaf1e0686173790226e8c0924525 100644 (file)
@@ -58,7 +58,7 @@ void manualContour3DControler::CopyAttributesTo( manualContour3DControler * clon
 bool  manualContour3DControler::OnLeftButtonDown()
 {
        int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
+       crea::wxVTKRenderWindowInteractor *wxVTKiren;
        wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
        wxVTKiren->GetEventPosition(X,Y);
        MouseClickLeft(X,Y);
index 4475960f5df055a4f823c84e8f2842fc1ee698ee..5b561fb3b15a4dd4b29f354821d28f41191a0c0d 100644 (file)
@@ -87,7 +87,7 @@ bool manualContourBaseControler::OnChar()
                char keyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode();
 
                int X,Y;
-               wxVTKRenderWindowInteractor *_wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *_wxVTKiren;
                _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                _wxVTKiren->GetEventPosition(X, Y);
                //int Z = GetZ(); // JPRx
@@ -169,7 +169,7 @@ bool manualContourBaseControler::OnMouseMove()
        if ( _vtkInteractorStyleBaseView!=NULL)
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *_wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *_wxVTKiren;
                _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                _wxVTKiren->GetEventPosition( X , Y );
 
@@ -187,7 +187,7 @@ bool manualContourBaseControler::OnLeftButtonDown()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
 
@@ -201,7 +201,7 @@ bool manualContourBaseControler::OnLeftButtonUp()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
                MouseReleaseLeft(X,Y);
@@ -214,7 +214,7 @@ bool manualContourBaseControler::OnLeftDClick()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
 
@@ -229,7 +229,7 @@ bool manualContourBaseControler::OnMiddleButtonDown()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
                GetManualViewBaseContour()->InitMove( X, Y,GetZ());
@@ -247,7 +247,7 @@ bool manualContourBaseControler::OnRightButtonDown()
        if( _vtkInteractorStyleBaseView!= NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X, Y);
 
index fedb9de69276fbce8448c77ed36671b165112b20..4fece95ed380c68131eeb03d8b0a99c2c93ba6b5 100644 (file)
@@ -61,7 +61,7 @@
 //#include "widgets/InteractorStyleMaracas.h"
 #include "InteractorStyleMaracas.h"
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 //--
@@ -98,7 +98,7 @@ public:
        virtual bool  OnRightButtonUp();
 
        void    SetModelView(manualBaseModel *manContModel, manualViewBaseContour *manViewBaseCont);
-       manualBaseModel         * GetManualContourModel();
+       manualBaseModel                 * GetManualContourModel();
        manualViewBaseContour   * GetManualViewBaseContour();
 
 
index e5ab192a368b3d2889b255b2abbf733c2b8388de..7f4d128eb4135f35993b2db96c426b0c3eef1de8 100644 (file)
@@ -34,34 +34,25 @@ manualContourModel::manualContourModel()
     _cntSplineX = vtkKochanekSpline::New( );
     _cntSplineY = vtkKochanekSpline::New( );
     _cntSplineZ = vtkKochanekSpline::New( );
-
        this->SetCloseContour(true);
-
     _cntSplineX->SetDefaultTension( 0 );
        _cntSplineX->SetDefaultBias( 0 );
        _cntSplineX->SetDefaultContinuity( 0 );
-
     _cntSplineY->SetDefaultTension( 0 );
        _cntSplineY->SetDefaultBias( 0 );
        _cntSplineY->SetDefaultContinuity( 0 );
-
     _cntSplineZ->SetDefaultTension( 0 );
        _cntSplineZ->SetDefaultBias( 0 );
        _cntSplineZ->SetDefaultContinuity( 0 );
-
 //JSTG 25-02-08 -------------------------------------------------------------------------------------------------
-
        // this parameter is reset in the  VIRTUAL manualContourBaseControler::Configure
        _sizePointsContour      = 100;                  //JSTG 25-02-08 The change in the inisialization of these variable is critical.
-
        _delta_JSTG                     = 0.0;
 //---------------------------------------------------------------------------------------------------------------
-
 //CMRU 17-08-09 -------------------------------------------------------------------------------------------------
        _realSize                       = 0.0;
        _label                          = "";
 //---------------------------------------------------------------------------------------------------------------
-
 }
 
 // ----------------------------------------------------------------------------
@@ -72,15 +63,14 @@ manualContourModel::~manualContourModel()
                delete _lstPoints[i];
        }
        _lstPoints.clear();
-
        _cntSplineX->RemoveAllPoints();
        _cntSplineY->RemoveAllPoints();
        _cntSplineZ->RemoveAllPoints();
-
        _cntSplineX->Delete();
        _cntSplineY->Delete();
        _cntSplineZ->Delete();
 }
+
 // ----------------------------------------------------------------------------
 int manualContourModel::AddPoint(double x,double y,double z)
 {
@@ -88,7 +78,6 @@ int manualContourModel::AddPoint(double x,double y,double z)
    mp->SetPoint(x,y,z);
    AddManualPoint(mp);
    //UpdateSpline();
-
    return _lstPoints.size()-1;
 }
 // ----------------------------------------------------------------------------
@@ -187,6 +176,7 @@ void manualContourModel::DeleteAllPoints()
 
 void manualContourModel::MovePoint(int i,double dx,double dy,double dz)
 {
+printf("EED manualContourModel::MovePoint %p \n", this);
        manualPoint *mp=_lstPoints[i];
        double x=mp->GetX()+dx;
        double y=mp->GetY()+dy;
@@ -388,8 +378,6 @@ void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, doubl
 }
 
 // ----------------------------------------------------------------------------
-
-
 /*void manualContourModel::GetSplinePoint(double t, double &x, double &y, double &z)
 {
        if (_lstPoints.size()==0)
@@ -413,19 +401,18 @@ void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, doubl
                z       = _cntSplineZ->Evaluate(t);
        }
 }*/
+
 // ----------------------------------------------------------------------------
 double manualContourModel::GetPathSize(double *spc)
 {
        double result = 0;
        double x1,y1,z1;
        double x2,y2,z2;
-
 // JSTG 25-02-08 -----------------------------
        //double t,delta;
        //int i,np,nps;
        int i;
 //--------------------------------------------
-
        if (_lstPoints.size()==2)
        {
                x1 = spc[0] * _lstPoints[0]->GetX();
@@ -438,7 +425,6 @@ double manualContourModel::GetPathSize(double *spc)
        }
        if (_lstPoints.size()>2)
        {
-
 // JSTG 25-02-08 ------------------------------------------
                //np  = _lstPoints.size( );
                //nps = 200;
@@ -446,7 +432,6 @@ double manualContourModel::GetPathSize(double *spc)
                UpdateSpline();
                //GetSplinePoint(0,x1,y1,z1);
                GetSpline_i_Point(0,&x1,&y1,&z1);
-
                x1 = spc[0] * x1; 
                y1 = spc[1] * y1; 
                z1 = spc[2] * z1; 
@@ -466,11 +451,9 @@ double manualContourModel::GetPathSize(double *spc)
                        z1=z2;
                }// for
        }
-
        return result;
 }
 
-
 // ----------------------------------------------------------------------------
 double manualContourModel::GetPathArea(double *spc)
 {
@@ -485,7 +468,6 @@ double manualContourModel::GetPathArea(double *spc)
                double x2,y2,z2;
                bool okArea=true;
                int i, j;
-
                // This uses Green's theorem:
                // A = 1/2 * sum( xiyi+1 - xi+1yi); pO == pN
                // A < 0 -> A = |A| (a negative value could raise because points are
@@ -513,9 +495,7 @@ double manualContourModel::GetPathArea(double *spc)
                        x2=spc[0]*x2;
                        y2=spc[1]*y2;
                        z2=spc[2]*z2;
-                       area +=
-                                       (x1 * y2 ) -
-                                       ( x2 * y1 );
+                       area += (x1 * y2 ) - ( x2 * y1 );
                        if (z1!=z2)
                        {
                                okArea=false;
@@ -558,7 +538,6 @@ double manualContourModel::GetPathArea(double *spc)
 // p[x,y,z]   :  data in
 // rp[x,y,z]  :  data out  result point
 // rn[x,y,z]  :  data out   result normal
-
 void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double *rn)
 {
        double  distMin=999999999;
@@ -604,12 +583,11 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                                rn[0] = x2-x1;
                                rn[1] = y2-y1;
                                rn[2] = z2-z1;
-                       }
-                       x2=x1;
-                       y2=y1;
-                       z2=z1;
+                       } // if
+                       x2 = x1;
+                       y2 = y1;
+                       z2 = z1;
                }// for
-
 // JSTG 25-02-08 ------------------------------------------
                //if (tback==0)
                if (iback==0)
@@ -618,10 +596,10 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                        //GetSplinePoint(t,x1,y1,z1);
                        GetSpline_i_Point(i,&x1,&y1,&z1);
 //----------------------------------------------------------
-                       rn[0]=rp[0]-x1;
-                       rn[1]=rp[1]-y1;
-                       rn[2]=rp[2]-z1;
-               }
+                       rn[0] = rp[0]-x1;
+                       rn[1] = rp[1]-y1;
+                       rn[2] = rp[2]-z1;
+               } // if iback 
        } else {
                rp[0] = 0;
                rp[1] = 0;
@@ -629,11 +607,11 @@ void manualContourModel::GetNearestPointAndNormal(double *p, double *rp,  double
                rn[0] = -1;
                rn[1] = 0;
                rn[2] = 0;
-       }
+       } // if np
 }
 
 // ----------------------------------------------------------------------------
-manualContourModel * manualContourModel :: Clone() // virtual
+manualContourModel * manualContourModel::Clone() // virtual
 {
        manualContourModel * clone = new manualContourModel();
        CopyAttributesTo(clone);
index d021a3212746f5d6b3f421181864d78d73a04847..2beb5ae2ce37ecbd1f91745321c977f51fab3340 100644 (file)
@@ -46,7 +46,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 //--
index f606f98a5c95510e5aff41a21a7078727199f6c9..b6b361c3bd167c8d2c368db82e3ae70ac8019f71 100644 (file)
@@ -80,7 +80,8 @@ void manualContourModelCircle::UpdateSpline() // virtal
        int nps = GetNumberOfPointsSpline();
        _deltaAngle=(3.14159265*2)/(nps-1);
 
-       if (np==2){
+       if (np==2)
+       {
                mpA                     = GetManualPoint(0);
                mpB                     = GetManualPoint(1);
                difX            = mpA->GetX() - mpB->GetX();
index 1d6a4115481618ae0c985d01af25e72bfbf723b7..a8d3d1d6aa73dee6caa957f17664646eb6810f9b 100644 (file)
@@ -42,7 +42,6 @@ private:
        double          _centerX;
        double          _centerY;
        double          _centerZ;
-
        virtual int             GetTypeModel();  
        virtual void    UpdateSpline();
 };
index e6791913123eb47141f75923ba91727f9a0d03a7..c0848508945c197754effba6de0e979852e1dd58 100644 (file)
@@ -87,7 +87,6 @@ void manualView3VContour::RefreshContour()  // virtula
 {
        manualViewContour::RefreshContour();
        int i;
-       
        //EED 27 Juin 2012
     //Boundaring box   
        _minX=99999;
@@ -96,8 +95,6 @@ void manualView3VContour::RefreshContour()  // virtula
        _maxX=-99999;
        _maxY=-99999;
        _maxZ=-99999;
-       
-       
        double pp[3];
 // JSTG 25-02-08 ----------------------------------------
        //int nps = GetNumberOfPointsSpline();
@@ -107,11 +104,8 @@ void manualView3VContour::RefreshContour()  // virtula
        {
                _pts->GetPoint( i, pp );
                FilterCordinateXYZ(pp[0],pp[1],pp[2]);
-
 //EED 27 sep 2006
                _pts->SetPoint( i, pp[0] , pp[1] ,pp[2] );
-               
-               
                //EED 27 Juin 2012
                //Boundaring box
                if (pp[0] < _minX) { _minX = pp[0]; }
@@ -120,14 +114,12 @@ void manualView3VContour::RefreshContour()  // virtula
                if (pp[0] > _maxX) { _maxX = pp[0]; }
                if (pp[1] > _maxY) { _maxY = pp[1]; }           
                if (pp[2] > _maxZ) { _maxY = pp[2]; }           
-               
        }// for
-
 //EED 2017-03-02
-       if (_pts!=NULL) { 
+       if (_pts!=NULL) 
+       { 
                _pts->Modified(); 
        }
-
 }
 
 // ----------------------------------------------------------------------------
index 198b7b1a5e55678bcff87ec2eeac3b5cbce448b6..47b19a033d802a515087015598f727e703e940fd 100644 (file)
@@ -48,21 +48,16 @@ manualViewBaseContour::manualViewBaseContour()
        _spc[0]                         = 1;
        _spc[1]                         = 1;
        _spc[2]                         = 1;
-
        _coulorEdit_r           = 1;
        _coulorEdit_g           = 1;
        _coulorEdit_b           = 0;
-
        _coulorNormal_r         = 1;
        _coulorNormal_g         = 0;
        _coulorNormal_b         = 1;
-
        _coulorSelection_r      = 0;
        _coulorSelection_g      = 1;
        _coulorSelection_b      = 0;
-
        _widthline                      = 1;
-
 }
 // ----------------------------------------------------------------------------
 manualViewBaseContour::~manualViewBaseContour()
@@ -121,7 +116,7 @@ void manualViewBaseContour :: AddCompleteContourActor(  bool ifControlPoints )
 }
 // ---------------------------------------------------------------------------
 
-void manualViewBaseContour :: RemoveCompleteContourActor()
+void manualViewBaseContour::RemoveCompleteContourActor()
 {
        /*vtkRenderer * theRenderer =*/  _wxvtkbaseview->GetRenderer(); // JPRx ??
         //Removing the spline
@@ -315,7 +310,15 @@ void manualViewBaseContour::ConstructVTKObjects()
     _bboxMapper                        =       vtkPolyDataMapper::New();
     _bboxMapper->ScalarVisibilityOff( );
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _bboxMapper->SetInput(_pd);
+#else
+       _bboxMapper->SetInputData(_pd);
+#endif
+
+
        _bboxMapper->ImmediateModeRenderingOn();
        _contourVtkActor->SetMapper(_bboxMapper);
        _contourVtkActor->GetProperty()->BackfaceCullingOff();
index 2a8a7588e493cbe8acdf0ca10f334b5d22f836f7..be5976a1d1c2c059b0758856218f77089f15e9e9 100644 (file)
@@ -57,7 +57,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 //--
@@ -188,7 +188,7 @@ public:
                        void                                    SetWidthLine(double width);
                        double                                  GetWidthLine();
 
-       virtual void                    ConstructVTKObjects();
+       virtual void                                    ConstructVTKObjects();
 
        void SetCellArray(bool type);
 //---------------------------------------------------
@@ -203,7 +203,7 @@ private:
        vtkActor                                                        *_contourVtkActor;
        vtkPolyDataMapper                                       *_bboxMapper;
 
-       void                    DeleteVtkObjects();
+       void                                                            DeleteVtkObjects();
        
 
 //---------------------------------------------------
index 60148cab5d189a4e5dcb8738770ca6448ee06b68..cbb4ec16d785796bc8624a03145e84c25360ec0f 100644 (file)
@@ -36,23 +36,20 @@ manualViewBullEyeSector::manualViewBullEyeSector()
 void manualViewBullEyeSector::RefreshContour()
 {
 //EED004
-       int i,nps;
-       double x,y,z;
-       double xx,yy,zz;
+       int     i,nps;
+       double  x,y,z;
+       double  xx,yy,zz;
 //----------------------------------
-
        //EED 27 Juin 2012
     //Boundaring box   
-       _minX=99999;
-       _minY=99999;
-       _minZ=99999;
-       _maxX=-99999;
-       _maxY=-99999;
-       _maxZ=-99999;
-       
+       _minX = 99999;
+       _minY = 99999;
+       _minZ = 99999;
+       _maxX = -99999;
+       _maxY = -99999;
+       _maxZ = -99999;
        _manContModel->UpdateSpline();
     nps = _manContModel->GetNumberOfPointsSpline();
-
        if ( _pts!=NULL )
        {
                for( i = 0; i < nps; i++ )
@@ -62,7 +59,6 @@ void manualViewBullEyeSector::RefreshContour()
                        yy = y*_spc[1];
                        zz = z*_spc[2];
                        _pts->SetPoint(i , xx , yy , zz );
-                       
                        //EED 27 Juin 2012
                        //Boundaring box
                        if (xx < _minX) { _minX = xx; }
@@ -71,11 +67,8 @@ void manualViewBullEyeSector::RefreshContour()
                        if (xx > _maxX) { _maxX = xx; }
                        if (yy > _maxY) { _maxY = yy; }         
                        if (zz > _maxZ) { _maxY = zz; }         
-                       
-                       
                }// for
                //EED 2017-03-02
                _pts->Modified();
        } // if _pts
-
 }
index 12d97e4f172c1f2c9189d0607653e483ccabb3cd..2fa468bbd1d00d90dc97d4186c03583e575c2f01 100644 (file)
@@ -30,8 +30,6 @@
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 
-// EED08
-
 manualViewCircle::manualViewCircle()
 {
 //     _sizePointsContour=5;   // default 100
@@ -41,7 +39,6 @@ manualViewCircle::~manualViewCircle()
 {
 }
 
-
 // ----------------------------------------------------------------------------
 manualViewCircle * manualViewCircle :: Clone()
 {
@@ -51,14 +48,12 @@ manualViewCircle * manualViewCircle :: Clone()
 }
 
 // ---------------------------------------------------------------------------
-
 void manualViewCircle::CopyAttributesTo( manualViewCircle * cloneObject)
 {
        // Fathers object
        manualViewBaseContour::CopyAttributesTo(cloneObject);
 }
 
-
 // ----------------------------------------------------------------------------
 int manualViewCircle::GetType() // virtual
 {
@@ -86,11 +81,11 @@ void manualViewCircle::GetMinMax(double &minX,double &minY, double &maxX, double
                maxX=mpA->GetX()+radio;
                maxY=mpA->GetY()+radio;
        } else {
-               minX=0;
-               maxX=0;
-               minY=0;
-               maxY=0;
-       }
+               minX    = 0;
+               maxX    = 0;
+               minY    = 0;
+               maxY    = 0;
+       } // if np
 }
 
 
@@ -99,60 +94,60 @@ void manualViewCircle::GetMinMax(double &minX,double &minY, double &maxX, double
 void manualViewCircle::InitMove(int x, int y, int z)  // virtual
 {
        manualPoint *mp;
-       double XX=x;
-       double YY=y;
-       double ZZ=z;
+       double          XX = x;
+       double          YY = y;
+       double          ZZ = z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
-       if (_manContModel->GetSizeLstPoints()==2){
+       if (_manContModel->GetSizeLstPoints()==2)
+       {
                mp = _manContModel->GetManualPoint(0);
-               _dp0[0]= mp->GetX() - XX;
-               _dp0[1]= mp->GetY() - YY;
-               _dp0[2]= mp->GetZ();
-
-               mp = _manContModel->GetManualPoint(1);
-               _dp1[0]= mp->GetX() - XX;
-               _dp1[1]= mp->GetY() - YY;
-               _dp1[2]= mp->GetZ();
+               _dp0[0] = mp->GetX() - XX;
+               _dp0[1] = mp->GetY() - YY;
+               _dp0[2] = mp->GetZ();
+               mp              = _manContModel->GetManualPoint(1);
+               _dp1[0] = mp->GetX() - XX;
+               _dp1[1] = mp->GetY() - YY;
+               _dp1[2] = mp->GetZ();
 /*
                mp = _manContModel->GetManualPoint(2);
                _dp2[0]= mp->GetX() - XX;
                _dp2[1]= mp->GetY() - YY;
                _dp2[2]= mp->GetZ();
-
                mp = _manContModel->GetManualPoint(3);
                _dp3[0]= mp->GetX() - XX;
                _dp3[1]= mp->GetY() - YY;
                _dp3[2]= mp->GetZ();
 */
-       }
+       } // if 
 }
 
-
 // ----------------------------------------------------------------------------
 void manualViewCircle::MoveContour(int x, int y, int z) // virtual
 {
+printf("EED  manualViewCircle::MoveContour %p \n", this);
        manualPoint *mp;
        double XX=x;
        double YY=y;
        double ZZ=z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
-
        mp = _manContModel->GetManualPoint(1);
        mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]);
-
 //     mp = _manContModel->GetManualPoint(2);
 //     mp->SetPoint(_dp2[0]+XX,_dp2[1]+YY,_dp0[2]);
-
 //     mp = _manContModel->GetManualPoint(3);
 //     mp->SetPoint(_dp3[0]+XX,_dp3[1]+YY,_dp0[2]);
-
        UpdateViewPoint(0);
        UpdateViewPoint(1);
 //     UpdateViewPoint(2);
 //     UpdateViewPoint(3);
+}
 
+// ----------------------------------------------------------------------------
+bool manualViewCircle::ShowLineVersion()
+{
+       return false;
 }
+
+
index dc58111a7035d31ac632f37d6ff2b54aa5ee3ebb..643c9e94a136aa72dc739b7811a218a365cbb086 100644 (file)
@@ -47,6 +47,7 @@ public:
        virtual void InitMove(int x, int y, int z);
        virtual void MoveContour(int x, int y, int z);
        void GetMinMax(double &minX,double &minY, double &maxX, double &maxY);
+       virtual bool ShowLineVersion();
 
 private:
        double                          _dp0[3];
index bddf6aa143923215b8b1ac9036a5dd94384b355c..32ef7e736c9ba79a7d34e59b06b86d37e5162066 100644 (file)
@@ -32,8 +32,7 @@
 manualViewContour::manualViewContour()
 {
        _id_viewPoint_for_text  = 0;
-       _initialConoturModel    = new manualContourModel();
-       
+       _initialConoturModel    = new manualContourModel();     
        _minX                                   = 99999;
        _minY                                   = 99999;
        _maxX                                   = -99999;
@@ -78,38 +77,45 @@ void manualViewContour::Save(FILE *pFile)
 }
 
 // ----------------------------------------------------------------------------
-
 void manualViewContour::Open(FILE *pFile)
 {
 }
 
 // ----------------------------------------------------------------------------
-void manualViewContour::RefreshContour() // virtual
+bool manualViewContour::ShowLineVersion()   // virtual
 {
-       int i,np,nps;
+       bool result = false;
+    int np     = GetNumberOfPoints( );
+       if (np==2) 
+       {
+               result=true;
+       }
+       return result;
+}
 
+// ----------------------------------------------------------------------------
+void manualViewContour::RefreshContour() // virtual
+{
+       int i,nps;
 //JSTG 25-02-08 --------------------
        //double t,delta, x,y,z;
        double x,y,z;
        double xx,yy,zz;
 //----------------------------------
-
-    np = GetNumberOfPoints( );
-
-       if (np==2) 
+       if ( ShowLineVersion()==true ) 
        {
                SetCellArray(false);
                manualPoint *mpA = _manContModel->GetManualPoint(0);
                manualPoint *mpB = _manContModel->GetManualPoint(1);            
                if ( _pts!=NULL )
                {
-                       xx=mpA->GetX() * _spc[0];
-                       yy=mpA->GetY() * _spc[1];
-                       zz=mpA->GetZ() * _spc[2];
-                       _minX=xx;
-                       _minY=yy;
-                       _maxX=xx;
-                       _maxY=yy;
+                       xx              = mpA->GetX() * _spc[0];
+                       yy              = mpA->GetY() * _spc[1];
+                       zz              = mpA->GetZ() * _spc[2];
+                       _minX   = xx;
+                       _minY   = yy;
+                       _maxX   = xx;
+                       _maxY   = yy;
                        _pts->SetPoint(0 , xx , yy , zz  );
                        xx=mpB->GetX() * _spc[0];
                        yy=mpB->GetY() * _spc[1];
@@ -129,12 +135,13 @@ void manualViewContour::RefreshContour() // virtual
 
                //EED 27 Juin 2012
                //Boundaring box        
-               _minX=99999;
-               _minY=99999;
-               _maxX=-99999;
-               _maxY=-99999;
+               _minX = 99999;
+               _minY = 99999;
+               _maxX = -99999;
+               _maxY = -99999;
                if ( _pts!=NULL )
                {
+                   int np      = GetNumberOfPoints( );
                        if (np>=2  )
                        {
                                for( i = 0; i < nps; i++ )
@@ -146,9 +153,9 @@ void manualViewContour::RefreshContour() // virtual
        //--------------------------------------------------------------
                // EED 27 sep 2006
                //                      _pts->SetPoint(i, x,y,z );
-                                       xx=x*_spc[0];
-                                       yy=y*_spc[1];
-                                       zz=z*_spc[2];
+                                       xx = x*_spc[0];
+                                       yy = y*_spc[1];
+                                       zz = z*_spc[2];
                                        _pts->SetPoint(i,xx,yy,zz );
 
                            //EED 27 Juin 2012
@@ -157,7 +164,6 @@ void manualViewContour::RefreshContour() // virtual
                                        if (yy < _minY) { _minY = yy; }
                                        if (xx > _maxX) { _maxX = xx; }
                                        if (yy > _maxY) { _maxY = yy; }
-                               
                                }// for
                        }else{
                                        _pts->SetPoint(0, 0 , 0 , 0);
@@ -165,14 +171,16 @@ void manualViewContour::RefreshContour() // virtual
                        } // if
                } // _pts!=NULL
        } //np==2
-
-       _minX=_minX-1.0;
-       _minY=_minY-1.0;
-       _maxX=_maxX+1.0;
-       _maxY=_maxY+1.0;
+       _minX = _minX-1.0;
+       _minY = _minY-1.0;
+       _maxX = _maxX+1.0;
+       _maxY = _maxY+1.0;
 
 //EED 2017-03-02
-       _pts->Modified();
+       if (_pts!=NULL) 
+       {
+               _pts->Modified();
+       }
 }
 
 // ----------------------------------------------------------------------------
@@ -291,50 +299,43 @@ void manualViewContour::RefreshText()  // virtual
 // ----------------------------------------------------------------------------
 bool manualViewContour::ifTouchContour(int x,int y,int z)
 {
-       bool result=false;
-
-       double xx=x;
-       double yy=y;
-       double zz=z;
+       bool result     = false;
+       double xx       = x;
+       double yy       = y;
+       double zz       = z;
        double ppA[3];
        double ppB[3];
        double d1,d2,d3;
        TransfromCoordViewWorld(xx,yy,zz);
-
 //EED 27 sep 2006
        xx = xx * _spc[0];
        yy = yy * _spc[1];
        zz = zz * _spc[2];
-
-       if ( (xx>=_minX) &&  (yy>=_minY) && (xx<=_maxX) && (yy<=_maxY)) {  // inside the boundaring box
-       
-
-               if (_manContModel->GetSizeLstPoints()==2)
+       if ( (xx>=_minX) &&  (yy>=_minY) && (xx<=_maxX) && (yy<=_maxY)) 
+       {  // inside the boundaring box
+               if ( ShowLineVersion()==true )
                {
                        manualPoint *mpA = _manContModel->GetManualPoint(0);
                        manualPoint *mpB = _manContModel->GetManualPoint(1);
                        _pts->GetPoint(0, ppA);
                        double dirVec[3];
-
                        // direction of the segment
             dirVec[0] = mpB->GetX() - mpA->GetX();                     
             dirVec[1] = mpB->GetY() - mpA->GetY();                     
             dirVec[2] = mpB->GetZ() - mpA->GetZ();                     
-
-
                        // proj = mpA + k*dirVec
                        double num;
                        double den = 0.0 ;
-                       num     =       dirVec[0]*( xx-mpA->GetX() );
-                       num     =       num + dirVec[1]*( yy-mpA->GetY() );
-                       num     =       num + dirVec[2]*( zz-mpA->GetZ() );
+                       num     = dirVec[0]*( xx-mpA->GetX() );
+                       num     = num + dirVec[1]*( yy-mpA->GetY() );
+                       num     = num + dirVec[2]*( zz-mpA->GetZ() );
                        den=dirVec[0]*dirVec[0] + dirVec[1]*dirVec[1] + dirVec[2]*dirVec[2];
                        double k;
                        if (den!=0) 
                        {
-                               k=num/den;
+                               k = num/den;
                        } else {
-                               k=99999999;
+                               k = 99999999;
                        }
                        // projection of th point xx,yy,zz  in segment mpA,mpB
                        double projX = mpA->GetX() + k*dirVec[0];
@@ -347,14 +348,14 @@ bool manualViewContour::ifTouchContour(int x,int y,int z)
                        { 
                                result=true;
                        } // if d1
-               } else{
+               } else {
                        unsigned int i, nps,nps_t;
                        nps       = _sizePointsContour;
                        if (this->_manContModel->IfCloseContour()==true)
                        {
                                nps_t = nps;
                        } else {
-                       nps_t = nps-1;
+                               nps_t = nps-1;
                        } // if close
                        for( i = 0; i < nps_t; i++ ) 
                        {
@@ -365,13 +366,12 @@ bool manualViewContour::ifTouchContour(int x,int y,int z)
                                d3 = sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2]));
                                if (  ((d1+d2)>=d3) &&  ((d1+d2)<=d3*1.3) ) 
                                {
-                                       result=true;
-                                       i=nps;
+                                       result  = true;
+                                       i               = nps;
                                } // if
                        } // for i
                } // if GetSizeLstPoints()==2
        } // if min max
-
        return result;
 }
 
index 64caa62eb7505ab2a4d061463d27c26a87dff0bd..8e1c14382a84cbdf3d7f02d1a9caed2a15a05d8c 100644 (file)
@@ -40,9 +40,10 @@ public:
        virtual ~manualViewContour();
        virtual manualViewContour * Clone();
        void CopyAttributesTo( manualViewContour *cloneObject );
-       virtual int GetType();
+       virtual int  GetType();
        virtual void Save(FILE *pFile);
        virtual void Open(FILE *pFile);
+       virtual bool ShowLineVersion();
        virtual void RefreshContour();
        virtual bool ifTouchContour(int x,int y, int z);
        virtual void InitMove(int x, int y, int z);
index 2e892e9ac9a6b1e4f2b34062df4a434353e0b5bf..031ac73237c171e0a4bde15981fae31df13058be 100644 (file)
@@ -41,7 +41,6 @@ manualViewLine::~manualViewLine()
 {
 }
 
-
 // ----------------------------------------------------------------------------
 manualViewLine * manualViewLine :: Clone()
 {
@@ -51,7 +50,6 @@ manualViewLine * manualViewLine :: Clone()
 }
 
 // ---------------------------------------------------------------------------
-
 void manualViewLine::CopyAttributesTo( manualViewLine * cloneObject)
 {
        // Fathers object
@@ -64,9 +62,7 @@ int manualViewLine::GetType() // virtual
        return 6;
 }
 
-
 // ----------------------------------------------------------------------------
-
 void manualViewLine::InitMove(int x, int y, int z)  // virtual
 {
        manualPoint *mp;
@@ -74,39 +70,31 @@ void manualViewLine::InitMove(int x, int y, int z)  // virtual
        double YY=y;
        double ZZ=z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
        if (_manContModel->GetSizeLstPoints()==2)
        {
                mp = _manContModel->GetManualPoint(0);
-               _dp0[0]= mp->GetX() - XX;
-               _dp0[1]= mp->GetY() - YY;
-               _dp0[2]= mp->GetZ();
-
+               _dp0[0] = mp->GetX() - XX;
+               _dp0[1] = mp->GetY() - YY;
+               _dp0[2] = mp->GetZ();
                mp = _manContModel->GetManualPoint(1);
-               _dp1[0]= mp->GetX() - XX;
-               _dp1[1]= mp->GetY() - YY;
-               _dp1[2]= mp->GetZ();
-
-       }
+               _dp1[0] = mp->GetX() - XX;
+               _dp1[1] = mp->GetY() - YY;
+               _dp1[2] = mp->GetZ();
+       } // if
 }
 
-
 // ----------------------------------------------------------------------------
 void manualViewLine::MoveContour(int x, int y, int z) // virtual 
 {
        manualPoint *mp;
-       double XX=x;
-       double YY=y;
-       double ZZ=z;
+       double          XX = x;
+       double          YY = y;
+       double          ZZ = z;
        TransfromCoordViewWorld(XX,YY,ZZ);
-
        mp = _manContModel->GetManualPoint(0);
        mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
-
        mp = _manContModel->GetManualPoint(1);
        mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]);
-
-
        UpdateViewPoint(0);
        UpdateViewPoint(1);
 }
index 5a8625a28c989d0fa69267dcd2216e028b9aac4b..ca17755e25093e7b65bd8f89bbfcdcaadd2ae73f 100644 (file)
@@ -157,7 +157,16 @@ vtkActor* manualViewPoint::CreateVtkPointActor()
        _pointVtkActor  =       vtkActor::New();
     _bboxMapper                =       vtkPolyDataMapper::New();
 
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _bboxMapper->SetInput(_pd);
+#else
+       _bboxMapper->SetInputData(_pd);
+#endif
+
+
 //     _bboxMapper->ImmediateModeRenderingOn();
        _pointVtkActor->SetMapper(_bboxMapper);
 //     _pointVtkActor->GetProperty()->BackfaceCullingOn();
index e0a8f8209324c8617455d8a53e7630aeffa8835f..84e2b95e6d2e71780d51e460cc0e5e8751f6f5cd 100644 (file)
@@ -44,7 +44,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 #include <vector>
 #include "wxVtkBaseView.h"
index bba59fa26145fa87848e6806ff60865cf47e9c4c..f908f68e0d1adc0d60354ea5be9974068413a6b3 100644 (file)
@@ -43,7 +43,7 @@ manualViewPoints::~manualViewPoints()
 
  
 // ----------------------------------------------------------------------------
-manualViewPoints * manualViewPoints :: Clone()
+manualViewPoints * manualViewPoints::Clone()
 {
        manualViewPoints * clone = new manualViewPoints();
        CopyAttributesTo(clone);
index 868494839f3b76c9f980a93a0a35ed963f20b350..1f868ec51f5ef08b5c53fad13bc44fd9cd0ab6ab 100644 (file)
@@ -66,10 +66,10 @@ void manualViewRoi::RefreshContour() // virtual
                if (np>=2)
                {
                        manualPoint     *mp;
-                       for( i = 0; i < np+1; i++ ) {
+                       for( i = 0; i < np+1; i++ ) 
+                       {
                                ii=i%np;
                                mp = _manContModel->GetManualPoint(ii);
-
        //EEDx6
                                double XX=mp->GetX(),YY=mp->GetY(),ZZ=mp->GetZ();
        //                      wxVtk2DBaseView *wxvtk2Dbasevie = (wxVtk2DBaseView*)this->GetWxVtkBaseView();
@@ -78,14 +78,12 @@ void manualViewRoi::RefreshContour() // virtual
        //EED 27 sep 2007
        //                      _pts->SetPoint(i, XX,YY,ZZ );
                                _pts->SetPoint(i, XX*_spc[0] , YY*_spc[1] , ZZ*_spc[2] );
-                       } //  rof
-
+                       } //  for
                } else {
                                _pts->SetPoint(0, 0 , 0 , 0);
                                _pts->SetPoint(1, 0 , 0 , 0);
                } // if
        }
-
 //EED 2017-03-02
        if (_pts!=NULL) 
        {
index f64909ec676b36ee75168fb100e551a5ec488ecc..48b3a4ddeea7463afcb6af56b8256a1a242970ef 100644 (file)
@@ -49,10 +49,28 @@ manualInteractorWindowLevel::~manualInteractorWindowLevel()
 
 bool manualInteractorWindowLevel::OnMouseMove()                        // virtual 
 {
+
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove    Clean this put in a specific class for camera Interaction ....\n");
+
+// EED Mising in the wheal event  and the ctrl+MouseRight Event
+       wxVtk2DBaseView *wxvtk2Dbaseview        = (wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
+       vtkBaseData *vtkbasedata                        = wxvtk2Dbaseview->GetVtkBaseData();
+       double parallelscaling=wxvtk2Dbaseview->GetRenderer()->GetActiveCamera()->GetParallelScale();
+       vtkbasedata->SetCameraParallelScale( parallelscaling );
+       this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+//-----------------
+
+
        if (_stateWindowLevel==true)
        {
                int tmpPx,tmpPy;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( tmpPx , tmpPy );
                double colorWin;
@@ -120,7 +138,7 @@ bool manualInteractorWindowLevel::OnMiddleButtonDown()      // virtual
        if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
                (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){
                _stateWindowLevel       = true;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( _backPx , _backPy );
                _backWindow = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow();
index 7a8b873dede432bce859965aa3b1ca5c8d0ff03e..f792652e95f4e34fa9cd218277ab2811ea6fbec6 100644 (file)
@@ -126,8 +126,7 @@ void BrushFilter::Run() // virtual
                                {
                                        pixelModify=false;
                                        scalarComponent = _image->GetScalarComponentAsFloat(i,j, k, 0);
-                                       if ((_RangeMin <= scalarComponent)
-                                                       && (scalarComponent <= _RangeMax )) 
+                                       if ((_RangeMin <= scalarComponent) && (scalarComponent <= _RangeMax )) 
                                        {
                                                if (_brushform == 0) 
                                                {
index 8210bec46e5199ab49af3d6662136d626e43d62c..1e2c470fee85473a3fc10f8a6c307dee1e517e8c 100644 (file)
@@ -49,7 +49,9 @@ FillFilter::~FillFilter()
 //---------------------------------------------------------------------------
 void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
 {
-       baseFilterManualPaint::SetImages(image,image2);
+       
+       
+               baseFilterManualPaint::SetImages(image,image2);
        
        if ((_maxX!=_maxXback) || (_maxY!=_maxYback) || (_maxZ!=_maxZback)) 
        {
@@ -61,15 +63,20 @@ void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
                _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
                _auxImageFill->SetOrigin(0, 0, 0);
                _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
                _auxImageFill->SetScalarTypeToUnsignedChar();
                _auxImageFill->AllocateScalars();
+#else
+               _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
                _ptrAuxImageFill = (unsigned char       *)_auxImageFill->GetScalarPointer();
                memset(_ptrAuxImageFill, 0, (_maxX+1) * (_maxY+1) * (_maxZ+1) );
        }
        _maxXback=_maxX;
        _maxYback=_maxY;
-       _maxYback=_maxZ;
+       _maxZback=_maxZ;        
 }
 
 
@@ -89,7 +96,15 @@ void FillFilter::Run() // virtual
                _countRecursiveFillProblem      = 0;
                _countProgressingFill           = 0;
                _usingAuxImageFill                      = false;
+
                ivi                                             = _px + _py*(_maxX+1) + _pz*(_maxX+1)*(_maxY+1);  // index vector image
+
+
+DEF_POINTER_IMAGE_VTK_CREA_set(v_image,ss_image,p_image,st_image,_image)               
+DEF_POINTER_IMAGE_VTK_CREA_set(v_image2,ss_image2,p_image2,st_image2,_image2)          
+
+
+
 //EED01
 //             FillToolRecursive(_px, _py, _pz);
                FillToolRecursive(_px, _py, _pz, ivi);
@@ -126,8 +141,8 @@ void FillFilter::Run() // virtual
 //---------------------------------------------------------------------------
 void FillFilter::FillToolRecursive(int px, int py, int pz,long int ivi) 
 {
-DEF_POINTER_IMAGE_VTK_CREA(v_image,ss_image,p_image,st_image,_image)           
-DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2)              
+//ups ??EED   DEF_POINTER_IMAGE_VTK_CREA(v_image,ss_image,p_image,st_image,_image)             
+//ups ??EED   DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2)                
 
        _countRecursiveFill++;
        _countProgressingFill++;
@@ -142,14 +157,18 @@ DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2)
        {
                if (_usingAuxImageFill == true) 
                {
-                       this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
+//UPS ??EED                    this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
 //EED01
 //                     _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 0);
                        _ptrAuxImageFill[ ivi ]=0;
                }
-               _tmpDistfill = (px-_pxfill)*(px-_pxfill)
-                                       +  (py-_pyfill)*(py-_pyfill)
-                                       +  (pz-_pzfill)*(pz-_pzfill);
+               difX=px-_pxfill;
+               difY=py-_pyfill;
+               difZ=pz-_pzfill;
+               _tmpDistfill = difX*difX + difY*difY + difZ*difZ;
+//             _tmpDistfill = (px-_pxfill)*(px-_pxfill)
+//                                     +  (py-_pyfill)*(py-_pyfill)
+//                                     +  (pz-_pzfill)*(pz-_pzfill);
 
 //if (_countRecursiveFill >1 )
 //{
@@ -210,7 +229,7 @@ GETVALUE2_VTK_CREA(_tmpiglfill2,p_image2,st_image2,ivi)
 
                if (_auxGrayLevelValidationFill == true) 
                {
-                       this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
+//UPS ??EED                    this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
                        if (_image2!=NULL)
                        {
 //EED01
index 3482b2a66e47159810de0a040ad7ade78f730360..9a3e3b8215d7c4c272655538c82c71f86686706a 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "baseFilterManualPaint.h"
 
+
 class FillFilter : public baseFilterManualPaint {
 public:
        FillFilter();
@@ -69,8 +70,29 @@ private:
        int                     _maxYback;
        int                     _maxZback;
 
+
+       int                     difX;
+       int                     difY;
+       int                     difZ;
 protected:
 
+
+//DEF_POINTER_IMAGE_VTK_CREA_definition( v_image , ss_image , p_image , st_image )             
+       double  v_image                 ;
+       int     ss_image                ;
+       char    *p_image                ;
+       int             st_image                ;
+
+//macro not working ???    
+//   DEF_POINTER_IMAGE_VTK_CREA_definition(v_image2,ss_image2,p_image2,st_image2)              
+       double  v_image2                ;
+       int     ss_image2               ;
+       char    *p_image2               ;
+       int             st_image2               ;
+
+
+
+
 };
 
 
index 3941e84f2b70fc06b6cf214ced36d1b929cff418..909db02c41aac42a13866dfa0ae4dc6c1570361c 100644 (file)
@@ -92,14 +92,26 @@ void baseFilterManualPaint::SetImages(vtkImageData *image, vtkImageData *image2)
        _image  = image;
        _image2 = image2;
        int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _image->GetWholeExtent(ext);
+#else
+       _image->GetExtent(ext);
+#endif
        _minX = 0;
        _minY = 0;
        _minZ = 0;
        if (_image2!=NULL)
        {
                int extB[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _image2->GetWholeExtent(extB);
+#else
+               _image2->GetExtent(extB);
+#endif
+
                _maxX = std::min( ext[1]-ext[0] , extB[1]-extB[0] );
                _maxY = std::min( ext[3]-ext[2] , extB[3]-extB[2] );
                _maxZ = std::min( ext[5]-ext[4] , extB[5]-extB[4] );
index b6af3ea5366170be78d96c35361e72fbba9e7eca..ae4e8b99052e791c09db49f633c8495dcdcb2dfe 100644 (file)
 #include "vtkInteractorManualPaint.h"
 
 #include "wxVtk2DBaseView.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
-vtkInteractorManualPaint::vtkInteractorManualPaint(ManualPaintControler* mpc) {
-       _manualPaintControler = mpc;
-       _state          = false;
-       _stateKey       = false;
-       _stateMouse = false;
+vtkInteractorManualPaint::vtkInteractorManualPaint(ManualPaintControler* mpc) 
+{
+       _manualPaintControler   = mpc;
+       _state                                  = false;
+       _stateKey                               = false;
+       _stateMouse                     = false;
 }
 
 //---------------------------------------------------------------------------
-vtkInteractorManualPaint::~vtkInteractorManualPaint() {
+vtkInteractorManualPaint::~vtkInteractorManualPaint() 
+{
 }
 
 //---------------------------------------------------------------------------
-bool vtkInteractorManualPaint::OnChar() {
+bool vtkInteractorManualPaint::OnChar() 
+{
        vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
-       if (interactor->GetKeyCode() == 97) {
+       if (interactor->GetKeyCode() == 97) 
+       {
                _stateKey = !_stateKey;
        }
        return true;
 }
 
 //---------------------------------------------------------------------------
-bool vtkInteractorManualPaint::OnLeftButtonDown() {
+bool vtkInteractorManualPaint::OnLeftButtonDown() 
+{
        vtkRenderWindowInteractor *interactor =
                        _vtkInteractorStyleBaseView->GetInteractor();
        if (interactor->GetControlKey() == 1) {
@@ -61,9 +66,12 @@ bool vtkInteractorManualPaint::OnLeftButtonDown() {
 }
 
 //---------------------------------------------------------------------------
-bool vtkInteractorManualPaint::OnLeftButtonUp() {
+bool vtkInteractorManualPaint::OnLeftButtonUp() 
+{
     if((_state == true) || (_stateKey == true))
+       {
        _manualPaintControler->SetImageUndo();
+       }
        _state = false;
        return true;
 }
@@ -75,7 +83,7 @@ bool vtkInteractorManualPaint::OnMouseMove()
        {
                wxVtk2DBaseView *wxvtk2Dbaseview =
                                (wxVtk2DBaseView*) _vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
-               wxVTKRenderWindowInteractor *wxVTKiren =
+               crea::wxVTKRenderWindowInteractor *wxVTKiren =
                                wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
                int px, py;
                wxVTKiren->GetEventPosition(px, py);
index ab311ae392aaa469c0c690c4ff9dbfe323cd7c26..57fd497a452561a4a12581e93187cf765dd599f6 100644 (file)
@@ -72,7 +72,14 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        this->_gConfigSizer->Add( _mBarSlices, 1, wxGROW );
        //GrayLevel Slider
        this->_gConfigSizer->Add( _txtGrayLevel );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2, wxHORIZONTAL );
+#else
+       wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2 );
+#endif
+
        sizerGrayLevel->Add( _sldGrayLevel, 1, wxGROW );
        sizerGrayLevel->Add( _graylevelCtrl, 1,
                wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
@@ -87,7 +94,14 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
                new wxStaticText( this, -1, _T("Brush Settings") ) );
        //BrushSize Slider
        this->_brushSizer->Add( _txtBrushSize );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2, wxHORIZONTAL );
+#else
+       wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2 );
+#endif
+
        sizersdlBrushSize->Add( _sldBrushSize, 1, wxGROW );
        sizersdlBrushSize->Add( _BrushSizeCtrl, 1,
                wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
index a57426a12cbc3f01e780887858dfa2feb91302b5..acdeae952af351ee731266151eec9187c49d959c 100644 (file)
 //-----------------------------------------------------------------------------
 void HistogramMinMaxLevel::onBarRangeChange(wxCommandEvent& event)
 {
-       printf ("EED HistogramMinMaxLevel::onBarrangeChange\n");
        Histogram*                      histogram               = (Histogram*)GetConcretComponent();
        pPlotterWindow*         plotterwindow   = histogram->GetPlotterWindow();        
 
index bd2d1e4559b1f29ab1625b294707a4911461671a..4f621cb350216666a5482e5f4b4c137ff7cd2b7e 100644 (file)
@@ -133,7 +133,12 @@ void HistogramDialog::initializeHistogramDialog(bool extracontrols){
     sizer->Add(bottomBox,0,wxCENTER);
        SetAutoLayout( TRUE );
        SetSizer( sizer );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        SetBestSize(wxSize(600,600));
+#else
+       SetSize(wxSize(600,600));
+#endif
 }
 wxPanel* HistogramDialog::getPanExtraControls(){
        wxBoxSizer* sizer0 = new wxBoxSizer(wxVERTICAL);
@@ -359,7 +364,14 @@ wxSizer* HistogramDialog::getControls(bool extracontrols){
 
 void HistogramDialog::OnSaveData(wxCommandEvent& event)
 {
-       wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxSAVE, NULL, -1,  -1);//wxFileSelector(_T("Save Data"),wxSAVE);
+       //wxFileSelector(_T("Save Data"),wxSAVE);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxSAVE, NULL, -1,  -1);
+#else
+       wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxFD_SAVE, NULL, -1,  -1);
+#endif
+
        std::ofstream file;
        if(nameF.CompareTo( _T("/0") )>0)
                file.open( (const char*)(nameF.mb_str()) );
@@ -725,7 +737,11 @@ void HistogramDialog::OnRefreshBtn(wxCommandEvent &event)
                return refreshed;
        }
        
+#if (VTK_MAJOR_VERSION <= 7) 
        void HistogramDialog::setVolumeMapper(vtkVolumeRayCastMapper* volMapper)
+#else 
+       void HistogramDialog::setVolumeMapper(vtkFixedPointVolumeRayCastMapper* volMapper)
+#endif
        {
                volumeMapper=volMapper;
        }
index 5ac1e398857d340b6fcbdf0fe47cb760a1c4d54b..c3ba219648c39cef58f1e74017e7de8897724d79 100644 (file)
  //#include <vector>
  #include <vtkPiecewiseFunction.h>
  #include <vtkColorTransferFunction.h>
- #include <vtkVolumeRayCastMapper.h>
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include <vtkVolumeRayCastMapper.h>
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
  #include <vtkVolume.h>
  //#include "../wxMPRWidget.h"
 
@@ -141,7 +145,11 @@ public:
        bool getRefreshed();
        void setCTF(vtkColorTransferFunction* cf);
        void setTF(vtkPiecewiseFunction* tf);
+#if (VTK_MAJOR_VERSION <= 7) 
        void setVolumeMapper(vtkVolumeRayCastMapper* volMapper);
+#else 
+       void setVolumeMapper(vtkFixedPointVolumeRayCastMapper* volMapper);
+#endif
        void setVolume(vtkVolume* vol);
        //void setMPR3Dview(wxVtkMPR3DView *wxvtkmpr3Dview1);
        //void setClipping3DView(wxVtkClipping3DView *wxvtkclipping3Dview1);
@@ -211,35 +219,37 @@ private:
        /*
         cancel Button
        */
-       //wxButton                      *cancelBtn;
-       wxBitmapButton          *cancelBtn;
+       //wxButton                                                      *cancelBtn;
+       wxBitmapButton                                          *cancelBtn;
        /*
         save Button
        */
-       wxButton                                *saveDataBtn;   
+       wxButton                                                        *saveDataBtn;   
        /*
        Load Button
        */
-       wxButton                                *loadDataBtn;
+       wxButton                                                        *loadDataBtn;
        /*
        Refresh Button
        */
-       wxButton                                *refreshBtn;
-
-       wxPanel                         *_panextracontrols;
-       
+       wxButton                                                        *refreshBtn;
+       wxPanel                                                         *_panextracontrols;
        
        // the user had pressed refresh
        bool refreshed;
        
-       vtkColorTransferFunction                *_ctfun;
+       vtkColorTransferFunction                        *_ctfun;
        vtkPiecewiseFunction                            *_tfun;
-       vtkVolumeRayCastMapper                  *volumeMapper; 
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper                          *volumeMapper; 
+#else 
+       vtkFixedPointVolumeRayCastMapper        *volumeMapper; 
+#endif
        vtkVolume                                                       *newvol;
 
        //things to refresh
        //wxVtkMPR3DView                                        *wxvtkmpr3Dview;
-       //wxVtkClipping3DView                   *wxvtkclipping3Dview;
+       //wxVtkClipping3DView                           *wxvtkclipping3Dview;
 
        
        wxSizer* getControls(bool extracontrols = false);
index eb6d6333cde0e8af09cfef6ef48d58f81d539ffe..24628b6ae9b43032f0b3667dcd34ce05eda1d1c1 100644 (file)
@@ -49,6 +49,7 @@
 //----------------------------------------------------------------------------
 
 IMPLEMENT_CLASS(HistogramWidget, wxWindow)
+
 //----------------------------------------------------------------------------
 // Event Table
 //----------------------------------------------------------------------------
index cd5cc1aad15edd364fcfb17057ad77042f4f82c6..4850d1322dcc64f1b66a7a396159ffb125c67d60 100644 (file)
@@ -185,9 +185,9 @@ private:
        
         pHistogram*    histogram;
         pPlotter*              plotter;
-        int                            idTransferenceFunction;
-        int                            histogramSize;
-        int                            idHistogram;
+        int                    idTransferenceFunction;
+        int                    histogramSize;
+        int                    idHistogram;
         /*
          if the image has already a transference
          function and color defines to that function
@@ -203,6 +203,7 @@ private:
         int type;      
         
         DECLARE_CLASS(HistogramWidget);
+
         //----------------------------------------------------------------------------
        // wxWidget macro use declaration for handdling events
        //----------------------------------------------------------------------------
index edcc939b3cb758764dd4f6a1640615c2f14b30de..1140df5e99294bc5edd147fad7f1b35c3516fda9 100644 (file)
@@ -72,7 +72,12 @@ MaximumsDialog::MaximumsDialog(wxWindow *parent,wxString title)
     
        SetAutoLayout( TRUE );
     SetSizer( sizer );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        SetBestSize(wxSize(325,100));
+#else
+       SetSize(wxSize(325,100));
+#endif
 }
 //-----------------------------------------------------------------
 float MaximumsDialog::getXValue()
index b92232faecc1a806ae48ab8e4fba8551abbfc1f9..8f62478e089105f4a839b4358359454d25d8b302 100644 (file)
 # ------------------------------------------------------------------------ */
 
 //----------------------------------------------------------------------------
-#include "mBarRange.h"
+#include <wx/brush.h>
+#include <wx/gdicmn.h>
 
+#include "mBarRange.h"
 
 //const wxEventType wxEVT_TSBAR = wxNewEventType();
 
@@ -36,13 +38,12 @@ DEFINE_EVENT_TYPE(wxEVT_TSBAR_END)
 DEFINE_EVENT_TYPE(wxEVT_TSBAR_MOVED)
 DEFINE_EVENT_TYPE(wxEVT_SELECTION_END)
 
-
-
 //----------------------------------------------------------------------------
 //EVENT TABLE
 //----------------------------------------------------------------------------
 
 IMPLEMENT_CLASS(mBarRange, wxScrolledWindow)
+
 BEGIN_EVENT_TABLE(mBarRange, wxScrolledWindow)
        EVT_PAINT (mBarRange::OnPaint)
        EVT_SIZE  (mBarRange::OnSize)
@@ -67,26 +68,23 @@ END_EVENT_TABLE()
 //CONSTRUCTOR
 //----------------------------------------------------------------------------
 
+//wxDefaultSize
 mBarRange::mBarRange(wxWindow *parent, int w, int h)
-:wxScrolledWindow(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL)
+:wxScrolledWindow(parent,-1,wxDefaultPosition, wxSize(60,60) ,wxTAB_TRAVERSAL)
 {
-       acceptedClick           = true;
-       _bitmap_bar                     = NULL;
+       acceptedClick           =       true;
+       _bitmap_bar                     =       NULL;
        SetWidth (w);
        SetHeight(h);
-       _initialPoint           = 0;
-       trianglesHalfWidth      = 5;
-       
-       wxColour start_Colour;
-
+       _initialPoint           =       0;
+       trianglesHalfWidth      =       5;
        // Setting the default parts colors
-       start_Colour            =       wxColour(0,0,255);
+       start_Colour            =       wxColour(1,0,255,254);
        actual_Colour           =       wxColour(255,255,202);
        end_Colour                      =       wxColour(0,0,255);
        bar_Colour                      =       wxColour(255,0,255);
        backgroundColor     =   parent ->GetBackgroundColour();
        guideLineColor          =   wxColour(255,0,0);
-
        //actual is in _start and end
        //false means that it could be anywhere
        _moveActualWithBar      =       false;
@@ -94,16 +92,13 @@ mBarRange::mBarRange(wxWindow *parent, int w, int h)
        _selectionMoveId        =       -1;
        realX_vertical_line =   -1;
        activeState                     =       false;
-       _actual=0;
-       deviceEndMargin = 0;
-
+       _actual                         =       0;
+       deviceEndMargin         =       0;
        SetOrientation(true);
        setIfWithActualDrawed(true);
-
        b_popmenu.Append (cntID_CHANGE_COLOR, _("Change Color"), _("Changes the color of the selected part"));
        b_popmenu.Append (cntID_ENABLE_ACTUAL, _("Enable actual in range"), _("Enables/Disables the actual triangle to be or not in range"));
        b_popmenu.Append (cntID_MOVABLE_ACTUAL_BAR, _("Move actual-bar simultaneously"), _("Disables the actual triangle to move with the bar"));
-
        SetSize(w,h);
 }
 
@@ -114,6 +109,7 @@ mBarRange::mBarRange(wxWindow *parent, int w, int h)
 mBarRange::~mBarRange()
 {
 }
+
 //---------------------------------------------------------------------------
 //Draw bar: vertical or Horizontal
 //---------------------------------------------------------------------------
@@ -182,6 +178,7 @@ int mBarRange::GetPixelStart()
 {
        return ((_start - _min)*(_w-deviceEndMargin))/(_max - _min);    
 }
+
 //----------------------------------------------------------------------------
 // param i: value in pixels
 //----------------------------------------------------------------------------
@@ -190,6 +187,7 @@ void mBarRange::SetPixelStart(int i)
        _start = _min+((i - deviceStart_x)*( _max - _min))/(_w-deviceEndMargin);
        
 }
+
 //----------------------------------------------------------------------------
 // _actual of the pixel rectangle
 //----------------------------------------------------------------------------
@@ -197,6 +195,7 @@ int mBarRange::GetPixelActual()
 {
        return ((_actual - _min)*(_w-deviceEndMargin))/(_max - _min);
 }
+
 //----------------------------------------------------------------------------
 // param i: value in pixels
 //----------------------------------------------------------------------------
@@ -204,6 +203,7 @@ void mBarRange::SetPixelActual(int i)
 {
        _actual = _min + (i-deviceStart_x)*(_max-_min)/(_w-deviceEndMargin);
 }
+
 //----------------------------------------------------------------------------
 // _end of the pixel rectangle
 //----------------------------------------------------------------------------
@@ -211,6 +211,7 @@ int mBarRange::GetPixelEnd()
 {
        return ((_end - _min)*(_w-deviceEndMargin))/(_max - _min);
 }
+
 //----------------------------------------------------------------------------
 // param i: value in pixels to be converted to real logical value
 //----------------------------------------------------------------------------
@@ -218,10 +219,10 @@ void mBarRange::SetPixelEnd(int i)
 {
        _end = _min + (i-deviceStart_x)*(_max-_min)/(_w-deviceEndMargin);
 }
+
 //----------------------------------------------------------------------------
 // Logical max of the triangle
 //----------------------------------------------------------------------------
-
 double mBarRange::GetMax()
 {
        return _max;
@@ -444,11 +445,9 @@ void mBarRange::RefreshHorizontalView()
        int pxEnd               = GetPixelEnd();
        int pxActual    = GetPixelActual();
 
-       
        int letterHeight= 9;
        int barHeight   = 2*letterHeight;
-       int tempHeight  = _h-(6*letterHeight);
-       
+       int tempHeight  = _h-(6*letterHeight);  
        
        if (_visibleLables)
        {
@@ -460,36 +459,26 @@ void mBarRange::RefreshHorizontalView()
        wxMemoryDC temp_dc;
        temp_dc.SelectObject( *_bitmap_bar );
 
-       
        // Background of this widget
-       
-       
        temp_dc.SetPen(wxPen( backgroundColor ));
        temp_dc.SetBrush(wxBrush( backgroundColor ,wxSOLID  ));
-       
        temp_dc.DrawRectangle(0,0,_w+2*trianglesHalfWidth,_h);
-       
-
        temp_dc.SetPen(wxPen( wxColour(167,165,191) ,1,wxSOLID  ));
        temp_dc.DrawLine(trianglesHalfWidth+2, 0, _w-deviceEndMargin, 0);
        temp_dc.DrawLine(trianglesHalfWidth+2, barHeight, (_w-deviceEndMargin-trianglesHalfWidth-2), barHeight);
        temp_dc.SetDeviceOrigin(trianglesHalfWidth+2,0);
 
-
        // Filling the bar
        temp_dc.SetBrush(wxBrush( wxColour(104,104,104),wxSOLID  ));
        temp_dc.SetPen(wxPen( wxColour(104,104,104),1,wxSOLID  ));
        temp_dc.DrawRectangle( pxStart , 0, pxEnd-pxStart, barHeight);
 
-
        //  The Bar
        if( _selectionMoveId==4 )
        {
                temp_dc.SetBrush(wxBrush( wxColour(128,255,0),wxSOLID  ));
                temp_dc.SetPen(wxPen(  wxColour(0,128,0),1,wxSOLID  ));
-       }
-       else
-       {
+       } else {
                temp_dc.SetBrush(wxBrush( bar_Colour,wxSOLID  ));
                temp_dc.SetPen(wxPen( wxColour(164,0,164),1,wxSOLID  ));
        }
@@ -516,9 +505,7 @@ void mBarRange::RefreshHorizontalView()
        {
                temp_dc.SetBrush(wxBrush( wxColour(128,255,0),wxSOLID  ));
                temp_dc.SetPen(wxPen(  wxColour(0,128,0),1,wxSOLID  ));
-       }
-       else
-       {
+       } else {
                temp_dc.SetBrush(wxBrush( start_Colour,wxSOLID  ));
                temp_dc.SetPen(wxPen( wxColour(0,51,204),1,wxSOLID  ));
        }
@@ -528,9 +515,7 @@ void mBarRange::RefreshHorizontalView()
        {
                temp_dc.SetBrush(wxBrush( wxColour(128,255,0),wxSOLID  ));
                temp_dc.SetPen(wxPen(  wxColour(0,128,0),1,wxSOLID  ));
-       }
-       else
-       {
+       } else {
                temp_dc.SetBrush(wxBrush( end_Colour,wxSOLID  ));
                temp_dc.SetPen(wxPen( wxColour(0,0,255),1,wxSOLID  ));
        }
@@ -551,9 +536,7 @@ void mBarRange::RefreshHorizontalView()
                {
                        temp_dc.SetBrush(wxBrush( wxColour(128,255,0),wxSOLID  ));
                        temp_dc.SetPen(wxPen(  wxColour(0,128,0),1,wxSOLID  ));
-               }
-               else
-               {
+               } else {
                        temp_dc.SetBrush(wxBrush( actual_Colour,wxSOLID  ));
                        temp_dc.SetPen(wxPen( wxColour(205,160,5),1,wxSOLID  ));
                }
@@ -583,7 +566,6 @@ void mBarRange::RefreshHorizontalView()
                temp_dc.SetFont(font);
                temp_dc.SetTextForeground(*wxBLACK);
 
-
                //the **MIN** value, always at the same y level that corresponds to barHeight+1
                wxString text_min;
 //             text_min<< GetMin();
@@ -634,7 +616,6 @@ void mBarRange::RefreshHorizontalView()
                        temp_dc.DrawText(text_actual, pxActual-(stringSize.GetWidth()/2),barHeight+letterHeight);                       
                }                       
        }
-
 }
 
 //----------------------------------------------------------------------------
index ecff41e1578394b6e1fbe935d798651ee06cbead..1f61b51259340f20dfd73b5ff23bd4e50bc2d089 100644 (file)
@@ -470,7 +470,10 @@ private:
        wxBitmap        *_bitmap_bar;
        //the info bitmap device 
        wxBitmap        *_bitmap_info;
+
+
        DECLARE_CLASS(BarRange)
+
        // any class wishing to process wxWindows events must use this macro
        DECLARE_EVENT_TABLE()
 };
index cf3441d4938dab199cd5fb8ada9e3889ccfd4de0..b1450dbcd9487ddeb470675a43e7258ed39edc44 100644 (file)
 #ifndef __mBarRange2_h__
 #define __mBarRange2_h__
 
-
 #include <wx/wx.h>
 #include <wx/textctrl.h>
 #include "mBarRange.h"
 
-
 BEGIN_DECLARE_EVENT_TYPES()
        DECLARE_EVENT_TYPE(wxEVT_BarRange2_Change,-1) 
 END_DECLARE_EVENT_TYPES()
 
-
-
        class mBarRange2
                : public wxPanel
                {
                public:
                        mBarRange2(wxWindow * parent,int width, int height);            
                        ~mBarRange2();
-                       void            onTxtCtrl(wxCommandEvent& event);
-                       void            SetMinMaxValue(double,double);
-                       void            SetScalarType(int);
+                       void    onTxtCtrl(wxCommandEvent& event);
+                       void    SetMinMaxValue(double,double);
+                       void    SetScalarType(int);
                        double  GetStartValue();
                        double  GetEndValue();
                private:
@@ -71,7 +67,7 @@ END_DECLARE_EVENT_TYPES()
                        wxTextCtrl                      *_textctrlStart;
                        wxTextCtrl                      *_textctrlEnd;
                        void            onBarRangeChange(wxCommandEvent& event);
-                       wxString CleanNumberStr(wxString string);       
+                       wxString        CleanNumberStr(wxString string);        
                        void            RefreshTextCntrl();
                        void            createAndSendEvent(WXTYPE theEventType);
                        DECLARE_EVENT_TABLE()
index af3e86591c91280d11a42fa6a1869c3fdfb7df18..738cae1a18c679ffc58824cb6c176891870dfde2 100644 (file)
@@ -368,12 +368,10 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w, int orgy)
        if (tmp>=1)
        {
                fmt = wxT("%.f");
-       }
-       else
-       {
+       } else {
                tmp=8-tmp;
                fmt.Printf(wxT("%%.%df"), tmp >= -1 ? 2 : -tmp);
-       }
+       } // if temp
 
        double n = floor( (w.GetPosY() - (double)extend / w.GetScaleY()) / step ) * step ;
 
@@ -389,8 +387,8 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w, int orgy)
                {
                        dc.DrawText( s, orgx+4, GetYTranslated(sizedc,p-ty/2));
                        tmp=p-ty/2;
-               }
-       }
+               } // if
+       } // for
 
        dc.GetTextExtent(m_name, &tx, &ty);
        dc.DrawText( m_name, orgx-tx-4, GetYTranslated(sizedc,-extend + ty + 4));
@@ -400,7 +398,13 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w, int orgy)
 // mpWindow
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(mpWindow, wxScrolledWindow)
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       IMPLEMENT_DYNAMIC_CLASS(mpWindow, wxScrolledWindow)
+#else
+       wxIMPLEMENT_DYNAMIC_CLASS(mpWindow, wxScrolledWindow);
+#endif
+
 
 BEGIN_EVENT_TABLE(mpWindow, wxScrolledWindow)
 EVT_PAINT    ( mpWindow::OnPaint)
@@ -421,24 +425,24 @@ END_EVENT_TABLE()
 mpWindow::mpWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag )
 : wxScrolledWindow( parent, id, wxDefaultPosition, wxDefaultSize, flag, wxT("wxPlotter") )
 {
-       m_scaleX = m_scaleY = 1.0;
-       m_posX   = m_posY   = 0;
-       m_scrX   = m_scrY   = 64;
-       m_minX   = m_minY   = 0;
-       m_maxX   = m_maxY   = 0;
-       maxScrX = maxScrY   = 200;
-       minScrX = minScrY   = 0;
-       m_clickedX  0;
-       m_clickedY = 5000;
-       m_lockaspect = FALSE;
-       offsetX = offsetY = 0;
-       offsetPixelX = offsetPixelY= 0;
-       _bitmap_functions=NULL;
-
-       real_guideLine_X = -1;
-       real_guideLine_Y = -1;
-       drawGuides = true;
-       type=1;
+       m_scaleX                        = m_scaleY              = 1.0;
+       m_posX                          = m_posY                = 0;
+       m_scrX                          = m_scrY                = 64;
+       m_minX                          = m_minY                = 0;
+       m_maxX                          = m_maxY                = 0;
+       maxScrX                         = maxScrY       = 200;
+       minScrX                         = minScrY       = 0;
+       m_clickedX                      = 0;
+       m_clickedY                      = 5000;
+       m_lockaspect            = FALSE;
+       offsetX                         = offsetY               = 0;
+       offsetPixelX            = offsetPixelY  = 0;
+       _bitmap_functions       = NULL;
+
+       real_guideLine_X        = -1;
+       real_guideLine_Y        = -1;
+       drawGuides                      = true;
+       type                            = 1;
 
        m_popmenu.Append( mpID_CENTER,     _("Center"),      _("Center plot view to this position"));
        m_popmenu.Append( mpID_FIT,        _("Fit"),         _("Set plot view to show all items"));
@@ -511,16 +515,13 @@ void mpWindow::ZoomOut()
 void mpWindow::LockAspect(bool enable)
 {
        m_lockaspect = enable;
-
        m_popmenu.Check(mpID_LOCKASPECT, enable);
-
        if (m_lockaspect)
        {
                double s = (m_scaleX + m_scaleY)/2;
                m_scaleX = s;
                m_scaleY = s;
        }
-
        UpdateAll();
 }
 
index a55e7b0d1c4b8256395920a05ca98082c6f75822..743bc54d5cca32ab867b1995d1ce8dce58493a1f 100644 (file)
@@ -465,6 +465,7 @@ public:
                int flags = 0);
        ~mpWindow();
 
+
        /** Get reference to context menu of the plot canvas.
        @return Pointer to menu. The menu can be modified.
        */
@@ -917,13 +918,22 @@ protected:
        */
         int type;
 
+
  private:
        //bitmap of functions
        wxBitmap        *_bitmap_functions;
 
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        DECLARE_CLASS(mpWindow)
+#else
+       wxDECLARE_DYNAMIC_CLASS(mpWindow);
+#endif
+
        DECLARE_EVENT_TABLE()
+
+
 };
 
 #endif // _MP_MATHPLOT_H_
index 7de96c458c2fe9bcb3224ccbb9bfa372c264a2f0..63b3cc9ed2a27dfb796d24b2c8a75c8e0166684a 100644 (file)
@@ -52,27 +52,27 @@ IMPLEMENT_CLASS(pGraphicalFunction, pPlotterLayer)
 pGraphicalFunction:: pGraphicalFunction(wxString name, int flags)
 {
        SetName(name);
-       showPointsF = false;
-       validPointRange = 5;
-       logicFunction = new pLogicalFunction ();
-       fromWindow=false;
-       factorZoom=1;
-       drawing=false;
-       editable=true;
-       ifActual=false;
-       zoomIn=false;
+       showPointsF             = false;
+       validPointRange         = 5;
+       logicFunction           = new pLogicalFunction ();
+       fromWindow                      = false;
+       factorZoom                      = 1;
+       drawing                         = false;
+       editable                        = true;
+       ifActual                        = false;
+       zoomIn                          = false;
        setOffsetX(0);
        setOffsetY(0);
-       initialDrawingPoint=NULL;
-       finalDrawingPoint=NULL;
+       initialDrawingPoint     = NULL;
+       finalDrawingPoint       = NULL;
        //type=1 means that is going to be a piecewise function
-       _type=1;
-       xKSpline=NULL;
-       yKSpline=NULL;
-       offsetPixelX=0;
-       offsetPixelY=0;
-       xTraslation=0;
-       mType=DEFAULT;
+       _type                           = 1;
+       xKSpline                        = NULL;
+       yKSpline                        = NULL;
+       offsetPixelX            = 0;
+       offsetPixelY            = 0;
+       xTraslation                     = 0;
+       mType                           = DEFAULT;
        
 }
 
@@ -108,7 +108,6 @@ void pGraphicalFunction::setUp()
        setEndX(logicFunction->getEndX());
        setStartY(logicFunction->getStartY());
        setEndY(logicFunction->getEndY());
-       
 }
 
 /*
@@ -146,8 +145,6 @@ void pGraphicalFunction::setScales()
        //int dy= logicFunction->getMaxY()-logicFunction->getMinY();
        int dx= maxShowedX-minShowedX;
        int dy= maxShowedY-minShowedY;
-       
-       
        if(dx!=0 && dy!=0)
        {
                double scaleX=(((float)(screenX-100))/dx)*factorZoom;
@@ -156,8 +153,7 @@ void pGraphicalFunction::setScales()
                setScaleY(scaleY);
                logicFunction->setScaleX(scaleX);
                logicFunction->setScaleY(scaleY);
-
-       }
+       }// if dx dy
 }
 /*
 * Includes a point between two existing points of this function. The new point (x,y) was not defined when the function was created.
@@ -166,10 +162,10 @@ void pGraphicalFunction::setScales()
 bool pGraphicalFunction:: AddNewPoint(int x,int y)
 {
        bool added= logicFunction -> AddNewPoint ( x, y );
-       if(!fromWindow)
-        setUp();
-       else
+       if(!fromWindow) 
        {
+        setUp();
+       } else {
                logicFunction->setEndPoints();
                logicFunction->setStartPoints();
        }
@@ -188,10 +184,10 @@ bool pGraphicalFunction::AddPoint(int aX, int aY,bool order)
        bool added=false;
        if (logicFunction!=NULL){
                added=logicFunction -> AddPoint( aX, aY,order );
-               if(!fromWindow)
-                       setUp();
-               else
+               if(!fromWindow) 
                {
+                       setUp();
+               } else {
                        logicFunction->setEndPoints();
                        logicFunction->setStartPoints();
                } // if fromWindow
@@ -208,9 +204,9 @@ bool pGraphicalFunction::DeletePoint(int aX, int aY)
 {
        bool added= logicFunction -> DeletePoint( aX, aY );     
        if(!fromWindow)
-        setUp();
-       else
        {
+        setUp();
+       } else {
                logicFunction->setEndPoints();
                logicFunction->setStartPoints();
        }
@@ -224,9 +220,9 @@ bool pGraphicalFunction::deletePointAt(int index)
 {
        bool added=logicFunction -> deletePointAt( index );
        if(!fromWindow)
-        setUp();
-       else
        {
+               setUp();
+       } else {
                logicFunction->setEndPoints();
                logicFunction->setStartPoints();
        }
@@ -240,10 +236,10 @@ bool pGraphicalFunction::deletePointAt(int index)
 bool pGraphicalFunction::changePoint(wxPoint newCoords, int movingIndexPoint) 
 {
        bool added= (logicFunction -> changePoint( newCoords, movingIndexPoint ));
-       if(!fromWindow)
-        setUp();
-       else
+       if(!fromWindow) 
        {
+               setUp();
+       } else {
                logicFunction->setEndPoints();
                logicFunction->setStartPoints();
        }
@@ -291,15 +287,14 @@ bool pGraphicalFunction:: isInFunction(int x, int y)
        pFunctionPoint* point= new pFunctionPoint(x,y);
        bool inLine;
        before=getBefore(point);
-
        if(before && before->GetNext())
        {
                next = before->GetNext();
                //next = (before->GetNext())->GetNext();
                inLine= isInLine((pFunctionPoint*)before->GetData(),(pFunctionPoint*)next->GetData(),point);
-       }
-       else 
+       } else { 
                inLine=false;
+       }
        return inLine;
 }
 /*
@@ -344,7 +339,6 @@ bool pGraphicalFunction::isInLine(pFunctionPoint* before,pFunctionPoint* next, p
        x=(float)point->getRealX();
        y=(float)point->getRealY();
 
-       
        float d1= (float)sqrt(pow(float(x1-x),2)+ pow(float(y1-y),2));
        float d2= (float)sqrt(pow(float(x2-x),2)+ pow(float(y2-y),2));
        float d=(float)sqrt(pow(float(x2-x1),2)+ pow(float(y2-y1),2));
@@ -467,17 +461,17 @@ void pGraphicalFunction::zooming(int clickedX,int clickedY,int width)
 {
        int xS,yS,x1,x2,y1,y2;
        setScales();
-       xS=clickedX/_scaleX+_offsetX;
-       yS=clickedY/_scaleY+_offsetY;
+       xS = clickedX/_scaleX+_offsetX;
+       yS = clickedY/_scaleY+_offsetY;
        //square
-       x1=(clickedX-width)/_scaleX+_offsetX;
-       x2=(clickedX+width)/_scaleX+_offsetX;
-       y1=(clickedY-width)/_scaleY+_offsetY;
-       y2=(clickedY+width)/_scaleY+_offsetY;
-
-       int numberPoints=getSizePoints();
-       pFunctionPoint* point;
-       wxNode* p;
+       x1 = (clickedX-width)/_scaleX+_offsetX;
+       x2 = (clickedX+width)/_scaleX+_offsetX;
+       y1 = (clickedY-width)/_scaleY+_offsetY;
+       y2 = (clickedY+width)/_scaleY+_offsetY;
+
+       int numberPoints = getSizePoints();
+       pFunctionPoint* point;
+       wxNode*                 p;
        bool inSquare=false,first=false;
        
        //if the user made a zoom
@@ -503,22 +497,20 @@ void pGraphicalFunction::zooming(int clickedX,int clickedY,int width)
                                finalDrawingPoint=point;
                        }
                }
-       }       
-       else
-       {
+       } else {
                //We extend the range of vision in x and y,20 and 10 respectively
                if((_offsetX-20)>=0)
                {
                        _offsetX=_offsetX-20;
-               }
-               else
+               } else {
                        _offsetX=0;
+               }
                if((_offsetY-10)>=0)
                {
                        _offsetY=_offsetY-10;
-               }
-               else
+               } else {
                        _offsetY=0;
+               }
        }
 }
 
index 4e8564c3fac753782aaaae3c7353a36aed1cd0c9..227df55d84157c3888ed06e13d2e0c7d7fe64f1f 100644 (file)
@@ -270,6 +270,11 @@ public:
                }
                return false;
        }
+
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        /**
        Get Point list of the funcion
        @param return points
@@ -279,16 +284,27 @@ public:
                logicFunction->GetPoints(points);
                //points = realPoints;
        }  
+#else
+       /**
+       Get Point list of the funcion
+       @param return pointsPtr
+       */
+       virtual wxList* GetPointsPtr()
+       {
+               return logicFunction->GetPointsPtr();
+       }  
+#endif
+
+
 
        /**
        Get the point where the user
        made a click
        */
-
        virtual void getMousePoint(int &x,int &y)
        {
-               x=mousePoint.x;
-               y=mousePoint.y;
+               x = mousePoint.x;
+               y = mousePoint.y;
        }
 
        /**
index c14e9511348f57ac1bf39256258777ebdfbaf2d9..4bac5fba7d5e09ce09047fd6f213698d32a6ced3 100644 (file)
@@ -135,9 +135,16 @@ void pHistogram::initializePoints(int xDimension)
        //setting image data of the points
        points->SetDimensions(xDimension,1,1);
 //EED  points->SetScalarTypeToUnsignedShort();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        points->SetScalarTypeToDouble();
        points->AllocateScalars();
        points->Update();
+#else
+       points->AllocateScalars(VTK_DOUBLE,1);
+#endif
+
 }
 
 /*
@@ -146,7 +153,6 @@ void pHistogram::initializePoints(int xDimension)
 void pHistogram::setPoints(vtkImageData* imageData)
 {
 
-printf("EED pHistogram::setPoints Trinng new histogram ..\n");
 /*
 printf("EED pHistogram::setPoints Test: vtkPComputeHistogram2DOutliers\n");
 vtkComputeHistogram2DOutliers *vtkhist = vtkComputeHistogram2DOutliers::New();
@@ -163,12 +169,12 @@ printf("EED pHistogram::setPoints colums:%d\n", (int)(resulttable->GetNumberOfCo
        */
 
        char*                           dataImagePointerC               = (char*)imageData->GetScalarPointer(0,0,0);
-       unsigned char*  dataImagePointerUC      = (unsigned char*)imageData->GetScalarPointer(0,0,0);
+       unsigned char*          dataImagePointerUC              = (unsigned char*)imageData->GetScalarPointer(0,0,0);
        short*                          dataImagePointerS               = (short*)imageData->GetScalarPointer(0,0,0);
-       unsigned short*         dataImagePointerUS      = (unsigned short*)imageData->GetScalarPointer(0,0,0);
+       unsigned short*         dataImagePointerUS              = (unsigned short*)imageData->GetScalarPointer(0,0,0);
        float*                          dataImagePointerF               = (float*)imageData->GetScalarPointer(0,0,0);
-       double*                                 dataImagePointerD               = (double*)imageData->GetScalarPointer(0,0,0);
-       double*                                 dataHistogramPointer    = (double*)points->GetScalarPointer(0,0,0);
+       double*                         dataImagePointerD               = (double*)imageData->GetScalarPointer(0,0,0);
+       double*                         dataHistogramPointer    = (double*)points->GetScalarPointer(0,0,0);
        
        /*
         Range of greys
index 4958a398c9e7463f0ea0f388e6619c988ca2c58b..6c5bac405aa7d17427755129a2d235b6463bc8d4 100644 (file)
@@ -101,6 +101,9 @@ public:
        }
        */
 
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        /**
        Get Point list of the funcion
        @param return points
@@ -110,6 +113,19 @@ public:
        {
                points = realPoints;
        }  
+#else
+       /**
+       Get Point list of the funcion
+       @param return pointsPtr
+       */
+       /*virtual*/
+       wxList* GetPointsPtr()
+       {
+               return &realPoints;
+       }  
+#endif
+
+
        /*
        * validate if the function has that point in a sensible area returning the index where the point was found or -1 if is in not part of the function: define the sensible area is  
        * x1-validPointRange<x<x1+validPointRange y1-validPointRange<y<y1+validPointRange
index 1e80597db847ec10a8969e9f9cd9a0de58152e87..c6d803e05e23014b2513cfbe8f2c00c944754fb8 100644 (file)
@@ -229,10 +229,20 @@ void pPlotter::setAll()
                text.Clear();
                text = _T("minX=");
                double realMin_X = actualFunction->getMinX();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                text = text + realMin_X;        
+#else
+               text = text + wxString::FromDouble( realMin_X );        
+#endif
                text = text + _T(" maxX=");
                double realMax_X = actualFunction->getMaxX();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                text = text + realMax_X;
+#else
+               text = text + wxString::FromDouble( realMax_X );        
+#endif
                int minShowed = actualFunction->getMinXShowed();
                int maxShowed = actualFunction->getMaxXShowed();
                barrange -> setRepresentedValues (realMin_X, realMax_X);
index b1053424d1c4197d241c423fc4e5421ee8750bfe..6951ccef5c2d9c081a3a392f0aac41ab34f0a510 100644 (file)
@@ -57,9 +57,14 @@ pPlotterLayer:: pPlotterLayer(wxString name , int flags )
 {
        SetName(name);
        m_flags = flags;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        points.DeleteContents(TRUE);
-       offsetX=0;
-       offsetY=0;
+#else
+       // ...
+#endif
+       offsetX = 0;
+       offsetY = 0;
 }
 
 /*
@@ -314,28 +319,25 @@ bool pPlotterLayer::initializePolygon(wxPoint* points,double x1, double y1,doubl
 */
 void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w, int orgy)
 {
-
-       
        int scrwX,scrwY,offsetpx,offsetpy,maxX,minX,maxY,minY;
-       wxPoint* ppoints=NULL;
+       wxPoint* ppoints = NULL;
 
        /*
        This is the offset of every point scale to the window
        pixel
        */
-       offsetpx=getOffsetPixelsXv();
-       offsetpy=getOffsetPixelsYv();   
-
+       offsetpx = getOffsetPixelsXv();
+       offsetpy = getOffsetPixelsYv(); 
        Rewind();
-       
        dc.GetSize(&scrwX, &scrwY);
-       
        //Lines between the points
-
        int sizedc = dc.GetSize().GetHeight()-orgy;
-       
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        GetPoints(points);
-
+#else
+  //...
+#endif
        // type of plotter
        int type=getmType();
        /***********/
@@ -345,7 +347,12 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w, int orgy)
 
        //traslation
        //int xTraslation=getXTraslation(); //JPRx
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxNode* node= points.GetFirst();
+#else
+       wxNode* node= GetPointsPtr()->GetFirst();
+#endif
        // int i=1;//points.GetCount()+1; //JPRx
        int j=2;
        /*
@@ -358,16 +365,19 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w, int orgy)
                /*
                Fill the function if it represented an histogram
          */
-               ppoints=(wxPoint*)malloc(sizeof(int)*2*(points.GetCount()+2));
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+               ppoints         = (wxPoint*)malloc(sizeof(int)*2*(points.GetCount()+2));
+#else
+               ppoints         = (wxPoint*)malloc(sizeof(int)*2*(GetPointsPtr()->GetCount()+2));
+#endif
                //initialize points
-               point.x=-5000;
-               point.y=GetYTranslated(sizedc,-5000);
-               ppoints[0]=point;
-               ppoints[1]=point;
-
+               point.x         = -5000;
+               point.y         = GetYTranslated(sizedc,-5000);
+               ppoints[0]      = point;
+               ppoints[1]      = point;
        }
        
-       
        while (node!=NULL && node->GetNext()!=NULL)
        { 
                pFunctionPoint* pointi=(pFunctionPoint*)node->GetData();
@@ -379,18 +389,16 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w, int orgy)
                int pyi=(pointi->getRealY()-minY)-offsetY;
                int pxj=(pointj->getRealX()-minX)-offsetX;
                int pyj=(pointj->getRealY()-minY)-offsetY;
-
-
                int cxi=pxi* scaleX + offsetpx; //+ xTraslation;
                int cxj=pxj* scaleX + offsetpx; //+ xTraslation;
                int cyi=pyi* scaleY+ offsetpy ;
                int cyj=pyj* scaleY+ offsetpy ;
                //dc.DrawLine(pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy );
                if(type!=2)
+               {
                        draw(dc,w,pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy,orgy );
                        //dc.DrawLine(pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy );
-               else if(type==2)
-               {
+               } else if(type==2) {
                        if(!initializePolygon(ppoints,cxi,cyi,cxj,cyj) && ((cxi<=0 && cxj>=0)||(cxi>=0 && cxj>=0)))
                        {
                                        point.x=cxj;
@@ -398,11 +406,9 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w, int orgy)
                                        ppoints[j]=point;
                                        j++;
                
-                       }
-               }
-               
+                       } // if
+               } // if type
                node=node->GetNext();
-
        } 
        if(type==2)
        {
@@ -426,9 +432,7 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w, int orgy)
                dc.SetPen(wxPen( wxColour(0,0,0) ,1,wxSOLID  ));
                //dc.DrawPolygon(vx.size()+2,ppoints,0,0);
                dc.DrawPolygon(j+2,ppoints,0,0);
-
-       }
-       
+       } // if type
 }
 
 /**
@@ -494,10 +498,16 @@ void pPlotterLayer::drawLineToMousePoint(wxDC & dc,mpWindow & w, int orgy)
        getDirection(direction);
        getSize(sizeP);
        //Lines betwen the points
-       GetPoints(points);
 
-       wxNode *node=points.GetLast();
-       wxNode *node1=points.GetFirst();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       GetPoints(points);
+       wxNode *node    = points.GetLast();
+       wxNode *node1   = points.GetFirst();
+#else
+       wxNode *node    = GetPointsPtr()->GetLast();
+       wxNode *node1   = GetPointsPtr()->GetFirst();
+#endif
        
        
        /*
@@ -670,8 +680,7 @@ void pPlotterLayer::Plot(wxDC & dc, mpWindow & w)
                                GetYTranslated(sizedc,(realY_guide/*-w.getMinScrY()*/-offsetX)*scaleX + offsetpx), 
                                scrwX, 
                                GetYTranslated(sizedc,(realY_guide/*-w.getMinScrY()*/-offsetX)*scaleX + offsetpx));
-               }
-       }
-   
+               } // if realY_guide
+       } // if actual
 }
 
index 1c9022e1e4f370ea6224da3af41cb11cce80958c..1e6ef4d645011bbd6467fc1915f34e3970d6f697 100644 (file)
@@ -213,11 +213,21 @@ void draw(wxDC & dc,mpWindow & w,double x1,double y1,double x2,double y2, int or
        */
        virtual bool GetNextXY(double & x, double & y){return false;}
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        /**
        Get Point list of the funcion
        @param return points
        */
        virtual void GetPoints(wxList &points){}
+#else
+       /**
+       Get Point list of the funcion
+       @param return points
+       */
+       virtual wxList* GetPointsPtr(){  }
+#endif
+
 
        /** Layer plot handler.
        This implementation will plot the locus in the visible area and
@@ -250,10 +260,17 @@ void draw(wxDC & dc,mpWindow & w,double x1,double y1,double x2,double y2, int or
 
 protected:
        int m_flags; //!< Holds label alignment
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        /*
        * Points of the function thats is drawing
        */
        wxList points;
+#else
+       //  use GetPointsPtr()
+#endif
+
        /*
        * the scale in x, with wich it must draw
        */
index e9dc15c4ae152cc18aa78f18dfa49bc5f295eee9..6db34e632d2d34a10f6c95e020cf3ed398268594 100644 (file)
@@ -46,8 +46,8 @@ IMPLEMENT_CLASS(pPlotterScaleX, pPlotterLayer)
 //----------------------------------------------------------------------------
 // Methods
 //----------------------------------------------------------------------------
-pPlotterScaleX::pPlotterScaleX(wxString aName,int flags) {
-
+pPlotterScaleX::pPlotterScaleX(wxString aName,int flags) 
+{
        SetName(aName);/*
        SetFont(*wxSMALL_FONT);
        SetPen(*wxGREY_PEN);*/
index 5115e2d33b47c2dbf48f7e470f94913558877108..ea0be8fe85c003f009ff38ad7860058f22605576 100644 (file)
@@ -1740,12 +1740,20 @@ void pPlotterWindow :: OnGuideLines (wxCommandEvent   &event)
 */
 pGraphicalFunction* pPlotterWindow::getFunction(int index)
 {
-       wxNode* node=functions.Item(index);
-       if(node==NULL){
+       wxNode* node=NULL;
+       if (functions.size()>index)
+       {
+               node=functions.Item(index);
+       } // if
+
+       if(node==NULL)
+       {
                return NULL;
-       }
+       } // if node
        return (pGraphicalFunction*)node->GetData();
 }
+
+
 /*
          move the functions that the user wants to move
          and that were set in functionsToMove
@@ -1755,9 +1763,7 @@ pGraphicalFunction* pPlotterWindow::getFunction(int index)
          @param porcentageMaxX:the percentage that the maxShowed
          of the functions have to be move
                0<=porcentageMaxX<=1
-
        */
-
 void pPlotterWindow::moveFunctions( float porcentageMinX,float porcentageMaxX)
        {
                //Adding the actual function
index 64c29bf7fd649d9398f012088f9270ae7abc41a3..264cc730394de2099eba464b6e79320b933b1170 100644 (file)
@@ -395,7 +395,7 @@ private:
        */
 
        wxTextCtrl  *m_log;
-       wxString                text;
+       wxString        text;
 
        /*
          Functions to be move at the same time
index 7aed68e42feff9947e6d1b42e3bd996e3cb198ef..dfc847270e8e5f066b60dfd036eae91d10b3cf4d 100644 (file)
 //-------------------------------------------------------------------
 vtkBaseData::vtkBaseData()
 {
-       _z              = 0;
-       _t              = 0;
-       _marImageData   = 0;
-       _interpolate    = true;
-       _fixAxis2D              = false;
-       _opacityAxis    = 0.5;
-       _observable     = vtkObject::New();
+       _z                              = 0;
+       _t                              = 0;
+       _marImageData                   = 0;
+       _interpolate                    = true;
+       _fixAxis2D                              = false;
+       _opacityAxis                    = 1.0;
+       _observable                     = vtkObject::New();
+       _cameraparallelScale    = 100.0;
 }
 
 //-------------------------------------------------------------------
@@ -232,3 +233,18 @@ void vtkBaseData::SetOpacityAxis(double value)
 {
        _opacityAxis = value;
 }
+
+//-------------------------------------------------------------------
+double vtkBaseData::GetCameraParallelScale()
+{
+       return _cameraparallelScale;
+}
+
+//-------------------------------------------------------------------
+void vtkBaseData::SetCameraParallelScale(double value)
+{
+       _cameraparallelScale=value;
+}
+
+
+
index 6870e0189568da85d478ea4509bc77b65219fa49..4047fc9636920d00efcac3ef5985def86e91977a 100644 (file)
@@ -54,8 +54,10 @@ public:
        bool                    GetFixAxis2D();
        void                    SetFixAxis2D(bool value);
        double                  GetOpacityAxis();
-       void                    SetOpacityAxis(double value);
-       
+       void                    SetOpacityAxis(double value);   
+       double                  GetCameraParallelScale();
+       void                    SetCameraParallelScale(double value);
+
 protected:
        marImageData    *_marImageData;
        double                  _z;
@@ -66,6 +68,7 @@ protected:
        bool                    _fixAxis2D;
        double                  _opacityAxis;
        vtkObject*              _observable;
+       double                  _cameraparallelScale;
 private:
 
 };
index cde27ecfddadb323c610e6c6e02706445721d203..aa398d488971528129d01e2c83955763b62c0f49 100644 (file)
@@ -43,11 +43,17 @@ vtkClipping3DDataViewer::vtkClipping3DDataViewer()
        _shade                                          = false;
 
     _volumerendererdata        = VolumeRendererData::New();
+
+#if (VTK_MAJOR_VERSION <= 7) 
     _volumeMapper                      = vtkVolumeRayCastMapper::New();
+    _compositeFunction                 = vtkVolumeRayCastCompositeFunction::New();
+       _compositeFunctionMIP   = vtkVolumeRayCastMIPFunction::New();
+#else 
+    _volumeMapper                      = vtkFixedPointVolumeRayCastMapper::New();
+#endif
+
     _newvol                            = vtkVolume::New();
     _volumeProperty            = vtkVolumeProperty::New();
-    _compositeFunction                 = vtkVolumeRayCastCompositeFunction::New();
-        _compositeFunctionMIP  = vtkVolumeRayCastMIPFunction::New();
 
 }
 //-------------------------------------------------------------------
@@ -61,13 +67,15 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
                _tissuePlanes[i]->Delete();
                _tissueClipper[i]->Delete();
        }
-       _outlineData->Delete();
-       _mapOutline->Delete();
-       _outline->Delete();
+
        // Volume
        _tfun->Delete();
        _ctfun->Delete();
+#if (VTK_MAJOR_VERSION <= 7) 
        _compositeFunction->Delete();
+#else 
+       // ..
+#endif
        _volumeMapper->Delete();
        _volumeProperty->Delete();
        _newvol->Delete();
@@ -79,11 +87,7 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
        }
        _observerV-> Delete();
 }
-//-------------------------------------------------------------------
-vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
-{
-       return _outline;
-}
+
 //-------------------------------------------------------------------
 vtkClipPolyData* vtkClipping3DDataViewer::GetTissueClipper(int id)
 {
@@ -210,9 +214,19 @@ void vtkClipping3DDataViewer::SetImage()
        vtkImageData *imagedata=_vtkmprbasedata->GetImageData();
        for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _mCubes[i]->SetInput( imagedata );
+#else
+               _mCubes[i]->SetInputData( imagedata );
+#endif
        } // for
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _volumeMapper->SetInput( imagedata );
+#else
+       _volumeMapper->SetInputData( imagedata );
+#endif
        _volumerendererdata->SetImageData( imagedata );
 }
 
@@ -227,21 +241,54 @@ void vtkClipping3DDataViewer::Configure_Tissue()
        {
                // Visualisation - original volume
                _mCubes[i] = vtkMarchingCubes::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _mCubes[i]->SetInput( imagedata );
+#else
+               _mCubes[i]->SetInputData( imagedata );
+#endif
+
                _mCubes[i]->SetValue( 0, range[1]*(4+i) / 8 );
 //             _mCubes[i]->SetValue( 0, 1500 );
            _tissueStripper[i] = vtkStripper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
            _tissueStripper[i]->SetInput( _mCubes[i]->GetOutput( ) );
+#else
+           _tissueStripper[i]->SetInputData( _mCubes[i]->GetOutput( ) );
+#endif
+
                _tissuePlanes[i]  = vtkPlanes::New();
                int x1,x2,y1,y2,z1,z2;
                imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
-               _tissuePlanes[i]->SetBounds  (x1,x2,y1,y2,z1,z2);
+               _tissuePlanes[i]->SetBounds(x1,x2,y1,y2,z1,z2);
                _tissueClipper[i] = vtkClipPolyData::New();
-               _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
                _tissueClipper[i]->SetClipFunction( _tissuePlanes[i] );
                _tissueClipper[i]->InsideOutOn( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
+#else
+               _tissueClipper[i]->SetInputData( _tissueStripper[i]->GetOutput() );
+#endif
+
                _tissueMapper[i] = vtkPolyDataMapper::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _tissueMapper[i]->SetInput( _tissueClipper[i]->GetOutput() );
+#else
+               _mCubes[i]->Update();
+               _tissueStripper[i]->Update();
+               _tissueClipper[i]->Update();
+               _tissueMapper[i]->SetInputData( _tissueClipper[i]->GetOutput() );
+               _tissueMapper[i]->Update();
+#endif
+
+
                _tissueMapper[i]->ScalarVisibilityOff( );
 //             _tissueMapper[i]->Update();
        } // for i  
@@ -256,19 +303,19 @@ void vtkClipping3DDataViewer::Configure_Tissue()
                _tissue[i]->GetProperty()->SetSpecular(.3);
                _tissue[i]->GetProperty()->SetSpecularPower(20);
                _tissue[i]->GetProperty()->SetOpacity(0.5);
-               if (i==0) _tissue[i]->GetProperty()->SetColor(0.85, 0.85   , 0.85   );
-               if (i==1) _tissue[i]->GetProperty()->SetColor(0, 0  ,  1  );
-               if (i==2) _tissue[i]->GetProperty()->SetColor(0.85, 0.20   , 0.20   );
-               if (i==3) _tissue[i]->GetProperty()->SetColor(0, 1   , 0   );
-       }
+               if (i==0) { _tissue[i]->GetProperty()->SetColor(0.85, 0.85   , 0.85   );        }
+               if (i==1) { _tissue[i]->GetProperty()->SetColor(0, 0  ,  1  );                          }
+               if (i==2) { _tissue[i]->GetProperty()->SetColor(0.85, 0.20   , 0.20   );        }
+               if (i==3) { _tissue[i]->GetProperty()->SetColor(0, 1   , 0   );                         }
+       } // for
 
        for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
        {
                _observerS[i] = boxSurfaceObserver::New();
                _observerS[i]->SetPlanes( GetTissuePlanes(i) );
                _observerS[i]->SetActor( _tissue[i] );
-       }
-
+               _observerS[i]->SetFilters( _mCubes[i], _tissueStripper[i] ,_tissueClipper[i] );
+       } // for
 }
 
 //-----------------------------------------------------------------------------
@@ -352,11 +399,22 @@ void vtkClipping3DDataViewer::Configure_Volume()
        // EED 13/03/2011
 
  // _volumeMapper = vtkVolumeRayCastMapper::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _volumeMapper->SetInput( this->GetVtkMPRBaseData()->GetImageData() );
+#else
+       _volumeMapper->SetInputData( this->GetVtkMPRBaseData()->GetImageData() );
+#endif
 
-    _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
 
-   // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
+#if (VTK_MAJOR_VERSION <= 7) 
+    _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
+       // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
+#else 
+       // ..
+#endif
        
 //
        _volumeMapper->SetClippingPlanes( _volumePlanes );
@@ -385,7 +443,12 @@ void vtkClipping3DDataViewer::Configure_Volume()
     _observerV = boxSurfaceObserver::New();
        _observerV->SetPlanes( _volumePlanes );
        _observerV->SetActor( _newvol );
+       
+#if (VTK_MAJOR_VERSION <= 7) 
        _observerV->SetvtkVolumeRayCastMapper( _volumeMapper );
+#else 
+       _observerV->SetvtkFixedPointVolumeRayCastMapper( _volumeMapper );
+#endif
 }
 
 //-----------------------------------------------------------------------------
@@ -446,16 +509,20 @@ void vtkClipping3DDataViewer::UpdateVolumeBox(vector<double> gf, vector<double>
 void vtkClipping3DDataViewer::updateVolume()
 {
 
+#if (VTK_MAJOR_VERSION <= 7) 
     if(_isRayCasting)
     {
         _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
         _volumerendererdata->changeCompositeMIPFunction(0);
-    }
-    else if(_isMIP)
-    {
+    }    else if(_isMIP) {
         _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
         _volumerendererdata->changeCompositeMIPFunction(1);
     }
+#else 
+       // ...   here Composition of MIP
+       printf("EED vtkClipping3DDataViewer::updateVolume ...   here Composition or MIP \n");
+#endif
+
 
     if(_interpolation)
     {
@@ -483,18 +550,6 @@ void vtkClipping3DDataViewer::Configure()
        Configure_Tissue();
        Configure_Volume();
     Configure_VolumeBox();
-  // An outline provides context around the data.
-  //
-       _outlineData    = vtkOutlineFilter::New();
-    _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
-       _mapOutline     = vtkPolyDataMapper::New();
-
-//EED 4 nov 2015 Estelle 
-//    _mapOutline->SetInput(_outlineData->GetOutput());
-
-       _outline        = vtkActor::New();
-    _outline->SetMapper(_mapOutline);
-    _outline->GetProperty()->SetColor(0,0,0);
 }
 
 
@@ -502,6 +557,14 @@ void vtkClipping3DDataViewer::Configure()
 void vtkClipping3DDataViewer::SetIsovalue(int idTissue, int isoValue)
 {
        _mCubes[idTissue]->SetValue(0, isoValue);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       // ..
+#else
+       _mCubes[idTissue]->Update();
+       _tissueStripper[idTissue]->Update();
+       _tissueClipper[idTissue]->Update();
+#endif
 }
 //-------------------------------------------------------------------
 double vtkClipping3DDataViewer::GetIsovalue(int idTissue)
@@ -514,7 +577,12 @@ vtkVolume* vtkClipping3DDataViewer::GetVolumeActor()
    return _newvol;
 }
 //-------------------------------------------------------------------
-vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
+#else 
+       vtkFixedPointVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
+#endif
+{
        return _volumeMapper;
 }
 //-------------------------------------------------------------------
@@ -773,7 +841,14 @@ void vtkClipping3DDataViewer::ReadMeshVTK(char *namefile)
        vtkDataSetReader *reader = vtkDataSetReader::New();
        reader->SetFileName(namefile);
        reader->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _tissueStripper[3]->SetInput( reader->GetPolyDataOutput()  );
+#else
+       _tissueStripper[3]->SetInputData( reader->GetPolyDataOutput()  );
+#endif
+
 }
 
 void vtkClipping3DDataViewer::setColorTransferFunction(vtkColorTransferFunction* colortable){
index 2822ca362155a76d04fee6b5ff64cd1dc34258b4..4a75a62a35fe8bd8988adc630db3776a690042d1 100644 (file)
 #include "vtkStripper.h"
 #include "vtkLODActor.h"
 #include "vtkMarchingCubes.h"
-#include "vtkVolumeRayCastMapper.h"
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastCompositeFunction.h"
+       #include "vtkVolumeRayCastMIPFunction.h"
+       #include "vtkVolumeRayCastMapper.h"
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
 #include "boxSurfaceObserver.h"
-#include "vtkVolumeRayCastCompositeFunction.h"
 #include <vtkPiecewiseFunction.h>
 #include "vtkVolumeProperty.h"
 #include "vtkPolyDataMapper.h"
@@ -44,7 +49,6 @@
 #include "vtkOutlineFilter.h"
 #include "vtkRenderWindowInteractor.h"
 
-#include "vtkVolumeRayCastMIPFunction.h"
 
 #include "volumerendererdata.h"
 
@@ -57,7 +61,8 @@ public:
        virtual ~vtkClipping3DDataViewer();
 
 //     vtkImageActor*                  GetImageActor(int id);
-       vtkActor*                               GetOutlineActor();
+
+
        vtkClipPolyData*                GetTissueClipper(int id);
        vtkPolyDataMapper*              GetTissueMapper(int id);
        vtkPlanes*                              GetTissuePlanes(int id);
@@ -79,7 +84,13 @@ public:
        double                                  GetIsovalue(int idTissue);
 
        vtkVolume                               *GetVolumeActor();
-       vtkVolumeRayCastMapper  *GetVolumeMapper();
+       
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper                          *GetVolumeMapper();
+#else 
+       vtkFixedPointVolumeRayCastMapper        *GetVolumeMapper();
+#endif
+
        vtkPlanes                               *GetVolumePlanes();
 
        void                                    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
@@ -140,43 +151,50 @@ public:
 
 
 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;
+       vtkMarchingCubes                                        *_mCubes[ VTKMPRDATA_MAXTISSUE ];
+       vtkStripper                                                     *_tissueStripper[ VTKMPRDATA_MAXTISSUE ];
+       vtkPolyDataMapper                                       *_tissueMapper[ VTKMPRDATA_MAXTISSUE ];
+       vtkPlanes                                                       *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
+       vtkClipPolyData                                         *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
 
        /// Volume
-       vtkPiecewiseFunction            *_tfun;
-       vtkColorTransferFunction        *_ctfun;
+       vtkPiecewiseFunction                            *_tfun;
+       vtkColorTransferFunction                        *_ctfun;
 //     vtkVolumeRayCastCompositeFunction       *_compositeFunction;
-       vtkPlanes                                       *_volumePlanes;
-       vtkVolumeRayCastMapper          *_volumeMapper;
-       vtkVolumeProperty                       *_volumeProperty;
-       vtkVolume                                       *_newvol;
-       vtkMPRBaseData                          *_vtkmprbasedata;
-       bool                                            _visibleVolume;
-       bool                                            _visibleVolumeBox;
-       bool                                            _representationType[VTKMPRDATA_MAXTISSUE];
-       bool                                            _visibleTissue[VTKMPRDATA_MAXTISSUE];
-       vtkActor                                        *_tissue[VTKMPRDATA_MAXTISSUE];
-       boxSurfaceObserver                      *_observerV;
-       boxSurfaceObserver                      *_observerS[VTKMPRDATA_MAXTISSUE];
-
-       std::vector<double>                     greyValuesTransferenceFVector;
-       std::vector<double>                     intensityValuesTransferenceFVector;
-       std::vector<double>                     redColorsOfColorTransferenceFVector;
-       std::vector<double>                     greenColorsOfColorTransferenceFVector;
-       std::vector<double>                     blueColorsOfColorTransferenceFVector;
-       std::vector<double>                     greyValueColorsOfColorTransferenceFVector;
-
+       vtkPlanes                                                       *_volumePlanes;
+       
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper                          *_volumeMapper;
+#else 
+       vtkFixedPointVolumeRayCastMapper        *_volumeMapper;
+#endif
+       
+       
+       vtkVolumeProperty                                       *_volumeProperty;
+       vtkVolume                                                       *_newvol;
+       vtkMPRBaseData                                          *_vtkmprbasedata;
+       bool                                                            _visibleVolume;
+       bool                                                            _visibleVolumeBox;
+       bool                                                            _representationType[VTKMPRDATA_MAXTISSUE];
+       bool                                                            _visibleTissue[VTKMPRDATA_MAXTISSUE];
+       vtkActor                                                        *_tissue[VTKMPRDATA_MAXTISSUE];
+       boxSurfaceObserver                                      *_observerV;
+       boxSurfaceObserver                                      *_observerS[VTKMPRDATA_MAXTISSUE];
+
+       std::vector<double>                                     greyValuesTransferenceFVector;
+       std::vector<double>                                     intensityValuesTransferenceFVector;
+       std::vector<double>                                     redColorsOfColorTransferenceFVector;
+       std::vector<double>                                     greenColorsOfColorTransferenceFVector;
+       std::vector<double>                                     blueColorsOfColorTransferenceFVector;
+       std::vector<double>                                     greyValueColorsOfColorTransferenceFVector;
+
+#if (VTK_MAJOR_VERSION <= 7) 
        vtkVolumeRayCastCompositeFunction   *_compositeFunction;
        vtkVolumeRayCastMIPFunction         *_compositeFunctionMIP ;
+#else 
+       // ..
+#endif
+
 
        bool _isRayCasting;
        bool _isMIP;
index 4b0aef797825d3695f89eb07c8d3e1b0885c1ae9..06e631622e47d38cd0d7b43053dc2f6bc02acc16 100644 (file)
@@ -42,7 +42,6 @@
 =========================================================================*/
 #include "vtkClosePolyData.h"
 
-#include "vtkObjectFactory.h"
 #include "vtkPolyData.h"
 #include "vtkFeatureEdges.h"
 #include "vtkStripper.h"
 #include "vtkAppendPolyData.h"
 #include "vtkCleanPolyData.h"
 
-vtkCxxRevisionMacro(vtkClosePolyData, "$Revision: 1.3 $");
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+  vtkCxxRevisionMacro(vtkClosePolyData, "$Revision: 1.3 $");
+#else
+  #include "vtkDataObject.h"
+  #include "vtkInformation.h"
+  #include "vtkDemandDrivenPipeline.h"
+  #include "vtkInformationVector.h"
+#endif
+
 vtkStandardNewMacro(vtkClosePolyData);
 
 //----------------------------------------------------------------------------
@@ -64,54 +73,117 @@ vtkClosePolyData::~vtkClosePolyData()
 {
 }
 
+
 //----------------------------------------------------------------------------
-// This method is much too long, and has to be broken up!
-// Furthermore we are loosing the normals !!!
-void vtkClosePolyData::Execute()
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       // This method is much too long, and has to be broken up!
+       // Furthermore we are loosing the normals !!!
+       void vtkClosePolyData::Execute()
+       {
+         vtkPolyData *input = this->GetInput();
+         vtkPolyData *output = this->GetOutput();
+         
+          //#closing the polydata see : close.py for details
+         vtkFeatureEdges *boundary = vtkFeatureEdges::New();
+         boundary->SetInput( input );
+         boundary->BoundaryEdgesOn ();
+         boundary->FeatureEdgesOff ();
+         boundary->NonManifoldEdgesOff ();
+         boundary->ManifoldEdgesOff ();
+         //boundary->ColoringOff ();
+
+         vtkStripper *stripper = vtkStripper::New();
+         stripper->SetInput( boundary->GetOutput() );
+         stripper->Update(); //important
+         boundary->Delete();
+
+         vtkPolyData *pd = vtkPolyData::New();
+         pd->SetPoints ( stripper->GetOutput()->GetPoints() );
+         pd->SetPolys  ( stripper->GetOutput()->GetLines() );
+         stripper->Delete();
+           
+         //vtkGLUTesselatorTriangleFilter *triangle = vtkGLUTesselatorTriangleFilter::New();
+         vtkTriangleFilter *triangle = vtkTriangleFilter::New();
+         triangle->SetInput( pd );
+         pd->Delete();
+           
+         vtkAppendPolyData *append = vtkAppendPolyData::New();
+         append->AddInput( input );
+         append->AddInput( triangle->GetOutput());
+         triangle->Delete();
+             vtkInformation
+         vtkCleanPolyData *clean = vtkCleanPolyData::New();
+         clean->SetInput( append->GetOutput());
+         append->Delete();
+           
+         // When all optimizations are complete, this squeeze will be unecessary.
+         // (But it does not seem to cost much.)
+         clean->Update();  //important before ShallowCopy
+         output->ShallowCopy( clean->GetOutput() );
+         clean->Delete();
+       }
+
+#else
+
+int vtkClosePolyData::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 {
-  vtkPolyData *input = this->GetInput();
-  vtkPolyData *output = this->GetOutput();
-  
-   //#closing the polydata see : close.py for details
-  vtkFeatureEdges *boundary = vtkFeatureEdges::New();
-  boundary->SetInput( input );
-  boundary->BoundaryEdgesOn ();
-  boundary->FeatureEdgesOff ();
-  boundary->NonManifoldEdgesOff ();
-  boundary->ManifoldEdgesOff ();
-  //boundary->ColoringOff ();
-
-  vtkStripper *stripper = vtkStripper::New();
-  stripper->SetInput( boundary->GetOutput() );
-  stripper->Update(); //important
-  boundary->Delete();
-
-  vtkPolyData *pd = vtkPolyData::New();
-  pd->SetPoints ( stripper->GetOutput()->GetPoints() );
-  pd->SetPolys  ( stripper->GetOutput()->GetLines() );
-  stripper->Delete();
-    
-  //vtkGLUTesselatorTriangleFilter *triangle = vtkGLUTesselatorTriangleFilter::New();
-  vtkTriangleFilter *triangle = vtkTriangleFilter::New();
-  triangle->SetInput( pd );
-  pd->Delete();
-    
-  vtkAppendPolyData *append = vtkAppendPolyData::New();
-  append->AddInput( input );
-  append->AddInput( triangle->GetOutput());
-  triangle->Delete();
-      
-  vtkCleanPolyData *clean = vtkCleanPolyData::New();
-  clean->SetInput( append->GetOutput());
-  append->Delete();
-    
-  // When all optimizations are complete, this squeeze will be unecessary.
-  // (But it does not seem to cost much.)
-  clean->Update();  //important before ShallowCopy
-  output->ShallowCopy( clean->GetOutput() );
-  clean->Delete();
+       // get the info objects
+       vtkInformation *inInfo          = inputVector[0]->GetInformationObject(0);
+       vtkInformation *outInfo         = outputVector->GetInformationObject(0);
+       // get the input and output
+       vtkPolyData *input                      = vtkPolyData::SafeDownCast(    inInfo->Get(vtkDataObject::DATA_OBJECT()));
+       vtkPolyData *output             = vtkPolyData::SafeDownCast(    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+       //#closing the polydata see : close.py for details
+
+       vtkFeatureEdges *boundary       = vtkFeatureEdges::New();
+       boundary->SetInputData( input );
+       boundary->BoundaryEdgesOn ();
+       boundary->FeatureEdgesOff ();
+       boundary->NonManifoldEdgesOff ();
+       boundary->ManifoldEdgesOff ();
+       // boundary->ColoringOff ();
+       boundary->Update();
+
+       vtkStripper *stripper = vtkStripper::New();
+       stripper->SetInputConnection( boundary->GetOutputPort() );
+       stripper->Update(); //important
+
+       vtkPolyData *pd = vtkPolyData::New();
+       pd->SetPoints ( stripper->GetOutput()->GetPoints() );
+       pd->SetPolys  ( stripper->GetOutput()->GetLines()  );
+       //vtkGLUTesselatorTriangleFilter *triangle = vtkGLUTesselatorTriangleFilter::New();
+
+       vtkTriangleFilter *triangle = vtkTriangleFilter::New();
+       triangle->SetInputData( pd );
+       triangle->Update( );
+
+       vtkAppendPolyData *append = vtkAppendPolyData::New();
+       append->AddInputData( input );
+       append->AddInputConnection( triangle->GetOutputPort() );
+       append->Update();
+
+       vtkCleanPolyData *clean = vtkCleanPolyData::New();
+       clean->SetInputConnection( append->GetOutputPort());
+       // When all optimizations are complete, this squeeze will be unecessary.
+       // (But it does not seem to cost much.)
+       clean->Update();  //important before ShallowCopy
+
+       output->ShallowCopy( clean->GetOutput() );
+
+       append   -> Delete();
+       clean    -> Delete();
+       boundary -> Delete();
+       stripper -> Delete();
+       pd               -> Delete();
+       triangle -> Delete();
+
+       return 1;
 }
 
+#endif
+
 //----------------------------------------------------------------------------
 void vtkClosePolyData::PrintSelf(ostream& os, vtkIndent indent)
 {
index 85e4ad0cebb53d36fbd2a82d3896488c8a4f343d..37f8cde17c26cc5223262a826a6cebee59cb1d6b 100644 (file)
 #ifndef __vtkClosePolyData_h
 #define __vtkClosePolyData_h
 
+#include "vtkObjectFactory.h"
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 #include "vtkPolyDataToPolyDataFilter.h"
+#else
+#include "vtkPolyDataAlgorithm.h"
+#endif
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 class vtkClosePolyData : public vtkPolyDataToPolyDataFilter
+#else
+class vtkClosePolyData : public vtkPolyDataAlgorithm
+#endif
 {
 public:
   static vtkClosePolyData *New();
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   vtkTypeRevisionMacro(vtkClosePolyData,vtkPolyDataToPolyDataFilter);
+#else
+  vtkTypeMacro(vtkClosePolyData,vtkPolyDataAlgorithm);
+#endif
   void PrintSelf(ostream& os, vtkIndent indent);
 
 protected:
   vtkClosePolyData();
   ~vtkClosePolyData();
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   // Usual data generation method
   void Execute();
+#else
+  int RequestData(  vtkInformation *vtkNotUsed(request),  vtkInformationVector **inputVector,  vtkInformationVector *outputVector);    
+#endif
+
 
 private:
   vtkClosePolyData(const vtkClosePolyData&);  // Not implemented.
index 2bb224a131626bae6ce5231a87d4475c32066e0b..41026ca30e344f02c3dc595149cb785712cd3e3a 100644 (file)
@@ -51,7 +51,7 @@ void vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(vtkInfoTextImage *vtki
 bool vtkInfoTextImageInteractor::OnMouseMove()
 {
        int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
+       crea::wxVTKRenderWindowInteractor *wxVTKiren;
        wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
        wxVTKiren->GetEventPosition(X,Y);
 
index a6339c18d034ec534a0b30af985935834b2cae92..479c30cd1740e2946368a03a6aa265d808756da5 100644 (file)
@@ -39,7 +39,7 @@ vtkInfoTextImageInteractorPlane2D::~vtkInfoTextImageInteractorPlane2D()
 bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
 {
        int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
+       crea::wxVTKRenderWindowInteractor *wxVTKiren;
        wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
        wxVTKiren->GetEventPosition(X,Y);
 
index 044d49a521c56f72add8885f6ecacb1c5698c4ef..ef444aa2f969ea00d4f1cd4cd59ebe3c78780893 100644 (file)
@@ -109,7 +109,13 @@ bool vtkInteractorStyle3DView::SelectMarchibCubePoint()
                                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
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                                this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                               this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
                                ok=true;
                        }
                }
index 7de94728684a266196798e1dec5366e55a94741b..d7c6b6843aca7ba420ab5742f9bce08f551f3ffb 100644 (file)
@@ -373,7 +373,13 @@ void vtkInteractorStyleBaseView::EvaluateToRefresh()
                        _parent_refresh_waiting = false;
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 //CPR 13/01/2010
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
                        int i;
                        int size = _lstParentToReport.size();
                        for(i = 0; i<size; i++)
index af13f650e4cd9d33b252fec4ec467eedeeb131c0..3dacf1a2d5da1b07097a18be875aaab499c17c04 100644 (file)
@@ -51,9 +51,18 @@ bool  vtkInteractorStyleMPRView::OnLeftDClick () // virtual
        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
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
        wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
+#else
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent2);
+#endif
+
+
 
        return true;
 }
index 54a7f734443491413e64d40eb3f7aab0e7f2aa67..177534ef86ba40be2ff8733c87feee97b1881007 100644 (file)
@@ -93,7 +93,13 @@ bool  vtkInteractorStyleSphere::OnLeftButtonUp()
                        _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
                        wxsphereview->SetXYZtoParent(x,y);
                        wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
+#else
+                       wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent);
+#endif
+
                } else {
                        wxsphereview->RotationEnd();
                }
index 45e4f3869ec476ca0f8295b8eca3fc199be8c3c7..cb1dc1e54e6b971f4456fed694c69f6fe4cc45e0 100644 (file)
@@ -141,10 +141,18 @@ std::vector<double>*     vtkMPR3DDataViewer::GetctFunVectorBlue()
 //-------------------------------------------------------------------
 void vtkMPR3DDataViewer::SetImage()
 {
-       _saggitalColors -> SetInput( _vtkmprbasedata->GetImageData() );
-       _axialColors    -> SetInput( _vtkmprbasedata->GetImageData() );
-       _coronalColors  -> SetInput( _vtkmprbasedata->GetImageData() );
-       _outlineData    -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       _saggitalColors ->SetInput( _vtkmprbasedata->GetImageData() );
+       _axialColors    ->SetInput( _vtkmprbasedata->GetImageData() );
+       _coronalColors  ->SetInput( _vtkmprbasedata->GetImageData() );
+       _outlineData    ->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
+#else
+       _saggitalColors ->SetInputData( _vtkmprbasedata->GetImageData() );
+       _axialColors    ->SetInputData( _vtkmprbasedata->GetImageData() );
+       _coronalColors  ->SetInputData( _vtkmprbasedata->GetImageData() );
+       _outlineData    ->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -179,7 +187,12 @@ void vtkMPR3DDataViewer::Configure()
        double delta;
        if(_vtkmprbasedata->GetImageData())
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _vtkmprbasedata->GetImageData()->Update();
+#else
+               // ..
+#endif
                _vtkmprbasedata->GetImageData()->Modified();
                _vtkmprbasedata->GetImageData()->GetScalarRange(range);
                delta = range[1]-range[0];
@@ -267,13 +280,27 @@ void vtkMPR3DDataViewer::Configure()
                        _saggitalColors = vtkImageMapToColors::New();
                }
                _saggitalColors->RemoveAllInputs();
-               _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
+
        //    _saggitalColors->SetLookupTable(_bwLut);
                _saggitalColors->SetLookupTable(_ctfun);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+               _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+               _saggitalColors->Update();
+#endif
+               
+               
                if(_saggital==NULL)
                {
                        _saggital = vtkImageActor::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _saggital->SetInput(_saggitalColors->GetOutput());
+#else
+                       _saggital->SetInputData(_saggitalColors->GetOutput());
+#endif
                }       
                //_saggitalColors->Update();
        
@@ -285,13 +312,29 @@ void vtkMPR3DDataViewer::Configure()
                        _axialColors = vtkImageMapToColors::New();
                }
                _axialColors->RemoveAllInputs();
-               _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
        //    _axialColors->SetLookupTable(_hueLut);
                _axialColors->SetLookupTable(_ctfun);
+
+               
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+               _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+               _axialColors->Update();
+#endif
+
                if(_axial==NULL)
                {
                        _axial = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _axial->SetInput(_axialColors->GetOutput());
+#else
+                       _axial->SetInputData(_axialColors->GetOutput());
+#endif
+
                }
                
                //_axialColors->Update();
@@ -302,31 +345,61 @@ void vtkMPR3DDataViewer::Configure()
                        _coronalColors = vtkImageMapToColors::New();
                }
                _coronalColors->RemoveAllInputs();
-               _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
        //    _coronalColors->SetLookupTable(_satLut);
                _coronalColors->SetLookupTable(_ctfun);
+
+               
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+               _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+               _coronalColors->Update();
+#endif
+
+
                if(_coronal==NULL)
                {
                        _coronal = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _coronal->SetInput(_coronalColors->GetOutput());
-               }
+#else
+                       _coronal->SetInputData(_coronalColors->GetOutput());
+#endif
+
+               } // if _coronal
                
        // An outline provides context around the data.
        //
                if(_outlineData==NULL)
                {
                        _outlineData = vtkOutlineFilter::New();
-               }
+               } // if _outlineData
                _outlineData->RemoveAllInputs();
                if(_vtkmprbasedata->GetImageData())
                {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
-               }
+#else
+                       _outlineData->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
+                       _outlineData->Update();    
+#endif
+               } // if _image
 
                if(_mapOutline==NULL)
                {
                        _mapOutline = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _mapOutline->SetInput(_outlineData->GetOutput());
+#else
+                       _mapOutline->SetInputData(_outlineData->GetOutput());
+#endif
+
                }
                _mapOutline->Update();    
                //_mapOutline->RemoveAllInputs();
index 1016dd464e1fdb5b03c5483b99418953634a35ba..3c715ae038aa09f20939c2d2a435b0050d3a7a76 100644 (file)
@@ -226,17 +226,41 @@ void vtkPlane2DView::Extract_One_PlaneVTK()
 {
        vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
        SetPSource(_sizeIma);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _3Dslices -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
        _3Dslices -> SetSource( imagedata );
+#else
+       _3Dslices -> SetInputData( ( vtkDataSet* )_pSource->GetOutput( ) );
+       _3Dslices -> SetSourceData( imagedata );
+#endif
+
        _3Dslices -> Update( );
        _stPoints -> GetPointData( )->SetScalars(  _3Dslices->GetOutput()->GetPointData()->GetScalars()  );
        _stPoints -> SetDimensions( _sizeIma, _sizeIma, 1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _stPoints -> SetScalarType( imagedata->GetScalarType() );
        _stPoints -> SetScalarTypeToShort();
        _stPoints -> Update();
 //     _change   -> SetInput( _stPoints );  
 //     _change   -> Update();    //important
        _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _stPoints );
+#else
+printf("EED Warning!  vtkPlane2DView::Extract_One_PlaneVTK     VTK 5->7   ???? SetScalarTypeToShort  \n");
+printf("EED Warning!  vtkPlane2DView::Extract_One_PlaneVTK     VTK 5->7   ???? SetScalarTypeToShort  \n");
+printf("EED Warning!  vtkPlane2DView::Extract_One_PlaneVTK     VTK 5->7   ???? SetScalarTypeToShort  \n");
+printf("EED Warning!  vtkPlane2DView::Extract_One_PlaneVTK     VTK 5->7   ???? SetScalarTypeToShort  \n");
+printf("EED Warning!  vtkPlane2DView::Extract_One_PlaneVTK     VTK 5->7   ???? SetScalarTypeToShort  \n");
+       vtkInformation* info=_stPoints->GetInformation();
+       vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_SHORT, 1);
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( _stPoints );
+
+#endif
+
+
 //     _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _change->GetOutput() );
        //      vtkImageActor *imageActor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor();
 }
@@ -276,8 +300,14 @@ void vtkPlane2DView::Extract_MIP_PlaneVTK( /*double heightDefinition*/ )
        for ( iWidth=0 ; iWidth<sizeWidth ; iWidth++ )
        {       
                vtkProbeFilter *slice = vtkProbeFilter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                slice -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
                slice -> SetSource( imagedata );
+#else
+               slice -> SetInputData( ( vtkDataSet* )_pSource->GetOutput( ) );
+               slice -> SetSourceData( imagedata );
+#endif
                slice -> Update( );
                slicesLST.push_back( slice );
                _pSource->Push( sp );
@@ -287,11 +317,17 @@ void vtkPlane2DView::Extract_MIP_PlaneVTK( /*double heightDefinition*/ )
                _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);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               _imageResult -> SetScalarType( imagedata->GetScalarType() );
                _imageResult -> SetWholeExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
                _imageResult -> AllocateScalars();
                _imageResult -> Update();
+#else
+               _imageResult -> AllocateScalars(imagedata->GetScalarType(),1);
+#endif
+
        }
        unsigned short *pTemp;
        unsigned short *pResult;
@@ -324,7 +360,12 @@ void vtkPlane2DView::Extract_MIP_PlaneVTK( /*double heightDefinition*/ )
                slicesLST[iWidth]->Delete();
        }
        _imageResult->Modified();
-       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageResult );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( _imageResult );
+#else
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( _imageResult );
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -341,7 +382,7 @@ void vtkPlane2DView::Configure( )
        _stPoints        = vtkStructuredPoints::New( );
        _change          = vtkImageChangeInformation::New();
 
-       wxVTKRenderWindowInteractor *iren               = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren         = GetWxVTKRenderWindowInteractor();
        ExtractPlane();
 //     SetActive(false);
        _imageViewer2XYZ -> GetVtkImageViewer2()        -> SetupInteractor ( iren );
@@ -404,7 +445,12 @@ void vtkPlane2DView::HorizontalLine()
        lines->Delete();  //do not delete lines ??
        _lineActor                                      =       vtkActor::New();
     _lineMapper                                        =       vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _lineMapper->SetInput(_pd);
+#else
+       _lineMapper->SetInputData(_pd);
+#endif
        _lineMapper->ImmediateModeRenderingOn();
        _lineActor->SetMapper(_lineMapper);
        _lineActor->GetProperty()->BackfaceCullingOn();
index c82d0d8a3467b03f2e5b2bf2dc693fa68801b939..1d202777ff92679d0b8579588a9db37a876bb010 100644 (file)
@@ -46,6 +46,14 @@ void vtkmyPWCallback_3DPointWidget::Execute(vtkObject *caller, unsigned long, vo
                _planeWidget->GetCenter(p);
                _planeWidget->GetNormal(n);
                _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetNormal(n[0],n[1],n[2]);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               //..
+#else
+               _planeWidget->GetPolyData(_vtkplane);
+               _probe->Update();
+#endif
+
        }
 
        double spc[3];
@@ -100,3 +108,17 @@ void vtkmyPWCallback_3DPointWidget::SetVtkPlaneWidget( vtkPlaneWidget *planeWidg
        _planeWidget=planeWidget;
 }
 
+//-------------------------------------------------------------------
+ void vtkmyPWCallback_3DPointWidget::SetVtkPolyData( vtkPolyData *vtkplane)
+{
+       _vtkplane=vtkplane;
+}
+
+//-------------------------------------------------------------------
+void vtkmyPWCallback_3DPointWidget::SetVtkProbeFilter( vtkProbeFilter *probe)
+{
+       _probe=probe;
+}
+
+
+
index 465e9ca8693571688303302581a6ee8167960dad..85de5dcfb3859fbbe3bcfd620c9196a456d97533 100644 (file)
@@ -43,13 +43,20 @@ public:
   void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
   void SetVtkPointWidget( vtkPointWidget *pointWidget );
   void SetVtkPlaneWidget( vtkPlaneWidget *planeWidget );
+
+  void SetVtkPolyData( vtkPolyData *vtkplane);
+  void SetVtkProbeFilter( vtkProbeFilter *probe);
+
 private:
 
        double                                                  _backNormal[3];
        vtkPlaneWidget                                  *_planeWidget;
+
        vtkPointWidget                                  *_pointWidget;
-       wxVtkMPR3DView *_wxvtkmpr3Dview;
+       vtkPolyData                                             *_vtkplane;
+       vtkProbeFilter                                  *_probe;
+               
+       wxVtkMPR3DView                                  *_wxvtkmpr3Dview;
 };
 
-
 #endif /*VTKMYPWCALLBACK_3DPOINTWIDGET_H_*/
index 99fad9d0c4426b44050d5452c4c7294b7389dd8c..67606299255f14f666ae5337dec6a3314de33f35 100644 (file)
@@ -81,7 +81,7 @@
 
 
 #include "wxMPRWidget.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "UtilVtk3DGeometriSelection.h"
 #include "../kernel/marDicomBase.h"
 
@@ -510,17 +510,17 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
        // view 0
        _vtkmpr2Dview[0] = new wxVtkMPR2DView(panel,0);
        _vtkmpr2Dview[0]->SetVtkBaseData(vtkmprbasedata);
-       wxVTKRenderWindowInteractor *iren0 = _vtkmpr2Dview[0]->GetWxVTKRenderWindowInteractor();        
+       crea::wxVTKRenderWindowInteractor *iren0 = _vtkmpr2Dview[0]->GetWxVTKRenderWindowInteractor();  
 
        // view 1
        _vtkmpr2Dview[1] = new wxVtkMPR2DView(panel,1);
        _vtkmpr2Dview[1]->SetVtkBaseData(vtkmprbasedata);
-       wxVTKRenderWindowInteractor *iren1 = _vtkmpr2Dview[1]->GetWxVTKRenderWindowInteractor();        
+       crea::wxVTKRenderWindowInteractor *iren1 = _vtkmpr2Dview[1]->GetWxVTKRenderWindowInteractor();  
 
        // view 2
        _vtkmpr2Dview[2] = new wxVtkMPR2DView(panel,2);
        _vtkmpr2Dview[2]->SetVtkBaseData(vtkmprbasedata);
-       wxVTKRenderWindowInteractor *iren2 = _vtkmpr2Dview[2]->GetWxVTKRenderWindowInteractor();        
+       crea::wxVTKRenderWindowInteractor *iren2 = _vtkmpr2Dview[2]->GetWxVTKRenderWindowInteractor();  
 
        // view 3
        wxNotebook *notebook = new wxNotebook( panel, -1 );
@@ -539,7 +539,7 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
 // EED
 //     _wxsphereview = new wxSphereView( notebook , vtkmprbasedata, vtkmprbasedata->GetImageData());
        _wxsphereview = new wxSphereView( notebook , vtkmprbasedata );
-       wxVTKRenderWindowInteractor *iren3B = _wxsphereview->GetWxVTKRenderWindowInteractor();  
+       crea::wxVTKRenderWindowInteractor *iren3B = _wxsphereview->GetWxVTKRenderWindowInteractor();    
        notebook->AddPage( iren3B, _T("Sphere") );
 
         // view 3.2
@@ -560,21 +560,16 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
        _wxvtkclipping3Dview->SetVtkClipping3DDataViewer(vtkclipping3Ddataviewer);
 
 
-       wxWindow        *window3D                               = _wxvtk3Dbaseview_MPRClipping3D->GetWxVTKRenderWindowInteractor();
-
+       wxWindow        *window3D                       = _wxvtk3Dbaseview_MPRClipping3D->GetWxVTKRenderWindowInteractor();
        wxPanel         *panelControl                   = new wxPanel(panelMPR3D,-1);
        wxPanel         *controlPanelMPR3D              = _wxvtkmpr3Dview->CreateControlPanel(panelControl, false);
        wxPanel         *controlPanelClipping3D = _wxvtkclipping3Dview->CreateSurfControlPanel(panelControl);
 
-
-
-
 //    wxBoxSizer        *sizerCtrol             = new wxBoxSizer(wxVERTICAL);
        wxFlexGridSizer  *sizerCtrol             = new wxFlexGridSizer(1);
        sizerCtrol->Add(controlPanelMPR3D               , 1, wxALL|wxEXPAND, 2);
        sizerCtrol->Add(controlPanelClipping3D  , 1, wxALL|wxEXPAND, 2);
 
-
        panelControl->SetAutoLayout(true);
        panelControl->SetSizer(sizerCtrol);
        panelControl->SetSize(400,150);
@@ -585,12 +580,8 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
        //RaC Nov2012 Correctly resize internal panels with the window resize event
        panelMPR3D->SetSashGravity(0.5);
        panelMPR3D      -> SplitHorizontally( panelControl,window3D,200  );
-
        notebook->AddPage( panelMPR3D, _T("MPR 3D - Clipping") );
-
-
        Connect(notebook->GetId()       , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED  , (wxObjectEventFunction) &wxMPRWidget::OnPageBChanged   );
-
        wxBoxSizer *sizerV = new wxBoxSizer(wxVERTICAL);
        wxBoxSizer *sizerH1= new wxBoxSizer(wxHORIZONTAL);
        wxBoxSizer *sizerH2= new wxBoxSizer(wxHORIZONTAL);
@@ -655,41 +646,35 @@ void wxMPRWidget::ConfigureVTK(){
        if (_vtkmprbasedata!=NULL)
        {
                _vtkmprbasedata->Configure();
-               x=_vtkmprbasedata                       ->      GetMaxPositionX()/2;
-               y=_vtkmprbasedata                       ->      GetMaxPositionY()/2;
-               z=_vtkmprbasedata                       ->      GetMaxPositionZ()/2;    
+               x = _vtkmprbasedata->GetMaxPositionX()/2;
+               y = _vtkmprbasedata->GetMaxPositionY()/2;
+               z = _vtkmprbasedata->GetMaxPositionZ()/2;       
                _vtkmprbasedata->SetX( x );
                _vtkmprbasedata->SetY( y );
                _vtkmprbasedata->SetZ( z );
        
        }
 
-       if(_vtkmpr2Dview[0]!=NULL) {_vtkmpr2Dview[0]                            ->      Configure();}
-       if(_vtkmpr2Dview[1]!=NULL) {_vtkmpr2Dview[1]                            ->      Configure();}
-       if(_vtkmpr2Dview[2]!=NULL) {_vtkmpr2Dview[2]                            ->      Configure();}
+       if(_vtkmpr2Dview[0]!=NULL)              { _vtkmpr2Dview[0]->Configure();                                        }
+       if(_vtkmpr2Dview[1]!=NULL)              { _vtkmpr2Dview[1]->Configure();                                        }
+       if(_vtkmpr2Dview[2]!=NULL)              { _vtkmpr2Dview[2]->Configure();                                        }
 
+       if (_vtkmpr2Dview_B[0]!=NULL)   { _vtkmpr2Dview_B[0]->Configure();                                      }
+       if (_vtkmpr2Dview_B[1]!=NULL)   { _vtkmpr2Dview_B[1]->Configure();                                      }
+       if (_vtkmpr2Dview_B[2]!=NULL)   { _vtkmpr2Dview_B[2]->Configure();                                      }
 
-       if (_vtkmpr2Dview_B[0]!=NULL) { _vtkmpr2Dview_B[0]                              ->      Configure(); }
-       if (_vtkmpr2Dview_B[1]!=NULL) { _vtkmpr2Dview_B[1]                              ->      Configure(); }
-       if (_vtkmpr2Dview_B[2]!=NULL) { _vtkmpr2Dview_B[2]                              ->      Configure(); }
+       if (_vtkplane2Dview!=NULL)              { _vtkplane2Dview->Configure();                                         }
+       if (_widgetMesure!=NULL)                { _widgetMesure->ConfigureA(_vtkplane2Dview);           }
+       if (_widgetMesure!=NULL)                { _widgetMesure->SetActiveLink(true);                           }
+       if (_wxsphereview!=NULL)                { _wxsphereview->Configure();                                           }
 
+       if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D->Configure();}
+       if (_wxvtkmpr3Dview!=NULL)              { _wxvtkmpr3Dview->Configure();                                         }
+       if (_wxvtkclipping3Dview!=NULL) { _wxvtkclipping3Dview->Configure();                            }
 
-       
-
-       if (_vtkplane2Dview!=NULL){_vtkplane2Dview                              ->      Configure();}
-       if (_widgetMesure!=NULL){_widgetMesure                                  ->      ConfigureA(_vtkplane2Dview);}
-       if (_widgetMesure!=NULL){_widgetMesure                                  ->      SetActiveLink(true);}
-       if (_wxsphereview!=NULL){_wxsphereview                                  ->      Configure();}
-
-       if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D        ->  Configure();}
-       if (_wxvtkmpr3Dview!=NULL){
-               _wxvtkmpr3Dview                                 ->      Configure();
-       }
-       if (_wxvtkclipping3Dview!=NULL){_wxvtkclipping3Dview            ->      Configure();}
-
-       if (_vtkplane2Dview_B!=NULL){   _vtkplane2Dview_B                       ->      Configure(); }
-       if (_widgetMesure_B!=NULL){             _widgetMesure_B                         ->      ConfigureA( _vtkplane2Dview_B ); }
-       if (_widgetMesure_B!=NULL){             _widgetMesure_B                         ->      SetActiveLink(true); }
+       if (_vtkplane2Dview_B!=NULL)    { _vtkplane2Dview_B->Configure();                                       }
+       if (_widgetMesure_B!=NULL)              { _widgetMesure_B->ConfigureA( _vtkplane2Dview_B ); }
+       if (_widgetMesure_B!=NULL)              { _widgetMesure_B->SetActiveLink(true);                         }
 
 //EEDx3
 //     double spc[3];
index 7e698c3abdbedcf552db2cec7162c28d28ba4946..a4d48213f71bc5927c1131904384588743f370f7 100644 (file)
@@ -42,5 +42,11 @@ wxMPRWidget2::~wxMPRWidget2()
 void wxMPRWidget2::OnRefreshView(wxCommandEvent & event) // Virtual
 {      
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     this->GetParent()->ProcessEvent(newevent1);
+#else
+    this->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 }
index 8ab810eb2d87f954bc1791461ca9cc86f4926380..c0690bdaf5b9fbaeff30e98082365758127abde1 100644 (file)
@@ -163,7 +163,13 @@ vtkImageData* wxMaracasMultipleVolumeRendererManager::getImageData(std::string f
                vtkImageData* img = reader->GetOutput();        
 
                vtkImageCast* cast = vtkImageCast::New(); 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                cast->SetInput(img);
+#else
+               cast->SetInputData(img);
+#endif
+
                cast->SetOutputScalarTypeToUnsignedShort();
                cast->Update();                 
                //reader->Delete();
index d1197c5f5c6a20519dc87e0e7562bbc238a38478..d71d3e91bac1b45d89d1006f682f54a80932bf63 100644 (file)
 
 wxMaracasMultipleVolumeRendererManagerData::wxMaracasMultipleVolumeRendererManagerData(vtkImageData* vol, std::string dataname){
 
-       _vol = vol;     
-       _dataname = dataname;
-       
-       _tfun = vtkPiecewiseFunction::New();
-       _ctfun = vtkColorTransferFunction::New();   
+       _vol                                    = vol;  
+       _dataname                               = dataname;
+       _tfun                                   = vtkPiecewiseFunction::New();
+       _ctfun                                  = vtkColorTransferFunction::New();   
+       _volumePlanes                   = vtkPlanes::New();
 
-       _volumePlanes  = vtkPlanes::New();
-       _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
-       _MIPFunction = vtkVolumeRayCastMIPFunction::New();
 
-       _volumeMapper = vtkVolumeRayCastMapper::New();  
+#if (VTK_MAJOR_VERSION <= 7) 
+       _compositeFunction              = vtkVolumeRayCastCompositeFunction::New();
+       _MIPFunction                    = vtkVolumeRayCastMIPFunction::New();
+       _volumeMapper                   = vtkVolumeRayCastMapper::New();                
        _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
+#else 
+       _volumeMapper                   = vtkFixedPointVolumeRayCastMapper::New();      
+#endif
+
        _volumeMapper->SetClippingPlanes( _volumePlanes );
        _volumeMapper->AutoAdjustSampleDistancesOn();
        _volumeProperty = vtkVolumeProperty::New();     
@@ -56,7 +60,14 @@ wxMaracasMultipleVolumeRendererManagerData::wxMaracasMultipleVolumeRendererManag
        _newvol = vtkVolume::New();
        _newvol->SetMapper(_volumeMapper );
        _newvol->SetProperty(_volumeProperty );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _volumeMapper->SetInput( _vol );
+#else
+       _volumeMapper->SetInputData( _vol );
+#endif
+
        _volumeMapper->Update();
        _newvol->Update();
 }
@@ -67,8 +78,16 @@ wxMaracasMultipleVolumeRendererManagerData::~wxMaracasMultipleVolumeRendererMana
        _tfun->Delete();
        _ctfun->Delete();
        _volumePlanes->Delete();
+
+
+#if (VTK_MAJOR_VERSION <= 7) 
        _compositeFunction->Delete();
+#else 
+       // ..
+#endif
+
        _volumeMapper->Delete();
+
        _volumeProperty->Delete();
        _newvol->Delete();
        
@@ -106,14 +125,24 @@ void wxMaracasMultipleVolumeRendererManagerData::setVolumeOpacity(std::vector<do
 /**
 **     Check if the variables are setted correctly
 **/
-void wxMaracasMultipleVolumeRendererManagerData::checkInvariant()throw (char *){
-       if(!_compositeFunction){
+void wxMaracasMultipleVolumeRendererManagerData::checkInvariant()throw (char *)
+{
+
+       
+#if (VTK_MAJOR_VERSION <= 7) 
+       if(!_compositeFunction)
+       {
                throw "No composite function initialized";
        }
-       if(!_MIPFunction){
+       if(!_MIPFunction)
+       {
                throw "No MIP function initialized";
        }
-       if(!_volumeMapper){
+#else 
+       // ..
+#endif
+       if(!_volumeMapper)
+       {
                throw "No volume mapper initialized";
        }
 }
@@ -156,12 +185,17 @@ void wxMaracasMultipleVolumeRendererManagerData::setDataname(std::string datanam
        _dataname = dataname;
 }
 
-void wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction(int function) throw (char *){
-       checkInvariant();
-       if(function == 0){
+void wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction(int function) throw (char *)
+{
+       checkInvariant();       
+#if (VTK_MAJOR_VERSION <= 7) 
+       if(function == 0)
+       {
                _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
        }else{
                _volumeMapper->SetVolumeRayCastFunction(_MIPFunction);
        }
-       
+#else 
+       printf("EED   wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction   Composite MIP  ..... ??");
+#endif
 }
index 147704a4a66bfcffaac0aff76793ef95c121744b..3f43407ef8c38834e0c3412abf89eac72fa0135e 100644 (file)
@@ -26,9 +26,7 @@
 #ifndef wxMaracasMultipleVolumeRendererManagerData_H_
 #define wxMaracasMultipleVolumeRendererManagerData_H_
 
-#include <vtkVolumeRayCastCompositeFunction.h>
 #include <vtkPlanes.h>
-#include <vtkVolumeRayCastMapper.h>
 #include <vtkVolumeProperty.h>
 #include <vtkVolume.h>
 #include <vtkPiecewiseFunction.h>
 #include <vtkImageData.h>
 #include <vtkProp3D.h>
 #include <vtkRenderer.h>
-#include <vtkVolumeRayCastMIPFunction.h>
+
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include <vtkVolumeRayCastCompositeFunction.h>
+       #include <vtkVolumeRayCastMIPFunction.h>
+       #include <vtkVolumeRayCastMapper.h>
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
+
 
 #include <vector>
 
@@ -123,14 +130,22 @@ private:
         */
        int _id;                
 
-       vtkVolumeRayCastCompositeFunction       *_compositeFunction;
+
+
        vtkPlanes                                                       *_volumePlanes;
-       vtkVolumeRayCastMapper                          *_volumeMapper;
        vtkVolumeProperty                                       *_volumeProperty;
        vtkVolume                                                       *_newvol;
-       vtkPiecewiseFunction* _tfun;
-       vtkColorTransferFunction* _ctfun;
-       vtkVolumeRayCastMIPFunction* _MIPFunction;
+       vtkPiecewiseFunction                            *_tfun;
+       vtkColorTransferFunction                        *_ctfun;
+       
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMIPFunction                     *_MIPFunction;
+       vtkVolumeRayCastCompositeFunction       *_compositeFunction;
+       vtkVolumeRayCastMapper                          *_volumeMapper;
+#else 
+       vtkFixedPointVolumeRayCastMapper        *_volumeMapper;
+#endif
+       
 
        
 };
index 267745798abceb7b19bdc6ef20c2811de909693c..1b562be52b2cde1ed4ddf424102ed8ff0e260a2e 100644 (file)
@@ -230,7 +230,12 @@ ToolBarMultipleVolumeRenderer::ToolBarMultipleVolumeRenderer(wxWindow * parent,s
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
 
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index 69538a803325c1ed55e479c7fcbc3ad52d1bedb6..68db204e99233335b6324a97b1d43d853e487539 100644 (file)
@@ -483,28 +483,20 @@ void wxMaracasRenderTabbedPanel::addRemoveActorMPR(bool addremove)
        if(addremove)
        {
                wxtabs->GetPage(id)->Enable();
-
                bool valueX = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleX();
                bool valueY = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleY();
                bool valueZ = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleZ();
                bool valueXYZ = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleXYZ();
                bool valuePlane = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisiblePlane();
-
                mwxvtkmpr3Dview->VisibleImageActor( 0, valueX );
                mwxvtkmpr3Dview->VisibleImageActor( 1, valueY );
                mwxvtkmpr3Dview->VisibleImageActor( 2, valueZ );
                mwxvtkmpr3Dview->VisiblePointWidget(valueXYZ);
                mwxvtkmpr3Dview->VisiblePlaneWidget(valuePlane);
                mwxvtkmpr3Dview->showOutlineActor(true);
-               
                mwxvtkmpr3Dview->Refresh();
-
-
-       }
-       else
-       {
+       } else {
                wxtabs->GetPage(id)->Disable();
-
                mwxvtkmpr3Dview->VisiblePointWidget(false);
                mwxvtkmpr3Dview->VisiblePlaneWidget(false);
                mwxvtkmpr3Dview->VisibleImageActor(0, false );
@@ -512,10 +504,14 @@ void wxMaracasRenderTabbedPanel::addRemoveActorMPR(bool addremove)
                mwxvtkmpr3Dview->VisibleImageActor(2, false );
                mwxvtkmpr3Dview->showOutlineActor(false);
                mwxvtkmpr3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if
 }
 
 
@@ -823,13 +819,18 @@ void wxMaracasRenderTabbedPanel::onMPROptions(wxCommandEvent& event)
        }*/
 }
 
+
 void wxMaracasRenderTabbedPanel::OnRefreshView(wxCommandEvent & event) 
 {
        printf("CPR wxMaracasRenderTabbedPanel::OnRefreshView \n");
        mwxvtkmpr3Dview->RefreshView();
-
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 /**
index 108944d96e8e4bfddc5b56d4bfeb8a613c314bc7..1098be22fb20f2e379681de9d2a96791c92a1d6d 100644 (file)
@@ -209,7 +209,14 @@ ToolBarRenderer::ToolBarRenderer(wxWindow * parent,std::string iconsdir)
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
+
+
 
        this->Realize();
 
index 110ba6d858b8ea4d8b81215433af05a93b7036a1..d16cff956e6c4ebb0a5305d4b9078f1ab1150aa0 100644 (file)
 wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
 : wxPanel( parent, -1)
 {
-       _imageData=NULL;
-       _histogrammeVector=NULL;
-       _wxvtk3Dbaseview=NULL;
-       _wxvtkbaseView=NULL;
-       CreateInterface();
+       _imageData                      = NULL;
+       _histogrammeVector      = NULL;
+       _wxvtk3Dbaseview        = NULL;
+       _wxvtkbaseView          = NULL;
+       CreateInterface() ;
        CreateModel();
        Create3DViewObjects();
 }
@@ -106,7 +106,12 @@ void wxPanelCuttingImageData::Create3DViewObjects()
        _vtksphere->SetThetaResolution (20);
        _vtksphere->SetPhiResolution (20);
        _sphereMapper   = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _sphereMapper->SetInput( _vtksphere->GetOutput() );
+#else
+       _sphereMapper->SetInputData( _vtksphere->GetOutput() );
+#endif
        _sphereActor    = vtkActor::New();
        _sphereActor->SetMapper(_sphereMapper);
        _sphereActor->SetOrigin(0, 0, 0);
@@ -120,7 +125,12 @@ void wxPanelCuttingImageData::Create3DViewObjects()
        _vtkcube->SetYLength (1);
        _vtkcube->SetZLength (1);
        _cubeMapper             = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _cubeMapper->SetInput( _vtkcube->GetOutput() );
+#else
+       _cubeMapper->SetInputData( _vtkcube->GetOutput() );
+#endif
        _cubeActor              = vtkActor::New();
        _cubeActor->SetMapper(_cubeMapper);
        _cubeActor->SetOrigin(0, 0, 0);
@@ -132,7 +142,14 @@ void wxPanelCuttingImageData::Create3DViewObjects()
        _vtkcylinder    = vtkCylinderSource::New();
        _vtkcylinder->SetResolution(20);
        _cylinderMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _cylinderMapper->SetInput( _vtkcylinder->GetOutput() );
+#else
+       _cylinderMapper->SetInputData( _vtkcylinder->GetOutput() );
+#endif
+
        _cylinderActor  = vtkActor::New();
        _cylinderActor->SetMapper(_cylinderMapper);
        _cylinderActor->SetOrigin(0, 0, 0);
@@ -166,7 +183,12 @@ void wxPanelCuttingImageData::InitHistogramme()
        } else {
                _imageData->GetScalarRange(rangeA);
        }
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _xyplot->RemoveAllInputs();
+#else
+       _xyplot->RemoveAllDataSetInputConnections();
+#endif
 /*
        if ( _histogrammeVector!=NULL )
        {
@@ -175,9 +197,14 @@ void wxPanelCuttingImageData::InitHistogramme()
 */
        _histogrammeVector =  vtkImageData::New();
     _histogrammeVector -> SetDimensions ( (int)(rangeA[1]),1,1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _histogrammeVector -> SetScalarTypeToUnsignedShort();
     _histogrammeVector -> AllocateScalars();    
     _histogrammeVector -> Update(); 
+#else
+    _histogrammeVector -> AllocateScalars(VTK_UNSIGNED_SHORT,1);    
+#endif
        
        unsigned short *p_vol = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
        int i,size = (int) (rangeA[1]);
@@ -188,7 +215,15 @@ void wxPanelCuttingImageData::InitHistogramme()
        }
        _xyplot->SetXRange(0, rangeA[1]);
        _xyplot->SetYRange(0, 10);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _xyplot->AddInput( _histogrammeVector );
+#else
+       _xyplot->AddDataSetInput( _histogrammeVector );
+#endif
+
 }
 
 //-------------------------------------------------------------------
@@ -242,24 +277,24 @@ void wxPanelCuttingImageData::CreateInterface()
 
        
        _typeFig        = new wxChoice(this,-1);
-       _opacityFig     = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _opacityFig     = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
-       _scaleX         = new wxSlider(this,-1,6,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _scaleY         = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _scaleZ         = new wxSlider(this,-1,7,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleX         = new wxSlider(this,-1,6,0,500  , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleY         = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleZ         = new wxSlider(this,-1,7,0,500  , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
-       _rotationX      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _rotationY      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _rotationZ      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationX      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationY      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationZ      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
        _volIntern              = new wxRadioButton(this,-1, _T("Volume intern " ));
        _volExtern              = new wxRadioButton(this,-1, _T("Volume extern " ));
 
        _histogrammeAccumulated = new wxCheckBox(this,-1,_T("Histogramme accumulated"));
 
-       _isoValue                               = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _valueBeforeIsoValue    = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _valueAfterIsoValue             = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _isoValue                               = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition,wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _valueBeforeIsoValue    = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _valueAfterIsoValue             = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
        wxButton *btnExtract    = new wxButton(this, -1,_T("Extract"));
 
@@ -478,7 +513,14 @@ void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
                }
        }
        double range[2];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _histogrammeVector->Update();
+#else
+       _histogrammeVector->Modified();
+#endif
+
        _histogrammeVector->GetScalarRange(range);
        _xyplot->SetYRange( 0   , range[1]      );
        _xyplot->SetXRange( min , max           );
@@ -488,7 +530,12 @@ void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
 
 //     _wxvtkbaseView->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 
index 59c33cd49750734b47fa007f243f615744e2b21a..9e73b799e4761645ee923f766b845578070a5641 100644 (file)
@@ -269,23 +269,23 @@ wxWindow* wxSTLWidget_03::CreateSegmentationPanel(wxWindow *parent)
        wxPanel *panel          = new wxPanel(parent,-1);
 
 
-       _opacity_Vol            = new wxSlider( panel, -1, 40, 0, 100                            , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS );
+       _opacity_Vol            = new wxSlider( panel, -1, 40, 0, 100                            , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
        _opacity_Vol    ->SetSize(250,20);  
        /*SIL
-       _sl_maxSize                     = new wxSlider( panel, -1, 300 , 0, 2000 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS );
-       _sl_minSize                     = new wxSlider( panel, -1, 200 , 0, 2000 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS );
+       _sl_maxSize                     = new wxSlider( panel, -1, 300 , 0, 2000 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS );
+       _sl_minSize                     = new wxSlider( panel, -1, 200 , 0, 2000 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS );
        
-       _sl_minSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
+       _sl_minSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxDefaultSize, wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
        _sl_minSizeSpin->SetRange(1,8);
        _sl_minSizeSpin->SetValue(5);
 
-       _sl_maxSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
+       _sl_maxSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxDefaultSize, wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
        _sl_maxSizeSpin->SetRange(1,8);
        _sl_maxSizeSpin->SetValue(5);
 
        */
 
-       _sl_RangeSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
+       _sl_RangeSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition ,wxDefaultSize, wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
        _sl_RangeSizeSpin->SetRange(1,8);
        _sl_RangeSizeSpin->SetValue(5);
 
@@ -551,17 +551,34 @@ void wxSTLWidget_03::ConfigureProcessing(vtkImageData *img, int x, int y, int z)
                //_thresh->ThresholdBetween(_sl_minSize->GetValue(), _range[1]);
                //SIL//
                _cast = vtkImageCast::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _cast->SetInput(_thresh->GetOutput());
+#else
+               _cast->SetInputData(_thresh->GetOutput());
+#endif
+
                _cast->SetOutputScalarTypeToUnsignedChar();
 
                _connect = vtkImageSeedConnectivity::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _connect->SetInput(_cast->GetOutput());
+#else
+               _connect->SetInputData(_cast->GetOutput());
+#endif
                _connect->SetInputConnectValue(255);
                _connect->SetOutputConnectedValue(255);
                _connect->SetOutputUnconnectedValue(0);
 
                cast3 = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                cast3->SetInput(_connect->GetOutput());
+#else
+               cast3->SetInputData(_connect->GetOutput());
+#endif
                cast3->SetOutputScalarTypeToUnsignedShort();
 
                _thresh2 = vtkImageThreshold::New();
@@ -572,20 +589,40 @@ void wxSTLWidget_03::ConfigureProcessing(vtkImageData *img, int x, int y, int z)
                //SIL//_thresh2->ThresholdBetween(_sl_minSize->GetValue(), _sl_maxSize->GetValue());
 
                cast2 = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                cast2->SetInput(_thresh2->GetOutput());
+#else
+               cast2->SetInputData(_thresh2->GetOutput());
+#endif
                cast2->SetOutputScalarTypeToUnsignedChar();
                _connect2 = vtkImageSeedConnectivity::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _connect2->SetInput(cast2->GetOutput());
+#else
+               _connect2->SetInputData(cast2->GetOutput());
+#endif
                _connect2->SetInputConnectValue(255);
                _connect2->SetOutputConnectedValue(255);
                _connect2->SetOutputUnconnectedValue(0);
 
                cast4 = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                cast4->SetInput(_connect2->GetOutput());
+#else
+               cast4->SetInputData(_connect2->GetOutput());
+#endif
                cast4->SetOutputScalarTypeToUnsignedShort();
        }
        _thresh->RemoveAllInputs();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _thresh->SetInput(_imagedata);  
+#else
+       _thresh->SetInputData(_imagedata);      
+#endif
        _thresh->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());    
        _thresh->Update();
        
@@ -598,7 +635,14 @@ void wxSTLWidget_03::ConfigureProcessing(vtkImageData *img, int x, int y, int z)
        //cast3->Update();
 //SIL//        
        _thresh2->RemoveAllInputs();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _thresh2->SetInput(_imagedata); 
+#else
+       _thresh2->SetInputData(_imagedata);     
+#endif
+
        _thresh2->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());
        _thresh2->Update();
        cast2->Update();
@@ -687,9 +731,14 @@ void wxSTLWidget_03::ExtractSurface(int x, int y, int z)
        puntoactualprov[1]      =       y;
        puntoactualprov[2]      =       z;
        
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _imagedata->UpdateInformation();
        _imagedata->SetUpdateExtent(_imagedata->GetWholeExtent());
        _imagedata->Update();
+#else
+       // ..
+#endif
 
        _imagedata->GetSpacing(espprin);
        _imagedata->GetExtent(extprin);
@@ -727,13 +776,26 @@ void wxSTLWidget_03::ExtractSurface(int x, int y, int z)
        // Visualisation - result volume
    
     _2_isoMC6 = vtkMarchingCubes::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _2_isoMC6->SetInput(cast4->GetOutput());
+#else
+       _2_isoMC6->SetInputData(cast4->GetOutput());
+#endif
 
     _2_isoMC6->SetValue(0, 128);
        _2_isoMC6->Update();
 
        _2_isoMapperMC6 = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     _2_isoMapperMC6->SetInput(_2_isoMC6->GetOutput());
+#else
+    _2_isoMapperMC6->SetInputData(_2_isoMC6->GetOutput());
+#endif
+
+
     _2_isoMapperMC6->ScalarVisibilityOff();
     _2_isoMapperMC6->ImmediateModeRenderingOn();
 
@@ -854,7 +916,12 @@ void wxSTLWidget_03::OnBtnSaveBinaryFile(wxCommandEvent& event)
        {
                vtkMetaImageWriter  *writer= vtkMetaImageWriter::New();
                writer->SetFileName( dialog.GetPath().mb_str(wxConvUTF8) );     
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput(cast4->GetOutput());
+#else
+               writer->SetInputData(cast4->GetOutput());
+#endif
                writer->Write();
                writer->Delete();
        }
@@ -942,7 +1009,12 @@ void wxSTLWidget_03::OnBtnSTLFileLoad(wxCommandEvent& event)
                vtkSTLReader *imgReader= vtkSTLReader::New();
                imgReader->SetFileName( dialog.GetPath().mb_str(wxConvUTF8) );  
                _loadSTLMapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _loadSTLMapper->SetInput(imgReader->GetOutput());
+#else
+               _loadSTLMapper->SetInputData(imgReader->GetOutput());
+#endif
                _loadActorSTL = vtkActor::New();
                _loadActorSTL->SetMapper(_loadSTLMapper);
                _loadActorSTL->GetProperty()->SetColor( 1, 0, 0);
@@ -974,7 +1046,12 @@ void wxSTLWidget_03::ConfigureSTL()
                stlInterna = vtkPolyData::New();
 
                dsm1 = vtkPolyDataMapper ::New();
-               dsm1->SetInput (stlInterna); 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               dsm1->SetInput(stlInterna); 
+#else
+               dsm1->SetInputData(stlInterna); 
+#endif
                dsm1->ScalarVisibilityOff();
 
                actorInternal = vtkActor::New();
@@ -982,7 +1059,14 @@ void wxSTLWidget_03::ConfigureSTL()
                actorInternal->GetProperty()->SetColor (0,1,0);
 
                dsm2 = vtkPolyDataMapper ::New();
-               dsm2->SetInput (stlExterna);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               dsm2->SetInput(stlExterna);
+#else
+               dsm2->SetInputData(stlExterna);
+#endif
+
                dsm2->ScalarVisibilityOff();
 
                actorExternal= vtkActor::New();
@@ -1038,7 +1122,14 @@ void wxSTLWidget_03::OnBtnCreateFileSTL(wxCommandEvent& event)
 
        
 //     wxDirDialog dialog( this, "Choose a directory...", ( !dirSTL.IsEmpty( ) )?dirSTL: wxGetHomeDir( ) );
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+#else
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+#endif
 
 
        if( dialog.ShowModal( ) == wxID_OK ) 
@@ -1054,17 +1145,29 @@ void wxSTLWidget_03::OnBtnCreateFileSTL(wxCommandEvent& event)
 
                // 1.1. Se hace un filtro triangular puesto que el stl writer solo recibe poligonos triangulares.
 
-        vtkTriangleFilter *filtro = vtkTriangleFilter::New();
+        vtkClosePolyData                               *cpd    = vtkClosePolyData::New();
+        vtkTriangleFilter                              *filtro = vtkTriangleFilter::New();
+               vtkPolyDataConnectivityFilter   *pdcf   = vtkPolyDataConnectivityFilter::New();
+
+               // 1.2 se escribe a disco el archivo stl de la superficie interna
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                filtro->SetInput(stlInterna);
-               vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
         pdcf->SetInput( filtro->GetOutput() );
-        vtkClosePolyData *cpd = vtkClosePolyData::New();
         cpd->SetInput( pdcf->GetOutput() );
-
-               // 1.2 se escribe a disco el archivo stl de la superficie interna
         cpd->Update();
+#else
+               filtro->SetInputData(stlInterna);
+        pdcf->SetInputData( filtro->GetOutput() );
+        cpd->SetInputData( pdcf->GetOutput() );
+#endif
         vtkSTLWriter *writerI = vtkSTLWriter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         writerI->SetInput( cpd->GetOutput() );
+#else
+        writerI->SetInputData( cpd->GetOutput() );
+#endif
 //        prefix = fileprefix;
                filename=prefix+"_internal.stl";
         writerI->SetFileName(filename.c_str());
@@ -1073,10 +1176,20 @@ void wxSTLWidget_03::OnBtnCreateFileSTL(wxCommandEvent& event)
         writerI->Delete();
 
                // 1.3 se escribe a disco el archivo stl de la superficie externa
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                filtro->SetInput(stlExterna);
+#else
+               filtro->SetInputData(stlExterna);
+#endif
         cpd->Update();
         vtkSTLWriter *writerE = vtkSTLWriter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         writerE->SetInput( cpd->GetOutput() );
+#else
+        writerE->SetInputData( cpd->GetOutput() );
+#endif
 //        prefix = fileprefix;
                filename=prefix+"_external.stl";
         writerE->SetFileName( filename.c_str() );
index 1e0b93665bb2314a4134400a5f2a83ea8292b041..8b1af9aae7fb5a429bd3c3f4d9b889727e73a82c 100644 (file)
@@ -40,7 +40,7 @@
 #include <vtkImageSeedConnectivity.h>
 #include <vtkImageCast.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 //#include "wxSurfaceWidget.h"
 #include "wxVtkBaseView.h"
 
index 961918187031c5118bb9d2c959e8aa8d29bc9b43..180e4cd182ed1326275d88a833816412853adf23 100644 (file)
@@ -38,12 +38,18 @@ wxSphereView::wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata/*,
        _imageSphere            =       vtkImageData::New();
        _imageSphere->SetDimensions (150,150,500);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 //EED
 //     _imageSphere->SetScalarTypeToUnsignedShort();
        _imageSphere->SetScalarType( _imageDataOriginal->GetScalarType() );
-
        _imageSphere->AllocateScalars();   
        _imageSphere->Update();   
+#else
+       _imageSphere->AllocateScalars(_imageDataOriginal->GetScalarType(),1);   
+#endif
+
+
 
 //EED  ???? vtkBaseData  no esta compartido con los otros objetos .. PLOP
 //     vtkBaseData *vtkbasedata = new vtkBaseData();
@@ -158,7 +164,12 @@ void wxSphereView::Refresh(  )
 void wxSphereView::RefreshView()
 {
 //EED
-       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageSphere );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( _imageSphere );
+#else
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( _imageSphere );
+#endif
        DefineImageSphere();
 //     UpdateColorWindowLevel();
 //     wxVtk2DBaseView::Refresh();
@@ -419,7 +430,12 @@ void wxSphereView::FiltreImageB(int id, double radio, bool ok,int deltaTMP)
                }
        }
        _imageSphere->Modified();  
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _imageSphere->Update();
+#else
+       // ..
+#endif
 }
 
 //----------------------------------------------------------------------------
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx
deleted file mode 100644 (file)
index cd205a4..0000000
+++ /dev/null
@@ -1,799 +0,0 @@
-/*# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    $RCSfile: wxVTKRenderWindowInteractor.cxx,v $
-  Language:  C++
-  Date:      $Date: 2012/11/15 14:14:35 $
-  Version:   $Revision: 1.7 $
-
-  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
-  All rights reserved.
-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-     PURPOSE.  See the above copyright notice for more information.
-
-=========================================================================*/
-
-#include <assert.h>
-
-#include "wxVTKRenderWindowInteractor.h"
-
-//This is needed for vtk 3.1 :
-#ifndef VTK_MAJOR_VERSION
-#  include "vtkVersion.h"
-#endif
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-#  include "vtkCommand.h"
-#else
-#  include "vtkInteractorStyle.h"
-#endif
-#include "vtkDebugLeaks.h"
-
-#ifdef __WXMAC__
-#include "vtkCarbonRenderWindow.h"
-#endif
-
-//Keep this for compatibilty reason, this was introduced in wxGTK 2.4.0
-#if (!wxCHECK_VERSION(2, 4, 0))
-wxWindow* wxGetTopLevelParent(wxWindow *win)
-{
-    while ( win && !win->IsTopLevel() )
-         win = win->GetParent();
-    return win;
-}
-#endif
-
-// To access objc calls on cocoa
-#ifdef __WXCOCOA__
-#ifdef VTK_USE_COCOA
-#import <Cocoa/Cocoa.h>
-// This trick is no longer need in VTK CVS, should get rid of that:
-#define id Id
-#else
-#error Build mismatch you need both wxWidgets and VTK to be configure against Cocoa to work
-#endif //VTK_USE_COCOA
-#endif //__WXCOCOA__
-
-#ifdef __WXGTK__
-#    include <gdk/gdkx.h> // GDK_WINDOW_XWINDOW is found here in wxWidgets 2.8.0
-#    include "gdk/gdkprivate.h"
-#if wxCHECK_VERSION(2, 8, 0)
-#ifdef __WXGTK20__
-#include <wx/gtk/win_gtk.h>
-#else
-#include <wx/gtk1/win_gtk.h>
-#endif
-#else
-#include <wx/gtk/win_gtk.h>
-#endif
-#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
-                          GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
-                          GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
-#endif
-
-#ifdef __WXX11__
-#include "wx/x11/privx.h"
-#define GetXWindow(wxwin)   ((Window)(wxwin)->GetHandle())
-#endif
-
-
-//For more info on this class please go to:
-//http://wxvtk.sf.net
-//This hack is for some buggy wxGTK version:
-#if wxCHECK_VERSION(2, 3, 2) && !wxCHECK_VERSION(2, 4, 1) && defined(__WXGTK__)
-#  define WX_USE_X_CAPTURE 0
-#else
-#  define WX_USE_X_CAPTURE 1
-#endif
-
-#define ID_wxVTKRenderWindowInteractor_TIMER 1001
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxGLCanvas)
-#else
-IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxWindow)
-#endif  //__WXGTK__
-
-//---------------------------------------------------------------------------
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxGLCanvas)
-#else
-BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
-#endif //__WXGTK__
-  //refresh window by doing a Render
-  EVT_PAINT       (wxVTKRenderWindowInteractor::OnPaint)
-  EVT_ERASE_BACKGROUND(wxVTKRenderWindowInteractor::OnEraseBackground)
-  EVT_MOTION      (wxVTKRenderWindowInteractor::OnMotion)
-
-  //Bind the events to the event converters
-  EVT_LEFT_DOWN   (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_MIDDLE_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_RIGHT_DOWN  (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_LEFT_UP     (wxVTKRenderWindowInteractor::OnButtonUp)
-  EVT_MIDDLE_UP   (wxVTKRenderWindowInteractor::OnButtonUp)
-  EVT_RIGHT_UP    (wxVTKRenderWindowInteractor::OnButtonUp)
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-  EVT_ENTER_WINDOW(wxVTKRenderWindowInteractor::OnEnter)
-  EVT_LEAVE_WINDOW(wxVTKRenderWindowInteractor::OnLeave)
-  EVT_MOUSEWHEEL  (wxVTKRenderWindowInteractor::OnMouseWheel)
-  EVT_KEY_DOWN    (wxVTKRenderWindowInteractor::OnKeyDown)
-  EVT_KEY_UP      (wxVTKRenderWindowInteractor::OnKeyUp)
-  EVT_CHAR        (wxVTKRenderWindowInteractor::OnChar)
-#endif
-  EVT_TIMER       (ID_wxVTKRenderWindowInteractor_TIMER, wxVTKRenderWindowInteractor::OnTimer)
-  EVT_SIZE        (wxVTKRenderWindowInteractor::OnSize)
-END_EVENT_TABLE()
-
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.7 $")
-vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
-
-//---------------------------------------------------------------------------
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-#if (wxCHECK_VERSION(2, 8, 0))
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxGLCanvas(0, -1, wxDefaultPosition), vtkRenderWindowInteractor()
-#else
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxGLCanvas(), vtkRenderWindowInteractor()
-#endif
-#else
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxWindow(), vtkRenderWindowInteractor()
-#endif //__WXGTK__
-      , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
-      , ActiveButton(wxEVT_NULL)
-      , RenderAllowed(0)
-      , Stereo(0)
-      , Handle(0)
-      , Created(true)
-      , RenderWhenDisabled(1)
-      , UseCaptureMouse(0)
-{
-#ifdef VTK_DEBUG_LEAKS
-  vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
-#endif
-  this->RenderWindow = NULL;
-  this->SetRenderWindow(vtkRenderWindow::New());
-  this->RenderWindow->Delete();
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
-                                                         wxWindowID id,
-                                                         const wxPoint &pos,
-                                                         const wxSize &size,
-                                                         long style,
-                                                         const wxString &name)
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-      : wxGLCanvas(parent, id, pos, size, style, name), vtkRenderWindowInteractor()
-#else
-      : wxWindow(parent, id, pos, size, style, name), vtkRenderWindowInteractor()
-#endif //__WXGTK__
-      , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
-      , ActiveButton(wxEVT_NULL)
-      , RenderAllowed(0)
-      , Stereo(0)
-      , Handle(0)
-      , Created(true)
-      , RenderWhenDisabled(1)
-      , UseCaptureMouse(0)
-{
-#ifdef VTK_DEBUG_LEAKS
-  vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
-#endif
-  this->RenderWindow = NULL;
-  this->SetRenderWindow(vtkRenderWindow::New());
-  this->RenderWindow->Delete();
-#ifdef __WXMAC__
-  // On Mac (Carbon) we don't get notified of the initial window size with an EVT_SIZE event,
-  // so we update the size information of the interactor/renderwindow here
-  this->UpdateSize(size.x, size.y);
-#endif
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
-{
-  SetRenderWindow(NULL);
-  SetInteractorStyle(NULL);
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor * wxVTKRenderWindowInteractor::New()
-{
-  // we don't make use of the objectfactory, because we're not registered
-  return new wxVTKRenderWindowInteractor;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Initialize()
-{
-  int *size = RenderWindow->GetSize();
-  // enable everything and start rendering
-  Enable();
-  //RenderWindow->Start();
-
-  // set the size in the render window interactor
-  Size[0] = size[0];
-  Size[1] = size[1];
-
-  // this is initialized
-  Initialized = 1;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Enable()
-{
-  // if already enabled then done
-  if (Enabled)
-    return;
-
-  // that's it
-  Enabled = 1;
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-  SetCurrent();
-#endif
-  Modified();
-}
-//---------------------------------------------------------------------------
-bool wxVTKRenderWindowInteractor::Enable(bool enable)
-{
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-  return wxGLCanvas::Enable(enable);
-#else
-  return wxWindow::Enable(enable);
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Disable()
-{
-  // if already disabled then done
-  if (!Enabled)
-    return;
-
-  // that's it (we can't remove the event handler like it should be...)
-  Enabled = 0;
-  Modified();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Start()
-{
-  // the interactor cannot control the event loop
-  vtkErrorMacro( << "wxVTKRenderWindowInteractor::Start() "
-    "interactor cannot control event loop.");
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::UpdateSize(int x, int y)
-{
-  if( RenderWindow )
-  {
-    // if the size changed tell render window
-    if ( x != Size[0] || y != Size[1] )
-    {
-      // adjust our (vtkRenderWindowInteractor size)
-      Size[0] = x;
-      Size[1] = y;
-      // and our RenderWindow's size
-      RenderWindow->SetSize(x, y);
-    }
-  }
-}
-//---------------------------------------------------------------------------
-int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
-{
-  // it's a one shot timer
-  if (!timer.Start(10, TRUE))
-    assert(false);
-
-  return 1;
-  
-}
-//---------------------------------------------------------------------------
-int wxVTKRenderWindowInteractor::DestroyTimer()
-{
-  // do nothing
-  return 1;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
-{
-  if (!Enabled)
-    return;
-    
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::TimerEvent, NULL);
-#else
-    // old style
-    InteractorStyle->OnTimer();
-#endif
-}
-
-//---------------------------------------------------------------------------
-// NOTE on implementation:
-// Bad luck you ended up in the only tricky place of this code.
-// A few note, wxWidgets still refuse to provide such convenient method
-// so I have to maintain it myself, eventhough this is completely integrated
-// in wxPython...
-// Anyway if this happen to break for you then compare to a recent version of wxPython
-// and look for the function long wxPyGetWinHandle(wxWindow* win)
-// in wxPython/src/helpers.cpp
-long wxVTKRenderWindowInteractor::GetHandleHack()
-{
-  //helper function to hide the MSW vs GTK stuff
-  long handle_tmp = 0;
-
-// __WXMSW__ is for Win32
-//__WXMAC__ stands for using Carbon C-headers, using either the CarbonLib/CFM or the native Mach-O builds (which then also use the latest features available)
-// __WXGTK__ is for both gtk 1.2.x and gtk 2.x
-#if defined(__WXMSW__) || defined(__WXMAC__)
-    handle_tmp = (long)this->GetHandle();
-#endif //__WXMSW__
-
-//__WXCOCOA__ stands for using the objective-c Cocoa API
-#ifdef __WXCOCOA__
-   // Here is how to find the NSWindow
-   wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>(
-     wxGetTopLevelParent( this ) );
-   if (toplevel != NULL )    
-   {
-     handle_tmp = (long)toplevel->GetNSWindow();
-   }
-   // The NSView will be deducted from 
-   // [(NSWindow*)Handle contentView]
-   // if only I knew how to write that in c++
-#endif //__WXCOCOA__
-
-    // Find and return the actual X-Window.
-#if defined(__WXGTK__) || defined(__WXX11__)
-    return (long)GetXWindow(this);
-#endif
-
-//#ifdef __WXMOTIF__
-//    handle_tmp = (long)this->GetXWindow();
-//#endif
-
-  return handle_tmp;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
-  //must always be here
-  wxPaintDC pDC(this);
-
-  //do it here rather than in the cstor: this is safer.
-  if(!Handle)
-  {
-    Handle = GetHandleHack();
-    RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
-#ifdef __WXMSW__
-    RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHWND()));
-#endif //__WXMSW__
-  }
-  // get vtk to render to the wxWindows
-  Render();
-#ifdef __WXMAC__
-  // This solves a problem with repainting after a window resize
-  // See also: http://sourceforge.net/mailarchive/forum.php?thread_id=31690967&forum_id=41789
-  vtkCarbonRenderWindow* rwin = vtkCarbonRenderWindow::SafeDownCast(RenderWindow);
-  if( rwin )
-  {
-    rwin->UpdateGLRegion();
-  }
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
-{
-  //turn off background erase to reduce flickering on MSW
-  event.Skip(false);
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& WXUNUSED(event))
-{
-  int w, h;
-  GetClientSize(&w, &h);
-  UpdateSize(w, h);
-
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  InvokeEvent(vtkCommand::ConfigureEvent, NULL);
-#endif
-  //this will check for Handle
-  //Render();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
-{
- if (!Enabled) 
-    {
-    return;
-    }
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
-#else
-  InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(),
-    event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-}
-//---------------------------------------------------------------------------
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-      event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::EnterEvent, NULL);
-#else
-    // old style
-  InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);  
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnLeave(wxMouseEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-      event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::LeaveEvent, NULL);
-#else
-    // old style
-  InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);  
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnKeyDown(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-  {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-  }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::KeyPressEvent, NULL);
-#else
-  InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(), 
-    event.GetKeyCode(), 1);
-#endif
-  event.Skip();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnKeyUp(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-  {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-  }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::KeyReleaseEvent, NULL);
-#else
-  InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(), 
-    event.GetKeyCode(), 1);
-#endif
-  event.Skip();
-}
-#endif //!(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
- //---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnChar(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-    
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-    {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-    }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::CharEvent, NULL);
-#endif
-  event.Skip();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
-{
-  if (!Enabled || (ActiveButton != wxEVT_NULL))
-    {
-    return;
-    }
-  ActiveButton = event.GetEventType();
-
-    // On Mac (Carbon) and Windows we don't automatically get the focus when
-    // you click inside the window
-    // we therefore set the focus explicitly
-    // Apparently we need that on linux (GTK) too:
-    this->SetFocus();
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-#endif
-
-  if(event.RightDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::RightButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(event.LeftDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnLeftButtonDown(event.ControlDown(),  event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(event.MiddleDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  //save the button and capture mouse until the button is released
-  //Only if :
-  //1. it is possible (WX_USE_X_CAPTURE)
-  //2. user decided to.
-  if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
-  {
-    CaptureMouse();
-  }
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
-{
-  //EVT_xxx_DOWN == EVT_xxx_UP - 1
-  //This is only needed if two mouse buttons are pressed at the same time.
-  //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or 
-  //wxEVT_COMMAND_RIGHT_CLICK
-  if (!Enabled || (ActiveButton != (event.GetEventType()-1))) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-#endif
-  
-  if(ActiveButton == wxEVT_RIGHT_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(ActiveButton == wxEVT_LEFT_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(ActiveButton == wxEVT_MIDDLE_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  //if the ActiveButton is realeased, then release mouse capture
-  if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
-  {
-    ReleaseMouse();
-  }
-  ActiveButton = wxEVT_NULL;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnMouseWheel(wxMouseEvent& event)
-{
-// Mouse wheel was only added after VTK 4.4 (I think...)
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
-  // new style
-  //Set vtk event information ... The numebr of wheel rotations is stored in
-  //the x varible.  y varible is zero
-  SetEventInformationFlipY(event.GetWheelRotation() / event.GetWheelDelta(), 0, 
-                           event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-  if(event.GetWheelRotation() > 0)
-    {
-      //Send event to VTK
-      InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL);
-    }
-  else
-    {
-      //Send event to VTK
-      InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL);
-    }
-#endif
-    
-}
-
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Render()
-{
-  RenderAllowed = 1;
-  if (!RenderWhenDisabled)
-    {
-    //the user doesn't want us to render when the toplevel frame
-    //is disabled - first find the top level parent
-    wxWindow *topParent = wxGetTopLevelParent(this);
-    if (topParent)
-      {
-      //if it exists, check whether it's enabled
-      //if it's not enabeld, RenderAllowed will be false
-      RenderAllowed = topParent->IsEnabled();
-      }
-    }
-
-  if (RenderAllowed)
-    {
-    if(Handle && (Handle == GetHandleHack()) )
-      {
-      RenderWindow->Render();
-      }
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
-    else if(GetHandleHack())
-      {
-      //this means the user has reparented us; let's adapt to the
-      //new situation by doing the WindowRemap dance
-      //store the new situation
-      Handle = GetHandleHack();
-      RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle));
-      RenderWindow->WindowRemap();
-      RenderWindow->Render();
-      }
-#endif
-    }
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::SetRenderWhenDisabled(int newValue)
-{
-  //Change value of __RenderWhenDisabled ivar.
-  //If __RenderWhenDisabled is false (the default), this widget will not
-  //call Render() on the RenderWindow if the top level frame (i.e. the
-  //containing frame) has been disabled.
-
-  //This prevents recursive rendering during wxSafeYield() calls.
-  //wxSafeYield() can be called during the ProgressMethod() callback of
-  //a VTK object to have progress bars and other GUI elements updated -
-  //it does this by disabling all windows (disallowing user-input to
-  //prevent re-entrancy of code) and then handling all outstanding
-  //GUI events.
-        
-  //However, this often triggers an OnPaint() method for wxVTKRWIs,
-  //resulting in a Render(), resulting in Update() being called whilst
-  //still in progress.
-
-  RenderWhenDisabled = (bool)newValue;
-}
-//---------------------------------------------------------------------------
-//
-// Set the variable that indicates that we want a stereo capable window
-// be created. This method can only be called before a window is realized.
-//
-void wxVTKRenderWindowInteractor::SetStereo(int capable)
-{
-  if (Stereo != capable)
-    {
-    Stereo = capable;
-    RenderWindow->StereoCapableWindowOn();
-    RenderWindow->SetStereoTypeToCrystalEyes();
-    Modified();
-    }
-}
-
-//---------------------------------------------------------------------------
-//
-//
-void wxVTKRenderWindowInteractor::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
-
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h
deleted file mode 100644 (file)
index 1d2279b..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    $RCSfile: wxVTKRenderWindowInteractor.h,v $
-  Language:  C++
-  Date:      $Date: 2012/11/15 14:14:35 $
-  Version:   $Revision: 1.5 $
-
-  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
-  All rights reserved.
-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-     PURPOSE.  See the above copyright notice for more information.
-
-=========================================================================*/
-
-// .NAME  wxVTKRenderWindowInteractor - class to enable VTK to render to 
-// and interact with wxWindow.
-// .SECTION Description
-//  wxVTKRenderWindowInteractor provide a VTK widget for wxWindow. This class
-// was completely rewrote to have the 'Look & Feel' of the python version:
-// wxVTKRenderWindowInteractor.py
-// .SECTION Caveats 
-//  - There is a know bug that prevent this class to works for more info see 
-// WX_USE_X_CAPTURE. This bug only affect wxGTK from 2.3.2 to wxGTK 2.4.0.
-//  - Furthermore this class is tempated over either wxWindows or wxGLCanvas,
-// in wxWindows 2.3.1 and earlier, the wxGLCanvas had scroll bars, you can avoid
-// this effect by playing with WX_BASE_CLASS at your risk (you might end up with
-// lot of flickering.)
-//  - This class might not be easily readable as it tried to work with VTK 3.2
-//  and 4.x. This class doesn't support reparenting with VTK 4.2 and earlier.
-// .SECTION see also
-// wxVTKRenderWindowInteractor.py wxVTKRenderWindow.py
-
-#ifndef _wxVTKRenderWindowInteractor_h_
-#define _wxVTKRenderWindowInteractor_h_
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#  pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include <wx/wx.h>
-#endif
-
-#include <wx/timer.h>
-#include <wx/dcclient.h>
-
-// vtk includes
-#include "vtkRenderWindowInteractor.h"
-#include "vtkRenderWindow.h"
-
-// Apparently since wxGTK 2.8.0 one can finally use wxWindow (just as in any
-// other port):
-// MM: tested on 2008/04/08: experienced some heavy flickering with wx-widget 2.6.0
-// using a wxWindow instead of wxGLCanvas fixed the symptoms
-//#if (!wxCHECK_VERSION(2, 6, 0))
-#if (!wxCHECK_VERSION(2, 8, 0))
-#define USE_WXGLCANVAS
-#endif
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-#  if wxUSE_GLCANVAS
-#    include <wx/glcanvas.h>
-#  else
-#    error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
-#  endif //wxUSE_GLCANVAS
-#endif //__WXGTK__
-
-// Motif version (renamed into wxX11 for wxWindow 2.4 and newer)
-#if defined(__WXMOTIF__) 
-# error This GUI is not supported by wxVTKRenderWindowInteractor for now
-#endif
-
-// wx forward declarations
-class wxPaintEvent;
-class wxMouseEvent;
-class wxTimerEvent;
-class wxKeyEvent;
-class wxSizeEvent;
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-class wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor
-#else
-class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
-#endif //__WXGTK__
-{
-  DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
-  
-  public:
-    //constructors
-    wxVTKRenderWindowInteractor();
-
-    wxVTKRenderWindowInteractor(wxWindow *parent,
-                                wxWindowID id,
-                                const wxPoint &pos = wxDefaultPosition,
-                                const wxSize &size = wxDefaultSize,
-                                long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
-                                const wxString &name = wxPanelNameStr);
-    vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
-    static wxVTKRenderWindowInteractor * New();
-    void PrintSelf(ostream& os, vtkIndent indent);
-
-         //destructor
-    ~wxVTKRenderWindowInteractor();
-
-    // vtkRenderWindowInteractor overrides
-    void Initialize();
-    void Enable();
-    bool Enable(bool enable);
-    void Disable();
-    void Start();
-    void UpdateSize(int x, int y);
-    int CreateTimer(int timertype);
-    int DestroyTimer();
-    void TerminateApp() {};
-
-    // event handlers
-    void OnPaint(wxPaintEvent &event);
-    void OnEraseBackground (wxEraseEvent& event);
-    void OnMotion(wxMouseEvent &event);
-
-    void OnButtonDown(wxMouseEvent &event);
-    void OnButtonUp(wxMouseEvent &event);
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-    void OnEnter(wxMouseEvent &event);
-    void OnLeave(wxMouseEvent &event);
-    void OnKeyDown(wxKeyEvent &event);
-    void OnKeyUp(wxKeyEvent &event);
-    void OnChar(wxKeyEvent &event);
-#endif
-    void OnTimer(wxTimerEvent &event);
-    void OnSize(wxSizeEvent &event);
-    void OnMouseWheel(wxMouseEvent& event);
-
-    void Render();
-    void SetRenderWhenDisabled(int newValue);
-
-    // Description:
-    // Prescribe that the window be created in a stereo-capable mode. This
-    // method must be called before the window is realized. Default if off.
-    vtkGetMacro(Stereo,int);
-    vtkBooleanMacro(Stereo,int);
-    virtual void SetStereo(int capable);
-
-    // Description:
-    // As CaptureMouse could be a problem sometimes on a window box
-    // This method allow to set or not the CaptureMouse.
-    // This method actually will works only if WX_USE_X_CAPTURE was set to 1
-    vtkSetMacro(UseCaptureMouse,int);
-    vtkBooleanMacro(UseCaptureMouse,int);
-
-  protected:
-    wxTimer timer;
-    int ActiveButton;
-    int RenderAllowed;
-    long GetHandleHack();
-    int Stereo;
-    
-  private:
-    long Handle;
-    bool Created;
-    int RenderWhenDisabled;
-    int UseCaptureMouse;
-
-    DECLARE_EVENT_TABLE()
-};
-
-#endif //_wxVTKRenderWindowInteractor_h_
index 8c13f8b907d4369013f66bc96ef55da00e4ad308..3c46e68c78607bd799c6dafd87e582119460c42c 100644 (file)
@@ -27,7 +27,7 @@
 #define _wxVTKRenderWindowInteractorEditContour_h_
 
 
-#include <wxVTKRenderWindowInteractor.h>
+#include <creawxVTKRenderWindowInteractor.h>
 
 #include <vtkCommand.h> 
 #include <vtkImageData.h> 
@@ -94,10 +94,18 @@ public:
 
       if (event == vtkCommand::ResetWindowLevelEvent)
         {
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         this->IV->GetInput()->UpdateInformation();
         this->IV->GetInput()->SetUpdateExtent
           (this->IV->GetInput()->GetWholeExtent());
         this->IV->GetInput()->Update();
+#else
+       //..
+#endif
+
         double *range = this->IV->GetInput()->GetScalarRange();
         this->IV->SetColorWindow(range[1] - range[0]);
         this->IV->SetColorLevel(0.5 * (range[1] + range[0]));
@@ -189,7 +197,7 @@ public:
   double InitialLevel;
 };
 
-class wxVTKRenderWindowInteractor;
+//class crea::wxVTKRenderWindowInteractor;
 
 class vtkInteractorStyle2DMaracas : public vtkInteractorStyleImage{
 public:
@@ -220,7 +228,7 @@ private:
 
 
 
-class wxVTKRenderWindowInteractorEditContour : public wxVTKRenderWindowInteractor {
+class wxVTKRenderWindowInteractorEditContour : public crea::wxVTKRenderWindowInteractor {
 
 public:
 
index 864041deab4a63630b01b88b17bc5c743c589ad1..0b333e593cc68d3b60978ef44325f4fda156a193 100644 (file)
 
 //class wxVtkBaseView;
 #include "wxVtkBaseView.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
-class creaMaracasVisu_EXPORT wxVTKRenderWindowInteractorPlus : public wxVTKRenderWindowInteractor
+class creaMaracasVisu_EXPORT wxVTKRenderWindowInteractorPlus : public crea::wxVTKRenderWindowInteractor
 {
 public:
        wxVTKRenderWindowInteractorPlus(wxWindow *parent ,wxVtkBaseView *_wxvtkbaseview);
index 3879377f94e3ba33d93aae257bed0007e9f3e8e8..4ade1682394fa7df720fd625f3bcad94066d87e0 100644 (file)
@@ -101,14 +101,19 @@ void wxVtk2DBaseView::ResetView()
        double spx = 0,spy = 0,spz = 0;
        int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
        wxVtkBaseView::Configure();
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        vtkImageData *imageData = GetVtkBaseData()->GetImageData();
        if(imageData)
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
                imageData->SetUpdateExtent( imageData->GetWholeExtent());
                imageData->Update();
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
+#else
+               _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData(imageData );
+#endif
                imageData->GetSpacing (spx,spy,spz);
                imageData->GetExtent (x1,x2,y1,y2,z1,z2);
        }
@@ -147,12 +152,19 @@ printf("//EED wxVtk2DBaseView::ResetView %d %d    %d %d     %d %d \n",x1,x2,y1,y
 void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
 {
        int ext[6];
-       imageData->Update();
-       imageData->GetWholeExtent(ext);
        if (_imageViewer2XYZ!=NULL)
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               imageData->Update();
+               imageData->GetWholeExtent(ext);
                _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
+#else
+               imageData->GetExtent(ext);
+               _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
+               _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
+#endif
        } // if _imageViewer2XYZ
 
        GetRenderer()->GetActiveCamera()->SetClippingRange(0.01, 1000000);
@@ -170,7 +182,7 @@ void wxVtk2DBaseView::Configure(bool okimage)
        if (_imageViewer2XYZ==NULL)
        {
                _imageViewer2XYZ = new vtkImageViewer2_XYZ();
-               wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+               crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
                _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
 
                //////////////
@@ -197,9 +209,16 @@ void wxVtk2DBaseView::Configure(bool okimage)
        vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
        if (imageData!=NULL)
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
                imageData->SetUpdateExtent( imageData->GetWholeExtent());
                imageData->Update();
+#else
+               //...
+#endif
+
                if (okimage==true){
                        imageData->GetSpacing (spx,spy,spz);
                        imageData->GetExtent (x1,x2,y1,y2,z1,z2);
@@ -252,7 +271,10 @@ void wxVtk2DBaseView::Configure(bool okimage)
                        
                        camera->SetClippingRange( 0.01                  , 1000000 );
                        camera->ComputeViewPlaneNormal();
-                       camera->SetParallelScale( spx*(x2-x1)/3.0 );
+               
+                       double cameraparallelScale=spx*(x2-x1)/3.0;     
+                       camera->SetParallelScale( cameraparallelScale );
+                       GetVtkBaseData()->SetCameraParallelScale( cameraparallelScale );
 
                        // text information over the graphic window
                        if(_vtkIinfoTextImage == NULL){
@@ -288,18 +310,19 @@ void wxVtk2DBaseView::UpdateColorWindowLevel()
        //EED 24oct2010
        //EED 02nov2012
        
-//     vtkImageViewer2 *vtkimageviewer2        = _imageViewer2XYZ->GetVtkImageViewer2();               
-       
        vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
        imagemaptowindowlevel->SetWindow( GetVtkBaseData()->GetColorWindow() );
        imagemaptowindowlevel->SetLevel( GetVtkBaseData()->GetColorLevel() );
-       
-// EED Borrame
-//     vtkimageviewer2->SetColorWindow( GetVtkBaseData()->GetColorWindow() );
-//     vtkimageviewer2->SetColorLevel(  GetVtkBaseData()->GetColorLevel() );
        _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->Modified();
 }
 
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::UpdateCameraParallelScale()
+{
+       vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
+       camera->SetParallelScale( GetVtkBaseData()->GetCameraParallelScale() );
+}
+
 //-------------------------------------------------------------------
 void wxVtk2DBaseView::Refresh()
 {
@@ -310,6 +333,7 @@ void wxVtk2DBaseView::Refresh()
        imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() );
        //EED 01nov2012
        UpdateColorWindowLevel();       
+       UpdateCameraParallelScale();    
        wxVtkBaseView::Refresh();
 }
 
@@ -317,7 +341,7 @@ void wxVtk2DBaseView::Refresh()
 void wxVtk2DBaseView::SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview)
 {
        SetInteractorStyleBaseView(interactorstylebaseview);
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        interactorstylebaseview->SetInteractor ( iren );
        iren->SetInteractorStyle(interactorstylebaseview);
        interactorstylebaseview->SetwxVtkBaseView(this);
index 380d5a7d228f054501ea83dbdec1a79d0c73716b..93e3eee5d5b4b3e6e79ea1eedf7ece2307d46da4 100644 (file)
@@ -67,6 +67,9 @@ public:
        //EED 01nov2012
        void UpdateColorWindowLevel();
 
+       //EED 05juin2019
+       void UpdateCameraParallelScale();
+
 private:
        vtkInfoTextImage                                *_vtkIinfoTextImage;
        vtkInfoTextImageInteractor              *_vtkIinfoTextImageInteractor;
index 7a158603a8551078b2d98d63d71fbe8936833711..334104671c35e4cb36e97ff588fc8a3098ea9d4b 100644 (file)
@@ -154,6 +154,20 @@ void wxVtk3DBaseView::Configure()
                //wxVtkBaseView::Configure();
                _aRenderer      = vtkRenderer::New();
                _renWin         = vtkRenderWindow::New();
+               
+               int supportopengl=_renWin->SupportsOpenGL();
+               printf("EED wxVtk3DBaseView::Configure >>>>> vtkRenderWindow SupportsOpenGL %d\n", supportopengl );
+               printf("EED wxVtk3DBaseView::Configure >>>>> vtkRenderWindow IsDirect       %d\n", _renWin->IsDirect() );
+               if (supportopengl==0)
+               {
+#if defined(_WIN32)
+                       printf("   OpenGL 3 not detected.\n    Try to install opengl drivers or use de opengl-mesa version.\n    Copy from <ProgramsFiles>\\CreaTools\\crea_TPdlls-4.0.0\\bin\\opengl-mesa\n    the file: opengl32.dll\n to    <ProgramsFiles>\\CreaTools\\CreaTools-3.0.0\\bin \n");
+#else
+                       printf("   OpenGL 3 not detected.\n    Try to install opengl drivers or use de opengl-mesa version.\n");
+#endif
+                       exit(0);
+               }
+               
                _renWin->AddRenderer(_aRenderer);
 
                _aRenderer->GradientBackgroundOn();
@@ -202,6 +216,7 @@ void wxVtk3DBaseView::Configure()
                GetCamera()->Roll(180);
                GetCamera()->Yaw(180+30);
                GetCamera()->Pitch(-22);
+                               
        }
 }
 
index eb454c97a37b72c888c3602cf80790fc1277e944..77d384390a912d2156b3bf4e9566c626592a013e 100644 (file)
@@ -45,7 +45,7 @@ wxVtkBaseView::wxVtkBaseView()
 wxVtkBaseView::wxVtkBaseView(wxWindow *parent)
 {
        _parent                         = parent;
-       _iren                           = (wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
+       _iren                           = (crea::wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
 //     _iren->UseCaptureMouseOn();
 //     _iren                           = new wxVTKRenderWindowInteractor(_parent,-1);
        _interactorStyle        = NULL;
@@ -58,11 +58,12 @@ wxVtkBaseView::~wxVtkBaseView()
        //_iren=NULL;
 }
 //-------------------------------------------------------------------
-wxVTKRenderWindowInteractor* wxVtkBaseView::GetWxVTKRenderWindowInteractor() throw (char*)
+crea::wxVTKRenderWindowInteractor* wxVtkBaseView::GetWxVTKRenderWindowInteractor() throw (char*)
 {
 
-       if(_iren==NULL){
-               throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren wxVTKRenderWindowInteractorPlus =NULL";
+       if(_iren==NULL)
+       {
+               throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren cwxVTKRenderWindowInteractorPlus =NULL";
        }
    return _iren;
 }
index 0ecedb5f0ddf7b02c2431711b9b6af5c829963c8..54d036f6f4fa5e24800dcca748bed976277ea5b8 100644 (file)
@@ -53,7 +53,7 @@
 #include <vector>
 #include "marTypes.h"
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 //#include "include/vtkImageViewer2_XYZ.h"
 
 /* JCP 14/05/09
@@ -69,7 +69,7 @@ public:
        wxVtkBaseView( );
        wxVtkBaseView( wxWindow *parent );
        virtual ~wxVtkBaseView();
-       wxVTKRenderWindowInteractor     *GetWxVTKRenderWindowInteractor() throw (char*);
+       crea::wxVTKRenderWindowInteractor       *GetWxVTKRenderWindowInteractor() throw (char*);
        virtual void                            Configure();
        virtual void                            Refresh();
        virtual void                            RefreshView();
@@ -95,16 +95,16 @@ public:
        void                                            SetVtkBaseData(vtkBaseData *vtkbasedata);
 
 private:
-       wxWindow                                        *_parent;
-       wxVTKRenderWindowInteractor *_iren;
+       wxWindow                                                        *_parent;
+       crea::wxVTKRenderWindowInteractor       *_iren;
        /**
         * JCP 04/05/09
-        * vtkInteractorStyleImage              *_interactorStyle;
+        * vtkInteractorStyleImage                      *_interactorStyle;
         */
-       vtkInteractorStyleImage         *_interactorStyle;
+       vtkInteractorStyleImage                         *_interactorStyle;
 
 // EED Nov 15 2014
-       vtkBaseData                                     *_vtkbasedata;
+       vtkBaseData                                                     *_vtkbasedata;
 
 protected:
 
index 84c3c609dd20fdad9e612e648d49aed7ff9dd065..b41609ebcb2fb5cc3928edadecd3cf5ef7ab158a 100644 (file)
@@ -168,19 +168,21 @@ void wxVtkClipping3DView::Configure()
        _wxvtk3Dbaseview->Configure();
 
        // Actors are added to the renderer.
-       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );
 
        _boxWidgetS1 = vtkBoxWidget::New();
        _boxWidgetS1->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
        _boxWidgetS1->SetPlaceFactor(1.25);
 
-
-
        vtkStripper *stripper=_vtkclipping3Ddataviewer->GetTissueStripper(0);
        vtkPolyData *polydata= stripper->GetOutput();
 
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _boxWidgetS1->SetInput( polydata );
+#else
+       stripper->Update();
+       _boxWidgetS1->SetInputData( polydata );
+#endif
 
 //EED 2016-08-19       
        //_boxWidgetS1->PlaceWidget();
@@ -218,7 +220,14 @@ void wxVtkClipping3DView::Configure()
        _boxWidgetVolume = vtkBoxWidget::New();
        _boxWidgetVolume->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
        _boxWidgetVolume->SetPlaceFactor(1.25);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _boxWidgetVolume->SetInput( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+#else
+       _boxWidgetVolume->SetInputData( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+#endif
+
        _boxWidgetVolume->PlaceWidget();
        _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent, _vtkclipping3Ddataviewer->GetObserverV() );
        _boxWidgetVolume->HandlesOn ();
@@ -255,6 +264,7 @@ void wxVtkClipping3DView::Configure()
        _vtkclipping3Ddataviewer->SetRenderer(this->GetWxvtk3Dbaseview()->GetRenderer());
        _vtkclipping3Ddataviewer->SetInteractor(this->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor());
 }
+
 //-------------------------------------------------------------------
 void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vtkclipping3Ddataviewer)
 {
index da8764c2c9ff569dec6f1d5c16073b0b682015bd..2a587c97f4ad6a713d9dee8102c75dc349817d62 100644 (file)
@@ -57,10 +57,12 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
 
                                        _color                  = new wxButton(panel,-1,_T(""));
                                        _visible                = new wxCheckBox(panel,-1,_T("Vis"));
-                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS);
+//EED                                  _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(300,110), wxSL_HORIZONTAL | wxSL_LABELS);
 
        wxStaticText    *isoValueTitle  = new wxStaticText(panel,-1,_T("isoValue"));
-                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
+//EED                                  _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
+                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(300,110), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
 
                                        _wireFrameRep   = new wxRadioButton(panel,-1,_T("WireFrame"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
                                        _surfaceRep             = new wxRadioButton(panel,-1,_T("Surface"));
@@ -71,9 +73,14 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
        _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
        _isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) );
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _isoValue->SetTickFreq(25,0);
+#else
+       // ..
+#endif
 
-       _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
+       _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxDefaultSize, wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
        _isoValueSpin->SetRange(1,8);
        _isoValueSpin->SetValue(5);
        Connect(_isoValueSpin->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin );
@@ -344,9 +351,14 @@ void wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(wxCommandEv
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
-       }
+       } // if idTissue
 }
 
 //-------------------------------------------------------------------
@@ -356,7 +368,14 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
        _wxvtkclipping3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
@@ -390,14 +409,18 @@ void wxVtkClipping3DViewCntrlPanel::OnColor(wxCommandEvent& event)
                        float b=dlgColour.GetColourData().GetColour().Blue()/255;
                        tmpActor->GetProperty()->SetColor( r , g , b );
                        _color->SetBackgroundColour(dlgColour.GetColourData().GetColour());
-
                        _wxvtkclipping3Dview->Refresh();
-
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-               }
-       }
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+               } // if ShowModal
+       } // if idTissue
 }
+
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
 {
@@ -405,12 +428,15 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
        if (idTissue!=-1)
        {
                _wxvtkclipping3Dview->VisibleActor(idTissue, _visible->GetValue());
-
                _wxvtkclipping3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if idTissue
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
@@ -422,12 +448,15 @@ void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
                tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
                float opacity=_opacity->GetValue();
                tmpActor->GetProperty()->SetOpacity( opacity/100 );
-
                _wxvtkclipping3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if idTissue
 }
 
 //----------------------------------------------------------------------------
@@ -462,8 +491,15 @@ void wxVtkClipping3DViewCntrlPanel::OnIsoValue(wxScrollEvent& event)
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+       } // if idTissue
 
 }
 //-------------------------------------------------------------------
@@ -478,7 +514,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 
 
        wxString dirSTL = wxGetHomeDir( ) ;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+#else
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+#endif
 
        if( dialog.ShowModal( ) == wxID_OK )
        {
@@ -496,23 +537,37 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
         vtkTriangleFilter *filtro = vtkTriangleFilter::New();
 
 
-               filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
                vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
-        pdcf->SetInput( filtro->GetOutput() );
         vtkClosePolyData *cpd = vtkClosePolyData::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+        pdcf->SetInput( filtro->GetOutput() );
         cpd->SetInput( pdcf->GetOutput() );
+#else
+               filtro->SetInputConnection( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutputPort() );
+        pdcf->SetInputConnection( filtro->GetOutputPort() );
+        cpd->SetInputConnection( pdcf->GetOutputPort() );
+#endif
 
-               // 1.2 se escribe a disco el archivo stl de la superficie interna
+               // 1.2 Write the stl file
         cpd->Update();
         vtkSTLWriter *writer = vtkSTLWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         writer->SetInput( cpd->GetOutput() );
-               filename =prefix;
+#else
+        writer->SetInputConnection( cpd->GetOutputPort() );
+#endif
+
         writer->SetFileName(filename.c_str());
         writer->SetFileTypeToASCII();
         writer->Write();
         writer->Delete();
 
-
         filtro->Delete();
         cpd->Delete();
         pdcf->Delete();
@@ -524,7 +579,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
 {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxSAVE );
+#else
+       wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxFD_SAVE );
+#endif
        if (dialog.ShowModal() == wxID_OK)
        {
                std::string directory = (const char*) (dialog.GetDirectory().mb_str() );
@@ -668,7 +728,15 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+
 
                        /*
                        volumeMapper->Update();
@@ -696,10 +764,10 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        size=greyctf->size();
                        for(i=0;i<size;i++)
                        {
-                               double grey2=(*greyctf)[i];
-                               double red =(*rctf)[i];
-                               double green =(*gctf)[i];
-                               double blue = (*bctf)[i];
+                               double grey2    = (*greyctf)[i];
+                               double red      = (*rctf)[i];
+                               double green    = (*gctf)[i];
+                               double blue     = (*bctf)[i];
                                ctfun->AddRGBPoint(grey2,red,green,blue);
                        }
 
@@ -709,7 +777,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
                        /*
                        volumeMapper->Update();
@@ -726,6 +799,8 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
 {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxOPEN);
        if (dialog.ShowModal() == wxID_OK)
        {
@@ -733,6 +808,18 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
                _wxvtkclipping3Dview->Refresh();
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+       } // if
+#else
+       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxFD_OPEN);
+       if (dialog.ShowModal() == wxID_OK)
+       {
+               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( dialog.GetPath().char_str() );
+               _wxvtkclipping3Dview->Refresh();
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+
+       } // if
+#endif
+
 }
 
index ed16d6e0860c0317911f467f4f7e405dc079f012..72fa34e46be890abdff977dd2a16f24434970ce8 100644 (file)
@@ -95,7 +95,6 @@ wxVtkClipping3DViewVolCntrlPanel::wxVtkClipping3DViewVolCntrlPanel(wxWindow *par
     sizerH2->Add(ckInterpolation, 1, wxALL|wxEXPAND, 0 );
     sizerH2->Add(ckShade, 1, wxALL|wxEXPAND, 0 );
 
-
        sizer->Add( sizerH0 , 1, wxALL|wxEXPAND, 2);
     sizer->Add( sizerH1 , 1, wxALL|wxEXPAND, 2);
     sizer->Add( sizerH2 , 1, wxALL|wxEXPAND, 2);
@@ -164,7 +163,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
 
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -194,7 +198,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnVisibleBoxVolume(wxCommandEvent& event)
 
     _wxvtkclipping3Dview->Refresh();
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
 }
 
@@ -327,8 +336,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& even
 
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
                        /*
                        volumeMapper->Update();
                        newvol->Update();
@@ -368,8 +381,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& even
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
 
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
                _wxvtkclipping3Dview->Refresh();
 
                        /*
@@ -384,43 +401,60 @@ void wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& even
        hDlg->Destroy();
 }
 
-void    wxVtkClipping3DViewVolCntrlPanel::OnRayCastingActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnRayCastingActive(wxCommandEvent& event)
+{
     //If Ray Casting is active, others options are disabled. Only RayCasting is true
     _wxvtkclipping3Dview->SetRayCasting(true);
     _wxvtkclipping3Dview->SetMIPActive(false);
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
-void    wxVtkClipping3DViewVolCntrlPanel::OnMIPActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnMIPActive(wxCommandEvent& event)
+{
     //If MIP is active, others options are disabled. Only MIP is true
     _wxvtkclipping3Dview->SetMIPActive(true);
     _wxvtkclipping3Dview->SetRayCasting(false);
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
 
-
-void    wxVtkClipping3DViewVolCntrlPanel::OnInterpolationActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnInterpolationActive(wxCommandEvent& event)
+{
     _wxvtkclipping3Dview->SetInterpolation(event.IsChecked());
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
-void    wxVtkClipping3DViewVolCntrlPanel::OnShadeActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnShadeActive(wxCommandEvent& event)
+{
     _wxvtkclipping3Dview->SetShade(event.IsChecked());
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
index bf823640f06f8c218929e53493565cf6c1a9cd43..d4752bd5f9ed62d1205455a8e350ac860dc7d69a 100644 (file)
@@ -56,14 +56,14 @@ wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction)
 //-------------------------------------------------------------------
 wxVtkMPR2DView::~wxVtkMPR2DView()
 {
-       if (_ptsA!=NULL)            { _ptsA                 -> Delete(); }
-       if (_lineAActor!=NULL)  { _lineAActor   -> Delete(); }
-       if (_lineAMapper!=NULL) { _lineAMapper  -> Delete(); }
-       if (_pdA!=NULL)             { _pdA                  -> Delete(); }
-       if (_ptsB!=NULL)            { _ptsB                 -> Delete(); }
-       if (_lineBActor!=NULL)  { _lineBActor   -> Delete(); }
-       if (_lineBMapper!=NULL) { _lineBMapper  -> Delete(); }
-       if (_pdB!=NULL)             { _pdB                  -> Delete(); }
+       if (_ptsA!=NULL)            { _ptsA->Delete();                  }
+       if (_lineAActor!=NULL)  { _lineAActor->Delete();        }
+       if (_lineAMapper!=NULL) { _lineAMapper->Delete();       }
+       if (_pdA!=NULL)             { _pdA->Delete();                   }
+       if (_ptsB!=NULL)            { _ptsB->Delete();                  }
+       if (_lineBActor!=NULL)  { _lineBActor->Delete();        }
+       if (_lineBMapper!=NULL) { _lineBMapper->Delete();       }
+       if (_pdB!=NULL)             { _pdB->Delete();                   }
 }
 //-------------------------------------------------------------------
 vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata()
@@ -116,7 +116,14 @@ void wxVtkMPR2DView::Configure()
                _ptsA->SetPoint(1,  1000        ,  1000 ,  1000 );
                _pdA = vtkPolyData::New();
                _lineAMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _lineAMapper->SetInput(_pdA);
+#else
+               _lineAMapper->SetInputData(_pdA);
+#endif
+
                _lineAMapper->ImmediateModeRenderingOn();
                _lineAActor->SetMapper(_lineAMapper);
        }
@@ -155,7 +162,14 @@ void wxVtkMPR2DView::Configure()
        _pdB->SetPoints( _ptsB );
        _pdB->SetLines( linesB );
        linesB->Delete();  //do not delete lines ??
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _lineBMapper->SetInput(_pdB);
+#else
+       _lineBMapper->SetInputData(_pdB);
+#endif
+
        _lineBMapper->ImmediateModeRenderingOn();
        if(_imageViewer2XYZ)
        {
@@ -353,6 +367,15 @@ void wxVtkMPR2DView::Refresh()
                                focalpoint[0]   = x;    
                                focalpoint[1]   = y;                                    
                        } // if back
+                       
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+                               // ..
+#else
+                               _ptsA->Modified();
+                               _ptsB->Modified();
+#endif
+
                        if (fixAxis2D == true)
                        {
                                GetRenderer()->GetActiveCamera()->SetPosition(position);
@@ -372,6 +395,8 @@ void wxVtkMPR2DView::Refresh()
        imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() );
 //EED 01nov2012
                UpdateColorWindowLevel();
+//EED 05juin2019
+               UpdateCameraParallelScale();
                wxVtkBaseView::Refresh();
        }
 }
index aea0d6f8b86a12636d553161f0fda69405e85081..4f5e2267fb61360fa9314c8d4faa7cfb92668cf2 100644 (file)
@@ -62,8 +62,10 @@ private:
        int                                                     _backX;
        int                                                     _backY;
        int                                                     _backZ;
+
        bool                                            _backFixAxis2D;
        double                                          _backOpacityAxis;
+
        bool                                            _visibleAxis;
        int                                                     _direction;
        vtkPoints                                       *_ptsA;
index 69ffc56b9d505a6dc4c80d0dd9f9cf6df2dbe4ea..3703011e6b5c35dbfc04b34c2d52cf076a99ff3c 100644 (file)
@@ -168,18 +168,10 @@ void wxVtkMPR3DView::Configure()
        vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
        _wxvtk3Dbaseview->Configure();
        _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel();
-//EED 27 Mai 2009
-//     _wxvtk3Dbaseview->GetRenderer()->Clear();
        // Actors are added to the renderer.
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
        _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(0)  );    // _saggital
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(1)  );    // _axial
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(2)  );    // _coronal
-       // vtkPointWidget
-       //if(_myCallback!=NULL){
-               //_myCallback->Delete();
-       //}
+
        vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New();
        _myCallback->SetWxVtkMPR3DView(this);
        if(imageData){
@@ -187,7 +179,12 @@ void wxVtkMPR3DView::Configure()
                {
                        _pointWidget = vtkPointWidget::New();
                }
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _pointWidget->SetInput( imageData );
+#else
+               _pointWidget->SetInputData( imageData );
+#endif
                _myCallback->SetVtkPointWidget(_pointWidget);
                _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
                _pointWidget->AllOff();
@@ -197,7 +194,13 @@ void wxVtkMPR3DView::Configure()
                {
                        _planeWidget = vtkPlaneWidget::New();
                }
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _planeWidget->SetInput( imageData );
+#else
+               _planeWidget->SetInputData( imageData );
+#endif
+
                _myCallback->SetVtkPlaneWidget(_planeWidget);
                _planeWidget->NormalToXAxisOn();
                _planeWidget->SetResolution(50);
@@ -209,12 +212,26 @@ void wxVtkMPR3DView::Configure()
                int pz=(dim[2]/2);
                int dd=20;
                _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd );
-               if(_vtkplane==NULL){
-                       _vtkplane = vtkPolyData::New();
-                       _probe = vtkProbeFilter::New();
+               if(_vtkplane==NULL)
+               {
+                       _vtkplane               = vtkPolyData::New();
+                       _probe                  = vtkProbeFilter::New();
+                       _contourMapper  = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _probe->SetInput(_vtkplane);
-                       _contourMapper = vtkPolyDataMapper::New();
                        _contourMapper->SetInput( _probe->GetPolyDataOutput() );
+#else
+                       _myCallback->SetVtkPolyData(_vtkplane);
+                       _myCallback->SetVtkProbeFilter(_probe);
+                       _planeWidget->GetPolyData(_vtkplane);
+                       _probe->SetInputData(_vtkplane);
+                       _probe->SetSourceData(imageData);
+//                     _probe->Update();
+                       _contourMapper->SetInputData( _probe->GetPolyDataOutput() );
+#endif
+
                        _contourPlaneActor = vtkActor::New();
                        _contourPlaneActor->SetMapper(_contourMapper);
                        _contourPlaneActor->VisibilityOff();
@@ -224,7 +241,13 @@ void wxVtkMPR3DView::Configure()
                        _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor );
                }
                _planeWidget->GetPolyData(_vtkplane);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _probe->SetSource( imageData );
+#else
+               _probe->SetSourceData( imageData );
+#endif
                _contourMapper->SetScalarRange( imageData->GetScalarRange() );
        ConfigureFreePlanes();
        }
@@ -296,11 +319,21 @@ void wxVtkMPR3DView::SetImage()
 {
        vtkImageData *imageData                                 = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
        // Orthogonal planes B&W
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _planeWidgetX->SetInput( imageData );
        _planeWidgetY->SetInput( imageData );
        _planeWidgetZ->SetInput( imageData );
        // -- Plane widget
        _probe->SetSource( imageData );
+#else
+       _planeWidgetX->SetInputData( imageData );
+       _planeWidgetY->SetInputData( imageData );
+       _planeWidgetZ->SetInputData( imageData );
+       // -- Plane widget
+       _probe->SetSourceData( imageData );
+#endif
+
        _vtkmpr3Ddataviewer->SetImage();
 }
 
@@ -317,7 +350,13 @@ vtkImagePlaneWidget* wxVtkMPR3DView::GetPlaneWidget(unsigned char activationkey,
        double xSpacing = 0, ySpacing = 0, zSpacing = 0;
        if(image)
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                planeWidget->SetInput( image );
+#else
+               planeWidget->SetInputData( image );
+#endif
                image->GetExtent(xMin, xMax, yMin, yMax, zMin, zMax);
                image->GetSpacing(xSpacing, ySpacing, zSpacing);
        }
@@ -502,7 +541,12 @@ void wxVtkMPR3DView::RefreshView()   // virtual
 
        if(_pointWidget)
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _pointWidget->SetInput( image );
+#else
+               _pointWidget->SetInputData( image );
+#endif
                _pointWidget->PlaceWidget();
 
                _pointWidget->SetPosition( x,y,z );
@@ -515,6 +559,12 @@ void wxVtkMPR3DView::RefreshView()   // virtual
                _planeWidget->SetCenter( x,y,z );
                _planeWidget->UpdatePlacement();
                _planeWidget->GetPolyData(_vtkplane);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               // ..
+#else
+               _probe->Update();
+#endif
        }
 
        if (_wxvtkmpr3DviewCntrlPanel!=NULL)
@@ -594,9 +644,9 @@ void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible){
                        // step 5 Refresh
                        _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
 
-               }
+               } // if visible
                _vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible);
-       }
+       } // if visible 
 }
 
 
@@ -609,8 +659,8 @@ void wxVtkMPR3DView::VisiblePointWidget( bool visible )
                        _pointWidget->On();
                } else {
                        _pointWidget->Off();
-               }
-       }
+               } // visible
+       } // _pointWidget
 }
 
 //-------------------------------------------------------------------
@@ -624,9 +674,10 @@ void wxVtkMPR3DView::VisiblePlaneWidget( bool visible )
 
                } else {
                        _planeWidget->Off();
-                       _contourPlaneActor->VisibilityOff();
-               }
-       }
+                       _contourPlaneActor->VisibilityOff();                    
+               } // if visible
+               _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
+       } // _planeWidget
 }
 
 //CPR: Method added 30 Nov 2009
@@ -638,7 +689,7 @@ void wxVtkMPR3DView::showOutlineActor(bool value)
                _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
        } else {
                _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor );
-       }
+       } // value
 }
 
 //-------------------------------------------------------------------
@@ -680,7 +731,12 @@ void wxVtkMPR3DView::TestLoic1()
        double spc[3];
        vtkimagedata->GetSpacing(spc);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        vtkimagedata->Update();
+#else
+       // ..
+#endif
 
 
         double p[3], n[3];
@@ -700,20 +756,41 @@ void wxVtkMPR3DView::TestLoic1()
     pSource->Update( );
 
     vtkProbeFilter* slices = vtkProbeFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     slices->SetInput( ( vtkDataSet* )pSource->GetOutput( ) );
     slices->SetSource( vtkimagedata );
     slices->Update( );
     pSource->Delete( );
+#else
+    slices->SetInputData( ( vtkDataSet* )pSource->GetOutput( ) );
+    slices->SetSourceData( vtkimagedata );
+#endif
 
        vtkStructuredPoints   *stPoints = vtkStructuredPoints::New();
        stPoints -> GetPointData( )->SetScalars(  slices->GetOutput()->GetPointData()->GetScalars()  );
        stPoints -> SetDimensions( sizeIma, sizeIma, 1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        stPoints -> SetScalarType( vtkimagedata->GetScalarType() );
        stPoints -> SetScalarTypeToShort();
        stPoints -> Update();
+#else
+       vtkInformation* info=stPoints->GetInformation();
+       vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_SHORT, 1);
+#endif
+
+
 
        vtkImageChangeInformation  *change = vtkImageChangeInformation ::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        change    -> SetInput( stPoints );
+#else
+       change    -> SetInputData( stPoints );
+#endif
        change    -> Update();    //important
 
        double _range[2];
@@ -737,7 +814,12 @@ void wxVtkMPR3DView::TestLoic1()
 
 
        vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        writer->SetInput( stPoints );
+#else
+       writer->SetInputData( stPoints );
+#endif
        writer->SetFileName( "C:/Users/Images/temp_EED/image.mhd" );
        writer->SetFileDimensionality( 2 );
        writer->Write( );
@@ -745,7 +827,14 @@ void wxVtkMPR3DView::TestLoic1()
 
 
        vtkDataSetMapper *_3DSliceMapper = vtkDataSetMapper::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _3DSliceMapper->SetInput(change->GetOutput( ) );
+#else
+       _3DSliceMapper->SetInputData(change->GetOutput( ) );
+#endif
+
        _3DSliceMapper->SetLookupTable( _bwlookup );
        _3DSliceMapper->SetScalarRange( _range );
        _3DSliceMapper->ImmediateModeRenderingOn( );
@@ -798,14 +887,24 @@ void wxVtkMPR3DView::TestLoic2()
 
         vtkCutter* sliceCutter = vtkCutter::New();
                vtkImageData *vtkimagedata =  this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                 sliceCutter->SetInput( vtkimagedata );
+#else
+                sliceCutter->SetInputData( vtkimagedata );
+#endif
                 sliceCutter->SetCutFunction( slicePlane );
 
 //EED
 //        vtkLookupTable *lut = BuildHueWeightBaseMap();
 
         vtkPolyDataMapper *slice = vtkPolyDataMapper::New();
-                slice->SetInput( sliceCutter->GetOutput() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               slice->SetInput( sliceCutter->GetOutput() );
+#else
+               slice->SetInputData( sliceCutter->GetOutput() );
+#endif
         double range[2];
 // EED
 //                slice->Update();
@@ -819,7 +918,14 @@ void wxVtkMPR3DView::TestLoic2()
 //                sliceActor->SetMapper( slice );
 
         vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                 contourMapper->SetInput( sliceCutter->GetOutput() );
+#else
+                contourMapper->SetInputData( sliceCutter->GetOutput() );
+#endif
+
                 contourMapper->SetScalarRange( range );
   //              contourMapper->SetLookupTable( lut );
 
index c1a639f78a503d69512d00f05ce7c82d1863aee1..5ab97aab8a567c76b03aa70a38567a5e3eb85f70 100644 (file)
@@ -67,6 +67,7 @@ public:
 //EED 27/05/2013
 //     void ResetCamera(int *ext=NULL,double* spc=NULL);
        void setColorTransferFunction(vtkColorTransferFunction* colortable);
+
        //Free planes
        //-------------------------------------------------------------------
        void ConfigureFreePlanes();
@@ -76,6 +77,7 @@ public:
        void SetFreePlanesOrtho();
        void SetColorWindow(double colorWindow);
        void SetColorLevel(double colorLevel);
+
 private:
        wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
        vtkMPR3DDataViewer                              *_vtkmpr3Ddataviewer;
@@ -93,11 +95,10 @@ private:
        vtkPolyDataMapper                               *_contourMapper;
 
        //Free planes
-       vtkImagePlaneWidget *_planeWidgetX;
-       vtkImagePlaneWidget *_planeWidgetY;
-       vtkImagePlaneWidget *_planeWidgetZ;
+       vtkImagePlaneWidget                     *_planeWidgetX;
+       vtkImagePlaneWidget                     *_planeWidgetY;
+       vtkImagePlaneWidget                     *_planeWidgetZ;
        
-
 protected:
 };
 
index dd182d53d77602d5b2ce074cfcb70e8523e8d502..d8137db26d18205d26d6ce4dd7ca7699a4febb6f 100644 (file)
@@ -45,24 +45,24 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        //CPR: Modified 30 Nov 2009
        /*
        wxCheckBox              *ckBoxX                 = new wxCheckBox(panel,-1,_T("X           "));
-                                       _positionX              = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+                                       _positionX              = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition,  wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
        wxCheckBox              *ckBoxY                 = new wxCheckBox(panel,-1,_T("Y           "));
-                                       _positionY              = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+                                       _positionY              = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition,  wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
        wxCheckBox              *ckBoxZ                 = new wxCheckBox(panel,-1,_T("Z           "));
-                                       _positionZ              = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+                                       _positionZ              = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition,  wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
        wxButton                *btnColorTable  = new wxButton (panel, -1, _T("Edit Color Table") );
        */
 
        _ckBoxX                                         = new wxCheckBox(panel,-1,_T("X   "));
-       _positionX                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       _positionX                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
        _ckBoxY                                         = new wxCheckBox(panel,-1,_T("Y   "));
-       _positionY                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       _positionY                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
        _ckBoxZ                                         = new wxCheckBox(panel,-1,_T("Z   "));
-       _positionZ                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       _positionZ                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
        _ckBoxXYZ                                       = new wxCheckBox(panel,-1,_T("3D Axis  "));
        _ckBoxFixAxis2D                         = new wxCheckBox(panel,-1,_T("2D Fix Axis"));
-       _opacityAxis                            = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS);
+       _opacityAxis                            = new wxSlider(panel,-1,100,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
        _ckBoxPlane                                     = new wxCheckBox(panel,-1,_T("Plane"));
 ////EED 05Nov2012      _ckBox_BW_Color_Plane           = new wxCheckBox(panel,-1,_T("GL/Color"));
@@ -140,6 +140,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        //      wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL);
        
        //CPR: If-else statements added 30 Nov 2009
+       wxFlexGridSizer *sizerV1;
        wxFlexGridSizer *sizerH4;
        wxFlexGridSizer *sizerH4a;
        wxFlexGridSizer *sizerH5;
@@ -149,6 +150,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        {
                sizer   = new wxFlexGridSizer(4);
                sizerH4 = new wxFlexGridSizer(3);
+
                sizerH4a = new wxFlexGridSizer(3);
                
                sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
@@ -199,12 +201,10 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
                sizerH6->Add( _ckBoxOutline                                                             , 1, wxALL|wxEXPAND                                             , 0);
                sizerH6->Add( _ckBoxBackGroundBlack                                             , 1, wxALL|wxEXPAND                                             , 0);
 
-
-               sizer->Add( sizerH4                                                                             ,  1, wxALL|wxGROW,     2);
+               sizer->Add( sizerH4,  1, wxALL|wxGROW,  2);
                sizer->Add( sizerH5,  1, wxALL|wxEXPAND,2);
                sizer->Add( sizerH6,  1, wxALL|wxEXPAND,2);
-               
-               
+                       
        }       else    {
                sizer    = new wxFlexGridSizer(1);
 
@@ -276,7 +276,9 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        //      sizerH5->Add( ckBoxZ                            ,  1, wxALL|wxEXPAND, 0);
 
 
-       panel->SetSize(400,50);
+       panel->ClearBackground();
+//     panel->SetSize(400,50);
+       sizer->FitInside(panel);
        panel->SetAutoLayout(true);
        panel->SetSizer(sizer);
        panel->Layout();
@@ -540,7 +542,12 @@ void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(wxCommandEvent& event)
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 
        try{
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+               _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
        }catch(char* e){
                std::cout<<e<<std::endl;
        }
@@ -552,17 +559,25 @@ void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(wxCommandEvent& event)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 //-------------------------------------------------------------------
 void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
 {
        _wxvtkmpr3Dview->VisibleImageActor(2, event.IsChecked() );
        _wxvtkmpr3Dview->Refresh();
-
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -576,7 +591,6 @@ void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ(wxCommandEvent& event)
 void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
 {
        _wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
-
 }
 
 //-------------------------------------------------------------------
@@ -586,7 +600,12 @@ void wxVtkMPR3DViewCntrlPanel::OnPositionX(wxScrollEvent& event)
        _wxvtkmpr3Dview->RefreshView();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 //-------------------------------------------------------------------
 void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
@@ -594,7 +613,12 @@ void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( _positionY->GetValue() );
        _wxvtkmpr3Dview->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 //-------------------------------------------------------------------
 void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
@@ -602,7 +626,12 @@ void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( _positionZ->GetValue() );
        _wxvtkmpr3Dview->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 
@@ -653,7 +682,12 @@ void wxVtkMPR3DViewCntrlPanel::SetVisibleX(bool value)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -665,7 +699,12 @@ void wxVtkMPR3DViewCntrlPanel::SetVisibleY(bool value)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -677,7 +716,12 @@ void wxVtkMPR3DViewCntrlPanel::SetVisibleZ(bool value)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -720,8 +764,13 @@ void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
 {
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetInterpolate(  _ckBoxInterpolate->GetValue() );
        _wxvtkmpr3Dview->Refresh();
-       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -730,7 +779,12 @@ void wxVtkMPR3DViewCntrlPanel::OnFixAxis2D(wxCommandEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetFixAxis2D(    _ckBoxFixAxis2D->GetValue() );
        _wxvtkmpr3Dview->Refresh();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -739,7 +793,12 @@ void wxVtkMPR3DViewCntrlPanel::OnOpacityAxis(wxCommandEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetOpacityAxis(  _opacityAxis->GetValue()/100.0 );
        _wxvtkmpr3Dview->Refresh();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif 
 }
 
 
index 6ffd82d2dfe0c32f17d26bbc80aed4f29b2b86fe..54455923c47dc0c8860715b62ae408fb475bf99c 100644 (file)
@@ -226,7 +226,13 @@ void wxWidgetMesure2D_Plane::CircleLine()
        lines->Delete();  //do not delete lines ??
        _circle1Actor                                   =       vtkActor::New();
     _circle1Mapper                                     =       vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _circle1Mapper->SetInput(_pdCircle1);
+#else
+       _circle1Mapper->SetInputData(_pdCircle1);
+#endif
        _circle1Mapper->ImmediateModeRenderingOn();
        _circle1Actor->SetMapper(_circle1Mapper);
        _circle1Actor->GetProperty()->BackfaceCullingOn();
@@ -253,7 +259,12 @@ void wxWidgetMesure2D_Plane::CircleLine()
        lines->Delete();  //do not delete lines ??
        _circle2Actor                                   =       vtkActor::New();
     _circle2Mapper                                     =       vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _circle2Mapper->SetInput(_pdCircle2);
+#else
+       _circle2Mapper->SetInputData(_pdCircle2);
+#endif
        _circle2Mapper->ImmediateModeRenderingOn();
        _circle2Actor->SetMapper(_circle2Mapper);
        _circle2Actor->GetProperty()->BackfaceCullingOn();
@@ -277,7 +288,14 @@ void wxWidgetMesure2D_Plane::CircleLine()
        lines->Delete();  //do not delete lines ??
        _lineRef1Actor                                  =       vtkActor::New();
     _lineRef1Mapper                                    =       vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _lineRef1Mapper->SetInput(_pdLineRef1);
+#else
+       _lineRef1Mapper->SetInputData(_pdLineRef1);
+#endif
+
        _lineRef1Mapper->ImmediateModeRenderingOn();
        _lineRef1Actor->SetMapper(_lineRef1Mapper);
        _lineRef1Actor->GetProperty()->BackfaceCullingOn();
@@ -301,7 +319,14 @@ void wxWidgetMesure2D_Plane::CircleLine()
        lines->Delete();  //do not delete lines ??
        _lineRef2Actor                                  =       vtkActor::New();
     _lineRef2Mapper                                    =       vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _lineRef2Mapper->SetInput(_pdLineRef2);
+#else
+       _lineRef2Mapper->SetInputData(_pdLineRef2);
+#endif
+
        _lineRef2Mapper->ImmediateModeRenderingOn();
        _lineRef2Actor->SetMapper(_lineRef2Mapper);
        _lineRef2Actor->GetProperty()->BackfaceCullingOn();
index 22e49152a171e8f3f0b5787e26d0f6c558a23898..a42b0e54d9cc528accad1a90cc0b5825722b1ba9 100644 (file)
@@ -34,33 +34,40 @@ PlaneDirectionManagerData::PlaneDirectionManagerData(int radio, double colour[3]
 :PlanesOperations(){   
        _vtkarrow               = vtkArrowSource::New();        
        _arrowMapper    = vtkPolyDataMapper::New();
-       _arrowActor     = vtkActor::New();
+       _arrowActor             = vtkActor::New();
 
        _vtkarrow->SetTipResolution(30);
        _vtkarrow->SetShaftResolution( 30  );   
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _arrowMapper->SetInput( _vtkarrow->GetOutput() );       
+#else
+       _arrowMapper->SetInputData( _vtkarrow->GetOutput() );   
+#endif
+
        _arrowActor->SetMapper(_arrowMapper);   
 
-       _radio = radio;
-       _colour = colour;
-       _opacity = opacity;
-
-       p0 = new double[3];
-       p0[0] = 0;
-       p0[1] = 0;
-       p0[2] = 0;
-       p1 = new double[3];
-       p1[0] = 0;
-       p1[1] = 0;
-       p1[2] = 0;
-       p2 = new double[3];
-       p2[0] = 1;
-       p2[1] = 1;
-       p2[2] = 1;
-       _dir = new double[3];
-       _dir[0] = 0;
-       _dir[1] = 0;
-       _dir[2] = 0;
+       _radio                  = radio;
+       _colour                 = colour;
+       _opacity                = opacity;
+
+       p0                              = new double[3];
+       p0[0]                   = 0;
+       p0[1]                   = 0;
+       p0[2]                   = 0;
+       p1                              = new double[3];
+       p1[0]                   = 0;
+       p1[1]                   = 0;
+       p1[2]                   = 0;
+       p2                              = new double[3];
+       p2[0]                   = 1;
+       p2[1]                   = 1;
+       p2[2]                   = 1;
+       _dir                    = new double[3];
+       _dir[0]                 = 0;
+       _dir[1]                 = 0;
+       _dir[2]                 = 0;
 }
 
 
index 6d0bb372da6c95acabef4af8243043f7677457c5..9d376c0b00b0324fbff611012020a881e856459d 100644 (file)
@@ -633,7 +633,12 @@ void marRAW2Files::loadActualSerie(wxGauge* gauge )
 void marRAW2Files::FlipY(vtkImageData *imagedata)
 {
        vtkImageData *vtkimagedata = imagedata;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        vtkimagedata->Update();
+#else
+  //...
+#endif
        int dim[3];
        vtkimagedata->GetDimensions(dim);
        unsigned short tmp;
@@ -662,7 +667,12 @@ void marRAW2Files::FlipY(vtkImageData *imagedata)
                                }
                        }
                }
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    vtkimagedata->Update();
+#else
+   vtkimagedata->Modified();
+#endif
 
 }
 // -------------------------------------------------------------------------
@@ -675,7 +685,13 @@ void marRAW2Files::saveVolume( std::string directory, std::string name, vtkImage
 
                // Crop
        vtkExtractVOI *crop = vtkExtractVOI::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        crop->SetInput( imagedata );
+#else
+       crop->SetInputData( imagedata );
+#endif
        crop->SetVOI( voi );
        crop->Update();
 
@@ -688,7 +704,12 @@ void marRAW2Files::saveVolume( std::string directory, std::string name, vtkImage
 
 
        vtkImageChangeInformation* change = vtkImageChangeInformation::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        change->SetInput( crop->GetOutput() );
+#else
+       change->SetInputData( crop->GetOutput() );
+#endif
 
 
 //     change->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
@@ -705,7 +726,14 @@ void marRAW2Files::saveVolume( std::string directory, std::string name, vtkImage
    std::string nameMW           = filename+".mhd";
 
        vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        writer->SetInput( change->GetOutput() );
+#else
+       writer->SetInputData( change->GetOutput() );
+#endif
+
        writer->SetFileName( nameMW.c_str() );
        writer->SetFileDimensionality( 3 );
        writer->Write( );
index 8ef4b5f483a69ea248de28a2f66024f7303f18c3..663036071f571def1353848c349f826b96543d04 100644 (file)
@@ -69,7 +69,12 @@ void marDynData::loadData( kVolume* vol, int* voi )
    reset( );
  
    vtkExtractVOI *crop = vtkExtractVOI::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    crop->SetInput( vol->castVtk( ) );
+#else
+   crop->SetInputData( vol->castVtk( ) );
+#endif
 
    crop->SetVOI( voi );
    //crop->SetSampleRate( getParameters( )->getVoxelSize( ), getParameters( )->getVoxelSize( ), getParameters( )->getVoxelSize( ));
@@ -82,13 +87,23 @@ void marDynData::loadData( kVolume* vol, int* voi )
 //     RescalaIntercept        = 0;
 
    vtkImageShiftScale *scale = vtkImageShiftScale::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    scale->SetInput( crop->GetOutput( ) );
+#else
+   scale->SetInputData( crop->GetOutput( ) );
+#endif
    scale->SetScale(RescalaSlope);
    scale->SetShift(0);
    scale->SetOutputScalarTypeToShort();
    scale->Update();
    vtkImageShiftScale *shift = vtkImageShiftScale::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    shift->SetInput( scale->GetOutput( ) );
+#else
+   shift->SetInputData( scale->GetOutput( ) );
+#endif
    shift->SetScale(1); 
    shift->SetShift(RescalaIntercept);
    shift->SetOutputScalarTypeToShort();
@@ -96,7 +111,12 @@ void marDynData::loadData( kVolume* vol, int* voi )
 
 
    vtkImageThreshold *threshold = vtkImageThreshold::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    threshold->SetInput( shift->GetOutput( ) );
+#else
+   threshold->SetInputData( shift->GetOutput( ) );
+#endif
    threshold->ThresholdByUpper (-10000); 
    threshold->ThresholdByLower (-1); 
    threshold->SetInValue(0);   
@@ -105,7 +125,12 @@ void marDynData::loadData( kVolume* vol, int* voi )
    threshold->SetOutputScalarTypeToUnsignedShort();
    
    vtkImageResample* ir = vtkImageResample::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    ir->SetInput( threshold->GetOutput( ) );
+#else
+   ir->SetInputData( threshold->GetOutput( ) );
+#endif
    ir->SetDimensionality( 3 );
    double voxelSize= getParameters( )->getVoxelSize( );
    ir->SetAxisOutputSpacing( 0, voxelSize );
@@ -127,7 +152,13 @@ void marDynData::loadData( kVolume* vol, int* voi )
    * Before we were using kgfoCrop which assume extent start at 0,0,0
    */
    vtkImageChangeInformation* change = vtkImageChangeInformation::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    change->SetInput( ir->GetOutput() );
+#else
+   change->SetInputData( ir->GetOutput() );
+#endif
+
    change->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
    change->SetOutputSpacing ( voxelSize , voxelSize , voxelSize );
    change->Update();    //important
index b201515ddea4f6c5f988fa77c01057016077d368..d2d5ae212cd7265a0a6be5b80e3f5f978c3a7518 100644 (file)
@@ -302,6 +302,7 @@ bool marParameters::load( std::ifstream& is )
        int i, s;
        try
        {
+               char tmp[500];
                is.read( ( char* )_boolValues, e_bool_cont * sizeof( bool ) );
                is.read( ( char* )_intValues, e_int_cont * sizeof( int ) );
                is.read( ( char* )_doubleValues, e_double_cont * sizeof( double ) );
@@ -309,7 +310,13 @@ bool marParameters::load( std::ifstream& is )
                {
                        is.read( ( char* )&s, sizeof( int ) );
                        _stringValues[ i ].resize( s );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        is.read( ( char* )_stringValues[ i ].c_str( ), s * sizeof( char ) );
+#else
+                       is.read( tmp , s * sizeof( char ) );
+                       _stringValues[ i ]=wxString(tmp);
+#endif
                } // rof
                return( true ); 
        }
@@ -422,7 +429,12 @@ wxArrayString marParameters::getRelationalArray( )
 
      for( i = 0; i < e_string_cont; i++, j += 2 ) {
                ret.Add( wxString( StringParamNames[ i ], wxConvUTF8)  );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                ret.Add( wxString( _stringValues[ i ].c_str( ), wxConvUTF8 ) );
+#else
+               ret.Add( wxString( _stringValues[ i ] ) );
+#endif
      } // rof
 
 
index c70a31bb05ed673ff088e259bb90363b80792412..9bdafc34c38ec2b639d2de885b3466a2c0a93f28 100644 (file)
@@ -724,14 +724,14 @@ void kVolume::buildIndex( )
        
 #ifdef KGFO_USE_VTK
        
-    vtkCharArraycarray;
-    vtkDoubleArraydarray;
-    vtkFloatArrayfarray;
-    vtkIntArrayiarray;
-    vtkShortArraysarray;
-    vtkUnsignedCharArrayucarray;
-    vtkUnsignedIntArrayuiarray;
-    vtkUnsignedShortArrayusarray;
+    vtkCharArray                       *carray;
+    vtkDoubleArray                     *darray;
+    vtkFloatArray                      *farray;
+    vtkIntArray                                *iarray;
+    vtkShortArray                      *sarray;
+    vtkUnsignedCharArray       *ucarray;
+    vtkUnsignedIntArray                *uiarray;
+    vtkUnsignedShortArray      *usarray;
        
     size = _dims[ CX ] * _dims[ CY ] * _dims[ CZ ];
 
@@ -741,82 +741,279 @@ void kVolume::buildIndex( )
        _vtk->SetDimensions( _dims[ CX ], _dims[ CY ], _dims[ CZ ] );
        _vtk->SetSpacing( _sizes[ CX ], _sizes[ CY ], _sizes[ CZ ] );
 
+       if (_type==CHAR)
+       {
+           carray = vtkCharArray::New( );
+           carray->SetArray( ( char* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           carray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_CHAR );
+#else
+               vtkInformation* infoC=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoC, VTK_CHAR, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( carray );
+           carray->Delete( );
+       }
+
+       if (_type==UCHAR)
+       {
+           ucarray = vtkUnsignedCharArray::New( );
+           ucarray->SetArray( ( uint8_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           ucarray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_UNSIGNED_CHAR );
+#else
+               vtkInformation* infoUC=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoUC, VTK_UNSIGNED_CHAR, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( ucarray );
+           ucarray->Delete( );
+       }
+
+
+
+
+
+       if (_type==SHORT)
+       {
+           sarray = vtkShortArray::New( );
+           sarray->SetArray( ( int16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           sarray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_SHORT );
+#else
+               vtkInformation* infoS=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoS, VTK_SHORT, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( sarray );
+           sarray->Delete( );
+}
+
+       if (_type==INT)
+       {
+           iarray = vtkIntArray::New( );
+           iarray->SetArray( ( int32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           iarray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_INT );
+#else
+               vtkInformation* infoI=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoI, VTK_INT, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( iarray );
+           iarray->Delete( );
+       }
+
+
+       if (_type==USHORT)
+       {
+           usarray = vtkUnsignedShortArray::New( );
+           usarray->SetArray( ( uint16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           usarray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_UNSIGNED_SHORT );
+#else
+               vtkInformation* infoUS=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoUS, VTK_UNSIGNED_SHORT, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( usarray );
+           usarray->Delete( );
+       }
+
+
+       if (_type==UINT)
+       {
+           uiarray = vtkUnsignedIntArray::New( );
+           uiarray->SetArray( ( uint32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           uiarray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_UNSIGNED_INT );
+#else
+               vtkInformation* infoUI=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoUI, VTK_UNSIGNED_INT, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( uiarray );
+           uiarray->Delete( );
+       }
+
+
+       if (_type==FLOAT)
+       {
+           farray = vtkFloatArray::New( );
+           farray->SetArray( ( float* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           farray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_FLOAT );
+#else
+               vtkInformation* infoF=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoF, VTK_FLOAT, 1);
+#endif
+           _vtk->GetPointData( )->SetScalars( farray );
+           farray->Delete( );
+       }
+
+                 
+       if (_type==DOUBLE)
+       {
+           darray = vtkDoubleArray::New( );
+           darray->SetArray( ( double* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           darray->SetNumberOfComponents( 1 );
+           _vtk->SetScalarType( VTK_DOUBLE );
+#else
+               vtkInformation* infoD=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoD, VTK_DOUBLE, 1);
+#endif
+
+
+           _vtk->GetPointData( )->SetScalars( darray );
+           darray->Delete( );
+       }
+
+
+
+
+
+
+/*
        switch( _type ) {
 
        case CHAR:
            carray = vtkCharArray::New( );
-           carray->SetNumberOfComponents( 1 );
            carray->SetArray( ( char* )( _raw ), size, 1 );
+
+//EED 2017-01-01 Migration VTK7
+//#if VTK_MAJOR_VERSION <= 5
+           carray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_CHAR );
+#else
+               vtkInformation* infoC=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoC, VTK_CHAR, 1);
+#endif
+
            _vtk->GetPointData( )->SetScalars( carray );
            carray->Delete( );
            break;
 
        case UCHAR:
            ucarray = vtkUnsignedCharArray::New( );
-           ucarray->SetNumberOfComponents( 1 );
            ucarray->SetArray( ( uint8_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           ucarray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_UNSIGNED_CHAR );
+#else
+               vtkInformation* infoUC=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoUC, VTK_UNSIGNED_CHAR, 1);
+#endif
            _vtk->GetPointData( )->SetScalars( ucarray );
            ucarray->Delete( );
            break;
 
        case SHORT:
            sarray = vtkShortArray::New( );
-           sarray->SetNumberOfComponents( 1 );
            sarray->SetArray( ( int16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           sarray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_SHORT );
+#else
+               vtkInformation* infoS=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoS, VTK_SHORT, 1);
+#endif
            _vtk->GetPointData( )->SetScalars( sarray );
            sarray->Delete( );
            break;
 
        case INT:
            iarray = vtkIntArray::New( );
-           iarray->SetNumberOfComponents( 1 );
            iarray->SetArray( ( int32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           iarray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_INT );
+#else
+               vtkInformation* infoI=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoI, VTK_INT, 1);
+#endif
            _vtk->GetPointData( )->SetScalars( iarray );
            iarray->Delete( );
            break;
 
        case USHORT:
            usarray = vtkUnsignedShortArray::New( );
-           usarray->SetNumberOfComponents( 1 );
            usarray->SetArray( ( uint16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           usarray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_UNSIGNED_SHORT );
+#else
+               vtkInformation* infoUS=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoUS, VTK_UNSIGNED_SHORT, 1);
+#endif
            _vtk->GetPointData( )->SetScalars( usarray );
            usarray->Delete( );
            break;
 
        case UINT:
            uiarray = vtkUnsignedIntArray::New( );
-           uiarray->SetNumberOfComponents( 1 );
            uiarray->SetArray( ( uint32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           uiarray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_UNSIGNED_INT );
+#else
+               vtkInformation* infoUI=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoUI, VTK_UNSIGNED_INT, 1);
+#endif
            _vtk->GetPointData( )->SetScalars( uiarray );
            uiarray->Delete( );
            break;
 
        case FLOAT:
            farray = vtkFloatArray::New( );
-           farray->SetNumberOfComponents( 1 );
            farray->SetArray( ( float* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           farray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_FLOAT );
+#else
+               vtkInformation* infoF=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoF, VTK_FLOAT, 1);
+#endif
            _vtk->GetPointData( )->SetScalars( farray );
            farray->Delete( );
            break;
                  
        case DOUBLE:
            darray = vtkDoubleArray::New( );
-           darray->SetNumberOfComponents( 1 );
            darray->SetArray( ( double* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+           darray->SetNumberOfComponents( 1 );
            _vtk->SetScalarType( VTK_DOUBLE );
+#else
+               vtkInformation* infoD=_vtk->GetInformation();
+               vtkDataObject::SetPointDataActiveScalarInfo(infoD, VTK_DOUBLE, 1);
+#endif
+
+
            _vtk->GetPointData( )->SetScalars( darray );
            darray->Delete( );
            break;
                  
        } // fswitch
-         
+*/  
+
     } // fi
 
 #endif // KGFO_USE_VTK
index 586a801a6e33db7e29c8c194a4b0c35a8215589c..4b3981c9adb66973fdd7d98c834a00e2c95df8c6 100644 (file)
@@ -84,12 +84,22 @@ void vtkSTLExtractor::calculate(){
                //  1. CALCULATING THE INNER SURFACE
                // ------------------------------------------------------------------------
            vtkImageGaussianSmooth *gaussFilter = vtkImageGaussianSmooth::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         gaussFilter->SetInput(volume);
+#else
+        gaussFilter->SetInputData(volume);
+#endif
         gaussFilter->SetDimensionality(3);
        gaussFilter->SetStandardDeviation(sigmaLevel);
     
         vtkMarchingCubes *cubesFilter = vtkMarchingCubes::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         cubesFilter->SetInput(gaussFilter->GetOutput());
+#else
+        cubesFilter->SetInputData(gaussFilter->GetOutput());
+#endif
         cubesFilter->SetValue(0,marchingCubesLevel);
                cubesFilter->ComputeGradientsOn ();
         cubesFilter->ComputeScalarsOn ();
@@ -97,11 +107,21 @@ void vtkSTLExtractor::calculate(){
            
                // Unir puntos duplicados y remover primitivas degeneradas
                vtkCleanPolyData *cleanFilter = vtkCleanPolyData::New();
-        cleanFilter->SetInput ( cubesFilter->GetOutput() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+        cleanFilter->SetInput( cubesFilter->GetOutput() );
+#else
+        cleanFilter->SetInputData( cubesFilter->GetOutput() );
+#endif
                
                // crea poligonos triangulares
         vtkTriangleFilter *triangleFilter = vtkTriangleFilter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         triangleFilter->SetInput( cleanFilter->GetOutput() );
+#else
+        triangleFilter->SetInputData( cleanFilter->GetOutput() );
+#endif
         triangleFilter->Update();
 
                innerSurface->DeepCopy(triangleFilter->GetOutput());
@@ -111,9 +131,19 @@ void vtkSTLExtractor::calculate(){
                //  2. CALCULATING THE OUTER SURFACE
                // ------------------------------------------------------------------------
                vtkImageContinuousDilate3D *dilateFilter = vtkImageContinuousDilate3D ::New();
-        dilateFilter->SetInput (volume);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+        dilateFilter->SetInput(volume);
+#else
+        dilateFilter->SetInputData(volume);
+#endif
                dilateFilter->SetKernelSize (3, 3, 3);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                gaussFilter->SetInput( dilateFilter->GetOutput());
+#else
+               gaussFilter->SetInputData( dilateFilter->GetOutput());
+#endif
         triangleFilter->Update();
                
            outerSurface->DeepCopy(triangleFilter->GetOutput());