]> Creatis software - creaMaracasVisu.git/commitdiff
#3138 creaMaracasVisu Feature New Normal - branch vtk7itk4wx3
authorEduardo DAVILA <davila@localhost.localdomain>
Wed, 4 Oct 2017 12:45:41 +0000 (14:45 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Wed, 4 Oct 2017 12:45:41 +0000 (14:45 +0200)
100 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/Ruler01_XY.bbg
bbtk/bbs/boxes/Ruler01_XY.bbs
bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx
bbtk/src/bbcreaMaracasVisuSliceImage.cxx
bbtk/src/bbcreaMaracasVisuTubeFilter.cxx
bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx
bbtk/src/bbmaracasvisuAnimationSphere.cxx
bbtk/src/bbmaracasvisuAxeVolume.cxx
bbtk/src/bbmaracasvisuDrawAxe3D.cxx
bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx
bbtk/src/bbmaracasvisuImageActor.cxx
bbtk/src/bbmaracasvisuImageChangeInformation.cxx
bbtk/src/bbmaracasvisuTransferFunctionView.cxx
bbtk/src/bbmaracasvisuTransferFunctionView.h
lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx
lib/GUI/Base/VolumeRenderer/volumerendererdata.h
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/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/CutModelPolygon.cxx
lib/maracasVisuLib/src/CutModule/kernel/CutModelSaveBinInfo.cxx
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.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/LayerImageBase.cxx
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/manualContour/manualViewBaseContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/baseFilterManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx
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/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/wxMaracasMultipleVolumeRendererManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.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/volume.cxx
lib/maracasVisuLib/src/kernel/vtkSTLExtractor.cpp

index d699297bad3e3027e489d303a08c0797c28f9f4e..4b8e3d7ba7bcf4f079135017af67ceeb65ab12c6 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)
 
 #==================================
 
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 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 e36413448e29d70fe33e61093d2f50958584bbcd..5c513422088d8bcc769e309305fc8a33ead7763f 100644 (file)
@@ -62,7 +62,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;
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 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 dcbac3431771099a0c8cc2018b7be9c631810391..d640d8d2a30877d44af57e4d128ffc9a55c6e0ea 100644 (file)
@@ -43,9 +43,21 @@ void ImageActor::Process()
 
                if(img != NULL){
                        
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        imageshiftscale->SetInput( img );       
+#else
+                       imageshiftscale->SetInputData( img );   
+#endif
                        imageshiftscale->SetOutputScalarTypeToUnsignedChar();   
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        imageactor->SetInput( imageshiftscale->GetOutput() );   
+#else
+                       imageshiftscale->Update();
+                       imageactor->SetInputData( imageshiftscale->GetOutput() );       
+#endif
                        if (transform!=NULL){
                          imageactor->SetUserTransform( transform );    
                        } // transform
index 2c0e5108500a2cced85ddf2a6d121acb0420c5d4..4a9c2d3967aad942d70d73f6d01df40ab862d8b4 100644 (file)
@@ -35,7 +35,8 @@ void ImageChangeInformation::Process()
        int ext[6];
        double spc[3];
        vtkImageData* img = bbGetInputIn();
-       if(img!=NULL){
+       if(img!=NULL)
+       {
                if(mchange != NULL)
                {
                        mchange->Delete();
@@ -47,7 +48,14 @@ void ImageChangeInformation::Process()
                origin[1]=0.0;
                origin[2]=0.0;
                img->SetOrigin(origin);         
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mchange->SetInput( img );
+#else
+               mchange->SetInputData( img );
+#endif
+
 //EED 2016 15 06
 //             mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
                mchange->SetOutputOrigin (0, 0, 0);
@@ -61,7 +69,7 @@ void ImageChangeInformation::Process()
                }
                mchange->Update();    //important
                bbSetOutputOut( mchange->GetOutput() );
-       }  
+       } // img
 }
 
 void ImageChangeInformation::bbUserSetDefaultValues()
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 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..4931d51876ba5d43680e40b94595a25280a1e477 100644 (file)
@@ -111,12 +111,26 @@ int VolumeRendererManager::addVolume(vtkImageData* img, vtkRenderWindowInteracto
 
 
         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 +315,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 +467,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..ac531f2bf5326e8b3b6a4427153e0a0b2e9d5854 100644 (file)
 
 #include <vtkVolumeRayCastMapper.h>
 
+
+//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
 //    #if VTK_MINOR_VERSION >= 6
@@ -68,13 +76,13 @@ VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, vtkRende
 
 }
 
-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();
@@ -151,20 +159,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();
 }
@@ -212,7 +228,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();
 
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 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 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 a0cfd9ae1e2cb27a3ffcf29866f95e0da7fc886a..2947bdc03f6586de3c99d7f84d4e5ec81bb47340 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  
@@ -460,8 +467,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
 
 }
@@ -559,10 +573,17 @@ void ContourExtractData::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
+
 
        if (imagedataMaskResult!=NULL)
        {
@@ -570,10 +591,17 @@ void ContourExtractData::InitVtkImagesResult()
        }
        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 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 299b737dc7a1a2605446d95a3a43972bd744e0a5..d94117402b086b1f0f1d43fbf4d414cf9d673641 100644 (file)
@@ -439,14 +439,22 @@ printf("EED ColorLayerImageView::ConfigLookupTable   Make something with transpa
 
   thresholdTable->Build( );
 
-
   //EO CM EED
 }
 
 //----------------------------------------------------------------------------
 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 2549d1471dc4e2a94361101c51786545b52d10a8..316f7851eb5561ed15c7bd9fed4fd6abb2378a97 100644 (file)
@@ -191,8 +191,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;
@@ -205,7 +212,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;                             
@@ -223,7 +237,15 @@ void LayerImageBase::SetImage(vtkImageData* image)
        _image->GetScalarRange( _range );
        _thresholdTable = vtkLookupTable::New();
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _imageChangeInformation->SetInput(_image);
+#else
+       _imageChangeInformation->SetInputData(_image);
+       _imageChangeInformation->Update();
+#endif
+
 }
 
 //------------------------------------------------------------------------------
@@ -237,9 +259,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 );  
 
 }
@@ -409,12 +431,10 @@ void LayerImageBase::onThreshold()
                double y=GetY();
                double z=GetZ();
 
-
                x = x*_spcBase[0];
                y = y*_spcBase[1];
                z = z*_spcBase[2];
 
-
                CleanXYZ(x,y,z);
 
                vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera();
@@ -474,7 +494,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)
@@ -500,15 +527,34 @@ 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
                
                _scalarbarActor->SetLookupTable( _thresholdTable );
 //             _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
@@ -516,10 +562,7 @@ void LayerImageBase::onThreshold()
                _scalarbarActor->SetNumberOfLabels(4);
                int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
                _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
-
 //             _scalarbarActor->SetTextPad(4);  ??
-
-
                } // _image
 }
 
@@ -569,7 +612,7 @@ void LayerImageBase::onThresholdRemove()
                baseView->GetRenderer()->RemoveActor( _scalarbarActor );
 
                _actorPresent = false;
-       }
+       }  // if _actorPresent
 }
 
 //----------------------------------------------------------------------------
@@ -594,7 +637,5 @@ void LayerImageBase::GetImageScalarRange()
        _range[1]=max;
 }
 
-
-
 // EOF
 
index 1f132b5b4d531179ec94316ad5710a8f64818578..2953844359ef8ae225d078ba9985b0fb0083e5c4 100644 (file)
@@ -215,6 +215,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 );
 }
@@ -241,7 +248,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);
index 9c3760aea88a0b4b5d74ea7e1140dd4ecc22177a..36e9c9b11e9da5d6d1d4ed84f6246e8f0725f127 100644 (file)
@@ -31,6 +31,14 @@ 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();
@@ -38,7 +46,8 @@ void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* ca
 //             boxwidget->GetPlanes(planes);
 //             _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
                _vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
-       }
+       } // if volume
+
 
 //     _actor->VisibilityOn();
 
@@ -57,3 +66,14 @@ void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvo
 {
        _vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
 }
+
+//-------------------------------------------------------------------
+void boxSurfaceObserver::SetFilters(vtkAlgorithm *mCubes , vtkAlgorithm *tissueStripper , vtkAlgorithm *tissueClipper)
+{
+       _mCubes                 = mCubes;
+       _tissueStripper = tissueStripper;
+       _tissueClipper  = tissueClipper;
+
+
+}
+
index 11e4d591ac221ac662a473e05d0715761acd8199..92892da6461affbc389f52313b7d48ac5955ebd6 100644 (file)
@@ -39,10 +39,17 @@ class boxSurfaceObserver : public vtkCommand
        public:
                vtkPlanes                                       *_planes;
                vtkProp                                         *_actor;
+
+               vtkAlgorithm                            *_mCubes;
+               vtkAlgorithm                            *_tissueStripper;
+               vtkAlgorithm                            *_tissueClipper;
                vtkVolumeRayCastMapper          *_vtkVolumeRayCastMapper;
 
                boxSurfaceObserver() 
                {  
+                       _mCubes                                 = NULL;
+                       _tissueStripper                 = NULL;
+                       _tissueClipper                  = NULL;
                        _vtkVolumeRayCastMapper = NULL;
                }
 
@@ -58,8 +65,8 @@ class boxSurfaceObserver : public vtkCommand
                void SetPlanes(vtkPlanes *planes);
                void SetActor(vtkProp *actor);
                void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
+               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 198b7b1a5e55678bcff87ec2eeac3b5cbce448b6..e1588bf4f3cae10683c1d5523ac6f3e95a2bcee5 100644 (file)
@@ -315,7 +315,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 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 1139e035b0bf9c263c438db85202891587b1225f..4156a3d54492d2c5cb7394dd916002e6892a752f 100644 (file)
@@ -54,9 +54,18 @@ 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
+
+
 }
 
 //---------------------------------------------------------------------------
index 0a9f995c57616ad9292aaf3c9852d7f44b9fdd37..0ca0de29abf6a7a94ab9f68fbfb2d25b696f9970 100644 (file)
@@ -91,7 +91,12 @@ void baseFilterManualPaint::SetImages(vtkImageData *image, vtkImageData *image2)
        _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;
@@ -99,7 +104,14 @@ void baseFilterManualPaint::SetImages(vtkImageData *image, vtkImageData *image2)
        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 c14e9511348f57ac1bf39256258777ebdfbaf2d9..95dc7a6f121e2068e3852cfbe2a63147e9e4cffe 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
+
 }
 
 /*
@@ -163,12 +170,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 a888215dc78262188dcaa7fade05be4dc4b72176..646baf280d5cc60011db3a2a02c141f32ef7d294 100644 (file)
@@ -60,9 +60,7 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
                _tissuePlanes[i]->Delete();
                _tissueClipper[i]->Delete();
        }
-       _outlineData->Delete();
-       _mapOutline->Delete();
-       _outline->Delete();
+
        // Volume
        _tfun->Delete();
        _ctfun->Delete();
@@ -78,11 +76,7 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
        }
        _observerV-> Delete();
 }
-//-------------------------------------------------------------------
-vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
-{
-       return _outline;
-}
+
 //-------------------------------------------------------------------
 vtkClipPolyData* vtkClipping3DDataViewer::GetTissueClipper(int id)
 {
@@ -209,9 +203,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 );
 }
 
@@ -226,21 +230,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  
@@ -255,19 +292,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
 }
 
 //-----------------------------------------------------------------------------
@@ -351,7 +388,15 @@ 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);
 
@@ -482,18 +527,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);
 }
 
 
@@ -501,6 +534,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)
@@ -772,7 +813,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..0c998de28443cfb425a546aaa6eba842586191d0 100644 (file)
@@ -57,7 +57,8 @@ public:
        virtual ~vtkClipping3DDataViewer();
 
 //     vtkImageActor*                  GetImageActor(int id);
-       vtkActor*                               GetOutlineActor();
+
+
        vtkClipPolyData*                GetTissueClipper(int id);
        vtkPolyDataMapper*              GetTissueMapper(int id);
        vtkPlanes*                              GetTissuePlanes(int id);
@@ -146,11 +147,6 @@ private:
        vtkPlanes                               *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
        vtkClipPolyData                 *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
 
-       // outline
-       vtkOutlineFilter                *_outlineData;
-       vtkPolyDataMapper               *_mapOutline;
-       vtkActor                                *_outline;
-
        /// Volume
        vtkPiecewiseFunction            *_tfun;
        vtkColorTransferFunction        *_ctfun;
index 4b0aef797825d3695f89eb07c8d3e1b0885c1ae9..9073c5df7dd4c7276acf740415ab48efb3ea46aa 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,105 @@ 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 ();
+       vtkStripper *stripper = vtkStripper::New();
+       stripper->SetInputData( 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->SetInputData( pd );
+       pd->Delete();
+       vtkAppendPolyData *append = vtkAppendPolyData::New();
+       append->AddInputData( input );
+       append->AddInputData( triangle->GetOutput() );
+       triangle->Delete();
+       vtkCleanPolyData *clean = vtkCleanPolyData::New();
+       clean->SetInputData( 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();
+       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 242c9bd68a415e957e507a4b342621031bfd4746..f35206765b43494bb0fc6c36e5063b224b5656d7 100644 (file)
@@ -142,9 +142,16 @@ std::vector<double>*     vtkMPR3DDataViewer::GetctFunVectorBlue()
 //-------------------------------------------------------------------
 void vtkMPR3DDataViewer::SetImage()
 {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
        _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
        _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+       _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+       _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+       _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -181,7 +188,12 @@ void vtkMPR3DDataViewer::Configure()
        
        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];
@@ -269,17 +281,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();
        
@@ -295,14 +317,29 @@ void vtkMPR3DDataViewer::Configure()
                }
 
                _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();
@@ -315,15 +352,30 @@ 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
                
        
 
@@ -332,17 +384,30 @@ void vtkMPR3DDataViewer::Configure()
                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 3e4c1a1deb86a09eff525c365f7aa3b00820de9c..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
 }
 
 //-------------------------------------------------------------------
@@ -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 bb9d79ad64b0e0d20175afb5141149289062a5b3..67606299255f14f666ae5337dec6a3314de33f35 100644 (file)
@@ -646,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 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..a7680bb84171bd365bb03b189a5a1d18c1c4f411 100644 (file)
@@ -56,7 +56,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();
 }
index 225204185181b37962493947f6b487c54961ace1..af20535fb7f48826e81c29c70ae9c2ab110c9360 100644 (file)
@@ -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
+
 }
 
 //-------------------------------------------------------------------
@@ -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           );
index 557bf671553c3b3cf98a6969ef172e41fcd12544..5d376a3d95a304eb92d3b9ffaa62330274eff087 100644 (file)
@@ -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();
@@ -1061,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());
@@ -1080,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 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
 }
 
 //----------------------------------------------------------------------------
index 2f3f9fa7b572419c9ee20aa8f4a45397532a2000..e09c1ce72ca9716686af6faa4d0f2983490e2734 100644 (file)
@@ -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]));
index 175c07439f1a9a7d3a26726034c8ca60df803c81..393b3f1160bf84c6ea866df1e7bba3c60459cc32 100644 (file)
@@ -108,10 +108,15 @@ void wxVtk2DBaseView::ResetView()
        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);
        }
@@ -151,7 +156,12 @@ void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
 {
        if (_imageViewer2XYZ!=NULL)
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
+#else
+               _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
+#endif
        } // if _imageViewer2XYZ
 }
 
@@ -193,9 +203,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);
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 bf26ee2e700c500d42103834b5ad1c3888444965..9dc0af6bf65b99e876c751321aebb6b78a34cf13 100644 (file)
@@ -530,16 +530,32 @@ 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->SetInputData( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+        pdcf->SetInputData( filtro->GetOutput() );
+        cpd->SetInputData( pdcf->GetOutput() );
+#endif
 
                // 1.2 se escribe a disco el archivo stl de la superficie interna
         cpd->Update();
         vtkSTLWriter *writer = vtkSTLWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         writer->SetInput( cpd->GetOutput() );
+#else
+        writer->SetInputData( cpd->GetOutput() );
+#endif
+
                filename =prefix;
         writer->SetFileName(filename.c_str());
         writer->SetFileTypeToASCII();
index 803bea180e9eed803882a9e249172eab98dd2b58..87b4fa3d909c507d49fb273a68eb6e5db4f79b17 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()
@@ -115,7 +115,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);
        }
@@ -153,7 +160,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){
                _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
@@ -346,6 +360,15 @@ void wxVtkMPR2DView::Refresh()
                                
                                
                        } // if back
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+                               // ..
+#else
+                               _ptsA->Modified();
+                               _ptsB->Modified();
+#endif
+
                        _backX=xx;
                        _backY=yy;
                        _backZ=zz;
index 11e0030810ee30ea7dd14678704779236837eeba..7a66d83d0a963ad797aed221182a3485923c2548 100644 (file)
@@ -47,7 +47,6 @@ public:
                        vtkMPRBaseData  *GetVtkmprbasedata();
        virtual int                             GetActualSlice();
        virtual void                    SetActualSlice(int slice);
-
                        bool                    IfMouseTouchX(double x, double y, double z);
                        bool                    IfMouseTouchY(double x, double y, double z);
                        bool                    IfMouseTouchZ(double x, double y, double z);
@@ -56,20 +55,14 @@ public:
                        void                    MoveZ(double x, double y, double z);
                        void                    ChangeAxisColor(double x, double y, double z);
        virtual void                    TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2);
-
                        void                    SetVisibleAxis(bool ok);
     virtual int             GetDirection();
 
-
-
 private:
-
        int                                                     _backX;
        int                                                     _backY;
        int                                                     _backZ;
-
        bool                                            _visibleAxis;
-
        int                                                     _direction;
        vtkPoints                                       *_ptsA;
        vtkActor                                        *_lineAActor;
@@ -83,5 +76,4 @@ private:
        vtkInteractorStyleMPRView       *_interactorstylemprview;
 };
 
-
 #endif /*WXVTKMPR2DVIEW_H_*/
index 1d9ff304bb673656854c3d459791030b54ee880f..d6fb6a53eebbe33672756b43486172ed03026a83 100644 (file)
@@ -186,39 +186,24 @@ void wxVtkMPR3DView::RemoveActor(vtkActor* actor)
 void wxVtkMPR3DView::Configure()
 {
        vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
-
        _wxvtk3Dbaseview->Configure();
        _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel();
-
-//EED 27 Mai 2009
-//     _wxvtk3Dbaseview->GetRenderer()->Clear();
-
        // Actors are added to the renderer.
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
-
-
        _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
-
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(0)  );    // _saggital
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(1)  );    // _axial
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(2)  );    // _coronal
-
-
-       
-       // vtkPointWidget
-       //if(_myCallback!=NULL){
-               //_myCallback->Delete();
-
-       //}
        vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New();
        _myCallback->SetWxVtkMPR3DView(this);
-
-
        if(imageData){
-               if(_pointWidget==NULL){
+               if(_pointWidget==NULL)
+               {
                        _pointWidget = vtkPointWidget::New();
                }
+//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();
@@ -230,7 +215,12 @@ 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);
 
@@ -248,14 +238,23 @@ void wxVtkMPR3DView::Configure()
                _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd );
 
                if(_vtkplane==NULL){
-                       _vtkplane = vtkPolyData::New();
+                       _vtkplane               = vtkPolyData::New();
+                       _probe                  = vtkProbeFilter::New();
+                       _contourMapper  = vtkPolyDataMapper::New();
 
-                       _probe = vtkProbeFilter::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);
@@ -271,7 +270,13 @@ void wxVtkMPR3DView::Configure()
                }
 
                _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();
@@ -349,11 +354,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();
 }
 
@@ -370,7 +385,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);
        }
@@ -555,7 +576,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 );
@@ -568,6 +594,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)
@@ -647,9 +679,9 @@ void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible){
                        // step 5 Refresh
                        _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
 
-               }
+               } // if visible
                _vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible);
-       }
+       } // if visible 
 }
 
 
@@ -662,8 +694,8 @@ void wxVtkMPR3DView::VisiblePointWidget( bool visible )
                        _pointWidget->On();
                } else {
                        _pointWidget->Off();
-               }
-       }
+               } // visible
+       } // _pointWidget
 }
 
 //-------------------------------------------------------------------
@@ -677,9 +709,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
@@ -690,11 +723,9 @@ void wxVtkMPR3DView::showOutlineActor(bool value)
        if(value == true)
        {
                _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
-       }
-       else
-       {
+       } else {
                _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor );
-       }
+       } // value
 
 }
 
@@ -737,7 +768,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];
@@ -757,20 +793,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];
@@ -794,7 +851,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( );
@@ -802,7 +864,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( );
@@ -855,14 +924,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();
@@ -876,7 +955,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 a46afe60ab19da8ac925ed683915fa7629dbd034..4d42b26342bcdebb9ca990a465bd4d7d10e3bfbc 100644 (file)
@@ -76,7 +76,6 @@ public:
 
        void setColorTransferFunction(vtkColorTransferFunction* colortable);
 
-       
        //Free planes
        //-------------------------------------------------------------------
        void ConfigureFreePlanes();
@@ -88,7 +87,6 @@ public:
        void SetColorWindow(double colorWindow);
        void SetColorLevel(double colorLevel);
 
-       
 private:
        wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
        vtkMPR3DDataViewer                              *_vtkmpr3Ddataviewer;
@@ -106,11 +104,10 @@ private:
        vtkPolyDataMapper                               *_contourMapper;
 
        //Free planes
-       vtkImagePlaneWidget *_planeWidgetX;
-       vtkImagePlaneWidget *_planeWidgetY;
-       vtkImagePlaneWidget *_planeWidgetZ;
+       vtkImagePlaneWidget                     *_planeWidgetX;
+       vtkImagePlaneWidget                     *_planeWidgetY;
+       vtkImagePlaneWidget                     *_planeWidgetZ;
        
-
 protected:
 };
 
index c828e1e72a693369937e10e39891b8f353b537a4..a2039f6d9545815ec671d8493454498b8d5e7606 100644 (file)
@@ -581,7 +581,6 @@ void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ(wxCommandEvent& event)
 void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
 {
        _wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
-
 }
 
 //-------------------------------------------------------------------
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 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());