From: Eduardo DAVILA Date: Mon, 14 Aug 2017 14:49:39 +0000 (+0200) Subject: #3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=688ca72c3097af56bc2a2cba126227b86d85262a;p=creaMaracasVisu.git #3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7 --- diff --git a/bbtk/bbs/appli/exampleBars.bbg b/bbtk/bbs/appli/exampleBars.bbg new file mode 100644 index 0000000..3b3930a --- /dev/null +++ b/bbtk/bbs/appli/exampleBars.bbg @@ -0,0 +1,151 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleBars.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION:creaMaracasVisu::ColorBar box example. +AUTHOR:eduardo.davila@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:8 +BOX +wx:LayoutSplit:s +ISEXEC:TRUE +-61.769617:-74.306605:-900.000000 +-22.689617:-84.306605:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +wx:LayoutSplit:ss +ISEXEC:FALSE +-100.000000:40.000000:-900.000000 +-56.204020:30.000000:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +wx:LayoutLine:s1 +ISEXEC:FALSE +-20.767371:-17.157332:-900.000000 +36.792629:-27.157332:-900.000000 +PORT +Orientation:"V" +FIN_BOX +BOX +wx:LayoutLine:s2 +ISEXEC:FALSE +-98.935007:-15.740026:-900.000000 +-41.375007:-25.740026:-900.000000 +PORT +Orientation:"V" +FIN_BOX +BOX +creaMaracasVisu:SliderMinMax:sliderMM_h +ISEXEC:FALSE +-41.534742:24.549538:-900.000000 +12.945258:14.549538:-900.000000 +PORT +InH:"90" +PORT +InMax:"350" +PORT +InMin:"0" +PORT +InW:"300" +PORT +Orientation:"1" +PORT +ShowLabels:"1" +FIN_BOX +BOX +creaMaracasVisu:SliderMinMax:sliderMM_v +ISEXEC:FALSE +-127.689828:84.008983:-900.000000 +-73.209828:74.008983:-900.000000 +PORT +InH:"30" +PORT +InMax:"350" +PORT +InMin:"0" +PORT +InW:"300" +PORT +Orientation:"0" +PORT +ShowLabels:"1" +FIN_BOX +BOX +creaMaracasVisu:ColorBar:colorB_h +ISEXEC:FALSE +-9.584941:6.084280:-900.000000 +44.895059:-3.915720:-900.000000 +PORT +Blues:" 255 0 15 0 0 0" +PORT +Greens:" 0 220 220 100 240 55" +PORT +InH:"50" +PORT +InMax:"350" +PORT +InMin:"0" +PORT +InW:"300" +PORT +Orientation:"1" +PORT +Reds:" 0 255 0 255 220 30" +PORT +Values:" 0 30 70 130 250 310" +FIN_BOX +BOX +creaMaracasVisu:ColorBar:colorB_v +ISEXEC:FALSE +-59.530251:80.986130:-900.000000 +-5.050251:70.986130:-900.000000 +PORT +Blues:" 255 0 15 0 0 0" +PORT +Greens:" 0 220 220 100 240 55" +PORT +InH:"50" +PORT +InMax:"350" +PORT +InMin:"0" +PORT +InW:"300" +PORT +Orientation:"0" +PORT +Reds:" 0 255 0 255 220 30" +PORT +Values:" 0 30 70 130 250 310" +FIN_BOX +CONNECTIONS:7 +CONNECTION +s1:Widget:s:Widget1 +NumberOfControlPoints:0 +CONNECTION +s2:Widget:s:Widget2 +NumberOfControlPoints:0 +CONNECTION +sliderMM_h:Widget:s1:Widget1 +NumberOfControlPoints:0 +CONNECTION +colorB_h:Widget:s1:Widget2 +NumberOfControlPoints:0 +CONNECTION +ss:Widget:s2:Widget1 +NumberOfControlPoints:0 +CONNECTION +sliderMM_v:Widget:ss:Widget1 +NumberOfControlPoints:0 +CONNECTION +colorB_v:Widget:ss:Widget2 +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/exampleBars.bbs b/bbtk/bbs/appli/exampleBars.bbs index a402b75..4a5e033 100644 --- a/bbtk/bbs/appli/exampleBars.bbs +++ b/bbtk/bbs/appli/exampleBars.bbs @@ -1,94 +1,86 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleBars.bbs +# ---------------------------------- +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include wx +include creaMaracasVisu + +author "eduardo.davila@creatis.insa-lyon.fr" description "creaMaracasVisu::ColorBar box example. " category "example" -author "eduardo.davila@creatis.insa-lyon.fr" -load std -load wx -load creaMaracasVisu - -new LayoutSplit s - set s.Orientation H -new LayoutSplit ss - set ss.Orientation H - -new LayoutLine s1 -new LayoutLine s2 - -set s1.Orientation V -set ss.Orientation H -set s2.Orientation V - -new SliderMinMax sliderMM_h -set sliderMM_h.Orientation 1 -set sliderMM_h.InW 300 -set sliderMM_h.InH 90 -set sliderMM_h.InMax 350 -set sliderMM_h.InMin 0 -set sliderMM_h.ShowLabels 1 - -new SliderMinMax sliderMM_v -set sliderMM_v.Orientation 0 -set sliderMM_v.InW 300 -set sliderMM_v.InH 30 -set sliderMM_v.InMax 350 -set sliderMM_v.InMin 0 -set sliderMM_v.ShowLabels 1 - -new ColorBar colorB_h -set colorB_h.Orientation 1 -set colorB_h.InW 300 -set colorB_h.InH 50 -set colorB_h.InMax 350 -set colorB_h.InMin 0 -set colorB_h.Reds " 0 255 0 255 220 30" -set colorB_h.Greens " 0 220 220 100 240 55" -set colorB_h.Blues " 255 0 15 0 0 0" -set colorB_h.Values " 0 30 70 130 250 310" - - -new ColorBar colorB_v -set colorB_v.Orientation 0 -set colorB_v.InW 300 -set colorB_v.InH 50 -set colorB_v.InMax 350 -set colorB_v.InMin 0 -set colorB_v.Reds " 0 255 0 255 220 30" -set colorB_v.Greens " 0 220 220 100 240 55" -set colorB_v.Blues " 255 0 15 0 0 0" -set colorB_v.Values " 0 30 70 130 250 310" - - -connect s1.Widget s.Widget1 -connect s2.Widget s.Widget2 -connect sliderMM_h.Widget s1.Widget1 -connect colorB_h.Widget s1.Widget2 -connect ss.Widget s2.Widget1 -connect sliderMM_v.Widget ss.Widget1 -connect colorB_v.Widget ss.Widget2 +new wx:LayoutSplit s + set s.Orientation "H" + +new wx:LayoutSplit ss + set ss.Orientation "H" + +new wx:LayoutLine s1 + set s1.Orientation "V" + +new wx:LayoutLine s2 + set s2.Orientation "V" + +new creaMaracasVisu:SliderMinMax sliderMM_h + set sliderMM_h.InH "90" + set sliderMM_h.InMax "350" + set sliderMM_h.InMin "0" + set sliderMM_h.InW "300" + set sliderMM_h.Orientation "1" + set sliderMM_h.ShowLabels "1" + +new creaMaracasVisu:SliderMinMax sliderMM_v + set sliderMM_v.InH "30" + set sliderMM_v.InMax "350" + set sliderMM_v.InMin "0" + set sliderMM_v.InW "300" + set sliderMM_v.Orientation "0" + set sliderMM_v.ShowLabels "1" + +new creaMaracasVisu:ColorBar colorB_h + set colorB_h.Blues " 255 0 15 0 0 0" + set colorB_h.Greens " 0 220 220 100 240 55" + set colorB_h.InH "50" + set colorB_h.InMax "350" + set colorB_h.InMin "0" + set colorB_h.InW "300" + set colorB_h.Orientation "1" + set colorB_h.Reds " 0 255 0 255 220 30" + set colorB_h.Values " 0 30 70 130 250 310" + +new creaMaracasVisu:ColorBar colorB_v + set colorB_v.Blues " 255 0 15 0 0 0" + set colorB_v.Greens " 0 220 220 100 240 55" + set colorB_v.InH "50" + set colorB_v.InMax "350" + set colorB_v.InMin "0" + set colorB_v.InW "300" + set colorB_v.Orientation "0" + set colorB_v.Reds " 0 255 0 255 220 30" + set colorB_v.Values " 0 30 70 130 250 310" + + +connect s1.Widget s.Widget1 + +connect s2.Widget s.Widget2 + +connect sliderMM_h.Widget s1.Widget1 + +connect colorB_h.Widget s1.Widget2 + +connect ss.Widget s2.Widget1 + +connect sliderMM_v.Widget ss.Widget1 + +connect colorB_v.Widget ss.Widget2 + + +# Complex input ports exec s diff --git a/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg index 79cfb18..1b3590f 100644 --- a/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg +++ b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg # ---------------------------------- APP_START @@ -13,26 +13,28 @@ BOXES:5 BOX creaMaracasVisu:ContourControlPoints_Widget:Box00 ISEXEC:FALSE --113.173864:13.069948:-900.000000 --41.998864:3.069948:-900.000000 +-72.595496:17.578656:-900.000000 +-18.145496:7.578656:-900.000000 FIN_BOX BOX vtk:LoadHola:Box01 ISEXEC:FALSE -37.427577:74.558110:-900.000000 -8.147423:64.558110:-900.000000 +-1.877577:64.558110:-900.000000 FIN_BOX BOX creaMaracasVisu:ViewerNV:Box02 ISEXEC:FALSE -52.873879:47.230038:-900.000000 -7.766121:37.230038:-900.000000 +10.846121:37.230038:-900.000000 +PORT +nTypeView:"0" FIN_BOX BOX wx:LayoutSplit:Box03 ISEXEC:TRUE --55.547277:-20.199010:-900.000000 --9.972277:-30.199010:-900.000000 +-22.483422:-16.592044:-900.000000 +16.596578:-26.592044:-900.000000 PORT Orientation:"H" FIN_BOX @@ -40,16 +42,13 @@ BOX std:MagicBox:Box04 ISEXEC:TRUE -108.718200:-16.931523:-900.000000 --63.143200:-26.931523:-900.000000 +-72.643200:-26.931523:-900.000000 FIN_BOX CONNECTIONS:5 CONNECTION Box01:Out:Box02:In NumberOfControlPoints:0 CONNECTION -Box02:wxVtkBaseView4:Box00:wxvtkbaseview -NumberOfControlPoints:0 -CONNECTION Box00:Widget_Contour:Box03:Widget1 NumberOfControlPoints:0 CONNECTION @@ -58,4 +57,7 @@ NumberOfControlPoints:0 CONNECTION Box00:BoxChange2:Box04:In NumberOfControlPoints:0 +CONNECTION +Box02:wxVtkBaseView1:Box00:wxvtkbaseview +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs index e66b3b4..d5e6af9 100644 --- a/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs +++ b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script -# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs # ---------------------------------- # BBTK GEditor Script @@ -17,28 +17,29 @@ author "Author ??" description "Description ??" category "" -new ContourControlPoints_Widget Box00 +new creaMaracasVisu:ContourControlPoints_Widget Box00 -new LoadHola Box01 +new vtk:LoadHola Box01 -new ViewerNV Box02 +new creaMaracasVisu:ViewerNV Box02 + set Box02.nTypeView "0" -new LayoutSplit Box03 +new wx:LayoutSplit Box03 set Box03.Orientation "H" -new MagicBox Box04 +new std:MagicBox Box04 connect Box01.Out Box02.In -connect Box02.wxVtkBaseView4 Box00.wxvtkbaseview - connect Box00.Widget_Contour Box03.Widget1 connect Box02.Widget Box03.Widget2 connect Box00.BoxChange2 Box04.In +connect Box02.wxVtkBaseView1 Box00.wxvtkbaseview + # Complex input ports diff --git a/bbtk/bbs/appli/exampleCutModule.bbg b/bbtk/bbs/appli/exampleCutModule.bbg new file mode 100644 index 0000000..152161f --- /dev/null +++ b/bbtk/bbs/appli/exampleCutModule.bbg @@ -0,0 +1,105 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION:Cutter.. application that helps to clean the image +AUTHOR:info-dev@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:8 +BOX +vtk:LoadHola:reader +ISEXEC:FALSE +0.000000:70.000000:-900.000000 +36.250000:60.000000:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:view1 +ISEXEC:FALSE +-89.230154:33.720365:-900.000000 +-25.510154:23.720365:-900.000000 +PORT +nTypeView:"6" +FIN_BOX +BOX +creaMaracasVisu:CutModule:cut +ISEXEC:FALSE +-8.425873:1.603538:-900.000000 +27.574127:-8.396462:-900.000000 +PORT +BoxExecute:"1" +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:view2 +ISEXEC:FALSE +-71.799075:-21.894050:-900.000000 +-8.079075:-31.894050:-900.000000 +PORT +nTypeView:"6" +FIN_BOX +BOX +wx:LayoutLine:layoutline1 +ISEXEC:FALSE +-94.983439:-90.878949:-900.000000 +-37.423439:-100.878949:-900.000000 +FIN_BOX +BOX +wx:LayoutTab:laytab +ISEXEC:FALSE +-88.351604:-61.749353:-900.000000 +-30.791604:-71.749353:-900.000000 +FIN_BOX +BOX +wx:LayoutLine:layoutline2 +ISEXEC:FALSE +0.000000:-110.000000:-900.000000 +57.560000:-120.000000:-900.000000 +FIN_BOX +BOX +wx:LayoutSplit:layoutsplit +ISEXEC:TRUE +-100.000000:-140.000000:-900.000000 +-59.325000:-150.000000:-900.000000 +PORT +Orientation:"H" +PORT +Proportion:"80" +FIN_BOX +CONNECTIONS:11 +CONNECTION +reader:Out:view1:In +NumberOfControlPoints:0 +CONNECTION +view1:Interactor1:cut:Interactor +NumberOfControlPoints:0 +CONNECTION +view1:Renderer1:cut:Renderer +NumberOfControlPoints:0 +CONNECTION +reader:Out:cut:In +NumberOfControlPoints:0 +CONNECTION +cut:Out:view2:In +NumberOfControlPoints:0 +CONNECTION +laytab:Widget:layoutline1:Widget1 +NumberOfControlPoints:0 +CONNECTION +view1:Widget:laytab:Widget1 +NumberOfControlPoints:0 +CONNECTION +view2:Widget:laytab:Widget2 +NumberOfControlPoints:0 +CONNECTION +cut:Widget:layoutline2:Widget1 +NumberOfControlPoints:0 +CONNECTION +layoutline1:Widget:layoutsplit:Widget1 +NumberOfControlPoints:0 +CONNECTION +layoutline2:Widget:layoutsplit:Widget2 +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/exampleCutModule.bbs b/bbtk/bbs/appli/exampleCutModule.bbs index 6422848..cfff773 100644 --- a/bbtk/bbs/appli/exampleCutModule.bbs +++ b/bbtk/bbs/appli/exampleCutModule.bbs @@ -1,81 +1,66 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include vtk +include creaMaracasVisu +include wx -description "Cutter.. application that helps to clean the image" author "info-dev@creatis.insa-lyon.fr" +description "Cutter.. application that helps to clean the image" category "example" +new vtk:LoadHola reader -include vtk/boxes/bbLoadHola -load vtk -load wxvtk -load creaMaracasVisu -load std -load wx - -new LoadHola reader - -#new FileSelector openFileDialog - # set openFileDialog.Wildcard "(*.mhd)|*.mhd" -#new MetaImageReader reader1 -# connect openFileDialog.Out reader1.In -#new ImageCastToUShort image -# connect reader1.Out image.In - -new ViewerNV view1 - set view1.nTypeView "6" - connect reader.Out view1.In - -new CutModule cut - connect view1.Interactor1 cut.Interactor - connect view1.Renderer1 cut.Renderer - connect reader.Out cut.In - -new ViewerNV view2 - set view2.nTypeView "6" - connect cut.Out view2.In - -#connect view1.BoxChange cut.BoxExecute - - -new LayoutLine layoutline1 - new LayoutTab laytab - connect laytab.Widget layoutline1.Widget1 - connect view1.Widget laytab.Widget1 - connect view2.Widget laytab.Widget2 - -new LayoutLine layoutline2 - connect cut.Widget layoutline2.Widget1 - -new LayoutSplit layoutsplit - set layoutsplit.Orientation H - set layoutsplit.Proportion 80 - connect layoutline1.Widget layoutsplit.Widget1 - connect layoutline2.Widget layoutsplit.Widget2 - -exec layoutsplit +new creaMaracasVisu:ViewerNV view1 + set view1.nTypeView "6" + +new creaMaracasVisu:CutModule cut + set cut.BoxExecute "1" + +new creaMaracasVisu:ViewerNV view2 + set view2.nTypeView "6" + +new wx:LayoutLine layoutline1 + +new wx:LayoutTab laytab + +new wx:LayoutLine layoutline2 + +new wx:LayoutSplit layoutsplit + set layoutsplit.Orientation "H" + set layoutsplit.Proportion "80" + + +connect reader.Out view1.In -set cut.BoxExecute 1 -exec cut +connect view1.Interactor1 cut.Interactor + +connect view1.Renderer1 cut.Renderer + +connect reader.Out cut.In + +connect cut.Out view2.In + +connect laytab.Widget layoutline1.Widget1 + +connect view1.Widget laytab.Widget1 + +connect view2.Widget laytab.Widget2 + +connect cut.Widget layoutline2.Widget1 + +connect layoutline1.Widget layoutsplit.Widget1 + +connect layoutline2.Widget layoutsplit.Widget2 + + + +# Complex input ports +exec layoutsplit diff --git a/bbtk/bbs/appli/exampleCutModule2.bbg b/bbtk/bbs/appli/exampleCutModule2.bbg new file mode 100644 index 0000000..cef1fdf --- /dev/null +++ b/bbtk/bbs/appli/exampleCutModule2.bbg @@ -0,0 +1,172 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule2.bbg +# ---------------------------------- + +APP_START +CATEGORY: +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 diff --git a/bbtk/bbs/appli/exampleCutModule2.bbs b/bbtk/bbs/appli/exampleCutModule2.bbs index 25485ed..6fa9ab1 100644 --- a/bbtk/bbs/appli/exampleCutModule2.bbs +++ b/bbtk/bbs/appli/exampleCutModule2.bbs @@ -1,98 +1,99 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ - -load vtk -load wxvtk -load creaMaracasVisu -load std -load wx - -new FileSelector filselect0 - set filselect0.Message "Select image" - set filselect0.Wildcard "*.mhd" - #set filselect0.DefaultDir "C:\Creatis\creaAppli\Data\Images" -new MetaImageReader gimm - connect filselect0.Out gimm.In -new ImageCastToUShort image - connect gimm.Out image.In - -new VolumeRendering volrend - connect image.Out volrend.In1 -new SurfaceRendering surrend - # connect image.Out surrend.In0 - -new ViewerNV view1 -set view1.nTypeView 6 - connect gimm.Out view1.In - -new CutModule2 cut - connect view1.Interactor1 cut.Interactor - connect view1.Renderer1 cut.Renderer - connect image.Out cut.In - -new ViewerNV view2 - set view2.nTypeView 6 - connect image.Out view2.In - -connect view1.BoxChange cut.BoxExecute - -new LayoutSplit layoutsplit1 - set layoutsplit1.Orientation V - connect volrend.Widget layoutsplit1.Widget1 - connect surrend.Widget layoutsplit1.Widget2 - - new LayoutSplit layoutsplit2 - set layoutsplit2.Orientation H - connect layoutsplit1.Widget layoutsplit2.Widget1 - #connect view1.Widget layoutsplit2.Widget2 - - new LayoutTab laytab - connect laytab.Widget layoutsplit2.Widget2 - connect view1.Widget laytab.Widget2 - connect view2.Widget laytab.Widget1 - -new LayoutLine layoutline1 - connect cut.Widget layoutline1.Widget1 - -new LayoutSplit layoutsplit3 - set layoutsplit3.Orientation H - set layoutsplit3.Proportion 80 - set layoutsplit3.WinTitle "Cutting Tool" - connect layoutline1.Widget layoutsplit3.Widget2 - connect layoutsplit2.Widget layoutsplit3.Widget1 - -exec layoutsplit3 +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleCutModule2.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include wx +include vtk +include creaMaracasVisu + +author "Author ??" +description "Description ??" +category "" + +new wx:FileSelector filselect0 + set filselect0.Message "Select image" + set filselect0.Wildcard "*.mhd" + +new vtk:MetaImageReader gimm + +new vtk:ImageCastToUShort image + +new creaMaracasVisu:VolumeRendering volrend + +new creaMaracasVisu:SurfaceRendering surrend + +new creaMaracasVisu:ViewerNV view1 + set view1.nTypeView "6" + +new creaMaracasVisu:CutModule2 cut + set cut.BoxExecute "1" + +new creaMaracasVisu:ViewerNV view2 + set view2.nTypeView "6" + +new wx:LayoutSplit layoutsplit1 + set layoutsplit1.Orientation "V" + +new wx:LayoutSplit layoutsplit2 + set layoutsplit2.Orientation "H" + +new wx:LayoutTab laytab + +new wx:LayoutLine layoutline1 + +new wx:LayoutSplit layoutsplit3 + set layoutsplit3.Orientation "H" + set layoutsplit3.Proportion "80" + set layoutsplit3.WinTitle "Cutting Tool" + + +connect filselect0.Out gimm.In -set cut.BoxExecute 1 -exec cut +connect gimm.Out image.In + +connect image.Out volrend.In1 + +connect gimm.Out view1.In + +connect view1.Interactor1 cut.Interactor + +connect view1.Renderer1 cut.Renderer + +connect image.Out cut.In + +connect image.Out view2.In + +connect view1.BoxChange cut.BoxExecute + +connect volrend.Widget layoutsplit1.Widget1 + +connect surrend.Widget layoutsplit1.Widget2 + +connect layoutsplit1.Widget layoutsplit2.Widget1 + +connect laytab.Widget layoutsplit2.Widget2 + +connect view1.Widget laytab.Widget2 + +connect view2.Widget laytab.Widget1 + +connect cut.Widget layoutline1.Widget1 + +connect layoutline1.Widget layoutsplit3.Widget2 + +connect layoutsplit2.Widget layoutsplit3.Widget1 connect view2.Renderer1 volrend.Renderer + connect view2.Renderer1 surrend.Renderer -exec volrend -exec surrend -#connect cut.BoxChange volrend.BoxExecute -#connect cut.BoxChange volrend.BoxExecute \ No newline at end of file + +# Complex input ports +exec layoutsplit3 diff --git a/bbtk/bbs/appli/exampleGaussianSmooth.bbg b/bbtk/bbs/appli/exampleGaussianSmooth.bbg new file mode 100644 index 0000000..265988b --- /dev/null +++ b/bbtk/bbs/appli/exampleGaussianSmooth.bbg @@ -0,0 +1,213 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleGaussianSmooth.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION:creaMaracasVisu::ImageGaussianSmooth box example. +AUTHOR:eduardo.davila@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:16 +BOX +vtk:MetaImageReader:reader +ISEXEC:FALSE +0.000000:70.000000:-900.000000 +45.375000:60.000000:-900.000000 +FIN_BOX +BOX +std:PrependPackageDataPath:prependDatapath +ISEXEC:FALSE +-11.011355:95.088209:-900.000000 +52.863645:85.088209:-900.000000 +PORT +In:"vtk/hola.mhd" +FIN_BOX +BOX +wx:Slider:slider +ISEXEC:FALSE +-83.338572:-22.487918:-900.000000 +-31.938572:-32.487918:-900.000000 +FIN_BOX +BOX +wxvtk:Viewer2D:viewer2DImageOriginal +ISEXEC:FALSE +91.631632:-110.401163:-900.000000 +144.231632:-120.401163:-900.000000 +FIN_BOX +BOX +itk:BinaryThresholdImageFilter:threshold +ISEXEC:FALSE +-18.127317:-16.805823:-900.000000 +37.122683:-26.805823:-900.000000 +PORT +InsideValue:"255" +PORT +LowerThreshold:"2000" +PORT +OutsideValue:"0" +PORT +UpperThreshold:"5000" +FIN_BOX +BOX +wxvtk:Viewer2D:viewer2DImageSegmented +ISEXEC:FALSE +-48.678506:-77.410383:-900.000000 +7.521494:-87.410383:-900.000000 +FIN_BOX +BOX +vtk:ImageGaussianSmooth:smooth +ISEXEC:FALSE +0.000000:-110.000000:-900.000000 +50.200000:-120.000000:-900.000000 +PORT +StdDevX:"1" +PORT +StdDevY:"1" +PORT +StdDevZ:"1" +FIN_BOX +BOX +wxvtk:Viewer2D:viewer2DImageSmooth +ISEXEC:FALSE +-117.891897:-134.114508:-900.000000 +-65.616897:-144.114508:-900.000000 +FIN_BOX +BOX +wx:LayoutLine:upLayout +ISEXEC:FALSE +30.133721:-194.012809:-900.000000 +87.693721:-204.012809:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +wxvtk:Viewer3D:viewernvImagethreshold3D +ISEXEC:FALSE +-115.773120:-240.256768:-900.000000 +-52.053120:-250.256768:-900.000000 +FIN_BOX +BOX +vtk:IsoSurfaceExtractor:isoextractorthreshold +ISEXEC:FALSE +-72.980106:-269.550509:-900.000000 +-13.605106:-279.550509:-900.000000 +PORT +Isovalue:"128" +PORT +Opacity:"1" +FIN_BOX +BOX +wxvtk:Viewer3D:viewernvImageSmooth3D +ISEXEC:FALSE +75.623093:-232.691315:-900.000000 +139.343093:-242.691315:-900.000000 +FIN_BOX +BOX +vtk:IsoSurfaceExtractor:isoextractorsmooth +ISEXEC:FALSE +45.200582:-284.585347:-900.000000 +102.800582:-294.585347:-900.000000 +PORT +Isovalue:"128" +PORT +Opacity:"1" +FIN_BOX +BOX +wx:LayoutLine:downLayout +ISEXEC:FALSE +-100.000000:-320.000000:-900.000000 +-42.440000:-330.000000:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +wx:LayoutSplit:splitUp +ISEXEC:FALSE +0.000000:-350.000000:-900.000000 +39.080000:-360.000000:-900.000000 +FIN_BOX +BOX +wx:LayoutSplit:mainSplit +ISEXEC:TRUE +-100.000000:-380.000000:-900.000000 +-60.111566:-390.000000:-900.000000 +FIN_BOX +CONNECTIONS:25 +CONNECTION +prependDatapath:Out:reader:In +NumberOfControlPoints:0 +CONNECTION +reader:Out:viewer2DImageOriginal:In +NumberOfControlPoints:0 +CONNECTION +slider:Out:viewer2DImageOriginal:Slice +NumberOfControlPoints:0 +CONNECTION +slider:BoxChange:viewer2DImageOriginal:BoxExecute +NumberOfControlPoints:0 +CONNECTION +reader:Out:threshold:In +NumberOfControlPoints:0 +CONNECTION +threshold:Out:viewer2DImageSegmented:In +NumberOfControlPoints:0 +CONNECTION +slider:Out:viewer2DImageSegmented:Slice +NumberOfControlPoints:0 +CONNECTION +slider:BoxChange:viewer2DImageSegmented:BoxExecute +NumberOfControlPoints:0 +CONNECTION +threshold:Out:smooth:In +NumberOfControlPoints:0 +CONNECTION +smooth:Out:viewer2DImageSmooth:In +NumberOfControlPoints:0 +CONNECTION +slider:Out:viewer2DImageSmooth:Slice +NumberOfControlPoints:0 +CONNECTION +slider:BoxChange:viewer2DImageSmooth:BoxExecute +NumberOfControlPoints:0 +CONNECTION +viewer2DImageOriginal:Widget:upLayout:Widget1 +NumberOfControlPoints:0 +CONNECTION +viewer2DImageSegmented:Widget:upLayout:Widget2 +NumberOfControlPoints:0 +CONNECTION +viewer2DImageSmooth:Widget:upLayout:Widget3 +NumberOfControlPoints:0 +CONNECTION +threshold:Out:isoextractorthreshold:In +NumberOfControlPoints:0 +CONNECTION +viewernvImagethreshold3D:Renderer:isoextractorthreshold:Renderer +NumberOfControlPoints:0 +CONNECTION +smooth:Out:isoextractorsmooth:In +NumberOfControlPoints:0 +CONNECTION +viewernvImageSmooth3D:Renderer:isoextractorsmooth:Renderer +NumberOfControlPoints:0 +CONNECTION +viewernvImagethreshold3D:Widget:downLayout:Widget1 +NumberOfControlPoints:0 +CONNECTION +viewernvImageSmooth3D:Widget:downLayout:Widget2 +NumberOfControlPoints:0 +CONNECTION +slider:Widget:splitUp:Widget1 +NumberOfControlPoints:0 +CONNECTION +upLayout:Widget:splitUp:Widget2 +NumberOfControlPoints:0 +CONNECTION +splitUp:Widget:mainSplit:Widget1 +NumberOfControlPoints:0 +CONNECTION +downLayout:Widget:mainSplit:Widget2 +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/exampleGaussianSmooth.bbs b/bbtk/bbs/appli/exampleGaussianSmooth.bbs index 9d79d4d..4d56377 100644 --- a/bbtk/bbs/appli/exampleGaussianSmooth.bbs +++ b/bbtk/bbs/appli/exampleGaussianSmooth.bbs @@ -1,133 +1,121 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleGaussianSmooth.bbs +# ---------------------------------- -description "creaMaracasVisu::ImageGaussianSmooth box example. " -category "example" -author "eduardo.davila@creatis.insa-lyon.fr" +# BBTK GEditor Script +# ---------------------- include std +include itkvtk include vtk +include std include wx -include itk -include itkvtk include wxvtk +include itk + +author "eduardo.davila@creatis.insa-lyon.fr" +description "creaMaracasVisu::ImageGaussianSmooth box example. " +category "example" + +new vtk:MetaImageReader reader + +new std:PrependPackageDataPath prependDatapath + set prependDatapath.In "vtk/hola.mhd" + +new wx:Slider slider + +new wxvtk:Viewer2D viewer2DImageOriginal + +new itk:BinaryThresholdImageFilter threshold + set threshold.InsideValue "255" + set threshold.LowerThreshold "2000" + set threshold.OutsideValue "0" + set threshold.UpperThreshold "5000" + +new wxvtk:Viewer2D viewer2DImageSegmented + +new vtk:ImageGaussianSmooth smooth + set smooth.StdDevX "1" + set smooth.StdDevY "1" + set smooth.StdDevZ "1" + +new wxvtk:Viewer2D viewer2DImageSmooth + +new wx:LayoutLine upLayout + set upLayout.Orientation "H" + +new wxvtk:Viewer3D viewernvImagethreshold3D + +new vtk:IsoSurfaceExtractor isoextractorthreshold + set isoextractorthreshold.Isovalue "128" + set isoextractorthreshold.Opacity "1" + +new wxvtk:Viewer3D viewernvImageSmooth3D + +new vtk:IsoSurfaceExtractor isoextractorsmooth + set isoextractorsmooth.Isovalue "128" + set isoextractorsmooth.Opacity "1" + +new wx:LayoutLine downLayout + set downLayout.Orientation "H" + +new wx:LayoutSplit splitUp + +new wx:LayoutSplit mainSplit + + +connect prependDatapath.Out reader.In + +connect reader.Out viewer2DImageOriginal.In -new MetaImageReader reader -include std/boxes/bbPrependPackageDataPath.bbs -new PrependPackageDataPath prependDatapath - set prependDatapath.In "vtk/hola.mhd" - connect prependDatapath.Out reader.In +connect slider.Out viewer2DImageOriginal.Slice -#--------------------------------------------------------------------- +connect slider.BoxChange viewer2DImageOriginal.BoxExecute -new Slider slider +connect reader.Out threshold.In -#--------------------------------------------------------------------- +connect threshold.Out viewer2DImageSegmented.In -new Viewer2D viewer2DImageOriginal - connect reader.Out viewer2DImageOriginal.In - connect slider.Out viewer2DImageOriginal.Slice - connect slider.BoxChange viewer2DImageOriginal.BoxExecute - -#--------------------------------------------------------------------- +connect slider.Out viewer2DImageSegmented.Slice -new BinaryThresholdImageFilter threshold - set threshold.LowerThreshold 2000 - set threshold.UpperThreshold 5000 - set threshold.InsideValue 255 - set threshold.OutsideValue 0 - connect reader.Out threshold.In +connect slider.BoxChange viewer2DImageSegmented.BoxExecute -new Viewer2D viewer2DImageSegmented - connect threshold.Out viewer2DImageSegmented.In - connect slider.Out viewer2DImageSegmented.Slice - connect slider.BoxChange viewer2DImageSegmented.BoxExecute +connect threshold.Out smooth.In -#--------------------------------------------------------------------- +connect smooth.Out viewer2DImageSmooth.In -new ImageGaussianSmooth smooth - connect threshold.Out smooth.In - set smooth.StdDevX 1 - set smooth.StdDevY 1 - set smooth.StdDevZ 1 +connect slider.Out viewer2DImageSmooth.Slice -new Viewer2D viewer2DImageSmooth - connect smooth.Out viewer2DImageSmooth.In - connect slider.Out viewer2DImageSmooth.Slice - connect slider.BoxChange viewer2DImageSmooth.BoxExecute +connect slider.BoxChange viewer2DImageSmooth.BoxExecute -#--------------------------------------------------------------------- +connect viewer2DImageOriginal.Widget upLayout.Widget1 -new LayoutLine upLayout - set upLayout.Orientation H - connect viewer2DImageOriginal.Widget upLayout.Widget1 - connect viewer2DImageSegmented.Widget upLayout.Widget2 - connect viewer2DImageSmooth.Widget upLayout.Widget3 +connect viewer2DImageSegmented.Widget upLayout.Widget2 +connect viewer2DImageSmooth.Widget upLayout.Widget3 -#--------------------------------------------------------------------- +connect threshold.Out isoextractorthreshold.In -new Viewer3D viewernvImagethreshold3D -# set viewernvImagethreshold3D.nTypeView "5" +connect viewernvImagethreshold3D.Renderer isoextractorthreshold.Renderer -new IsoSurfaceExtractor isoextractorthreshold - connect threshold.Out isoextractorthreshold.In - set isoextractorthreshold.Opacity 1 - set isoextractorthreshold.Isovalue 128 - connect viewernvImagethreshold3D.Renderer isoextractorthreshold.Renderer +connect smooth.Out isoextractorsmooth.In +connect viewernvImageSmooth3D.Renderer isoextractorsmooth.Renderer -#--------------------------------------------------------------------- -new Viewer3D viewernvImageSmooth3D -# set viewernvImageSmooth3D.nTypeView "5" +connect viewernvImagethreshold3D.Widget downLayout.Widget1 -new IsoSurfaceExtractor isoextractorsmooth - connect smooth.Out isoextractorsmooth.In - set isoextractorsmooth.Opacity 1 - set isoextractorsmooth.Isovalue 128 - connect viewernvImageSmooth3D.Renderer isoextractorsmooth.Renderer +connect viewernvImageSmooth3D.Widget downLayout.Widget2 +connect slider.Widget splitUp.Widget1 -#--------------------------------------------------------------------- +connect upLayout.Widget splitUp.Widget2 -new LayoutLine downLayout - set downLayout.Orientation H - connect viewernvImagethreshold3D.Widget downLayout.Widget1 - connect viewernvImageSmooth3D.Widget downLayout.Widget2 +connect splitUp.Widget mainSplit.Widget1 -#--------------------------------------------------------------------- -new LayoutSplit splitUp - connect slider.Widget splitUp.Widget1 - connect upLayout.Widget splitUp.Widget2 +connect downLayout.Widget mainSplit.Widget2 -new LayoutSplit mainSplit - connect splitUp.Widget mainSplit.Widget1 - connect downLayout.Widget mainSplit.Widget2 -#--------------------------------------------------------------------- -exec isoextractorthreshold -exec isoextractorsmooth +# Complex input ports exec mainSplit diff --git a/bbtk/bbs/appli/exampleHistogramView.bbg b/bbtk/bbs/appli/exampleHistogramView.bbg new file mode 100644 index 0000000..06df981 --- /dev/null +++ b/bbtk/bbs/appli/exampleHistogramView.bbg @@ -0,0 +1,40 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleHistogramView.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION:creaMaracasVisu::HistogramView box example. +AUTHOR:eduardo.davila@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:3 +BOX +vtk:MetaImageReader:reader +ISEXEC:FALSE +-32.252498:44.574673:-900.000000 +13.122502:34.574673:-900.000000 +FIN_BOX +BOX +std:PrependPackageDataPath:prependDatapath +ISEXEC:FALSE +-46.088890:84.729742:-900.000000 +17.786110:74.729742:-900.000000 +PORT +In:"vtk/hola.mhd" +FIN_BOX +BOX +creaMaracasVisu:HistogramView:histogramview +ISEXEC:TRUE +-29.427462:2.937409:-900.000000 +19.672538:-7.062591:-900.000000 +FIN_BOX +CONNECTIONS:2 +CONNECTION +prependDatapath:Out:reader:In +NumberOfControlPoints:0 +CONNECTION +reader:Out:histogramview:In +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/exampleHistogramView.bbs b/bbtk/bbs/appli/exampleHistogramView.bbs index 164b045..c112884 100644 --- a/bbtk/bbs/appli/exampleHistogramView.bbs +++ b/bbtk/bbs/appli/exampleHistogramView.bbs @@ -1,47 +1,34 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleHistogramView.bbs +# ---------------------------------- +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include vtk +include std +include creaMaracasVisu + +author "eduardo.davila@creatis.insa-lyon.fr" description "creaMaracasVisu::HistogramView box example. " category "example" -author "eduardo.davila@creatis.insa-lyon.fr" +new vtk:MetaImageReader reader +new std:PrependPackageDataPath prependDatapath + set prependDatapath.In "vtk/hola.mhd" -load wx -load std -load creaMaracasVisu -load vtk +new creaMaracasVisu:HistogramView histogramview -new MetaImageReader reader -include std/boxes/bbPrependPackageDataPath.bbs -new PrependPackageDataPath prependDatapath - set prependDatapath.In "vtk/hola.mhd" - connect prependDatapath.Out reader.In -new HistogramView histogramview +connect prependDatapath.Out reader.In -print $prependDatapath.Out$\n connect reader.Out histogramview.In + + + +# Complex input ports exec histogramview diff --git a/bbtk/bbs/appli/exampleManualContour.bbg b/bbtk/bbs/appli/exampleManualContour.bbg index 5c72c2a..33ab8f2 100644 --- a/bbtk/bbs/appli/exampleManualContour.bbg +++ b/bbtk/bbs/appli/exampleManualContour.bbg @@ -48,7 +48,7 @@ ISEXEC:TRUE -48.256510:-25.995767:-900.000000 -2.681510:-35.995767:-900.000000 FIN_BOX -CONNECTIONS:7 +CONNECTIONS:6 CONNECTION Box00:Out:Box01:In NumberOfControlPoints:0 @@ -62,9 +62,6 @@ CONNECTION Box01:wxVtkBaseView4:Box08:wxvtkbaseview NumberOfControlPoints:0 CONNECTION -Box01:Renderer4:Box08:vtkRenderer -NumberOfControlPoints:0 -CONNECTION Box08:BoxChange2:Box09:BoxExecute NumberOfControlPoints:0 CONNECTION diff --git a/bbtk/bbs/appli/exampleManualContour.bbs b/bbtk/bbs/appli/exampleManualContour.bbs index 1379228..1bd7647 100644 --- a/bbtk/bbs/appli/exampleManualContour.bbs +++ b/bbtk/bbs/appli/exampleManualContour.bbs @@ -39,7 +39,7 @@ connect Box01.Widget Box05.Widget2 connect Box01.wxVtkBaseView4 Box08.wxvtkbaseview -connect Box01.Renderer4 Box08.vtkRenderer +#connect Box01.Renderer4 Box08.vtkRenderer connect Box08.BoxChange2 Box09.BoxExecute diff --git a/bbtk/bbs/appli/exampleManualContourModel_Box.bbg b/bbtk/bbs/appli/exampleManualContourModel_Box.bbg index 91749a3..2ba70e2 100644 --- a/bbtk/bbs/appli/exampleManualContourModel_Box.bbg +++ b/bbtk/bbs/appli/exampleManualContourModel_Box.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbg +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbg # ---------------------------------- APP_START @@ -14,25 +14,25 @@ BOX creaMaracasVisu:ShowNPoints:Box00 ISEXEC:FALSE -39.494457:11.050643:-900.000000 -8.825543:1.050643:-900.000000 +21.145543:1.050643:-900.000000 FIN_BOX BOX vtk:LoadHola:Box01 ISEXEC:FALSE -9.258012:83.442946:-900.000000 -54.833012:73.442946:-900.000000 +58.553215:97.570230:-900.000000 +94.103215:87.570230:-900.000000 FIN_BOX BOX creaMaracasVisu:ViewerNV:Box02 ISEXEC:FALSE 20.955874:40.973496:-900.000000 -81.595874:30.973496:-900.000000 +84.675874:30.973496:-900.000000 FIN_BOX BOX wx:LayoutSplit:Box03 ISEXEC:TRUE 13.204164:-71.936977:-900.000000 -58.779164:-81.936977:-900.000000 +52.284164:-81.936977:-900.000000 PORT Orientation:"H" FIN_BOX @@ -40,7 +40,7 @@ BOX creaMaracasVisu:ManualContourModel_Box:Box04 ISEXEC:FALSE -49.983835:-14.091828:-900.000000 -21.191165:-24.091828:-900.000000 +2.116165:-24.091828:-900.000000 PORT OpenClose:"false" FIN_BOX @@ -48,7 +48,7 @@ BOX creaMaracasVisu:DrawAxe3D:Box05 ISEXEC:FALSE -52.874467:-40.107511:-900.000000 --7.299467:-50.107511:-900.000000 +-15.174467:-50.107511:-900.000000 PORT Colour:"1 1 0" FIN_BOX @@ -56,19 +56,19 @@ BOX vtk:Transform:Box06 ISEXEC:FALSE -57.714085:25.260177:-900.000000 --12.139085:15.260177:-900.000000 +-22.139085:15.260177:-900.000000 FIN_BOX BOX vtk:ImageVtkProperties:Box07 ISEXEC:FALSE -40.107511:44.925230:-900.000000 -5.467489:34.925230:-900.000000 +5.242489:34.925230:-900.000000 FIN_BOX BOX vtk:UpdateRender:Box08 ISEXEC:FALSE -36.735108:-55.042440:-900.000000 -8.839892:-65.042440:-900.000000 +3.589892:-65.042440:-900.000000 PORT Active:"true" FIN_BOX @@ -76,19 +76,19 @@ BOX vtk:vtkImageDataPointerRelay:Box09 ISEXEC:FALSE -6.137882:66.826620:-900.000000 -65.037118:56.826620:-900.000000 +46.037118:56.826620:-900.000000 FIN_BOX BOX creaImageIO:ImagesChooserDialogBox:Box10 ISEXEC:FALSE --43.926443:95.650480:-900.000000 -27.248557:85.650480:-900.000000 +-22.885808:101.962671:-900.000000 +28.589192:91.962671:-900.000000 FIN_BOX BOX creaMaracasVisu:ImageChangeInformation:Box11 ISEXEC:FALSE -48.435663:82.829799:-900.000000 -22.739337:72.829799:-900.000000 +3.089337:72.829799:-900.000000 FIN_BOX CONNECTIONS:22 CONNECTION @@ -152,9 +152,9 @@ CONNECTION Box09:Out:Box00:Image NumberOfControlPoints:0 CONNECTION -Box10:Out:Box11:In +Box11:Out:Box09:In NumberOfControlPoints:0 CONNECTION -Box11:Out:Box09:In +Box01:Out:Box11:In NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/appli/exampleManualContourModel_Box.bbs b/bbtk/bbs/appli/exampleManualContourModel_Box.bbs index 9b7d180..6f92ad6 100644 --- a/bbtk/bbs/appli/exampleManualContourModel_Box.bbs +++ b/bbtk/bbs/appli/exampleManualContourModel_Box.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script -# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbs +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualContourModel_Box.bbs # ---------------------------------- # BBTK GEditor Script @@ -86,10 +86,10 @@ connect Box09.Out Box02.In connect Box09.Out Box00.Image -connect Box10.Out Box11.In - connect Box11.Out Box09.In +connect Box01.Out Box11.In + # Complex input ports diff --git a/bbtk/bbs/appli/exampleOpenDialog.bbg b/bbtk/bbs/appli/exampleOpenDialog.bbg new file mode 100644 index 0000000..5bc22b4 --- /dev/null +++ b/bbtk/bbs/appli/exampleOpenDialog.bbg @@ -0,0 +1,29 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleOpenDialog.bbg +# ---------------------------------- + +APP_START +CATEGORY: +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 diff --git a/bbtk/bbs/appli/exampleOpenDialog.bbs b/bbtk/bbs/appli/exampleOpenDialog.bbs index 1a5b554..3cedd8f 100644 --- a/bbtk/bbs/appli/exampleOpenDialog.bbs +++ b/bbtk/bbs/appli/exampleOpenDialog.bbs @@ -1,32 +1,27 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ - -load std -load wx -load creaMaracasVisu - -new OpenImageDialog diag - -exec diag \ No newline at end of file +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleOpenDialog.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include creaMaracasVisu + +author "Author ??" +description "Description ??" +category "" + +new creaMaracasVisu:OpenImageDialog diag + +new creaMaracasVisu:ViewerNV Box01 + + +connect diag.Out Box01.In + + + +# Complex input ports +exec Box01 diff --git a/bbtk/bbs/appli/examplePlaneNPoints.bbg b/bbtk/bbs/appli/examplePlaneNPoints.bbg new file mode 100644 index 0000000..6ab8822 --- /dev/null +++ b/bbtk/bbs/appli/examplePlaneNPoints.bbg @@ -0,0 +1,194 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlaneNPoints.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION: 3points -> 1-plane +AUTHOR:info-dev@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:14 +BOX +wx:FileSelector:openFileDialog +ISEXEC:FALSE +-71.844270:101.006474:-900.000000 +-25.744270:91.006474:-900.000000 +PORT +Wildcard:"(*.mhd)|*.mhd" +FIN_BOX +BOX +vtk:MetaImageReader:reader +ISEXEC:FALSE +-69.371653:76.678391:-900.000000 +-23.996653:66.678391:-900.000000 +FIN_BOX +BOX +vtk:ImagePlanes:planes +ISEXEC:FALSE +-45.753456:-110.244621:-900.000000 +-6.128456:-120.244621:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:TransferFunctionView:transferfunc +ISEXEC:FALSE +-104.537533:28.400350:-900.000000 +-52.362533:18.400350:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:viewernv +ISEXEC:FALSE +14.746982:-12.565354:-900.000000 +78.466982:-22.565354:-900.000000 +PORT +nTypeView:"6 1 2 0" +FIN_BOX +BOX +creaMaracasVisu:ShowNPoints:showpoints +ISEXEC:FALSE +-22.483814:-50.506036:-900.000000 +38.156186:-60.506036:-900.000000 +PORT +Radio:"1" +FIN_BOX +BOX +creaMaracasVisu:ImageActor:imgactor +ISEXEC:FALSE +-15.503237:-152.350307:-900.000000 +25.446763:-162.350307:-900.000000 +FIN_BOX +BOX +wxvtk:Viewer2D:view2d +ISEXEC:FALSE +-15.299387:-191.047245:-900.000000 +23.780613:-201.047245:-900.000000 +FIN_BOX +BOX +wx:CommandButton:execplanes +ISEXEC:FALSE +-122.135259:-88.324409:-900.000000 +-73.735259:-98.324409:-900.000000 +PORT +Label:"Refresh planes" +FIN_BOX +BOX +wx:LayoutLine:layoutline0 +ISEXEC:FALSE +-100.000000:-200.000000:-900.000000 +-42.440000:-210.000000:-900.000000 +FIN_BOX +BOX +wx:LayoutLine:layoutline1 +ISEXEC:FALSE +0.000000:-230.000000:-900.000000 +57.560000:-240.000000:-900.000000 +FIN_BOX +BOX +wx:LayoutSplit:mainSplit +ISEXEC:TRUE +-100.000000:-260.000000:-900.000000 +-60.300000:-270.000000:-900.000000 +PORT +Orientation:"H" +PORT +Proportion:"10" +FIN_BOX +BOX +vtk:LoadHola:Box12 +ISEXEC:FALSE +7.751619:76.570867:-900.000000 +43.301619:66.570867:-900.000000 +FIN_BOX +BOX +vtk:vtkImageDataPointerRelay:Box13 +ISEXEC:FALSE +-12.289151:51.614436:-900.000000 +39.885849:41.614436:-900.000000 +FIN_BOX +CONNECTIONS:28 +CONNECTION +openFileDialog:Out:reader:In +NumberOfControlPoints:0 +CONNECTION +transferfunc:ColorFunction:viewernv:ColorFunction +NumberOfControlPoints:0 +CONNECTION +transferfunc:WindowLevel:viewernv:WindowLevel +NumberOfControlPoints:0 +CONNECTION +transferfunc:ColorLevel:viewernv:ColorLevel +NumberOfControlPoints:0 +CONNECTION +showpoints:lstPointsX:planes:PointsX +NumberOfControlPoints:0 +CONNECTION +showpoints:lstPointsY:planes:PointsY +NumberOfControlPoints:0 +CONNECTION +showpoints:lstPointsZ:planes:PointsZ +NumberOfControlPoints:0 +CONNECTION +viewernv:BoxChange:showpoints:BoxExecute +NumberOfControlPoints:0 +CONNECTION +viewernv:Point:showpoints:In +NumberOfControlPoints:0 +CONNECTION +viewernv:Renderer1:showpoints:Renderer +NumberOfControlPoints:0 +CONNECTION +planes:Image3Pts:imgactor:In +NumberOfControlPoints:0 +CONNECTION +viewernv:Renderer1:imgactor:Renderer +NumberOfControlPoints:0 +CONNECTION +planes:Transform3Pts:imgactor:Transform +NumberOfControlPoints:0 +CONNECTION +execplanes:BoxChange:planes:BoxExecute +NumberOfControlPoints:0 +CONNECTION +execplanes:BoxChange:view2d:BoxExecute +NumberOfControlPoints:0 +CONNECTION +execplanes:BoxChange:imgactor:BoxExecute +NumberOfControlPoints:0 +CONNECTION +showpoints:Widget:layoutline0:Widget1 +NumberOfControlPoints:0 +CONNECTION +execplanes:Widget:layoutline0:Widget2 +NumberOfControlPoints:0 +CONNECTION +transferfunc:Widget:layoutline0:Widget3 +NumberOfControlPoints:0 +CONNECTION +viewernv:Widget:layoutline1:Widget1 +NumberOfControlPoints:0 +CONNECTION +layoutline0:Widget:mainSplit:Widget1 +NumberOfControlPoints:0 +CONNECTION +layoutline1:Widget:mainSplit:Widget2 +NumberOfControlPoints:0 +CONNECTION +planes:Image3Pts:view2d:In +NumberOfControlPoints:0 +CONNECTION +Box12:Out:Box13:In +NumberOfControlPoints:0 +CONNECTION +Box13:Out:transferfunc:In +NumberOfControlPoints:0 +CONNECTION +Box13:Out:planes:In +NumberOfControlPoints:0 +CONNECTION +Box13:Out:showpoints:Image +NumberOfControlPoints:0 +CONNECTION +Box13:Out:viewernv:In +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/examplePlaneNPoints.bbs b/bbtk/bbs/appli/examplePlaneNPoints.bbs index 047824a..28a67f6 100644 --- a/bbtk/bbs/appli/examplePlaneNPoints.bbs +++ b/bbtk/bbs/appli/examplePlaneNPoints.bbs @@ -1,110 +1,114 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlaneNPoints.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include wx +include vtk +include creaMaracasVisu +include wxvtk -description " 3points -> 1-plane " author "info-dev@creatis.insa-lyon.fr" +description " 3points -> 1-plane " category "example" -include vtk/boxes/bbLoadHola -load vtk -load wxvtk -load creaMaracasVisu -load std -load wx - -//new LoadHola reader - -new FileSelector openFileDialog - set openFileDialog.Wildcard "(*.mhd)|*.mhd" -new MetaImageReader reader - connect openFileDialog.Out reader.In - -new ImagePlanes planes -connect reader.Out planes.In - -#new Viewer3D viewer - -#connect planes.PlaneX viewer.Obs1 -#connect planes.PlaneY viewer.Obs2 -#connect planes.PlaneZ viewer.Obs3 -#connect planes.Plane3Pts viewer.Obs4 -#set viewer.WinTitle "Show N Points" -#set viewer.WinWidth 350 -#set viewer.WinHeight 400 - -new TransferFunctionView transferfunc - connect reader.Out transferfunc.In - -new ViewerNV viewernv - set viewernv.nTypeView "6 1 2 0" - #set viewernv.nTypeView "6" - connect reader.Out viewernv.In - connect transferfunc.ColorFunction viewernv.ColorFunction - connect transferfunc.WindowLevel viewernv.WindowLevel - connect transferfunc.ColorLevel viewernv.ColorLevel - -new ShowNPoints showpoints - connect reader.Out showpoints.Image - connect showpoints.lstPointsX planes.PointsX - connect showpoints.lstPointsY planes.PointsY - connect showpoints.lstPointsZ planes.PointsZ - #set planes.PointsX "10 10 50" - #set planes.PointsY "10 50 20" - #set planes.PointsZ "10 10 30" - connect viewernv.BoxChange showpoints.BoxExecute - connect viewernv.Point showpoints.In - connect viewernv.Renderer1 showpoints.Renderer - set showpoints.Radio 1 - -new ImageActor imgactor - connect planes.Image3Pts imgactor.In - connect viewernv.Renderer1 imgactor.Renderer - connect planes.Transform3Pts imgactor.Transform - -new Viewer2D view2d -new CommandButton execplanes - set execplanes.Label "Refresh planes" - connect execplanes.BoxChange planes.BoxExecute - connect execplanes.BoxChange view2d.BoxExecute - connect execplanes.BoxChange imgactor.BoxExecute - #connect execplanes.BoxChange viewer.BoxExecute - -new LayoutLine layoutline0 +new wx:FileSelector openFileDialog + set openFileDialog.Wildcard "(*.mhd)|*.mhd" + +new vtk:MetaImageReader reader + +new vtk:ImagePlanes planes + +new creaMaracasVisu:TransferFunctionView transferfunc + +new creaMaracasVisu:ViewerNV viewernv + set viewernv.nTypeView "6 1 2 0" + +new creaMaracasVisu:ShowNPoints showpoints + set showpoints.Radio "1" + +new creaMaracasVisu:ImageActor imgactor + +new wxvtk:Viewer2D view2d + +new wx:CommandButton execplanes + set execplanes.Label "Refresh planes" + +new wx:LayoutLine layoutline0 + +new wx:LayoutLine layoutline1 + +new wx:LayoutSplit mainSplit + set mainSplit.Orientation "H" + set mainSplit.Proportion "10" + +new vtk:LoadHola Box12 + +new vtk:vtkImageDataPointerRelay Box13 + + +connect openFileDialog.Out reader.In + +connect transferfunc.ColorFunction viewernv.ColorFunction + +connect transferfunc.WindowLevel viewernv.WindowLevel + +connect transferfunc.ColorLevel viewernv.ColorLevel + +connect showpoints.lstPointsX planes.PointsX + +connect showpoints.lstPointsY planes.PointsY + +connect showpoints.lstPointsZ planes.PointsZ + +connect viewernv.BoxChange showpoints.BoxExecute + +connect viewernv.Point showpoints.In + +connect viewernv.Renderer1 showpoints.Renderer + +connect planes.Image3Pts imgactor.In + +connect viewernv.Renderer1 imgactor.Renderer + +connect planes.Transform3Pts imgactor.Transform + +connect execplanes.BoxChange planes.BoxExecute + +connect execplanes.BoxChange view2d.BoxExecute + +connect execplanes.BoxChange imgactor.BoxExecute + connect showpoints.Widget layoutline0.Widget1 + connect execplanes.Widget layoutline0.Widget2 + connect transferfunc.Widget layoutline0.Widget3 -new LayoutLine layoutline1 connect viewernv.Widget layoutline1.Widget1 -new LayoutSplit mainSplit -set mainSplit.Orientation H -set mainSplit.Proportion 10 connect layoutline0.Widget mainSplit.Widget1 -connect layoutline1.Widget mainSplit.Widget2 -exec mainSplit +connect layoutline1.Widget mainSplit.Widget2 connect planes.Image3Pts view2d.In + +connect Box12.Out Box13.In + +connect Box13.Out transferfunc.In + +connect Box13.Out planes.In + +connect Box13.Out showpoints.Image + +connect Box13.Out viewernv.In + + + +# Complex input ports +exec mainSplit diff --git a/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg b/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg new file mode 100644 index 0000000..e700cae --- /dev/null +++ b/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg @@ -0,0 +1,49 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_01.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION:Example of the box vtk::ImagePlanes. +AUTHOR:laurent.guigues@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:3 +BOX +vtk:LoadHola:reader +ISEXEC:FALSE +0.000000:70.000000:-900.000000 +35.550000:60.000000:-900.000000 +FIN_BOX +BOX +vtk:ImagePlanes:planes +ISEXEC:TRUE +-55.397404:-18.807244:-900.000000 +-15.772404:-28.807244:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:viewer +ISEXEC:FALSE +0.000000:10.000000:-900.000000 +63.720000:0.000000:-900.000000 +PORT +WinHeight:"400" +PORT +WinTitle:"ExampleImagePlanes" +PORT +WinWidth:"350" +PORT +nTypeView:"7" +FIN_BOX +CONNECTIONS:3 +CONNECTION +reader:Out:viewer:In +NumberOfControlPoints:0 +CONNECTION +reader:Out:planes:In +NumberOfControlPoints:0 +CONNECTION +viewer:Interactor1:planes:Interactor +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/examplePlanesViewerNV_01.bbs b/bbtk/bbs/appli/examplePlanesViewerNV_01.bbs index 6ed13fb..c475ccc 100644 --- a/bbtk/bbs/appli/examplePlanesViewerNV_01.bbs +++ b/bbtk/bbs/appli/examplePlanesViewerNV_01.bbs @@ -1,49 +1,38 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_01.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include vtk +include creaMaracasVisu -description "Example of the box vtk::ImagePlanes." author "laurent.guigues@creatis.insa-lyon.fr" +description "Example of the box vtk::ImagePlanes." category "example" -include vtk/boxes/bbLoadHola -load vtk -load creaMaracasVisu +new vtk:LoadHola reader -new LoadHola reader -new ImagePlanes planes -new ViewerNV viewer -connect reader.Out viewer.In +new vtk:ImagePlanes planes + +new creaMaracasVisu:ViewerNV viewer + set viewer.WinHeight "400" + set viewer.WinTitle "ExampleImagePlanes" + set viewer.WinWidth "350" set viewer.nTypeView "7" + +connect reader.Out viewer.In + connect reader.Out planes.In + connect viewer.Interactor1 planes.Interactor -load std -set viewer.WinTitle "ExampleImagePlanes" -set viewer.WinWidth 350 -set viewer.WinHeight 400 -#set viewer.Slice 20 + +# Complex input ports exec planes diff --git a/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg b/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg new file mode 100644 index 0000000..6ee0340 --- /dev/null +++ b/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg @@ -0,0 +1,55 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_02.bbg +# ---------------------------------- + +APP_START +CATEGORY:example +DESCRIPTION:Example of the box vtk::ImagePlanes. +AUTHOR:laurent.guigues@creatis.insa-lyon.fr +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:3 +BOX +vtk:LoadHola:reader +ISEXEC:FALSE +0.000000:70.000000:-900.000000 +35.550000:60.000000:-900.000000 +FIN_BOX +BOX +vtk:ImagePlanes:planes +ISEXEC:FALSE +-63.636100:34.318141:-900.000000 +-24.011100:24.318141:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:viewer +ISEXEC:TRUE +-16.761485:-12.159251:-900.000000 +46.958515:-22.159251:-900.000000 +PORT +WinHeight:"400" +PORT +WinTitle:"ExampleImagePlanes" +PORT +WinWidth:"350" +PORT +nTypeView:"6" +FIN_BOX +CONNECTIONS:5 +CONNECTION +reader:Out:viewer:In +NumberOfControlPoints:0 +CONNECTION +reader:Out:planes:In +NumberOfControlPoints:0 +CONNECTION +planes:PlaneX:viewer:Obs1 +NumberOfControlPoints:0 +CONNECTION +planes:PlaneY:viewer:Obs2 +NumberOfControlPoints:0 +CONNECTION +planes:PlaneZ:viewer:Obs3 +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/examplePlanesViewerNV_02.bbs b/bbtk/bbs/appli/examplePlanesViewerNV_02.bbs index c79607e..d2723b0 100644 --- a/bbtk/bbs/appli/examplePlanesViewerNV_02.bbs +++ b/bbtk/bbs/appli/examplePlanesViewerNV_02.bbs @@ -1,51 +1,42 @@ -# --------------------------------------------------------------------- -# -# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Sant�) -# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton -# Previous Authors : Laurent Guigues, Jean-Pierre Roux -# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil -# -# This software is governed by the CeCILL-B license under French law and -# abiding by the rules of distribution of free software. You can use, -# modify and/ or redistribute the software under the terms of the CeCILL-B -# license as circulated by CEA, CNRS and INRIA at the following URL -# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -# or in the file LICENSE.txt. -# -# As a counterpart to the access to the source code and rights to copy, -# modify and redistribute granted by the license, users are provided only -# with a limited warranty and the software's author, the holder of the -# economic rights, and the successive licensors have only limited -# liability. -# -# The fact that you are presently reading this means that you have had -# knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /tmpEED/creaTools2/creatools_source/creaMaracasVisu/bbtk/bbs/appli/examplePlanesViewerNV_02.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include vtk +include creaMaracasVisu -description "Example of the box vtk::ImagePlanes." author "laurent.guigues@creatis.insa-lyon.fr" +description "Example of the box vtk::ImagePlanes." category "example" -include vtk/boxes/bbLoadHola -load vtk -load creaMaracasVisu +new vtk:LoadHola reader -new LoadHola reader -new ImagePlanes planes -new ViewerNV viewer -connect reader.Out viewer.In +new vtk:ImagePlanes planes + +new creaMaracasVisu:ViewerNV viewer + set viewer.WinHeight "400" + set viewer.WinTitle "ExampleImagePlanes" + set viewer.WinWidth "350" set viewer.nTypeView "6" + +connect reader.Out viewer.In + connect reader.Out planes.In + connect planes.PlaneX viewer.Obs1 + connect planes.PlaneY viewer.Obs2 + connect planes.PlaneZ viewer.Obs3 -load std -set viewer.WinTitle "ExampleImagePlanes" -set viewer.WinWidth 350 -set viewer.WinHeight 400 -#set viewer.Slice 20 + +# Complex input ports exec viewer diff --git a/bbtk/src/bbmaracasvisuImageActor.cxx b/bbtk/src/bbmaracasvisuImageActor.cxx index ad6c30c..d640d8d 100644 --- a/bbtk/src/bbmaracasvisuImageActor.cxx +++ b/bbtk/src/bbmaracasvisuImageActor.cxx @@ -55,6 +55,7 @@ void ImageActor::Process() #if VTK_MAJOR_VERSION <= 5 imageactor->SetInput( imageshiftscale->GetOutput() ); #else + imageshiftscale->Update(); imageactor->SetInputData( imageshiftscale->GetOutput() ); #endif if (transform!=NULL){ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx index 76fa42b..d941174 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx @@ -439,7 +439,6 @@ printf("EED ColorLayerImageView::ConfigLookupTable Make something with transpa thresholdTable->Build( ); - //EO CM EED } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx index 1e402d3..77a5579 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx @@ -243,6 +243,7 @@ void LayerImageBase::SetImage(vtkImageData* image) _imageChangeInformation->SetInput(_image); #else _imageChangeInformation->SetInputData(_image); + _imageChangeInformation->Update(); #endif } @@ -258,9 +259,9 @@ void LayerImageBase::SetSpcOriginalLayer(double spc[3]) //------------------------------------------------------------------------------ void LayerImageBase::SetNewSpacingLayer(double spc[3]) { - _newSpcLayer[0]=spc[0]; - _newSpcLayer[1]=spc[1]; - _newSpcLayer[2]=spc[2]; + _newSpcLayer[0] = spc[0]; + _newSpcLayer[1] = spc[1]; + _newSpcLayer[2] = spc[2]; _imageChangeInformation->SetOutputSpacing( _newSpcLayer ); } @@ -430,12 +431,10 @@ void LayerImageBase::onThreshold() double y=GetY(); double z=GetZ(); - x = x*_spcBase[0]; y = y*_spcBase[1]; z = z*_spcBase[2]; - CleanXYZ(x,y,z); vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera(); @@ -528,11 +527,15 @@ void LayerImageBase::onThreshold() _imageReslicer->SetInterpolationModeToNearestNeighbor(); _imageReslicer->Modified(); - +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 + // .. +#else + _imageReslicer->Update(); +#endif vtkImageData *img = _imageReslicer->GetOutput(); // img->Update(); // img->UpdateInformation(); - // _thresholdTable->Update(); //EED 2017-01-01 Migration VTK7 @@ -549,9 +552,9 @@ void LayerImageBase::onThreshold() #if VTK_MAJOR_VERSION <= 5 _thresholdActor->SetInput( _thresholdMapper->GetOutput() ); #else + _thresholdMapper->Update(); _thresholdActor->SetInputData( _thresholdMapper->GetOutput() ); #endif - _scalarbarActor->SetLookupTable( _thresholdTable ); // _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() ); @@ -559,10 +562,7 @@ void LayerImageBase::onThreshold() _scalarbarActor->SetNumberOfLabels(4); int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize(); _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2); - // _scalarbarActor->SetTextPad(4); ?? - - } // _image } @@ -612,7 +612,7 @@ void LayerImageBase::onThresholdRemove() baseView->GetRenderer()->RemoveActor( _scalarbarActor ); _actorPresent = false; - } + } // if _actorPresent } //---------------------------------------------------------------------------- @@ -637,7 +637,5 @@ void LayerImageBase::GetImageScalarRange() _range[1]=max; } - - // EOF