]> Creatis software - creaVtk.git/commitdiff
#spc.push_back(1);
authorEduardo DAVILA <davila@ei-ed-606.univ-lyon1.fr>
Thu, 24 Oct 2019 09:35:59 +0000 (11:35 +0200)
committerEduardo DAVILA <davila@ei-ed-606.univ-lyon1.fr>
Thu, 24 Oct 2019 09:35:59 +0000 (11:35 +0200)
bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkVoiMPR.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkVoiMPR.h

diff --git a/bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbg b/bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbg
new file mode 100644 (file)
index 0000000..6a221e9
--- /dev/null
@@ -0,0 +1,70 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+creaVtk:VoiMPR-Widget:Box00
+ISEXEC:FALSE
+-21.477436:-25.903727:-900.000000
+19.722564:-35.903727:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+-31.631200:58.927159:-900.000000
+3.918800:48.927159:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+17.822656:30.988942:-900.000000
+81.542656:20.988942:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box03
+ISEXEC:TRUE
+12.006697:-66.365397:-900.000000
+51.086697:-76.365397:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box01:Out:Box00:image
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Point:Box00:Point
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer2:Box00:RenderYZ
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:Box00:execute
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer3:Box00:RenderXZ
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer4:Box00:RenderXY
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView1:Box00:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box00:Widget:Box03:Widget1
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbs b/bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbs
new file mode 100644 (file)
index 0000000..234dab1
--- /dev/null
@@ -0,0 +1,53 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVoiMPR.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include vtk
+include creaMaracasVisu
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:VoiMPR-Widget Box00
+
+new vtk:LoadHola Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new wx:LayoutSplit Box03
+  set Box03.Orientation "H"
+
+
+connect Box01.Out Box00.image
+
+connect Box01.Out Box02.In
+
+connect Box02.Point Box00.Point
+
+connect Box02.Renderer2 Box00.RenderYZ
+
+connect Box02.BoxChange Box00.execute
+
+connect Box02.Renderer3 Box00.RenderXZ
+
+connect Box02.Renderer4 Box00.RenderXY
+
+connect Box02.wxVtkBaseView1 Box00.wxVtkBaseView
+
+connect Box02.Widget Box03.Widget2
+
+connect Box00.Widget Box03.Widget1
+
+
+
+# Complex input ports
+exec Box03
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbg b/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbg
new file mode 100644 (file)
index 0000000..e247a78
--- /dev/null
@@ -0,0 +1,364 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:InfoDev
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:VoiMPR-Interface
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:5
+COMPLEX_PORT
+widget
+-194.857295:-108.744190:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+voi
+116.850695:-134.317313:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxchange
+215.834887:-129.487204:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+active
+-400.889574:-104.288004:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxchangeRender
+2.545632:-132.673333:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:3
+COMPLEX_PORT
+Image
+-165.967032:312.412587:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Execute
+120.347352:309.716369:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview
+-113.324460:312.838326:-900.000000
+FIN_COMPLEX_PORT
+BOXES:23
+BOX
+creaMaracasVisu:SliderMinMax:Box03
+ISEXEC:FALSE
+-183.678150:126.815992:-900.000000
+-129.198150:116.815992:-900.000000
+PORT
+InMax:"500"
+PORT
+InMin:"0"
+FIN_BOX
+BOX
+creaMaracasVisu:SliderMinMax:Box04
+ISEXEC:FALSE
+-109.661484:126.399574:-900.000000
+-55.181484:116.399574:-900.000000
+PORT
+InMax:"500"
+PORT
+InMin:"0"
+FIN_BOX
+BOX
+creaMaracasVisu:SliderMinMax:Box05
+ISEXEC:FALSE
+-27.997021:123.372567:-900.000000
+26.482979:113.372567:-900.000000
+PORT
+InMax:"500"
+PORT
+InMin:"0"
+FIN_BOX
+BOX
+std:MultipleInputs:Box06
+ISEXEC:FALSE
+11.096726:60.042693:-900.000000
+50.796726:50.042693:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box07
+ISEXEC:FALSE
+-119.450413:58.469239:-900.000000
+-79.725413:48.469239:-900.000000
+PORT
+In2:"  "
+PORT
+In4:"  "
+PORT
+In6:"  "
+PORT
+In8:"   "
+FIN_BOX
+BOX
+std:ConcatStrings:Box08
+ISEXEC:FALSE
+-50.852772:55.779193:-900.000000
+-11.127772:45.779193:-900.000000
+PORT
+In2:"  "
+PORT
+In4:"  "
+PORT
+In6:"  "
+FIN_BOX
+BOX
+std:ConcatStrings:Box09
+ISEXEC:FALSE
+-64.118040:14.195593:-900.000000
+-24.393040:4.195593:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box11
+ISEXEC:FALSE
+-324.390545:-36.367861:-900.000000
+-266.830545:-46.367861:-900.000000
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box30
+ISEXEC:FALSE
+-180.072980:255.020330:-900.000000
+-134.722980:245.020330:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box31
+ISEXEC:FALSE
+-176.426596:278.323054:-900.000000
+-124.251596:268.323054:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box32
+ISEXEC:FALSE
+-176.463853:148.268737:-900.000000
+-130.013853:138.268737:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box33
+ISEXEC:FALSE
+-96.363202:149.019418:-900.000000
+-49.913202:139.019418:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box34
+ISEXEC:FALSE
+-25.459447:142.925896:-900.000000
+20.990553:132.925896:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+creaMaracasVisu:SetPosition:Box35
+ISEXEC:FALSE
+-79.954071:-54.580452:-900.000000
+-43.404071:-64.580452:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box36
+ISEXEC:FALSE
+-131.390576:12.543783:-900.000000
+-91.665576:2.543783:-900.000000
+PORT
+In2:"  "
+PORT
+In4:"  "
+FIN_BOX
+BOX
+std:MultipleInputs:Box40
+ISEXEC:FALSE
+219.080593:-45.709082:-900.000000
+258.780593:-55.709082:-900.000000
+FIN_BOX
+BOX
+wx:CheckBox:Box42
+ISEXEC:FALSE
+-401.467596:135.181986:-900.000000
+-365.142596:125.181986:-900.000000
+PORT
+In:"true"
+PORT
+ReactiveOnKeystroke:"true"
+PORT
+Title:"Active"
+FIN_BOX
+BOX
+wx:LayoutTab:Box21
+ISEXEC:FALSE
+-339.526908:50.695036:-900.000000
+-281.966908:40.695036:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box22
+ISEXEC:FALSE
+-337.903619:76.667657:-900.000000
+-280.343619:66.667657:-900.000000
+PORT
+WinTitle:"X"
+FIN_BOX
+BOX
+wx:LayoutTab:Box23
+ISEXEC:FALSE
+-270.828244:52.396144:-900.000000
+-213.268244:42.396144:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box24
+ISEXEC:FALSE
+-269.204955:78.368765:-900.000000
+-211.644955:68.368765:-900.000000
+PORT
+WinTitle:"Y"
+FIN_BOX
+BOX
+wx:LayoutTab:Box25
+ISEXEC:FALSE
+-210.393596:53.802109:-900.000000
+-152.833596:43.802109:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box26
+ISEXEC:FALSE
+-208.770307:79.774730:-900.000000
+-151.210307:69.774730:-900.000000
+PORT
+WinTitle:"Z"
+FIN_BOX
+CONNECTIONS:43
+CONNECTION
+Box03:BoxChange:Box06:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box06:In2
+NumberOfControlPoints:0
+CONNECTION
+Box05:BoxChange:Box06:In3
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box09:In1
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box09:In10
+NumberOfControlPoints:0
+CONNECTION
+Box03:OutStart:Box07:In1
+NumberOfControlPoints:0
+CONNECTION
+Box03:OutEnd:Box07:In3
+NumberOfControlPoints:0
+CONNECTION
+Box04:OutStart:Box07:In5
+NumberOfControlPoints:0
+CONNECTION
+Box04:OutEnd:Box07:In7
+NumberOfControlPoints:0
+CONNECTION
+Box05:OutStart:Box08:In1
+NumberOfControlPoints:0
+CONNECTION
+Box05:OutEnd:Box08:In3
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box30:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Size:Box32:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Size:Box33:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Size:Box34:In
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box03:InMax
+NumberOfControlPoints:0
+CONNECTION
+Box33:Out:Box04:InMax
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box05:InMax
+NumberOfControlPoints:0
+CONNECTION
+Box36:Out:Box35:Point
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box35:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box40:In1
+NumberOfControlPoints:0
+CONNECTION
+Box42:Widget:Box11:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box42:BoxChange:Box06:In4
+NumberOfControlPoints:0
+CONNECTION
+Image:Image:Box31:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Execute:Execute:Box40:In2
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview:wxvtkbaseview:Box35:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box40:BoxChange:boxchange:boxchange
+NumberOfControlPoints:0
+CONNECTION
+Box42:Out:active:active
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:boxchangeRender:boxchangeRender
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:voi:voi
+NumberOfControlPoints:0
+CONNECTION
+Box03:OutActual:Box36:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:OutActual:Box36:In3
+NumberOfControlPoints:0
+CONNECTION
+Box05:OutActual:Box36:In5
+NumberOfControlPoints:0
+CONNECTION
+Box22:Widget:Box21:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box22:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box21:Widget:Box11:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box24:Widget:Box23:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box24:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box23:Widget:Box11:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box26:Widget:Box25:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box25:Widget:Box11:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box26:Widget1
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbs b/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbs
new file mode 100644 (file)
index 0000000..c4dcb0c
--- /dev/null
@@ -0,0 +1,140 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Interface.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include std
+include wx
+include vtk
+
+define VoiMPR-Interface creaVtk
+
+author "InfoDev"
+description "Description ??"
+
+category "<VOID>"
+
+new creaMaracasVisu:SliderMinMax Box03
+  set Box03.InMax "500"
+  set Box03.InMin "0"
+
+new creaMaracasVisu:SliderMinMax Box04
+  set Box04.InMax "500"
+  set Box04.InMin "0"
+
+new creaMaracasVisu:SliderMinMax Box05
+  set Box05.InMax "500"
+  set Box05.InMin "0"
+
+new std:MultipleInputs Box06
+
+new std:ConcatStrings Box07
+  set Box07.In2 "  "
+  set Box07.In4 "  "
+  set Box07.In6 "  "
+  set Box07.In8 "   "
+
+new std:ConcatStrings Box08
+  set Box08.In2 "  "
+  set Box08.In4 "  "
+  set Box08.In6 "  "
+
+new std:ConcatStrings Box09
+
+new wx:LayoutLine Box11
+
+new vtk:ImageVtkProperties Box30
+
+new vtk:vtkImageDataPointerRelay Box31
+
+new std:GetVectorIntElement Box32
+  set Box32.I "0"
+
+new std:GetVectorIntElement Box33
+  set Box33.I "1"
+
+new std:GetVectorIntElement Box34
+  set Box34.I "2"
+
+new creaMaracasVisu:SetPosition Box35
+
+new std:ConcatStrings Box36
+  set Box36.In2 "  "
+  set Box36.In4 "  "
+
+new std:MultipleInputs Box40
+
+new wx:CheckBox Box42
+  set Box42.In "true"
+  set Box42.ReactiveOnKeystroke "true"
+  set Box42.Title "Active"
+
+new wx:LayoutTab Box21
+
+new wx:LayoutLine Box22
+  set Box22.WinTitle "X"
+
+new wx:LayoutTab Box23
+
+new wx:LayoutLine Box24
+  set Box24.WinTitle "Y"
+
+new wx:LayoutTab Box25
+
+new wx:LayoutLine Box26
+  set Box26.WinTitle "Z"
+
+
+connect Box03.BoxChange Box06.In1
+connect Box04.BoxChange Box06.In2
+connect Box05.BoxChange Box06.In3
+connect Box07.Out Box09.In1
+connect Box08.Out Box09.In10
+connect Box03.OutStart Box07.In1
+connect Box03.OutEnd Box07.In3
+connect Box04.OutStart Box07.In5
+connect Box04.OutEnd Box07.In7
+connect Box05.OutStart Box08.In1
+connect Box05.OutEnd Box08.In3
+connect Box31.Out Box30.In
+connect Box30.Size Box32.In
+connect Box30.Size Box33.In
+connect Box30.Size Box34.In
+connect Box32.Out Box03.InMax
+connect Box33.Out Box04.InMax
+connect Box34.Out Box05.InMax
+connect Box36.Out Box35.Point
+connect Box06.BoxChange Box35.BoxExecute
+connect Box06.BoxChange Box40.In1
+connect Box42.Widget Box11.Widget1
+connect Box42.BoxChange Box06.In4
+connect Box03.OutActual Box36.In1
+connect Box04.OutActual Box36.In3
+connect Box05.OutActual Box36.In5
+connect Box22.Widget Box21.Widget1
+connect Box03.Widget Box22.Widget1
+connect Box21.Widget Box11.Widget3
+connect Box24.Widget Box23.Widget1
+connect Box04.Widget Box24.Widget1
+connect Box23.Widget Box11.Widget5
+connect Box26.Widget Box25.Widget1
+connect Box25.Widget Box11.Widget8
+connect Box05.Widget Box26.Widget1
+
+# Complex input ports
+input Image Box31.In " "
+input Execute Box40.In2 " "
+input wxvtkbaseview Box35.wxVtkBaseView " "
+
+# Complex output ports
+output widget Box11.Widget " "
+output boxchange Box40.BoxChange " "
+output active Box42.Out " "
+output boxchangeRender Box06.BoxChange " "
+output voi Box09.Out " "
+
+
+endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbg
new file mode 100644 (file)
index 0000000..40766f3
--- /dev/null
@@ -0,0 +1,358 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:InfoDev
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:VoiMPR-Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:5
+COMPLEX_PORT
+Widget
+353.092211:-318.865448:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Voi
+301.480796:-312.026931:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxchangeInterface
+271.395421:-312.977644:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+index
+-110.981909:-314.679525:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+size
+182.155431:-324.218825:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:7
+COMPLEX_PORT
+execute
+202.846948:77.379235:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+image
+-67.836074:80.479216:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Point
+-10.598806:80.481110:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxVtkBaseView
+236.114210:75.192161:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RenderXY
+14.170076:78.107701:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RenderYZ
+100.261163:77.448973:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RenderXZ
+66.284345:75.805900:-900.000000
+FIN_COMPLEX_PORT
+BOXES:21
+BOX
+creaVtk:VoiMPR-Interface:Box01
+ISEXEC:FALSE
+212.804711:4.373404:-900.000000
+255.904711:-5.626596:-900.000000
+FIN_BOX
+BOX
+creaVtk:VoiMPR:Box02
+ISEXEC:FALSE
+-18.111927:-109.039110:-900.000000
+15.438073:-119.039110:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box03
+ISEXEC:FALSE
+351.163040:-97.770139:-900.000000
+391.488040:-107.770139:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MagicBox:Box04
+ISEXEC:FALSE
+9.484851:49.900219:-900.000000
+45.559851:39.900219:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box05
+ISEXEC:FALSE
+48.870651:49.674678:-900.000000
+84.945651:39.674678:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box06
+ISEXEC:FALSE
+90.898503:48.874788:-900.000000
+126.973503:38.874788:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box07
+ISEXEC:FALSE
+406.438779:-97.452724:-900.000000
+446.763779:-107.452724:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box08
+ISEXEC:FALSE
+450.234362:-96.323828:-900.000000
+490.559362:-106.323828:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:ConcatStrings:Box09
+ISEXEC:FALSE
+-116.019206:-196.232084:-900.000000
+-76.294206:-206.232084:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box10
+ISEXEC:FALSE
+-6.890515:-136.473014:-900.000000
+39.559485:-146.473014:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:ConcatStrings:Box14
+ISEXEC:FALSE
+157.607448:-247.695413:-900.000000
+197.332448:-257.695413:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+FIN_BOX
+BOX
+std:MathOperation:Box15
+ISEXEC:FALSE
+3.807182:-195.312415:-900.000000
+44.857182:-205.312415:-900.000000
+PORT
+Type:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box16
+ISEXEC:FALSE
+47.213814:-137.759972:-900.000000
+93.663814:-147.759972:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box17
+ISEXEC:FALSE
+128.705901:-136.782115:-900.000000
+175.155901:-146.782115:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:MathOperation:Box18
+ISEXEC:FALSE
+162.348219:-197.941357:-900.000000
+203.398219:-207.941357:-900.000000
+PORT
+Type:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box19
+ISEXEC:FALSE
+180.079360:-136.525745:-900.000000
+226.529360:-146.525745:-900.000000
+PORT
+I:"3"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box20
+ISEXEC:FALSE
+297.542452:-134.964985:-900.000000
+343.992452:-144.964985:-900.000000
+PORT
+I:"4"
+FIN_BOX
+BOX
+std:MathOperation:Box21
+ISEXEC:FALSE
+307.499788:-193.961686:-900.000000
+348.549788:-203.961686:-900.000000
+PORT
+Type:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box22
+ISEXEC:FALSE
+344.628676:-134.708616:-900.000000
+391.078676:-144.708616:-900.000000
+PORT
+I:"5"
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box23
+ISEXEC:FALSE
+-80.401182:48.734170:-900.000000
+-28.226182:38.734170:-900.000000
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box24
+ISEXEC:FALSE
+-87.393532:-45.289394:-900.000000
+-42.043532:-55.289394:-900.000000
+FIN_BOX
+CONNECTIONS:45
+CONNECTION
+execute:execute:Box01:Execute
+NumberOfControlPoints:0
+CONNECTION
+wxVtkBaseView:wxVtkBaseView:Box01:wxvtkbaseview
+NumberOfControlPoints:0
+CONNECTION
+Box01:active:Box02:Active
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxchange:Box02:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:widget:Widget:Widget
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Voi:Voi
+NumberOfControlPoints:0
+CONNECTION
+RenderXY:RenderXY:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box02:XYrender
+NumberOfControlPoints:0
+CONNECTION
+RenderXZ:RenderXZ:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box02:XZrender
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box03:Renderer
+NumberOfControlPoints:0
+CONNECTION
+RenderYZ:RenderYZ:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box02:YZrender
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box07:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box08:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxchangeRender:Box03:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxchangeRender:Box07:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxchangeRender:Box08:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxchangeRender:boxchangeInterface:boxchangeInterface
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box09:In1
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:index:index
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:Box15:In1
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box15:In2
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box18:In1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box18:In2
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box21:In1
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box21:In2
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box09:In3
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box09:In5
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:Box14:In1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box14:In3
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box14:In5
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box17:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box19:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box20:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:voi:Box22:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:size:size
+NumberOfControlPoints:0
+CONNECTION
+Point:Point:Box02:ActualPoint
+NumberOfControlPoints:0
+CONNECTION
+image:image:Box23:In
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box01:Image
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box24:In
+NumberOfControlPoints:0
+CONNECTION
+Box24:Spacing:Box02:Spacing
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbs
new file mode 100644 (file)
index 0000000..4ae5616
--- /dev/null
@@ -0,0 +1,129 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VoiMPR-Widget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaVtk
+include vtk
+include std
+
+define VoiMPR-Widget creaVtk
+
+author "InfoDev"
+description "Description ??"
+
+category "<VOID>"
+
+new creaVtk:VoiMPR-Interface Box01
+
+new creaVtk:VoiMPR Box02
+
+new vtk:UpdateRender Box03
+  set Box03.Active "true"
+
+new std:MagicBox Box04
+
+new std:MagicBox Box05
+
+new std:MagicBox Box06
+
+new vtk:UpdateRender Box07
+  set Box07.Active "true"
+
+new vtk:UpdateRender Box08
+  set Box08.Active "true"
+
+new std:ConcatStrings Box09
+  set Box09.In2 " "
+  set Box09.In4 " "
+
+new std:GetVectorIntElement Box10
+  set Box10.I "0"
+
+new std:ConcatStrings Box14
+  set Box14.In2 " "
+  set Box14.In4 " "
+
+new std:MathOperation Box15
+  set Box15.Type "1"
+
+new std:GetVectorIntElement Box16
+  set Box16.I "1"
+
+new std:GetVectorIntElement Box17
+  set Box17.I "2"
+
+new std:MathOperation Box18
+  set Box18.Type "1"
+
+new std:GetVectorIntElement Box19
+  set Box19.I "3"
+
+new std:GetVectorIntElement Box20
+  set Box20.I "4"
+
+new std:MathOperation Box21
+  set Box21.Type "1"
+
+new std:GetVectorIntElement Box22
+  set Box22.I "5"
+
+new vtk:vtkImageDataPointerRelay Box23
+
+new vtk:ImageVtkProperties Box24
+
+
+connect Box01.active Box02.Active
+connect Box01.boxchange Box02.BoxExecute
+connect Box01.voi Box02.In
+connect Box04.Out Box02.XYrender
+connect Box05.Out Box02.XZrender
+connect Box04.Out Box03.Renderer
+connect Box06.Out Box02.YZrender
+connect Box05.Out Box07.Renderer
+connect Box06.Out Box08.Renderer
+connect Box01.boxchangeRender Box03.BoxExecute
+connect Box01.boxchangeRender Box07.BoxExecute
+connect Box01.boxchangeRender Box08.BoxExecute
+connect Box01.voi Box10.In
+connect Box10.Out Box09.In1
+connect Box01.voi Box16.In
+connect Box16.Out Box15.In1
+connect Box10.Out Box15.In2
+connect Box19.Out Box18.In1
+connect Box17.Out Box18.In2
+connect Box22.Out Box21.In1
+connect Box20.Out Box21.In2
+connect Box17.Out Box09.In3
+connect Box20.Out Box09.In5
+connect Box15.Out Box14.In1
+connect Box18.Out Box14.In3
+connect Box21.Out Box14.In5
+connect Box01.voi Box17.In
+connect Box01.voi Box19.In
+connect Box01.voi Box20.In
+connect Box01.voi Box22.In
+connect Box23.Out Box01.Image
+connect Box23.Out Box24.In
+connect Box24.Spacing Box02.Spacing
+
+# Complex input ports
+input execute Box01.Execute " "
+input wxVtkBaseView Box01.wxvtkbaseview " "
+input RenderXY Box04.In " "
+input RenderXZ Box05.In " "
+input RenderYZ Box06.In " "
+input Point Box02.ActualPoint " "
+input image Box23.In " "
+
+# Complex output ports
+output Widget Box01.widget " "
+output Voi Box01.voi " "
+output boxchangeInterface Box01.boxchangeRender " "
+output index Box09.Out " "
+output size Box14.Out " "
+
+
+endefine
index 3e89bb71ae17bd293d92222154ea803eb79a28a7..2ecd5cabd007fd68b4c0265e51084cf2948ebd3a 100644 (file)
@@ -37,24 +37,35 @@ void VoiMPR::Process()
                bool showActorYZ;
                bool showActorXZ;
 
-               std::vector<int> vecP = bbGetInputIn();
+               std::vector<int> vecVOI = bbGetInputIn();
+               std::vector<double> spc = bbGetInputSpacing();
+               vecVOI[0] = vecVOI[0]*spc[0];
+               vecVOI[1] = vecVOI[1]*spc[0];
+               vecVOI[2] = vecVOI[2]*spc[1];
+               vecVOI[3] = vecVOI[3]*spc[1];
+               vecVOI[4] = vecVOI[4]*spc[2];
+               vecVOI[5] = vecVOI[5]*spc[2];
                int dep;
                std::vector<int> vecPoint = bbGetInputActualPoint();
+               vecPoint[0] = vecPoint[0]*spc[0];
+               vecPoint[1] = vecPoint[1]*spc[1];
+               vecPoint[2] = vecPoint[2]*spc[2];
+
                if (vecPoint.size()==3)
                {
-                       if ((vecPoint[0]>=vecP[0]) && (vecPoint[0]<=vecP[1]) ) 
+                       if ((vecPoint[0]>=vecVOI[0]) && (vecPoint[0]<=vecVOI[1]) ) 
                        {       
                                showActorYZ=bbGetInputActive() && true; 
                        } else {
                                showActorYZ=bbGetInputActive() && false;        
                        }
-                       if ((vecPoint[1]>=vecP[2]) && (vecPoint[1]<=vecP[3]) ) 
+                       if ((vecPoint[1]>=vecVOI[2]) && (vecPoint[1]<=vecVOI[3]) ) 
                        {       
                                showActorXZ=bbGetInputActive() && true; 
                        } else {
                                showActorXZ=bbGetInputActive() && false;        
                        }
-                       if ((vecPoint[2]>=vecP[4]) && (vecPoint[2]<=vecP[5]) ) 
+                       if ((vecPoint[2]>=vecVOI[4]) && (vecPoint[2]<=vecVOI[5]) ) 
                        {       
                                showActorXY=bbGetInputActive() && true; 
                        } else {
@@ -70,10 +81,10 @@ void VoiMPR::Process()
                if (bbGetInputXYrender()!=NULL)
                {
                        dep=-900;
-                       pointsXY->SetPoint(0, vecP[0], vecP[2], dep);
-                       pointsXY->SetPoint(1, vecP[0], vecP[3], dep);
-                       pointsXY->SetPoint(2, vecP[1], vecP[3], dep);
-                       pointsXY->SetPoint(3, vecP[1], vecP[2], dep);
+                       pointsXY->SetPoint(0, vecVOI[0], vecVOI[2], dep);
+                       pointsXY->SetPoint(1, vecVOI[0], vecVOI[3], dep);
+                       pointsXY->SetPoint(2, vecVOI[1], vecVOI[3], dep);
+                       pointsXY->SetPoint(3, vecVOI[1], vecVOI[2], dep);
                        pointsXY-> Modified();
                        if ( showActorXY==true )
                        {
@@ -93,10 +104,10 @@ void VoiMPR::Process()
                if (bbGetInputYZrender()!=NULL)
                {
                        dep=900;
-                       pointsYZ->SetPoint(0, dep,vecP[2], vecP[4] );
-                       pointsYZ->SetPoint(1, dep,vecP[2], vecP[5] );
-                       pointsYZ->SetPoint(2, dep,vecP[3], vecP[5] );
-                       pointsYZ->SetPoint(3, dep,vecP[3], vecP[4] );
+                       pointsYZ->SetPoint(0, dep,vecVOI[2], vecVOI[4] );
+                       pointsYZ->SetPoint(1, dep,vecVOI[2], vecVOI[5] );
+                       pointsYZ->SetPoint(2, dep,vecVOI[3], vecVOI[5] );
+                       pointsYZ->SetPoint(3, dep,vecVOI[3], vecVOI[4] );
                        pointsYZ-> Modified();
                        if ( showActorYZ==true )
                        {
@@ -116,10 +127,10 @@ void VoiMPR::Process()
                if (bbGetInputXZrender()!=NULL)
                {
                        dep=-900;
-                       pointsXZ->SetPoint(0, vecP[0],dep, vecP[4] );
-                       pointsXZ->SetPoint(1, vecP[0],dep, vecP[5] );
-                       pointsXZ->SetPoint(2, vecP[1],dep, vecP[5] );
-                       pointsXZ->SetPoint(3, vecP[1],dep, vecP[4] );
+                       pointsXZ->SetPoint(0, vecVOI[0],dep, vecVOI[4] );
+                       pointsXZ->SetPoint(1, vecVOI[0],dep, vecVOI[5] );
+                       pointsXZ->SetPoint(2, vecVOI[1],dep, vecVOI[5] );
+                       pointsXZ->SetPoint(3, vecVOI[1],dep, vecVOI[4] );
                        pointsXZ-> Modified();
                        if ( showActorXZ==true )
                        {
@@ -146,13 +157,19 @@ void VoiMPR::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
-       actorAddedXY=false;
-       actorAddedXZ=false;
-       actorAddedYZ=false;
+       actorAddedXY            = false;
+       actorAddedXZ            = false;
+       actorAddedYZ            = false;
        bbSetInputActive(true);
        bbSetInputXYrender(NULL);
        bbSetInputYZrender(NULL);
        bbSetInputXZrender(NULL);
+
+       std::vector<double> spc;
+       spc.push_back(1);
+       spc.push_back(1);
+       spc.push_back(1);
+       bbSetInputSpacing(spc);
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
@@ -165,6 +182,7 @@ void VoiMPR::bbUserInitializeProcessing()
 //    but this is where you should allocate the internal/output pointers 
 //    if any 
 
+
        pointsXY                = vtkPoints                     ::New();
        linesXY                 = vtkCellArray          ::New();
        polygonXY               = vtkPolyData           ::New();
index b5f4c8adef6dda6337664417ec1cb4d4bee3da84..be95b922e8cd20d918bf4e40b7730dc18827baa8 100644 (file)
@@ -28,6 +28,7 @@ class bbcreaVtk_EXPORT VoiMPR
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
   BBTK_DECLARE_INPUT(In,std::vector<int>);
+  BBTK_DECLARE_INPUT(Spacing,std::vector<double>);
   BBTK_DECLARE_INPUT(ActualPoint,std::vector<int>);
   BBTK_DECLARE_INPUT(XYrender,vtkRenderer*);
   BBTK_DECLARE_INPUT(YZrender,vtkRenderer*);
@@ -51,7 +52,6 @@ class bbcreaVtk_EXPORT VoiMPR
        vtkActor                        *polygonActorXZ;
     bool                               actorAddedXZ;
 
-
        vtkPoints                       *pointsYZ;
        vtkCellArray            *linesYZ;
        vtkPolyData             *polygonYZ;
@@ -71,6 +71,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VoiMPR,bbtk::AtomicBlackBox);
   BBTK_CATEGORY("empty");
 
   BBTK_INPUT(VoiMPR,In,"input box (minX maxX minY maxY minZ maxZ)",std::vector<int>,"");
+  BBTK_INPUT(VoiMPR,Spacing,"default [1 1 1]. Spacing [sx sy sz]",std::vector<double>,"");
   BBTK_INPUT(VoiMPR,ActualPoint,"Actual point [x y z]",std::vector<int>,"");
   BBTK_INPUT(VoiMPR,XYrender,"vtkRenderer XY",vtkRenderer*,"");
   BBTK_INPUT(VoiMPR,YZrender,"vtkRenderer YZ",vtkRenderer*,"");