#-----------------------------------------------------------------------------
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)
#==================================
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
# ----------------------------------
# - 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
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
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
CONNECTION
Box00:BoxChange2:Box04:In
NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView1:Box00:wxvtkbaseview
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - 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
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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
-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
Box01:wxVtkBaseView4:Box08:wxvtkbaseview
NumberOfControlPoints:0
CONNECTION
-Box01:Renderer4:Box08:vtkRenderer
-NumberOfControlPoints:0
-CONNECTION
Box08:BoxChange2:Box09:BoxExecute
NumberOfControlPoints:0
CONNECTION
connect Box01.wxVtkBaseView4 Box08.wxvtkbaseview
-connect Box01.Renderer4 Box08.vtkRenderer
+#connect Box01.Renderer4 Box08.vtkRenderer
connect Box08.BoxChange2 Box09.BoxExecute
# ----------------------------------
# - 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
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
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
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
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
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
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
# ----------------------------------
# - 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
connect Box09.Out Box00.Image
-connect Box10.Out Box11.In
-
connect Box11.Out Box09.In
+connect Box01.Out Box11.In
+
# Complex input ports
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
--- /dev/null
+# ----------------------------------
+# - 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
-# ---------------------------------------------------------------------
-#
-# 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
# ----------------------------------
# - 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
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
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
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
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
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
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
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
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
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
CONNECTION
Box14:Out:Box17:In2
NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box32:In
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box32:BoxExecute
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - 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
include vtk
include std
include creaMaracasVisu
+include wx
define Ruler01_XY creaMaracasVisu
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
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 " "
// 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;
//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();
}
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 );
}
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();
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();
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);
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();
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();
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);
}
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 );
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
int ext[6];
double spc[3];
vtkImageData* img = bbGetInputIn();
- if(img!=NULL){
+ if(img!=NULL)
+ {
if(mchange != NULL)
{
mchange->Delete();
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);
}
mchange->Update(); //important
bbSetOutputOut( mchange->GetOutput() );
- }
+ } // img
}
void ImageChangeInformation::bbUserSetDefaultValues()
_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() );
private:
//HistogramWidget *mwxwidget;
- HistogramDialogComboBox *mwxwidget;
- vtkImageData* _currentimg;
+ HistogramDialogComboBox *mwxwidget;
+ vtkImageData* _currentimg;
- vtkPiecewiseFunction* _tfun;
- vtkColorTransferFunction* _ctfun;
+ vtkPiecewiseFunction* _tfun;
+ vtkColorTransferFunction* _ctfun;
};
#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()
{
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);
#include "surfacerenderingimagestencilexport.h"
-#include "vtkObjectFactory.h"
#include "vtkMetaImageWriter.h"
#include "math.h"
+
vtkStandardNewMacro(SurfaceRenderingImageStencilExport)
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();
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
+
#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:
}
_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);
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{
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;
_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();
_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();
_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 );
_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);
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]);
// 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();
_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();
_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();
}
-void ImagePlaneWidget::invariant(){
+void ImagePlaneWidget::invariant()
+{
if(_img == NULL){
throw "Image data is not initialized";
}
}
-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();
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();
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();
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();
#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
}
-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();
#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();
}
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();
#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);
//----------------------------------------------------------------------------
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 );
// 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();
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");
}
_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
_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);
}
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);
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;
}// for i
_inImage->Modified();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_inImage->Update();
+#else
+ // ..
+#endif
}
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();
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();
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);
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
+
}
// 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
imagedataValueResult->Modified();
imagedataMaskResult->Modified();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagedataValueResult->Update();
imagedataMaskResult->Update();
+#else
+ //...
+#endif
+
} // if
}
}
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)
{
}
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
+
}
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());
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());
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());
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);
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;
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;
_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
+
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
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 );
}
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();
} // !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)
_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() );
_scalarbarActor->SetNumberOfLabels(4);
int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
_scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
-
// _scalarbarActor->SetTextPad(4); ??
-
-
} // _image
}
baseView->GetRenderer()->RemoveActor( _scalarbarActor );
_actorPresent = false;
- }
+ } // if _actorPresent
}
//----------------------------------------------------------------------------
_range[1]=max;
}
-
-
// EOF
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 );
}
//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);
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();
// boxwidget->GetPlanes(planes);
// _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
_vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
- }
+ } // if volume
+
// _actor->VisibilityOn();
{
_vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
}
+
+//-------------------------------------------------------------------
+void boxSurfaceObserver::SetFilters(vtkAlgorithm *mCubes , vtkAlgorithm *tissueStripper , vtkAlgorithm *tissueClipper)
+{
+ _mCubes = mCubes;
+ _tissueStripper = tissueStripper;
+ _tissueClipper = tissueClipper;
+
+
+}
+
public:
vtkPlanes *_planes;
vtkProp *_actor;
+
+ vtkAlgorithm *_mCubes;
+ vtkAlgorithm *_tissueStripper;
+ vtkAlgorithm *_tissueClipper;
vtkVolumeRayCastMapper *_vtkVolumeRayCastMapper;
boxSurfaceObserver()
{
+ _mCubes = NULL;
+ _tissueStripper = NULL;
+ _tissueClipper = NULL;
_vtkVolumeRayCastMapper = NULL;
}
void SetPlanes(vtkPlanes *planes);
void SetActor(vtkProp *actor);
void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
+ void SetFilters(vtkAlgorithm *_mCubes , vtkAlgorithm *_tissueStripper , vtkAlgorithm *_tissueClipper);
};
-
#endif /*BOXSURFACEOBSERVER_H_*/
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;
}
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());
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( );
}
// ----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
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(
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 );
}
// ----------------------------------------------------------------------------------
_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();
_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();
_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
+
+
}
//---------------------------------------------------------------------------
_image2 = image2;
int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_image->GetWholeExtent(ext);
+#else
+ _image->GetExtent(ext);
+#endif
_minX = 0;
_minY = 0;
_minZ = 0;
if (_image2!=NULL)
{
int extB[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_image2->GetWholeExtent(extB);
+#else
+ _image2->GetExtent(extB);
+#endif
+
_maxX = std::min( ext[1]-ext[0] , extB[1]-extB[0] );
_maxY = std::min( ext[3]-ext[2] , extB[3]-extB[2] );
_maxZ = std::min( ext[5]-ext[4] , extB[5]-extB[4] );
//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
+
}
/*
*/
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
_tissuePlanes[i]->Delete();
_tissueClipper[i]->Delete();
}
- _outlineData->Delete();
- _mapOutline->Delete();
- _outline->Delete();
+
// Volume
_tfun->Delete();
_ctfun->Delete();
}
_observerV-> Delete();
}
-//-------------------------------------------------------------------
-vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
-{
- return _outline;
-}
+
//-------------------------------------------------------------------
vtkClipPolyData* vtkClipping3DDataViewer::GetTissueClipper(int id)
{
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 );
}
{
// 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
_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
}
//-----------------------------------------------------------------------------
// 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);
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);
}
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)
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){
virtual ~vtkClipping3DDataViewer();
// vtkImageActor* GetImageActor(int id);
- vtkActor* GetOutlineActor();
+
+
vtkClipPolyData* GetTissueClipper(int id);
vtkPolyDataMapper* GetTissueMapper(int id);
vtkPlanes* GetTissuePlanes(int id);
vtkPlanes *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
vtkClipPolyData *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
- // outline
- vtkOutlineFilter *_outlineData;
- vtkPolyDataMapper *_mapOutline;
- vtkActor *_outline;
-
/// Volume
vtkPiecewiseFunction *_tfun;
vtkColorTransferFunction *_ctfun;
=========================================================================*/
#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);
//----------------------------------------------------------------------------
{
}
+
//----------------------------------------------------------------------------
-// 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)
{
#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.
//-------------------------------------------------------------------
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
}
//-------------------------------------------------------------------
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];
_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();
}
_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();
_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
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();
{
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();
}
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 );
_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;
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
}
//-------------------------------------------------------------------
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();
_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];
_planeWidget=planeWidget;
}
+//-------------------------------------------------------------------
+ void vtkmyPWCallback_3DPointWidget::SetVtkPolyData( vtkPolyData *vtkplane)
+{
+ _vtkplane=vtkplane;
+}
+
+//-------------------------------------------------------------------
+void vtkmyPWCallback_3DPointWidget::SetVtkProbeFilter( vtkProbeFilter *probe)
+{
+ _probe=probe;
+}
+
+
+
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_*/
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];
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();
_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();
}
_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);
_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);
_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);
} else {
_imageData->GetScalarRange(rangeA);
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_xyplot->RemoveAllInputs();
+#else
+ _xyplot->RemoveAllDataSetInputConnections();
+#endif
/*
if ( _histogrammeVector!=NULL )
{
*/
_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]);
}
_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
+
}
//-------------------------------------------------------------------
}
}
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 );
//_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();
//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();
//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();
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);
// 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();
{
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();
}
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);
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();
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();
// 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());
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() );
_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();
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();
}
}
_imageSphere->Modified();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_imageSphere->Update();
+#else
+ // ..
+#endif
}
//----------------------------------------------------------------------------
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]));
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);
}
{
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
}
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);
_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();
_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 ();
_vtkclipping3Ddataviewer->SetRenderer(this->GetWxvtk3Dbaseview()->GetRenderer());
_vtkclipping3Ddataviewer->SetInteractor(this->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor());
}
+
//-------------------------------------------------------------------
void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vtkclipping3Ddataviewer)
{
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();
//-------------------------------------------------------------------
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()
_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);
}
_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 );
} // 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;
vtkMPRBaseData *GetVtkmprbasedata();
virtual int GetActualSlice();
virtual void SetActualSlice(int slice);
-
bool IfMouseTouchX(double x, double y, double z);
bool IfMouseTouchY(double x, double y, double z);
bool IfMouseTouchZ(double x, double y, double z);
void 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;
vtkInteractorStyleMPRView *_interactorstylemprview;
};
-
#endif /*WXVTKMPR2DVIEW_H_*/
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();
{
_planeWidget = vtkPlaneWidget::New();
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_planeWidget->SetInput( imageData );
+#else
+ _planeWidget->SetInputData( imageData );
+#endif
_myCallback->SetVtkPlaneWidget(_planeWidget);
_planeWidget->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);
}
_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();
{
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();
}
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);
}
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 );
_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)
// step 5 Refresh
_wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
- }
+ } // if visible
_vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible);
- }
+ } // if visible
}
_pointWidget->On();
} else {
_pointWidget->Off();
- }
- }
+ } // visible
+ } // _pointWidget
}
//-------------------------------------------------------------------
} else {
_planeWidget->Off();
- _contourPlaneActor->VisibilityOff();
- }
- }
+ _contourPlaneActor->VisibilityOff();
+ } // if visible
+ _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
+ } // _planeWidget
}
//CPR: Method added 30 Nov 2009
if(value == true)
{
_wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
- }
- else
- {
+ } else {
_wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor );
- }
+ } // value
}
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];
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];
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( );
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( );
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();
// 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 );
void setColorTransferFunction(vtkColorTransferFunction* colortable);
-
//Free planes
//-------------------------------------------------------------------
void ConfigureFreePlanes();
void SetColorWindow(double colorWindow);
void SetColorLevel(double colorLevel);
-
private:
wxVtk3DBaseView *_wxvtk3Dbaseview;
vtkMPR3DDataViewer *_vtkmpr3Ddataviewer;
vtkPolyDataMapper *_contourMapper;
//Free planes
- vtkImagePlaneWidget *_planeWidgetX;
- vtkImagePlaneWidget *_planeWidgetY;
- vtkImagePlaneWidget *_planeWidgetZ;
+ vtkImagePlaneWidget *_planeWidgetX;
+ vtkImagePlaneWidget *_planeWidgetY;
+ vtkImagePlaneWidget *_planeWidgetZ;
-
protected:
};
void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
{
_wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
-
}
//-------------------------------------------------------------------
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();
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();
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();
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();
: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;
}
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;
}
}
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagedata->Update();
+#else
+ vtkimagedata->Modified();
+#endif
}
// -------------------------------------------------------------------------
// 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();
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] );
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( );
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( ));
// 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();
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);
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 );
* 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
#ifdef KGFO_USE_VTK
- vtkCharArray* carray;
- vtkDoubleArray* darray;
- vtkFloatArray* farray;
- vtkIntArray* iarray;
- vtkShortArray* sarray;
- vtkUnsignedCharArray* ucarray;
- vtkUnsignedIntArray* uiarray;
- vtkUnsignedShortArray* usarray;
+ vtkCharArray *carray;
+ vtkDoubleArray *darray;
+ vtkFloatArray *farray;
+ vtkIntArray *iarray;
+ vtkShortArray *sarray;
+ vtkUnsignedCharArray *ucarray;
+ vtkUnsignedIntArray *uiarray;
+ vtkUnsignedShortArray *usarray;
size = _dims[ CX ] * _dims[ CY ] * _dims[ CZ ];
_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
// 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 ();
// 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());
// 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());