#ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} )
#ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} )
+
+
# JPR 4 mars 2011
set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
# ----
ADD_SUBDIRECTORY(bbtk_creaVtk_PKG)
#ADD_SUBDIRECTORY(bbtk_creaVtkHeartAngles_PKG)
+
+
+
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/ExamplePointPicker.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:19
+BOX
+creaVtk:PointPicker:Box00
+ISEXEC:FALSE
+42.388461:-60.890316:-900.000000
+79.338461:-70.890316:-900.000000
+FIN_BOX
+BOX
+vtk:SphereSource:Box01
+ISEXEC:FALSE
+-86.646215:96.548464:-900.000000
+-46.821215:86.548464:-900.000000
+PORT
+CenterX:"40"
+PORT
+CenterY:"40"
+PORT
+CenterZ:"40"
+PORT
+PhiResolution:"20"
+PORT
+Radius:"20"
+PORT
+ThetaResolution:"20"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box02
+ISEXEC:FALSE
+-95.048252:31.209645:-900.000000
+-49.808252:21.209645:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box03
+ISEXEC:FALSE
+8.401272:82.554547:-900.000000
+44.276272:72.554547:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+42.530164:-134.123521:-900.000000
+79.305164:-144.123521:-900.000000
+PORT
+Title:"Point&&2P&&"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-17.972686:-174.663538:-900.000000
+18.602314:-184.663538:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box07
+ISEXEC:FALSE
+-147.867981:83.753544:-900.000000
+-96.467981:73.753544:-900.000000
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity"
+FIN_BOX
+BOX
+vtk:LoadHola:Box08
+ISEXEC:FALSE
+60.405272:125.283738:-900.000000
+95.955272:115.283738:-900.000000
+FIN_BOX
+BOX
+std:MathOperationVector:Box09
+ISEXEC:FALSE
+140.121465:-78.587243:-900.000000
+187.646465:-88.587243:-900.000000
+PORT
+Type:"3"
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box10
+ISEXEC:FALSE
+137.805626:-58.052985:-900.000000
+183.155626:-68.052985:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:SetPosition:Box11
+ISEXEC:FALSE
+140.379252:-125.723679:-900.000000
+176.929252:-135.723679:-900.000000
+FIN_BOX
+BOX
+std:MathOperationVector:Box13
+ISEXEC:FALSE
+146.565584:-95.540874:-900.000000
+194.090584:-105.540874:-900.000000
+PORT
+Type:"23"
+FIN_BOX
+BOX
+std:Div:Box14
+ISEXEC:FALSE
+-108.350574:58.048497:-900.000000
+-79.025574:48.048497:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:OutputText:Box15
+ISEXEC:FALSE
+88.836059:-132.175947:-900.000000
+125.611059:-142.175947:-900.000000
+PORT
+Title:"Round Point&&2P&&"
+FIN_BOX
+BOX
+wx:CheckBox:Box16
+ISEXEC:FALSE
+13.081332:16.677865:-900.000000
+49.406332:6.677865:-900.000000
+PORT
+In:"true"
+PORT
+Title:"Point Picker Active"
+FIN_BOX
+BOX
+creaVtk:OutputWindow:Box17
+ISEXEC:TRUE
+-119.252058:-206.172997:-900.000000
+-78.652058:-216.172997:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box18
+ISEXEC:TRUE
+-61.489869:-207.111169:-900.000000
+-24.814869:-217.111169:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:ComboBox:Box19
+ISEXEC:FALSE
+-39.256609:18.205522:-900.000000
+2.903391:8.205522:-900.000000
+PORT
+In:"Nothing MouseMove ClickLeft DoubleClickLeft"
+PORT
+Selection:"2"
+PORT
+Title:"Event"
+FIN_BOX
+BOX
+std:MultipleInputs:Box20
+ISEXEC:FALSE
+-64.871846:-21.697611:-900.000000
+-25.171846:-31.697611:-900.000000
+FIN_BOX
+CONNECTIONS:29
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Renderer1:Box02:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box03:Renderer1:Box00:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box07:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box07:BoxChange:Box02:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box04:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box00:Point:Box09:In0
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box10:Spacing:Box09:In1
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:wxVtkBaseView1:Box11:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box13:In0
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box11:Point
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box14:In1
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box02:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box15:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box15:Widget:Box05:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box16:Widget:Box05:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box18:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box18:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box19:Widget:Box05:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box00:TypeEvent
+NumberOfControlPoints:0
+CONNECTION
+Box19:BoxChange:Box20:In1
+NumberOfControlPoints:0
+CONNECTION
+Box16:BoxChange:Box20:In3
+NumberOfControlPoints:0
+CONNECTION
+Box20:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/ExamplePointPicker.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include vtk
+include creaMaracasVisu
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:PointPicker Box00
+
+new vtk:SphereSource Box01
+ set Box01.CenterX "40"
+ set Box01.CenterY "40"
+ set Box01.CenterZ "40"
+ set Box01.PhiResolution "20"
+ set Box01.Radius "20"
+ set Box01.ThetaResolution "20"
+
+new vtk:PolyDataToActor Box02
+
+new creaMaracasVisu:ViewerNV Box03
+
+new wx:OutputText Box04
+ set Box04.Title "Point:"
+
+new wx:LayoutLine Box05
+
+new wx:Slider Box07
+ set Box07.Label "true"
+ set Box07.Max "100"
+ set Box07.ReactiveOnTrack "true"
+ set Box07.Title "Opacity"
+
+new vtk:LoadHola Box08
+
+new std:MathOperationVector Box09
+ set Box09.Type "3"
+
+new vtk:ImageVtkProperties Box10
+
+new creaMaracasVisu:SetPosition Box11
+
+new std:MathOperationVector Box13
+ set Box13.Type "23"
+
+new std:Div Box14
+ set Box14.In2 "100"
+
+new wx:OutputText Box15
+ set Box15.Title "Round Point:"
+
+new wx:CheckBox Box16
+ set Box16.In "true"
+ set Box16.Title "Point Picker Active"
+
+new creaVtk:OutputWindow Box17
+
+new wx:LayoutSplit Box18
+ set Box18.Orientation "H"
+
+new wx:ComboBox Box19
+ set Box19.In "Nothing MouseMove ClickLeft DoubleClickLeft"
+ set Box19.Selection "2"
+ set Box19.Title "Event"
+
+new std:MultipleInputs Box20
+
+
+connect Box01.Out Box02.In
+
+connect Box04.Widget Box05.Widget2
+
+connect Box03.Renderer1 Box02.Renderer
+
+connect Box03.Renderer1 Box00.Renderer
+
+connect Box07.Widget Box05.Widget1
+
+connect Box07.BoxChange Box02.BoxExecute
+
+connect Box08.Out Box03.In
+
+connect Box00.BoxChange Box04.BoxExecute
+
+connect Box00.Point Box09.In0
+
+connect Box08.Out Box10.In
+
+connect Box10.Spacing Box09.In1
+
+connect Box09.Out Box04.In
+
+connect Box03.wxVtkBaseView1 Box11.wxVtkBaseView
+
+connect Box00.BoxChange Box11.BoxExecute
+
+connect Box09.Out Box13.In0
+
+connect Box13.Out Box11.Point
+
+connect Box07.Out Box14.In1
+
+connect Box14.Out Box02.Opacity
+
+connect Box13.Out Box15.In
+
+connect Box00.BoxChange Box15.BoxExecute
+
+connect Box15.Widget Box05.Widget3
+
+connect Box16.Widget Box05.Widget5
+
+connect Box05.Widget Box18.Widget1
+
+connect Box03.Widget Box18.Widget2
+
+connect Box19.Widget Box05.Widget6
+
+connect Box19.Out Box00.TypeEvent
+
+connect Box19.BoxChange Box20.In1
+
+connect Box16.BoxChange Box20.In3
+
+connect Box20.BoxChange Box00.BoxExecute
+
+
+
+# Complex input ports
+exec Box17
+exec Box18
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleBooleanOperationPolyDataFilter.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+vtk:LoadHola:Box00
+ISEXEC:FALSE
+20.514225:65.842216:-900.000000
+56.064225:55.842216:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+10.074288:34.484577:-900.000000
+73.794288:24.484577:-900.000000
+FIN_BOX
+BOX
+creaVtk:BooleanOperationPolyDataFilter:Box02
+ISEXEC:FALSE
+-84.931667:-3.883455:-900.000000
+-27.731667:-13.883455:-900.000000
+PORT
+Operation:"2"
+FIN_BOX
+BOX
+vtk:SphereSource:Box03
+ISEXEC:FALSE
+-66.750036:38.292380:-900.000000
+-26.925036:28.292380:-900.000000
+PORT
+CenterX:"50"
+PORT
+CenterY:"50"
+PORT
+CenterZ:"50"
+PORT
+Radius:"10"
+FIN_BOX
+BOX
+vtk:SphereSource:Box04
+ISEXEC:FALSE
+-115.429192:38.610324:-900.000000
+-75.604192:28.610324:-900.000000
+PORT
+CenterX:"60"
+PORT
+CenterY:"60"
+PORT
+CenterZ:"60"
+PORT
+Radius:"15"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box05
+ISEXEC:TRUE
+17.589025:-59.260516:-900.000000
+56.669025:-69.260516:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CommandButton:Box06
+ISEXEC:FALSE
+-129.629226:-22.380301:-900.000000
+-86.854226:-32.380301:-900.000000
+PORT
+Label:"Run"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box07
+ISEXEC:FALSE
+-77.744753:-60.735724:-900.000000
+-35.344753:-70.735724:-900.000000
+FIN_BOX
+CONNECTIONS:8
+CONNECTION
+Box00:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:Box07:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box07:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box02:In1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box02:In2
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleBooleanOperationPolyDataFilter.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include creaVtk
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola Box00
+
+new creaMaracasVisu:ViewerNV Box01
+
+new creaVtk:BooleanOperationPolyDataFilter Box02
+ set Box02.Operation "2"
+
+new vtk:SphereSource Box03
+ set Box03.CenterX "50"
+ set Box03.CenterY "50"
+ set Box03.CenterZ "50"
+ set Box03.Radius "10"
+
+new vtk:SphereSource Box04
+ set Box04.CenterX "60"
+ set Box04.CenterY "60"
+ set Box04.CenterZ "60"
+ set Box04.Radius "15"
+
+new wx:LayoutSplit Box05
+ set Box05.Orientation "H"
+
+new wx:CommandButton Box06
+ set Box06.Label "Run"
+
+new vtk:PolyDataToActor Box07
+
+
+connect Box00.Out Box01.In
+
+connect Box01.Widget Box05.Widget2
+
+connect Box06.Widget Box05.Widget1
+
+connect Box02.Out Box07.In
+
+connect Box01.Renderer1 Box07.Renderer
+
+connect Box06.BoxChange Box07.BoxExecute
+
+connect Box04.Out Box02.In1
+
+connect Box03.Out Box02.In2
+
+
+
+# Complex input ports
+exec Box05
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleCutter.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:10
+BOX
+creaVtk:Cutter:Box00
+ISEXEC:FALSE
+-145.723171:32.668251:-900.000000
+-113.523171:22.668251:-900.000000
+FIN_BOX
+BOX
+vtk:SphereSource:Box01
+ISEXEC:FALSE
+-111.028659:69.110634:-900.000000
+-71.203659:59.110634:-900.000000
+PORT
+CenterX:"0"
+PORT
+CenterY:"0"
+PORT
+CenterZ:"0"
+PORT
+PhiResolution:"15"
+PORT
+Radius:"40"
+PORT
+ThetaResolution:"15"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+-39.027712:25.464030:-900.000000
+24.692288:15.464030:-900.000000
+PORT
+nTypeView:"7"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box04
+ISEXEC:FALSE
+-160.865702:-7.231106:-900.000000
+-115.625702:-17.231106:-900.000000
+PORT
+Colour:"1 0 0"
+PORT
+LineWidth:"2"
+PORT
+Opacity:"1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box05
+ISEXEC:TRUE
+-85.277640:-110.429457:-900.000000
+-46.197640:-120.429457:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box09
+ISEXEC:FALSE
+-118.071022:-28.000184:-900.000000
+-72.831022:-38.000184:-900.000000
+PORT
+Opacity:"0.2"
+PORT
+Representation:"2"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box13
+ISEXEC:FALSE
+-86.780672:-58.548149:-900.000000
+-46.455672:-68.548149:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:CommandButton:Box15
+ISEXEC:FALSE
+-191.766922:14.485134:-900.000000
+-148.991922:4.485134:-900.000000
+PORT
+Label:"Refresh"
+FIN_BOX
+BOX
+creaVtk:Plane:Box10
+ISEXEC:FALSE
+-159.787919:55.095091:-900.000000
+-128.062919:45.095091:-900.000000
+PORT
+Normal:"0 0 1"
+PORT
+Origin:"0 0 30"
+FIN_BOX
+BOX
+vtk:LoadHola:Box11
+ISEXEC:FALSE
+-22.628739:43.735282:-900.000000
+12.921261:33.735282:-900.000000
+FIN_BOX
+CONNECTIONS:13
+CONNECTION
+Box00:Out:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box04:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box09:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box13:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box15:BoxChange:Box04:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box09:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:Box13:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box15:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box00:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box02:In
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleCutter.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include vtk
+include creaMaracasVisu
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:Cutter Box00
+
+new vtk:SphereSource Box01
+ set Box01.CenterX "0"
+ set Box01.CenterY "0"
+ set Box01.CenterZ "0"
+ set Box01.PhiResolution "15"
+ set Box01.Radius "40"
+ set Box01.ThetaResolution "15"
+
+new creaMaracasVisu:ViewerNV Box02
+ set Box02.nTypeView "7"
+
+new vtk:PolyDataToActor Box04
+ set Box04.Colour "1 0 0"
+ set Box04.LineWidth "2"
+ set Box04.Opacity "1"
+ set Box04.Representation "1"
+
+new wx:LayoutSplit Box05
+ set Box05.Orientation "H"
+
+new vtk:PolyDataToActor Box09
+ set Box09.Opacity "0.2"
+ set Box09.Representation "2"
+
+new vtk:UpdateRender Box13
+ set Box13.Active "true"
+
+new wx:CommandButton Box15
+ set Box15.Label "Refresh"
+
+new creaVtk:Plane Box10
+ set Box10.Normal "0 0 1"
+ set Box10.Origin "0 0 30"
+
+new vtk:LoadHola Box11
+
+
+connect Box00.Out Box04.In
+
+connect Box02.Renderer1 Box04.Renderer
+
+connect Box02.Widget Box05.Widget2
+
+connect Box02.Renderer1 Box09.Renderer
+
+connect Box02.Renderer1 Box13.Renderer
+
+connect Box15.BoxChange Box04.BoxExecute
+
+connect Box04.BoxChange Box09.BoxExecute
+
+connect Box09.BoxChange Box13.BoxExecute
+
+connect Box01.Out Box00.In
+
+connect Box01.Out Box09.In
+
+connect Box15.Widget Box05.Widget1
+
+connect Box10.Out Box00.ImplicitFunction
+
+connect Box11.Out Box02.In
+
+
+
+# Complex input ports
+exec Box05
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleDelaunay3D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:10
+BOX
+creaVtk:Delaunay3D:Box03
+ISEXEC:FALSE
+-2.472015:3.957655:-900.000000
+35.727985:-6.042345:-900.000000
+PORT
+Alpha:"0"
+PORT
+Tolerance:"0"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box04
+ISEXEC:FALSE
+-126.280141:32.405606:-900.000000
+-62.560141:22.405606:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:Box05
+ISEXEC:FALSE
+-120.467476:57.400064:-900.000000
+-84.917476:47.400064:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box06
+ISEXEC:FALSE
+-5.919702:-30.569827:-900.000000
+36.480298:-40.569827:-900.000000
+PORT
+Opacity:"0.4"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box07
+ISEXEC:TRUE
+-161.991926:-50.380782:-900.000000
+-122.911926:-60.380782:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CommandButton:Box08
+ISEXEC:FALSE
+-179.483711:26.604189:-900.000000
+-136.708711:16.604189:-900.000000
+PORT
+Label:"Run"
+FIN_BOX
+BOX
+creaMaracasVisu:DrawAxe3D:Box10
+ISEXEC:FALSE
+-99.671144:-20.425965:-900.000000
+-61.971144:-30.425965:-900.000000
+PORT
+Colour:"0 0 1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box11
+ISEXEC:FALSE
+-67.014817:80.569084:-900.000000
+-27.289817:70.569084:-900.000000
+PORT
+In1:"10 10 10 30 50"
+FIN_BOX
+BOX
+std:ConcatStrings:Box12
+ISEXEC:FALSE
+-31.127956:68.291016:-900.000000
+8.597044:58.291016:-900.000000
+PORT
+In1:"80 20 10 30 50"
+FIN_BOX
+BOX
+std:ConcatStrings:Box13
+ISEXEC:FALSE
+-15.540973:57.652069:-900.000000
+24.184027:47.652069:-900.000000
+PORT
+In1:"40 60 30 30 50"
+FIN_BOX
+CONNECTIONS:14
+CONNECTION
+Box05:Out:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box07:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box07:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Renderer1:Box06:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box10:lstPointX
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box10:lstPointY
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box10:lstPointZ
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box03:LstPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box03:LstPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box03:LstPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box04:Renderer1:Box10:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box10:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box06:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleDelaunay3D.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include creaMaracasVisu
+include vtk
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:Delaunay3D Box03
+ set Box03.Alpha "0"
+ set Box03.Tolerance "0"
+
+new creaMaracasVisu:ViewerNV Box04
+
+new vtk:LoadHola Box05
+
+new vtk:PolyDataToActor Box06
+ set Box06.Opacity "0.4"
+
+new wx:LayoutSplit Box07
+ set Box07.Orientation "H"
+
+new wx:CommandButton Box08
+ set Box08.Label "Run"
+
+new creaMaracasVisu:DrawAxe3D Box10
+ set Box10.Colour "0 0 1"
+
+new std:ConcatStrings Box11
+ set Box11.In1 "10 10 10 30 50"
+
+new std:ConcatStrings Box12
+ set Box12.In1 "80 20 10 30 50"
+
+new std:ConcatStrings Box13
+ set Box13.In1 "40 60 30 30 50"
+
+
+connect Box05.Out Box04.In
+
+connect Box03.Out Box06.In
+
+connect Box04.Widget Box07.Widget2
+
+connect Box08.Widget Box07.Widget1
+
+connect Box04.Renderer1 Box06.Renderer
+
+connect Box11.Out Box10.lstPointX
+
+connect Box12.Out Box10.lstPointY
+
+connect Box13.Out Box10.lstPointZ
+
+connect Box11.Out Box03.LstPointsX
+
+connect Box12.Out Box03.LstPointsY
+
+connect Box13.Out Box03.LstPointsZ
+
+connect Box04.Renderer1 Box10.Renderer
+
+connect Box08.BoxChange Box10.BoxExecute
+
+connect Box08.BoxChange Box06.BoxExecute
+
+
+
+# Complex input ports
+exec Box07
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleFillHoles.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:17
+BOX
+creaVtk:Stripper:Box03
+ISEXEC:FALSE
+6.762907:33.247744:-900.000000
+40.437907:23.247744:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box05
+ISEXEC:FALSE
+23.670785:-15.139648:-900.000000
+87.390785:-25.139648:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:Box06
+ISEXEC:FALSE
+57.254540:51.170565:-900.000000
+92.804540:41.170565:-900.000000
+FIN_BOX
+BOX
+creaVtk:OutputWindow:Box08
+ISEXEC:TRUE
+-66.866442:-103.666489:-900.000000
+-26.266442:-113.666489:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box09
+ISEXEC:TRUE
+20.844703:-115.072869:-900.000000
+59.924703:-125.072869:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box11
+ISEXEC:FALSE
+-98.079015:-46.165323:-900.000000
+-52.839015:-56.165323:-900.000000
+PORT
+Representation:"2"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box12
+ISEXEC:FALSE
+-67.131351:-85.498261:-900.000000
+-26.806351:-95.498261:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:SphereSource:Box13
+ISEXEC:FALSE
+-32.341283:37.565115:-900.000000
+7.483717:27.565115:-900.000000
+PORT
+PhiResolution:"20"
+PORT
+Radius:"40"
+PORT
+ThetaResolution:"20"
+FIN_BOX
+BOX
+creaVtk:MeshCutByAxis:Box14
+ISEXEC:FALSE
+-47.918925:9.265731:-900.000000
+-6.843925:-0.734269:-900.000000
+PORT
+InsideVol:"false"
+PORT
+Point:"0 0 0"
+PORT
+Type:"x"
+FIN_BOX
+BOX
+creaVtk:FillHolesFilter:Box15
+ISEXEC:FALSE
+-32.600910:-15.139242:-900.000000
+5.774090:-25.139242:-900.000000
+PORT
+HoleSize:"500"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box16
+ISEXEC:FALSE
+-10.056643:-64.330547:-900.000000
+35.183357:-74.330547:-900.000000
+PORT
+Colour:"1 0 0"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+wx:Slider:Box17
+ISEXEC:FALSE
+-139.644776:80.915665:-900.000000
+-88.244776:70.915665:-900.000000
+PORT
+In:"100"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+std:Div:Box18
+ISEXEC:FALSE
+-120.720951:61.339294:-900.000000
+-91.395951:51.339294:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box19
+ISEXEC:FALSE
+-146.170233:11.745822:-900.000000
+-88.610233:1.745822:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box20
+ISEXEC:FALSE
+-88.322583:75.792656:-900.000000
+-36.922583:65.792656:-900.000000
+PORT
+In:"100"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+std:Div:Box21
+ISEXEC:FALSE
+-78.208125:56.542558:-900.000000
+-48.883125:46.542558:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+std:MultipleInputs:Box22
+ISEXEC:FALSE
+-76.674118:-1.305091:-900.000000
+-36.974118:-11.305091:-900.000000
+FIN_BOX
+CONNECTIONS:21
+CONNECTION
+Box06:Out:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box09:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box12:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box11:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box16:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box11:BoxChange:Box16:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box16:BoxChange:Box12:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box18:In1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box19:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box11:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box21:In1
+NumberOfControlPoints:0
+CONNECTION
+Box20:Widget:Box19:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box19:Widget:Box09:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box16:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box20:BoxChange:Box22:In2
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box22:In1
+NumberOfControlPoints:0
+CONNECTION
+Box22:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleFillHoles.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include creaMaracasVisu
+include vtk
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:Stripper Box03
+
+new creaMaracasVisu:ViewerNV Box05
+
+new vtk:LoadHola Box06
+
+new creaVtk:OutputWindow Box08
+
+new wx:LayoutSplit Box09
+ set Box09.Orientation "H"
+
+new vtk:PolyDataToActor Box11
+ set Box11.Representation "2"
+
+new vtk:UpdateRender Box12
+ set Box12.Active "true"
+
+new vtk:SphereSource Box13
+ set Box13.PhiResolution "20"
+ set Box13.Radius "40"
+ set Box13.ThetaResolution "20"
+
+new creaVtk:MeshCutByAxis Box14
+ set Box14.InsideVol "false"
+ set Box14.Point "0 0 0"
+ set Box14.Type "x"
+
+new creaVtk:FillHolesFilter Box15
+ set Box15.HoleSize "500"
+
+new vtk:PolyDataToActor Box16
+ set Box16.Colour "1 0 0"
+ set Box16.Representation "1"
+
+new wx:Slider Box17
+ set Box17.In "100"
+ set Box17.Max "100"
+ set Box17.ReactiveOnTrack "true"
+
+new std:Div Box18
+ set Box18.In2 "100"
+
+new wx:LayoutLine Box19
+
+new wx:Slider Box20
+ set Box20.In "100"
+ set Box20.Max "100"
+ set Box20.ReactiveOnTrack "true"
+
+new std:Div Box21
+ set Box21.In2 "100"
+
+new std:MultipleInputs Box22
+
+
+connect Box06.Out Box05.In
+
+connect Box05.Widget Box09.Widget2
+
+connect Box05.Renderer1 Box11.Renderer
+
+connect Box05.Renderer1 Box12.Renderer
+
+connect Box13.Out Box14.In
+
+connect Box14.Out Box11.In
+
+connect Box14.Out Box15.In
+
+connect Box15.Out Box16.In
+
+connect Box05.Renderer1 Box16.Renderer
+
+connect Box11.BoxChange Box16.BoxExecute
+
+connect Box16.BoxChange Box12.BoxExecute
+
+connect Box17.Out Box18.In1
+
+connect Box17.Widget Box19.Widget1
+
+connect Box18.Out Box11.Opacity
+
+connect Box20.Out Box21.In1
+
+connect Box20.Widget Box19.Widget3
+
+connect Box19.Widget Box09.Widget1
+
+connect Box21.Out Box16.Opacity
+
+connect Box20.BoxChange Box22.In2
+
+connect Box17.BoxChange Box22.In1
+
+connect Box22.BoxChange Box11.BoxExecute
+
+
+
+# Complex input ports
+exec Box08
+exec Box09
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleGetCameraInfo.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:9
+BOX
+creaMaracasVisu:ViewerNV:Box00
+ISEXEC:FALSE
+-0.450871:79.052673:-900.000000
+63.269129:69.052673:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box01
+ISEXEC:TRUE
+8.265964:-80.254995:-900.000000
+53.840964:-90.254995:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box02
+ISEXEC:FALSE
+-75.295416:-45.087076:-900.000000
+-17.735416:-55.087076:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box03
+ISEXEC:FALSE
+-87.919797:29.456889:-900.000000
+-42.344797:19.456889:-900.000000
+PORT
+Title:"FocalPoint"
+FIN_BOX
+BOX
+creaVtk:GetCameraInfo:Box04
+ISEXEC:FALSE
+-49.144912:58.913779:-900.000000
+-3.569912:48.913779:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box05
+ISEXEC:FALSE
+-67.018056:11.583746:-900.000000
+-21.443056:1.583746:-900.000000
+PORT
+Title:"Position"
+FIN_BOX
+BOX
+wx:OutputText:Box06
+ISEXEC:FALSE
+-40.405285:-7.191139:-900.000000
+5.169715:-17.191139:-900.000000
+PORT
+Title:"ViewUp"
+FIN_BOX
+BOX
+vtk:LoadHola:Box07
+ISEXEC:FALSE
+-26.901955:98.590405:-900.000000
+18.673045:88.590405:-900.000000
+FIN_BOX
+BOX
+wx:CommandButton:Box08
+ISEXEC:FALSE
+-118.579009:79.353253:-900.000000
+-73.004009:69.353253:-900.000000
+PORT
+In:"Refresh"
+FIN_BOX
+CONNECTIONS:15
+CONNECTION
+Box00:Widget:Box01:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box01:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box02:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box02:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box02:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box00:Renderer1:Box04:vtkRenderer
+NumberOfControlPoints:0
+CONNECTION
+Box04:FocalPoint:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Position:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:ViewUp:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box02:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box03:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box05:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box06:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box04:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleGetCameraInfo.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include wx
+include creaVtk
+include vtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:ViewerNV Box00
+
+new wx:LayoutSplit Box01
+ set Box01.Orientation "H"
+
+new wx:LayoutLine Box02
+
+new wx:OutputText Box03
+ set Box03.Title "FocalPoint"
+
+new creaVtk:GetCameraInfo Box04
+
+new wx:OutputText Box05
+ set Box05.Title "Position"
+
+new wx:OutputText Box06
+ set Box06.Title "ViewUp"
+
+new vtk:LoadHola Box07
+
+new wx:CommandButton Box08
+ set Box08.In "Refresh"
+
+
+connect Box00.Widget Box01.Widget2
+
+connect Box02.Widget Box01.Widget1
+
+connect Box06.Widget Box02.Widget3
+
+connect Box05.Widget Box02.Widget2
+
+connect Box03.Widget Box02.Widget1
+
+connect Box00.Renderer1 Box04.vtkRenderer
+
+connect Box04.FocalPoint Box03.In
+
+connect Box04.Position Box05.In
+
+connect Box04.ViewUp Box06.In
+
+connect Box07.Out Box00.In
+
+connect Box08.Widget Box02.Widget4
+
+connect Box08.BoxChange Box03.BoxExecute
+
+connect Box08.BoxChange Box05.BoxExecute
+
+connect Box08.BoxChange Box06.BoxExecute
+
+connect Box08.BoxChange Box04.BoxExecute
+
+
+
+# Complex input ports
+exec Box01
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleHausdorffDistancePointSetFilter.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:35
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+296.629210:12.955195:-900.000000
+360.349210:2.955195:-900.000000
+PORT
+nTypeView:"6"
+FIN_BOX
+BOX
+vtk:LoadHola:Box03
+ISEXEC:FALSE
+157.002336:46.757753:-900.000000
+192.552336:36.757753:-900.000000
+FIN_BOX
+BOX
+creaVtk:OutputWindow:Box06
+ISEXEC:TRUE
+1.434151:-390.631803:-900.000000
+42.034151:-400.631803:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box07
+ISEXEC:TRUE
+84.617219:-387.180899:-900.000000
+123.697219:-397.180899:-900.000000
+PORT
+Orientation:"H"
+PORT
+Proportion:"30"
+FIN_BOX
+BOX
+wx:LayoutLine:Box08
+ISEXEC:FALSE
+28.433535:-355.027567:-900.000000
+85.993535:-365.027567:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box10
+ISEXEC:FALSE
+53.348954:-232.163398:-900.000000
+93.673954:-242.163398:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:HausdorffDistancePointSetFilter:Box13
+ISEXEC:FALSE
+-4.243130:-64.340632:-900.000000
+51.631870:-74.340632:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box14
+ISEXEC:FALSE
+-5.815841:-151.204618:-900.000000
+39.424159:-161.204618:-900.000000
+PORT
+Colour:"1 0 1"
+PORT
+ScalarVisibility:"true"
+PORT
+ScalarVisibilityOn_NameColorArray:"Distance"
+FIN_BOX
+BOX
+std:MultipleInputs:Box15
+ISEXEC:FALSE
+-14.222548:-181.438246:-900.000000
+25.477452:-191.438246:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box17
+ISEXEC:FALSE
+-268.774700:-17.240416:-900.000000
+-217.374700:-27.240416:-900.000000
+PORT
+In:"0"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity"
+FIN_BOX
+BOX
+std:Div:Box18
+ISEXEC:FALSE
+-239.724516:-35.067991:-900.000000
+-210.399516:-45.067991:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+creaVtk:ScalarsToColors:Box19
+ISEXEC:FALSE
+92.332707:-30.067916:-900.000000
+133.857707:-40.067916:-900.000000
+PORT
+Type:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box21
+ISEXEC:FALSE
+-244.045924:-76.548342:-900.000000
+-186.485924:-86.548342:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"Surface A"
+FIN_BOX
+BOX
+creaVtk:ScalarBarActor:Box23
+ISEXEC:FALSE
+-98.492869:-129.189186:-900.000000
+-57.667869:-139.189186:-900.000000
+PORT
+DisplayPosition:"5 30"
+PORT
+Title:"DistAtoB"
+FIN_BOX
+BOX
+std:ConcatStrings:Box26
+ISEXEC:FALSE
+40.116283:-131.073416:-900.000000
+79.841283:-141.073416:-900.000000
+PORT
+In1:"0"
+PORT
+In2:" "
+FIN_BOX
+BOX
+wx:CheckBox:Box27
+ISEXEC:FALSE
+-230.713713:-50.042390:-900.000000
+-194.388713:-60.042390:-900.000000
+PORT
+In:"true"
+PORT
+Title:"Hausdorff"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box28
+ISEXEC:FALSE
+144.583506:-160.381381:-900.000000
+189.823506:-170.381381:-900.000000
+PORT
+Colour:"1 1 0"
+PORT
+ScalarVisibility:"true"
+PORT
+ScalarVisibilityOn_NameColorArray:"Distance"
+FIN_BOX
+BOX
+wx:Slider:Box29
+ISEXEC:FALSE
+-151.123182:7.444080:-900.000000
+-99.723182:-2.555920:-900.000000
+PORT
+In:"0"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity"
+FIN_BOX
+BOX
+std:Div:Box30
+ISEXEC:FALSE
+-126.614422:-18.282583:-900.000000
+-97.289422:-28.282583:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box31
+ISEXEC:FALSE
+-143.091108:-78.667405:-900.000000
+-85.531108:-88.667405:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CheckBox:Box32
+ISEXEC:FALSE
+-69.062463:-23.402224:-900.000000
+-32.737463:-33.402224:-900.000000
+PORT
+In:"true"
+PORT
+Title:"Hausdorff"
+FIN_BOX
+BOX
+wx:LayoutTab:Box33
+ISEXEC:FALSE
+-242.607538:-103.970480:-900.000000
+-185.047538:-113.970480:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:Box34
+ISEXEC:FALSE
+-144.671933:-105.710866:-900.000000
+-87.111933:-115.710866:-900.000000
+PORT
+WinTitle:"Surface B"
+FIN_BOX
+BOX
+std:ConcatStrings:Box35
+ISEXEC:FALSE
+184.752770:-123.184507:-900.000000
+224.477770:-133.184507:-900.000000
+PORT
+In1:"0"
+PORT
+In2:" "
+FIN_BOX
+BOX
+creaVtk:ScalarsToColors:Box36
+ISEXEC:FALSE
+154.166636:-25.865345:-900.000000
+195.691636:-35.865345:-900.000000
+PORT
+Type:"100"
+FIN_BOX
+BOX
+creaVtk:ScalarBarActor:Box37
+ISEXEC:FALSE
+172.652599:-65.711863:-900.000000
+213.477599:-75.711863:-900.000000
+PORT
+Title:"DistBtoA"
+FIN_BOX
+BOX
+vtk:MarchingCubes:Box38
+ISEXEC:FALSE
+85.703833:23.290306:-900.000000
+127.503833:13.290306:-900.000000
+PORT
+Value:"2000"
+FIN_BOX
+BOX
+vtk:MarchingCubes:Box39
+ISEXEC:FALSE
+138.163210:20.820758:-900.000000
+179.963210:10.820758:-900.000000
+PORT
+Value:"1550"
+FIN_BOX
+BOX
+wx:LayoutLine:Box40
+ISEXEC:FALSE
+-168.946872:-272.505294:-900.000000
+-111.386872:-282.505294:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box43
+ISEXEC:FALSE
+-192.398986:-249.561605:-900.000000
+-155.623986:-259.561605:-900.000000
+PORT
+Title:"Retative Distance A to B"
+FIN_BOX
+BOX
+wx:OutputText:Box44
+ISEXEC:FALSE
+-150.058217:-249.000135:-900.000000
+-113.283217:-259.000135:-900.000000
+PORT
+Title:"Retative Distance B to A"
+FIN_BOX
+BOX
+wx:OutputText:Box45
+ISEXEC:FALSE
+-105.995753:-246.824890:-900.000000
+-69.220753:-256.824890:-900.000000
+PORT
+Title:"Hausdorff Distance"
+FIN_BOX
+BOX
+wx:OutputText:Box46
+ISEXEC:FALSE
+-232.606583:-249.953591:-900.000000
+-195.831583:-259.953591:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box47
+ISEXEC:FALSE
+-166.604357:-58.947810:-900.000000
+-126.904357:-68.947810:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box48
+ISEXEC:FALSE
+-83.122100:-53.867603:-900.000000
+-43.422100:-63.867603:-900.000000
+FIN_BOX
+CONNECTIONS:60
+CONNECTION
+Box03:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box07:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box07:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box10:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box15:BoxChange:Box10:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box18:In1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box14:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box14:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box19:LookupTable:Box14:ScalarVisibilityOn_LookupTable
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box21:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box23:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box19:LookupTable:Box23:LookupTable
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box14:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:BoxChange:Box15:In5
+NumberOfControlPoints:0
+CONNECTION
+Box13:OutA:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box14:ScalarVisibilityOn_ScalarRange
+NumberOfControlPoints:0
+CONNECTION
+Box13:RelativeDistanceAtoB:Box26:In3
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box14:ScalarVisibility
+NumberOfControlPoints:0
+CONNECTION
+Box27:Widget:Box21:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box29:Out:Box30:In1
+NumberOfControlPoints:0
+CONNECTION
+Box29:Widget:Box31:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box32:Widget:Box31:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box21:Widget:Box33:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box33:Widget:Box08:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box31:Widget:Box34:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box34:Widget:Box08:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box28:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box29:BoxChange:Box28:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box28:BoxChange:Box15:In7
+NumberOfControlPoints:0
+CONNECTION
+Box13:RelativeDistanceBtoA:Box35:In3
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box28:ScalarVisibilityOn_ScalarRange
+NumberOfControlPoints:0
+CONNECTION
+Box13:OutB:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box28:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box28:ScalarVisibility
+NumberOfControlPoints:0
+CONNECTION
+Box36:LookupTable:Box28:ScalarVisibilityOn_LookupTable
+NumberOfControlPoints:0
+CONNECTION
+Box36:LookupTable:Box37:LookupTable
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box37:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box38:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box39:In
+NumberOfControlPoints:0
+CONNECTION
+Box38:Out:Box13:InA
+NumberOfControlPoints:0
+CONNECTION
+Box39:Out:Box13:InB
+NumberOfControlPoints:0
+CONNECTION
+Box40:Widget:Box08:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box44:Widget:Box40:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box13:HausdorffDistance:Box45:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:RelativeDistanceAtoB:Box43:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:RelativeDistanceBtoA:Box44:In
+NumberOfControlPoints:0
+CONNECTION
+Box45:Widget:Box40:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box43:Widget:Box40:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box46:Widget:Box40:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box23:Active
+NumberOfControlPoints:0
+CONNECTION
+Box47:BoxChange:Box23:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box47:In2
+NumberOfControlPoints:0
+CONNECTION
+Box27:BoxChange:Box47:In4
+NumberOfControlPoints:0
+CONNECTION
+Box32:BoxChange:Box48:In2
+NumberOfControlPoints:0
+CONNECTION
+Box29:BoxChange:Box48:In4
+NumberOfControlPoints:0
+CONNECTION
+Box48:BoxChange:Box37:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box37:Active
+NumberOfControlPoints:0
+CONNECTION
+Box27:BoxChange:Box15:In2
+NumberOfControlPoints:0
+CONNECTION
+Box37:BoxChange:Box15:In3
+NumberOfControlPoints:0
+CONNECTION
+Box23:BoxChange:Box15:In1
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleHausdorffDistancePointSetFilter.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include vtk
+include creaVtk
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:ViewerNV Box02
+ set Box02.nTypeView "6"
+
+new vtk:LoadHola Box03
+
+new creaVtk:OutputWindow Box06
+
+new wx:LayoutSplit Box07
+ set Box07.Orientation "H"
+ set Box07.Proportion "30"
+
+new wx:LayoutLine Box08
+
+new vtk:UpdateRender Box10
+ set Box10.Active "true"
+
+new creaVtk:HausdorffDistancePointSetFilter Box13
+
+new vtk:PolyDataToActor Box14
+ set Box14.Colour "1 0 1"
+ set Box14.ScalarVisibility "true"
+ set Box14.ScalarVisibilityOn_NameColorArray "Distance"
+
+new std:MultipleInputs Box15
+
+new wx:Slider Box17
+ set Box17.In "0"
+ set Box17.Label "true"
+ set Box17.Max "100"
+ set Box17.ReactiveOnTrack "true"
+ set Box17.Title "Opacity"
+
+new std:Div Box18
+ set Box18.In2 "100"
+
+new creaVtk:ScalarsToColors Box19
+ set Box19.Type "100"
+
+new wx:LayoutLine Box21
+ set Box21.Orientation "H"
+ set Box21.WinTitle "Surface A"
+
+new creaVtk:ScalarBarActor Box23
+ set Box23.DisplayPosition "5 30"
+ set Box23.Title "DistAtoB"
+
+new std:ConcatStrings Box26
+ set Box26.In1 "0"
+ set Box26.In2 " "
+
+new wx:CheckBox Box27
+ set Box27.In "true"
+ set Box27.Title "Hausdorff"
+
+new vtk:PolyDataToActor Box28
+ set Box28.Colour "1 1 0"
+ set Box28.ScalarVisibility "true"
+ set Box28.ScalarVisibilityOn_NameColorArray "Distance"
+
+new wx:Slider Box29
+ set Box29.In "0"
+ set Box29.Label "true"
+ set Box29.Max "100"
+ set Box29.ReactiveOnTrack "true"
+ set Box29.Title "Opacity"
+
+new std:Div Box30
+ set Box30.In2 "100"
+
+new wx:LayoutLine Box31
+ set Box31.Orientation "H"
+
+new wx:CheckBox Box32
+ set Box32.In "true"
+ set Box32.Title "Hausdorff"
+
+new wx:LayoutTab Box33
+
+new wx:LayoutTab Box34
+ set Box34.WinTitle "Surface B"
+
+new std:ConcatStrings Box35
+ set Box35.In1 "0"
+ set Box35.In2 " "
+
+new creaVtk:ScalarsToColors Box36
+ set Box36.Type "100"
+
+new creaVtk:ScalarBarActor Box37
+ set Box37.Title "DistBtoA"
+
+new vtk:MarchingCubes Box38
+ set Box38.Value "2000"
+
+new vtk:MarchingCubes Box39
+ set Box39.Value "1550"
+
+new wx:LayoutLine Box40
+
+new wx:OutputText Box43
+ set Box43.Title "Retative Distance A to B"
+
+new wx:OutputText Box44
+ set Box44.Title "Retative Distance B to A"
+
+new wx:OutputText Box45
+ set Box45.Title "Hausdorff Distance"
+
+new wx:OutputText Box46
+
+new std:MultipleInputs Box47
+
+new std:MultipleInputs Box48
+
+
+connect Box03.Out Box02.In
+
+connect Box02.Widget Box07.Widget2
+
+connect Box08.Widget Box07.Widget1
+
+connect Box02.Renderer1 Box10.Renderer
+
+connect Box15.BoxChange Box10.BoxExecute
+
+connect Box17.Out Box18.In1
+
+connect Box18.Out Box14.Opacity
+
+connect Box02.Renderer1 Box14.Renderer
+
+connect Box19.LookupTable Box14.ScalarVisibilityOn_LookupTable
+
+connect Box17.Widget Box21.Widget3
+
+connect Box02.Renderer1 Box23.Renderer
+
+connect Box19.LookupTable Box23.LookupTable
+
+connect Box17.BoxChange Box14.BoxExecute
+
+connect Box14.BoxChange Box15.In5
+
+connect Box13.OutA Box14.In
+
+connect Box26.Out Box14.ScalarVisibilityOn_ScalarRange
+
+connect Box13.RelativeDistanceAtoB Box26.In3
+
+connect Box27.Out Box14.ScalarVisibility
+
+connect Box27.Widget Box21.Widget4
+
+connect Box29.Out Box30.In1
+
+connect Box29.Widget Box31.Widget3
+
+connect Box32.Widget Box31.Widget4
+
+connect Box21.Widget Box33.Widget1
+
+connect Box33.Widget Box08.Widget2
+
+connect Box31.Widget Box34.Widget1
+
+connect Box34.Widget Box08.Widget4
+
+connect Box30.Out Box28.Opacity
+
+connect Box29.BoxChange Box28.BoxExecute
+
+connect Box28.BoxChange Box15.In7
+
+connect Box13.RelativeDistanceBtoA Box35.In3
+
+connect Box35.Out Box28.ScalarVisibilityOn_ScalarRange
+
+connect Box13.OutB Box28.In
+
+connect Box02.Renderer1 Box28.Renderer
+
+connect Box32.Out Box28.ScalarVisibility
+
+connect Box36.LookupTable Box28.ScalarVisibilityOn_LookupTable
+
+connect Box36.LookupTable Box37.LookupTable
+
+connect Box02.Renderer1 Box37.Renderer
+
+connect Box03.Out Box38.In
+
+connect Box03.Out Box39.In
+
+connect Box38.Out Box13.InA
+
+connect Box39.Out Box13.InB
+
+connect Box40.Widget Box08.Widget7
+
+connect Box44.Widget Box40.Widget3
+
+connect Box13.HausdorffDistance Box45.In
+
+connect Box13.RelativeDistanceAtoB Box43.In
+
+connect Box13.RelativeDistanceBtoA Box44.In
+
+connect Box45.Widget Box40.Widget5
+
+connect Box43.Widget Box40.Widget2
+
+connect Box46.Widget Box40.Widget1
+
+connect Box27.Out Box23.Active
+
+connect Box47.BoxChange Box23.BoxExecute
+
+connect Box17.BoxChange Box47.In2
+
+connect Box27.BoxChange Box47.In4
+
+connect Box32.BoxChange Box48.In2
+
+connect Box29.BoxChange Box48.In4
+
+connect Box48.BoxChange Box37.BoxExecute
+
+connect Box32.Out Box37.Active
+
+connect Box27.BoxChange Box15.In2
+
+connect Box37.BoxChange Box15.In3
+
+connect Box23.BoxChange Box15.In1
+
+
+
+# Complex input ports
+exec Box06
+exec Box07
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleKMeans.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:7
+BOX
+creaVtk:KMeansStatistics:Box00
+ISEXEC:FALSE
+-38.722672:-3.319086:-900.000000
+3.477328:-13.319086:-900.000000
+PORT
+NumberOfClusters:"5"
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+-59.901602:70.965223:-900.000000
+-24.351602:60.965223:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+-11.853879:-34.929430:-900.000000
+51.866121:-44.929430:-900.000000
+FIN_BOX
+BOX
+vtk:ExtractVtkImageFilter:Box08
+ISEXEC:FALSE
+-62.588481:45.993051:-900.000000
+-15.713481:35.993051:-900.000000
+PORT
+Index:"0 0 40"
+PORT
+Size:"100 100 2"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box09
+ISEXEC:FALSE
+-95.219704:-34.527844:-900.000000
+-31.499704:-44.527844:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ImageChangeInformation:Box11
+ISEXEC:FALSE
+-66.065619:24.814120:-900.000000
+-14.540619:14.814120:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box07
+ISEXEC:TRUE
+-49.154085:-72.545740:-900.000000
+-10.074085:-82.545740:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:7
+CONNECTION
+Box01:Out:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box11:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box07:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box07:Widget2
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleKMeans.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include vtk
+include creaMaracasVisu
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:KMeansStatistics Box00
+ set Box00.NumberOfClusters "5"
+
+new vtk:LoadHola Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new vtk:ExtractVtkImageFilter Box08
+ set Box08.Index "0 0 40"
+ set Box08.Size "100 100 2"
+
+new creaMaracasVisu:ViewerNV Box09
+
+new creaMaracasVisu:ImageChangeInformation Box11
+
+new wx:LayoutSplit Box07
+ set Box07.Orientation "H"
+
+
+connect Box01.Out Box08.In
+
+connect Box00.Out Box02.In
+
+connect Box08.Out Box11.In
+
+connect Box11.Out Box00.In
+
+connect Box11.Out Box09.In
+
+connect Box09.Widget Box07.Widget1
+
+connect Box02.Widget Box07.Widget2
+
+
+
+# Complex input ports
+exec Box07
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleMeshCutByAxis.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:12
+BOX
+vtk:LoadHola:Box00
+ISEXEC:FALSE
+42.970380:121.375067:-900.000000
+78.520380:111.375067:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+12.381685:53.142024:-900.000000
+48.256685:43.142024:-900.000000
+PORT
+nTypeView:"6 1 2 0"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box02
+ISEXEC:TRUE
+-21.881348:-68.528094:-900.000000
+14.793652:-78.528094:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box03
+ISEXEC:FALSE
+-89.318321:28.465101:-900.000000
+-52.743321:18.465101:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box05
+ISEXEC:FALSE
+49.016284:-54.225839:-900.000000
+91.416284:-64.225839:-900.000000
+PORT
+Colour:"1 0 0"
+FIN_BOX
+BOX
+wx:Slider:Box06
+ISEXEC:FALSE
+-88.015958:64.249653:-900.000000
+-56.440958:54.249653:-900.000000
+PORT
+In:"100"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+std:Div:Box07
+ISEXEC:FALSE
+-32.712798:46.677489:-900.000000
+-3.387798:36.677489:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+creaVtk:MeshCutByAxis:Box08
+ISEXEC:FALSE
+80.897806:-31.255502:-900.000000
+121.972806:-41.255502:-900.000000
+PORT
+InsideVol:"true"
+PORT
+Point:"30 30 30"
+FIN_BOX
+BOX
+vtk:MarchingCubes:Box14
+ISEXEC:FALSE
+74.384670:4.520731:-900.000000
+116.184670:-5.479269:-900.000000
+PORT
+Value:"500"
+FIN_BOX
+BOX
+wx:RadioButton:Box17
+ISEXEC:FALSE
+-36.357203:77.589847:-900.000000
+1.542797:67.589847:-900.000000
+PORT
+In0:"Inside"
+PORT
+In1:"Outside"
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box18
+ISEXEC:FALSE
+111.800931:65.662813:-900.000000
+157.150931:55.662813:-900.000000
+FIN_BOX
+BOX
+std:MathOperationVector:Box19
+ISEXEC:FALSE
+113.596399:21.834168:-900.000000
+161.121399:11.834168:-900.000000
+PORT
+Type:"2"
+FIN_BOX
+CONNECTIONS:18
+CONNECTION
+Box00:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box02:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box02:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:Box05:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box07:In1
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box05:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box08:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box05:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box08:InsideVol
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box18:In
+NumberOfControlPoints:0
+CONNECTION
+Box18:Spacing:Box19:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Point:Box19:In0
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box08:Point
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleMeshCutByAxis.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include wx
+include std
+include creaVtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola Box00
+
+new creaMaracasVisu:ViewerNV Box01
+ set Box01.nTypeView "6 1 2 0"
+
+new wx:LayoutSplit Box02
+ set Box02.Orientation "H"
+
+new wx:LayoutLine Box03
+
+new vtk:PolyDataToActor Box05
+ set Box05.Colour "1 0 0"
+
+new wx:Slider Box06
+ set Box06.In "100"
+ set Box06.Max "100"
+ set Box06.Min "0"
+ set Box06.ReactiveOnTrack "true"
+
+new std:Div Box07
+ set Box07.In2 "100"
+
+new creaVtk:MeshCutByAxis Box08
+ set Box08.InsideVol "true"
+ set Box08.Point "30 30 30"
+
+new vtk:MarchingCubes Box14
+ set Box14.Value "500"
+
+new wx:RadioButton Box17
+ set Box17.In0 "Inside"
+ set Box17.In1 "Outside"
+
+new vtk:ImageVtkProperties Box18
+
+new std:MathOperationVector Box19
+ set Box19.Type "2"
+
+
+connect Box00.Out Box01.In
+
+connect Box01.Widget Box02.Widget2
+
+connect Box03.Widget Box02.Widget1
+
+connect Box01.Renderer1 Box05.Renderer
+
+connect Box06.Widget Box03.Widget1
+
+connect Box06.Out Box07.In1
+
+connect Box07.Out Box05.Opacity
+
+connect Box08.Out Box05.In
+
+connect Box01.BoxChange Box08.BoxExecute
+
+connect Box01.BoxChange Box05.BoxExecute
+
+connect Box00.Out Box14.In
+
+connect Box14.Out Box08.In
+
+connect Box17.Widget Box03.Widget2
+
+connect Box17.Out Box08.InsideVol
+
+connect Box00.Out Box18.In
+
+connect Box18.Spacing Box19.In1
+
+connect Box01.Point Box19.In0
+
+connect Box19.Out Box08.Point
+
+
+
+# Complex input ports
+exec Box02
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleScreenShot.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:5
+BOX
+creaVtk:ScreenShot:Box00
+ISEXEC:FALSE
+-38.417136:17.257698:-900.000000
+7.157864:7.257698:-900.000000
+PORT
+FileName:"ScreenShot.png"
+PORT
+Scale:"2 2"
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+15.306828:70.981662:-900.000000
+60.881828:60.981662:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+6.302811:43.969613:-900.000000
+70.022811:33.969613:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box03
+ISEXEC:TRUE
+-32.414459:-30.763722:-900.000000
+13.160541:-40.763722:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CommandButton:Box04
+ISEXEC:FALSE
+-99.044179:44.569881:-900.000000
+-53.469179:34.569881:-900.000000
+PORT
+Label:"ScreenShot"
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box00:vtkRenderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleScreenShot.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include vtk
+include creaMaracasVisu
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:ScreenShot Box00
+ set Box00.FileName "ScreenShot.png"
+ set Box00.Scale "2 2"
+
+new vtk:LoadHola Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new wx:LayoutSplit Box03
+ set Box03.Orientation "H"
+
+new wx:CommandButton Box04
+ set Box04.Label "ScreenShot"
+
+
+connect Box01.Out Box02.In
+
+connect Box02.Renderer1 Box00.vtkRenderer
+
+connect Box02.Widget Box03.Widget2
+
+connect Box04.Widget Box03.Widget1
+
+connect Box04.BoxChange Box00.BoxExecute
+
+
+
+# Complex input ports
+exec Box03
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleSetCameraInfo.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:10
+BOX
+vtk:LoadHola:Box00
+ISEXEC:FALSE
+-21.909773:76.684205:-900.000000
+23.665227:66.684205:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+-61.227311:54.474299:-900.000000
+2.492689:44.474299:-900.000000
+PORT
+nTypeView:"5"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+20.000000:54.365329:-900.000000
+83.720000:44.365329:-900.000000
+PORT
+nTypeView:"5"
+FIN_BOX
+BOX
+wx:LayoutLine:Box03
+ISEXEC:FALSE
+24.010710:-20.859304:-900.000000
+81.570710:-30.859304:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box04
+ISEXEC:TRUE
+-62.427846:-61.977645:-900.000000
+-16.852846:-71.977645:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-112.250070:-27.162116:-900.000000
+-54.690070:-37.162116:-900.000000
+FIN_BOX
+BOX
+wx:CommandButton:Box06
+ISEXEC:FALSE
+-125.155826:53.273763:-900.000000
+-79.580826:43.273763:-900.000000
+PORT
+Label:"Refresh"
+FIN_BOX
+BOX
+creaVtk:GetCameraInfo:Box07
+ISEXEC:FALSE
+-86.138423:36.466266:-900.000000
+-40.563423:26.466266:-900.000000
+FIN_BOX
+BOX
+creaVtk:SetCameraInfo:Box09
+ISEXEC:FALSE
+-77.734674:16.057162:-900.000000
+-32.159674:6.057162:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box10
+ISEXEC:FALSE
+-68.430524:-2.851272:-900.000000
+-22.855524:-12.851272:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+CONNECTIONS:16
+CONNECTION
+Box00:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box04:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box04:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:Box07:vtkRenderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box09:vtkRenderer
+NumberOfControlPoints:0
+CONNECTION
+Box07:ViewUp:Box09:ViewUp
+NumberOfControlPoints:0
+CONNECTION
+Box07:Position:Box09:Position
+NumberOfControlPoints:0
+CONNECTION
+Box07:FocalPoint:Box09:FocalPoint
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box07:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box10:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box07:BoxChange:Box09:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:Box10:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleSetCameraInfo.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include wx
+include creaVtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola Box00
+
+new creaMaracasVisu:ViewerNV Box01
+ set Box01.nTypeView "5"
+
+new creaMaracasVisu:ViewerNV Box02
+ set Box02.nTypeView "5"
+
+new wx:LayoutLine Box03
+ set Box03.Orientation "H"
+
+new wx:LayoutSplit Box04
+ set Box04.Orientation "H"
+
+new wx:LayoutLine Box05
+
+new wx:CommandButton Box06
+ set Box06.Label "Refresh"
+
+new creaVtk:GetCameraInfo Box07
+
+new creaVtk:SetCameraInfo Box09
+
+new vtk:UpdateRender Box10
+ set Box10.Active "true"
+
+
+connect Box00.Out Box01.In
+
+connect Box00.Out Box02.In
+
+connect Box01.Widget Box03.Widget1
+
+connect Box02.Widget Box03.Widget2
+
+connect Box03.Widget Box04.Widget2
+
+connect Box05.Widget Box04.Widget1
+
+connect Box06.Widget Box05.Widget1
+
+connect Box01.Renderer1 Box07.vtkRenderer
+
+connect Box02.Renderer1 Box09.vtkRenderer
+
+connect Box07.ViewUp Box09.ViewUp
+
+connect Box07.Position Box09.Position
+
+connect Box07.FocalPoint Box09.FocalPoint
+
+connect Box06.BoxChange Box07.BoxExecute
+
+connect Box02.Renderer1 Box10.Renderer
+
+connect Box07.BoxChange Box09.BoxExecute
+
+connect Box09.BoxChange Box10.BoxExecute
+
+
+
+# Complex input ports
+exec Box04
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleStripper.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:21
+BOX
+creaVtk:Stripper:Box03
+ISEXEC:FALSE
+-11.080041:-28.602722:-900.000000
+22.594959:-38.602722:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box05
+ISEXEC:FALSE
+69.707883:6.867455:-900.000000
+133.427883:-3.132545:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:Box06
+ISEXEC:FALSE
+77.511222:77.041163:-900.000000
+113.061222:67.041163:-900.000000
+FIN_BOX
+BOX
+creaVtk:OutputWindow:Box08
+ISEXEC:TRUE
+-31.378810:-187.920863:-900.000000
+9.221190:-197.920863:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box09
+ISEXEC:TRUE
+-95.327818:-189.758498:-900.000000
+-56.247818:-199.758498:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box11
+ISEXEC:FALSE
+-102.646835:-36.050865:-900.000000
+-57.406835:-46.050865:-900.000000
+PORT
+Representation:"2"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box12
+ISEXEC:FALSE
+-65.173714:-134.156961:-900.000000
+-24.848714:-144.156961:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:SphereSource:Box13
+ISEXEC:FALSE
+1.890546:75.328227:-900.000000
+41.715546:65.328227:-900.000000
+PORT
+PhiResolution:"20"
+PORT
+Radius:"40"
+PORT
+ThetaResolution:"20"
+FIN_BOX
+BOX
+creaVtk:MeshCutByAxis:Box14
+ISEXEC:FALSE
+-3.502359:32.303106:-900.000000
+37.572641:22.303106:-900.000000
+PORT
+InsideVol:"false"
+PORT
+Point:"0 0 0"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box16
+ISEXEC:FALSE
+-93.582490:-73.466187:-900.000000
+-48.342490:-83.466187:-900.000000
+PORT
+Colour:"1 0 0"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+wx:Slider:Box17
+ISEXEC:FALSE
+-164.947235:74.138978:-900.000000
+-113.547235:64.138978:-900.000000
+PORT
+In:"30"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Surface"
+FIN_BOX
+BOX
+std:Div:Box18
+ISEXEC:FALSE
+-117.898202:45.100858:-900.000000
+-88.573202:35.100858:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box19
+ISEXEC:FALSE
+-150.477035:4.926720:-900.000000
+-92.917035:-5.073280:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box20
+ISEXEC:FALSE
+-87.903471:71.768822:-900.000000
+-36.503471:61.768822:-900.000000
+PORT
+In:"30"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Surface + cutter"
+FIN_BOX
+BOX
+std:Div:Box21
+ISEXEC:FALSE
+-64.112323:45.768018:-900.000000
+-34.787323:35.768018:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+std:MultipleInputs:Box22
+ISEXEC:FALSE
+-76.674118:-1.305091:-900.000000
+-36.974118:-11.305091:-900.000000
+FIN_BOX
+BOX
+creaVtk:Cutter:Box24
+ISEXEC:FALSE
+-9.135640:-4.567820:-900.000000
+23.064360:-14.567820:-900.000000
+FIN_BOX
+BOX
+creaVtk:Plane:Box25
+ISEXEC:FALSE
+27.533219:17.245608:-900.000000
+59.258219:7.245608:-900.000000
+PORT
+Origin:"0 0 10"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box26
+ISEXEC:FALSE
+-73.286561:-101.665584:-900.000000
+-28.046561:-111.665584:-900.000000
+PORT
+Colour:"0 1 1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+wx:Slider:Box27
+ISEXEC:FALSE
+-223.463982:73.636316:-900.000000
+-172.063982:63.636316:-900.000000
+PORT
+In:"30"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Surface + cutter + stripper"
+FIN_BOX
+BOX
+std:Div:Box28
+ISEXEC:FALSE
+-213.575990:47.651098:-900.000000
+-184.250990:37.651098:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+CONNECTIONS:30
+CONNECTION
+Box06:Out:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box09:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box12:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box11:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box16:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box11:BoxChange:Box16:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box18:In1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box19:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box11:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box21:In1
+NumberOfControlPoints:0
+CONNECTION
+Box20:Widget:Box19:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box19:Widget:Box09:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box16:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box20:BoxChange:Box22:In2
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box22:In1
+NumberOfControlPoints:0
+CONNECTION
+Box22:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box24:In
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:Box24:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Renderer1:Box26:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box26:In
+NumberOfControlPoints:0
+CONNECTION
+Box16:BoxChange:Box26:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box26:BoxChange:Box12:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box28:In1
+NumberOfControlPoints:0
+CONNECTION
+Box27:Widget:Box19:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box27:BoxChange:Box22:In6
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box26:Opacity
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleStripper.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+include creaMaracasVisu
+include vtk
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:Stripper Box03
+
+new creaMaracasVisu:ViewerNV Box05
+
+new vtk:LoadHola Box06
+
+new creaVtk:OutputWindow Box08
+
+new wx:LayoutSplit Box09
+ set Box09.Orientation "H"
+
+new vtk:PolyDataToActor Box11
+ set Box11.Representation "2"
+
+new vtk:UpdateRender Box12
+ set Box12.Active "true"
+
+new vtk:SphereSource Box13
+ set Box13.PhiResolution "20"
+ set Box13.Radius "40"
+ set Box13.ThetaResolution "20"
+
+new creaVtk:MeshCutByAxis Box14
+ set Box14.InsideVol "false"
+ set Box14.Point "0 0 0"
+
+new vtk:PolyDataToActor Box16
+ set Box16.Colour "1 0 0"
+ set Box16.Representation "1"
+
+new wx:Slider Box17
+ set Box17.In "30"
+ set Box17.Label "true"
+ set Box17.Max "100"
+ set Box17.ReactiveOnTrack "true"
+ set Box17.Title "Surface"
+
+new std:Div Box18
+ set Box18.In2 "100"
+
+new wx:LayoutLine Box19
+
+new wx:Slider Box20
+ set Box20.In "30"
+ set Box20.Label "true"
+ set Box20.Max "100"
+ set Box20.ReactiveOnTrack "true"
+ set Box20.Title "Surface + cutter"
+
+new std:Div Box21
+ set Box21.In2 "100"
+
+new std:MultipleInputs Box22
+
+new creaVtk:Cutter Box24
+
+new creaVtk:Plane Box25
+ set Box25.Origin "0 0 10"
+
+new vtk:PolyDataToActor Box26
+ set Box26.Colour "0 1 1"
+ set Box26.Representation "1"
+
+new wx:Slider Box27
+ set Box27.In "30"
+ set Box27.Label "true"
+ set Box27.Max "100"
+ set Box27.ReactiveOnTrack "true"
+ set Box27.Title "Surface + cutter + stripper"
+
+new std:Div Box28
+ set Box28.In2 "100"
+
+
+connect Box06.Out Box05.In
+
+connect Box05.Widget Box09.Widget2
+
+connect Box05.Renderer1 Box11.Renderer
+
+connect Box05.Renderer1 Box12.Renderer
+
+connect Box13.Out Box14.In
+
+connect Box14.Out Box11.In
+
+connect Box05.Renderer1 Box16.Renderer
+
+connect Box11.BoxChange Box16.BoxExecute
+
+connect Box17.Out Box18.In1
+
+connect Box17.Widget Box19.Widget1
+
+connect Box18.Out Box11.Opacity
+
+connect Box20.Out Box21.In1
+
+connect Box20.Widget Box19.Widget3
+
+connect Box19.Widget Box09.Widget1
+
+connect Box21.Out Box16.Opacity
+
+connect Box20.BoxChange Box22.In2
+
+connect Box17.BoxChange Box22.In1
+
+connect Box22.BoxChange Box11.BoxExecute
+
+connect Box14.Out Box24.In
+
+connect Box25.Out Box24.ImplicitFunction
+
+connect Box24.Out Box16.In
+
+connect Box24.Out Box03.In
+
+connect Box05.Renderer1 Box26.Renderer
+
+connect Box03.Out Box26.In
+
+connect Box16.BoxChange Box26.BoxExecute
+
+connect Box26.BoxChange Box12.BoxExecute
+
+connect Box27.Out Box28.In1
+
+connect Box27.Widget Box19.Widget6
+
+connect Box27.BoxChange Box22.In6
+
+connect Box28.Out Box26.Opacity
+
+
+
+# Complex input ports
+exec Box08
+exec Box09
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsExploration_Widget.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsExploration_Widget.bbg
# ----------------------------------
APP_START
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script
-# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsExploration_Widget.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsExploration_Widget.bbs
# ----------------------------------
# BBTK GEditor Script
--- /dev/null
+# ----------------------------------
+# - 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
--- /dev/null
+# ----------------------------------
+# - 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
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/example_BoxWidget_ClipPolydata.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+vtk:LoadHola:Box00
+ISEXEC:FALSE
+-13.850748:68.721067:-900.000000
+21.699252:58.721067:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+-19.979284:45.126531:-900.000000
+43.740716:35.126531:-900.000000
+FIN_BOX
+BOX
+creaVtk:BoxWidget:Box02
+ISEXEC:FALSE
+-38.184214:4.379120:-900.000000
+-1.509214:-5.620880:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box03
+ISEXEC:TRUE
+11.848896:-90.117759:-900.000000
+50.928896:-100.117759:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CommandButton:Box04
+ISEXEC:FALSE
+-85.584870:31.037853:-900.000000
+-42.809870:21.037853:-900.000000
+PORT
+Label:"Refresh"
+FIN_BOX
+BOX
+vtk:SphereSource:Box05
+ISEXEC:FALSE
+26.306848:5.863047:-900.000000
+66.131848:-4.136953:-900.000000
+PORT
+CenterX:"50"
+PORT
+CenterY:"50"
+PORT
+CenterZ:"50"
+PORT
+Radius:"20"
+FIN_BOX
+BOX
+creaVtk:ClipPolyData:Box06
+ISEXEC:FALSE
+-49.518922:-34.972985:-900.000000
+-10.693922:-44.972985:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box07
+ISEXEC:FALSE
+-52.136645:-67.077861:-900.000000
+-9.736645:-77.077861:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box00:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:Box02:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box02:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:ImplicitFunction:Box06:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:Box07:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box07:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/example_BoxWidget_ClipPolydata.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include creaVtk
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola Box00
+
+new creaMaracasVisu:ViewerNV Box01
+
+new creaVtk:BoxWidget Box02
+
+new wx:LayoutSplit Box03
+ set Box03.Orientation "H"
+
+new wx:CommandButton Box04
+ set Box04.Label "Refresh"
+
+new vtk:SphereSource Box05
+ set Box05.CenterX "50"
+ set Box05.CenterY "50"
+ set Box05.CenterZ "50"
+ set Box05.Radius "20"
+
+new creaVtk:ClipPolyData Box06
+
+new vtk:PolyDataToActor Box07
+
+
+connect Box00.Out Box01.In
+
+connect Box01.Renderer1 Box02.Renderer
+
+connect Box01.Widget Box03.Widget2
+
+connect Box04.Widget Box03.Widget1
+
+connect Box04.BoxChange Box02.BoxExecute
+
+connect Box05.Out Box06.In
+
+connect Box02.ImplicitFunction Box06.ImplicitFunction
+
+connect Box06.Out Box07.In
+
+connect Box01.Renderer1 Box07.Renderer
+
+connect Box06.BoxChange Box07.BoxExecute
+
+
+
+# Complex input ports
+exec Box03
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C10/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:2
+COMPLEX_PORT
+filename
+10.332827:23.665507:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+compression
+-17.999118:23.665507:-900.000000
+FIN_COMPLEX_PORT
+BOXES:1
+BOX
+creaVtk:save_YZ_XZ_volume:Box00
+ISEXEC:TRUE
+-15.332582:-5.666389:-900.000000
+30.417418:-15.666389:-900.000000
+FIN_BOX
+CONNECTIONS:2
+CONNECTION
+compression:compression:Box00:Compression
+NumberOfControlPoints:0
+CONNECTION
+filename:filename:Box00:FileName
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C10/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaVtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaVtk:save_YZ_XZ_volume Box00
+
+
+
+
+
+
+# Complex input ports
+input compression Box00.Compression " "
+input filename Box00.FileName " "
+exec Box00
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:CompareImagesByRGB-Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+OutWidget
+-141.188304:-163.078587:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:2
+COMPLEX_PORT
+Image1
+-40.537616:163.388080:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Image2
+30.013598:159.944870:-900.000000
+FIN_COMPLEX_PORT
+BOXES:20
+BOX
+creaMaracasVisu:ViewerNV:Box00
+ISEXEC:FALSE
+-43.426794:-66.268413:-900.000000
+20.293206:-76.268413:-900.000000
+PORT
+nTypeView:"1 2 0"
+FIN_BOX
+BOX
+creaVtk:ImageAppendComponents:Box02
+ISEXEC:FALSE
+-203.582916:-29.421199:-900.000000
+-150.532916:-39.421199:-900.000000
+FIN_BOX
+BOX
+vtk:RescaleSlopeIntercept:Box05
+ISEXEC:FALSE
+-43.951428:89.905525:-900.000000
+4.173572:79.905525:-900.000000
+PORT
+A:"0"
+PORT
+B:"255"
+PORT
+OutputFormat:"VTK_UNSIGNED_CHAR"
+PORT
+Type:"2"
+FIN_BOX
+BOX
+creaMaracasVisu:SetwxVtkBaseViewLookupTable:Box06
+ISEXEC:FALSE
+-12.855698:-115.985952:-900.000000
+43.994302:-125.985952:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box07
+ISEXEC:FALSE
+-141.202294:-144.516735:-900.000000
+-102.122294:-154.516735:-900.000000
+PORT
+Proportion:"50"
+FIN_BOX
+BOX
+creaVtk:ScalarsToColors:Box10
+ISEXEC:FALSE
+55.522942:-52.647302:-900.000000
+97.047942:-62.647302:-900.000000
+PORT
+Type:"3"
+FIN_BOX
+BOX
+vtk:RescaleSlopeIntercept:Box13
+ISEXEC:FALSE
+23.644953:90.680497:-900.000000
+71.769953:80.680497:-900.000000
+PORT
+A:"0"
+PORT
+B:"255"
+PORT
+OutputFormat:"VTK_UNSIGNED_CHAR"
+PORT
+Type:"2"
+FIN_BOX
+BOX
+std:StringSelect:Box18
+ISEXEC:FALSE
+-202.842874:73.343866:-900.000000
+-160.682874:63.343866:-900.000000
+PORT
+In0:"1 1 1"
+PORT
+In1:"0 0 0"
+PORT
+In2:"1 0 0"
+PORT
+In3:"0 1 0"
+PORT
+In4:"0 0 1"
+PORT
+In5:"1 1 0"
+PORT
+In6:"1 0 1"
+PORT
+In7:"0 1 1"
+FIN_BOX
+BOX
+PackRecalage:AddImageToVector:Box19
+ISEXEC:FALSE
+-13.743788:38.895326:-900.000000
+31.656212:28.895326:-900.000000
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box20
+ISEXEC:FALSE
+-271.077722:53.758698:-900.000000
+-221.677722:43.758698:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box21
+ISEXEC:FALSE
+-205.073499:53.172640:-900.000000
+-155.673499:43.172640:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box22
+ISEXEC:FALSE
+-138.754214:52.260973:-900.000000
+-89.354214:42.260973:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+vtk:GetVectorVtkImageDataElement:Box23
+ISEXEC:FALSE
+-270.964594:-0.569468:-900.000000
+-212.714594:-10.569468:-900.000000
+FIN_BOX
+BOX
+vtk:GetVectorVtkImageDataElement:Box24
+ISEXEC:FALSE
+-185.710508:-1.005972:-900.000000
+-127.460508:-11.005972:-900.000000
+FIN_BOX
+BOX
+vtk:GetVectorVtkImageDataElement:Box25
+ISEXEC:FALSE
+-98.887475:-1.939186:-900.000000
+-40.637475:-11.939186:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box26
+ISEXEC:FALSE
+-306.701264:117.651337:-900.000000
+-255.301264:107.651337:-900.000000
+PORT
+Max:"7"
+PORT
+Min:"0"
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box29
+ISEXEC:FALSE
+-48.945155:121.673754:-900.000000
+3.229845:111.673754:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box30
+ISEXEC:FALSE
+24.733746:117.421238:-900.000000
+76.908746:107.421238:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box31
+ISEXEC:FALSE
+-308.385679:-23.643024:-900.000000
+-250.825679:-33.643024:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CheckBox:Box32
+ISEXEC:FALSE
+-323.671153:15.952937:-900.000000
+-287.346153:5.952937:-900.000000
+PORT
+Title:"Interpolation"
+FIN_BOX
+CONNECTIONS:32
+CONNECTION
+Box02:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box10:LookupTable:Box06:ScalarToColors
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box19:In0
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box19:In1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box20:In
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box21:In
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box22:In
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box23:In
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box23:I
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box24:In
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box25:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box24:I
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box25:I
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box02:In0
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box02:In1
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:Box02:In2
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box18:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:wxVtkBaseView1:Box06:BaseView1
+NumberOfControlPoints:0
+CONNECTION
+Box00:wxVtkBaseView2:Box06:BaseView2
+NumberOfControlPoints:0
+CONNECTION
+Box00:wxVtkBaseView3:Box06:BaseView3
+NumberOfControlPoints:0
+CONNECTION
+Box29:Out:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box13:In
+NumberOfControlPoints:0
+CONNECTION
+Image1:Image1:Box29:In
+NumberOfControlPoints:0
+CONNECTION
+Image2:Image2:Box30:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Widget:OutWidget:OutWidget
+NumberOfControlPoints:0
+CONNECTION
+Box26:BoxChange:Box06:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box26:Widget:Box31:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box32:Widget:Box31:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box00:Interpolate
+NumberOfControlPoints:0
+CONNECTION
+Box32:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box00:Widget:Box07:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box31:Widget:Box07:Widget2
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include creaVtk
+include vtk
+include wx
+include std
+include PackRecalage
+
+define CompareImagesByRGB-Widget creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new creaMaracasVisu:ViewerNV Box00
+ set Box00.nTypeView "1 2 0"
+
+new creaVtk:ImageAppendComponents Box02
+
+new vtk:RescaleSlopeIntercept Box05
+ set Box05.A "0"
+ set Box05.B "255"
+ set Box05.OutputFormat "VTK_UNSIGNED_CHAR"
+ set Box05.Type "2"
+
+new creaMaracasVisu:SetwxVtkBaseViewLookupTable Box06
+
+new wx:LayoutSplit Box07
+ set Box07.Proportion "50"
+
+new creaVtk:ScalarsToColors Box10
+ set Box10.Type "3"
+
+new vtk:RescaleSlopeIntercept Box13
+ set Box13.A "0"
+ set Box13.B "255"
+ set Box13.OutputFormat "VTK_UNSIGNED_CHAR"
+ set Box13.Type "2"
+
+new std:StringSelect Box18
+ set Box18.In0 "1 1 1"
+ set Box18.In1 "0 0 0"
+ set Box18.In2 "1 0 0"
+ set Box18.In3 "0 1 0"
+ set Box18.In4 "0 0 1"
+ set Box18.In5 "1 1 0"
+ set Box18.In6 "1 0 1"
+ set Box18.In7 "0 1 1"
+
+new PackRecalage:AddImageToVector Box19
+
+new std:GetVectorStringElement Box20
+ set Box20.I "0"
+
+new std:GetVectorStringElement Box21
+ set Box21.I "1"
+
+new std:GetVectorStringElement Box22
+ set Box22.I "2"
+
+new vtk:GetVectorVtkImageDataElement Box23
+
+new vtk:GetVectorVtkImageDataElement Box24
+
+new vtk:GetVectorVtkImageDataElement Box25
+
+new wx:Slider Box26
+ set Box26.Max "7"
+ set Box26.Min "0"
+
+new vtk:vtkImageDataPointerRelay Box29
+
+new vtk:vtkImageDataPointerRelay Box30
+
+new wx:LayoutLine Box31
+ set Box31.Orientation "H"
+
+new wx:CheckBox Box32
+ set Box32.Title "Interpolation"
+
+
+connect Box02.Out Box00.In
+connect Box10.LookupTable Box06.ScalarToColors
+connect Box05.Out Box19.In0
+connect Box13.Out Box19.In1
+connect Box18.Out Box20.In
+connect Box18.Out Box21.In
+connect Box18.Out Box22.In
+connect Box19.Out Box23.In
+connect Box20.Out Box23.I
+connect Box19.Out Box24.In
+connect Box19.Out Box25.In
+connect Box21.Out Box24.I
+connect Box22.Out Box25.I
+connect Box23.Out Box02.In0
+connect Box24.Out Box02.In1
+connect Box25.Out Box02.In2
+connect Box26.Out Box18.In
+connect Box00.wxVtkBaseView1 Box06.BaseView1
+connect Box00.wxVtkBaseView2 Box06.BaseView2
+connect Box00.wxVtkBaseView3 Box06.BaseView3
+connect Box29.Out Box05.In
+connect Box30.Out Box13.In
+connect Box26.BoxChange Box06.BoxExecute
+connect Box26.Widget Box31.Widget1
+connect Box32.Widget Box31.Widget2
+connect Box32.Out Box00.Interpolate
+connect Box32.BoxChange Box00.BoxExecute
+connect Box00.Widget Box07.Widget1
+connect Box31.Widget Box07.Widget2
+
+# Complex input ports
+input Image1 Box29.In " "
+input Image2 Box30.In " "
+
+# Complex output ports
+output OutWidget Box07.Widget " "
+
+
+endefine
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/FindAxisEED.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:FindAxisEED
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:7
+COMPLEX_PORT
+imageOutTmp
+-86.519730:-205.275397:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+imageOutDistanceMap
+67.799086:-204.784844:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+axisLstX
+-12.475387:-203.066620:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+axisLstY
+22.071112:-204.330508:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+axisLstZ
+39.089406:-202.265702:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+finalPointDistanceMap
+-49.262810:-205.322083:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+outLengthPixelsDistanceMap
+-28.377706:-204.106778:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:6
+COMPLEX_PORT
+stdDev
+-28.447633:50.012145:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+averageRadius
+-159.307290:53.037280:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+imageMask
+-106.635422:53.024269:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+slopeDistanceMap
+175.140002:49.789248:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Point2DistanceMap
+124.204556:49.878387:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Point1DistanceMap
+77.729781:51.447056:-900.000000
+FIN_COMPLEX_PORT
+BOXES:7
+BOX
+vtk:ImageGaussianSmooth:Box15
+ISEXEC:FALSE
+-86.019292:-54.567937:-900.000000
+-37.119292:-64.567937:-900.000000
+FIN_BOX
+BOX
+itk:BinaryThresholdImageFilter:Box16
+ISEXEC:FALSE
+-69.915319:-77.677020:-900.000000
+-17.740319:-87.677020:-900.000000
+PORT
+InsideValue:"255"
+PORT
+LowerThreshold:"250"
+PORT
+OutsideValue:"0"
+PORT
+UpperThreshold:"1000"
+FIN_BOX
+BOX
+vtk:ImageGaussianSmooth:Box17
+ISEXEC:FALSE
+-152.015620:-95.824068:-900.000000
+-103.115620:-105.824068:-900.000000
+PORT
+StdDevX:"10"
+PORT
+StdDevY:"10"
+PORT
+StdDevZ:"3"
+FIN_BOX
+BOX
+creaVtk:ApplyMask:Box20
+ISEXEC:FALSE
+-32.976315:-121.753349:-900.000000
+4.248685:-131.753349:-900.000000
+FIN_BOX
+BOX
+creaVtk:DistanceMap:Box21
+ISEXEC:FALSE
+-13.775824:-151.205153:-900.000000
+25.424176:-161.205153:-900.000000
+PORT
+Point1:"107 103 382"
+FIN_BOX
+BOX
+std:ConcatStrings:Box30
+ISEXEC:FALSE
+-172.788476:-49.034634:-900.000000
+-133.063476:-59.034634:-900.000000
+PORT
+In1:"10"
+FIN_BOX
+BOX
+std:ConcatStrings:Box31
+ISEXEC:FALSE
+-61.001950:-12.733523:-900.000000
+-21.276950:-22.733523:-900.000000
+PORT
+In1:"10"
+FIN_BOX
+CONNECTIONS:24
+CONNECTION
+Box15:Out:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:Box17:In
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box20:Image
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:Box20:Mask
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box21:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box17:StdDevX
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box17:StdDevY
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box21:AverageRadius
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box15:StdDevX
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box15:StdDevY
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box15:StdDevZ
+NumberOfControlPoints:0
+CONNECTION
+stdDev:stdDev:Box31:In1
+NumberOfControlPoints:0
+CONNECTION
+averageRadius:averageRadius:Box30:In1
+NumberOfControlPoints:0
+CONNECTION
+imageMask:imageMask:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+slopeDistanceMap:slopeDistanceMap:Box21:Slope
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:imageOutTmp:imageOutTmp
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:imageOutDistanceMap:imageOutDistanceMap
+NumberOfControlPoints:0
+CONNECTION
+Box21:LstPathXOut:axisLstX:axisLstX
+NumberOfControlPoints:0
+CONNECTION
+Box21:LstPathYOut:axisLstY:axisLstY
+NumberOfControlPoints:0
+CONNECTION
+Box21:LstPathZOut:axisLstZ:axisLstZ
+NumberOfControlPoints:0
+CONNECTION
+Box21:FinalPoint:finalPointDistanceMap:finalPointDistanceMap
+NumberOfControlPoints:0
+CONNECTION
+Point2DistanceMap:Point2DistanceMap:Box21:Point2
+NumberOfControlPoints:0
+CONNECTION
+Point1DistanceMap:Point1DistanceMap:Box21:Point1
+NumberOfControlPoints:0
+CONNECTION
+Box21:LengthPixels:outLengthPixelsDistanceMap:outLengthPixelsDistanceMap
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/FindAxisEED.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include vtk
+include itk
+include creaVtk
+include std
+
+define FindAxisEED creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new vtk:ImageGaussianSmooth Box15
+
+new itk:BinaryThresholdImageFilter Box16
+ set Box16.InsideValue "255"
+ set Box16.LowerThreshold "250"
+ set Box16.OutsideValue "0"
+ set Box16.UpperThreshold "1000"
+
+new vtk:ImageGaussianSmooth Box17
+ set Box17.StdDevX "10"
+ set Box17.StdDevY "10"
+ set Box17.StdDevZ "3"
+
+new creaVtk:ApplyMask Box20
+
+new creaVtk:DistanceMap Box21
+ set Box21.Point1 "107 103 382"
+
+new std:ConcatStrings Box30
+ set Box30.In1 "10"
+
+new std:ConcatStrings Box31
+ set Box31.In1 "10"
+
+
+connect Box15.Out Box16.In
+connect Box16.Out Box17.In
+connect Box17.Out Box20.Image
+connect Box16.Out Box20.Mask
+connect Box20.Out Box21.In
+connect Box30.Out Box17.StdDevX
+connect Box30.Out Box17.StdDevY
+connect Box30.Out Box21.AverageRadius
+connect Box31.Out Box15.StdDevX
+connect Box31.Out Box15.StdDevY
+connect Box31.Out Box15.StdDevZ
+
+# Complex input ports
+input stdDev Box31.In1 " "
+input averageRadius Box30.In1 " "
+input imageMask Box15.In " "
+input slopeDistanceMap Box21.Slope " "
+input Point2DistanceMap Box21.Point2 " "
+input Point1DistanceMap Box21.Point1 " "
+
+# Complex output ports
+output imageOutTmp Box16.Out " "
+output imageOutDistanceMap Box21.Out " "
+output axisLstX Box21.LstPathXOut " "
+output axisLstY Box21.LstPathYOut " "
+output axisLstZ Box21.LstPathZOut " "
+output finalPointDistanceMap Box21.FinalPoint " "
+output outLengthPixelsDistanceMap Box21.LengthPixels " "
+
+
+endefine
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
# ----------------------------------
APP_START
creaVtk:VectorsVisu:Box00
ISEXEC:FALSE
-4.465574:-69.418679:-900.000000
-41.109426:-79.418679:-900.000000
+33.159426:-79.418679:-900.000000
FIN_BOX
BOX
creaVtk:PlaneWidget:Box01
std:MagicBox:Box11
ISEXEC:FALSE
-116.304953:49.494646:-900.000000
--70.729953:39.494646:-900.000000
+-80.229953:39.494646:-900.000000
FIN_BOX
-CONNECTIONS:22
+CONNECTIONS:23
CONNECTION
Box03:Out:Box00:In
NumberOfControlPoints:0
CONNECTION
Box11:Out:Box15:In2
NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box15:In3
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
# ----------------------------------
include std
connect Box06.boxChange Box15.In1
connect Box15.Out Box13.BoxExecute
connect Box11.Out Box15.In2
+connect Box01.BoxChange Box15.In3
# Complex input ports
input vtkImageData Box04.In " "
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorVisuPlane.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:VectorVisuPlane
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+outvtkdataset
+166.704997:-189.595641:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:5
+COMPLEX_PORT
+structuredpoints
+168.091564:208.867022:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+point
+116.120397:207.428577:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxexecute
+39.849629:211.168926:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+orientation
+81.925146:210.995455:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+ResolutionPlane
+220.331663:206.252378:-900.000000
+FIN_COMPLEX_PORT
+BOXES:23
+BOX
+vtk:ProbeFilter:Box05
+ISEXEC:FALSE
+163.478369:-153.585467:-900.000000
+199.878369:-163.585467:-900.000000
+FIN_BOX
+BOX
+creaVtk:PlaneSource:Box06
+ISEXEC:FALSE
+94.101891:-106.947829:-900.000000
+132.551891:-116.947829:-900.000000
+PORT
+Center:"10 10 10"
+PORT
+Normal:"0 0 1"
+PORT
+XResolution:"100"
+PORT
+YResolution:"100"
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box15
+ISEXEC:FALSE
+-83.675523:128.799375:-900.000000
+-38.325523:118.799375:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box16
+ISEXEC:FALSE
+-150.960816:98.785690:-900.000000
+-104.510816:88.785690:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:Div:Box17
+ISEXEC:FALSE
+-154.010066:77.460700:-900.000000
+-124.685066:67.460700:-900.000000
+PORT
+In2:"2"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box18
+ISEXEC:FALSE
+-85.650958:97.856583:-900.000000
+-39.200958:87.856583:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:Div:Box19
+ISEXEC:FALSE
+-105.283745:77.582504:-900.000000
+-75.958745:67.582504:-900.000000
+PORT
+In2:"2"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box20
+ISEXEC:FALSE
+-6.414177:45.511247:-900.000000
+40.035823:35.511247:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:ConcatStrings:Box21
+ISEXEC:FALSE
+-83.537606:12.320630:-900.000000
+-43.812606:2.320630:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+FIN_BOX
+BOX
+std:MathOperationVector:Box22
+ISEXEC:FALSE
+-89.409251:-75.781700:-900.000000
+-41.884251:-85.781700:-900.000000
+PORT
+Type:"2"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box23
+ISEXEC:FALSE
+-25.954150:102.423268:-900.000000
+20.495850:92.423268:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:Div:Box24
+ISEXEC:FALSE
+-34.789630:81.174151:-900.000000
+-5.464630:71.174151:-900.000000
+PORT
+In2:"2"
+FIN_BOX
+BOX
+std:MagicBox:Box41
+ISEXEC:FALSE
+156.767214:162.166259:-900.000000
+192.842214:152.166259:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box43
+ISEXEC:FALSE
+35.415784:161.354987:-900.000000
+71.490784:151.354987:-900.000000
+FIN_BOX
+BOX
+std:StringSelect:Box45
+ISEXEC:FALSE
+-128.065356:-53.449117:-900.000000
+-85.905356:-63.449117:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box46
+ISEXEC:FALSE
+-202.286031:9.447795:-900.000000
+-162.561031:-0.552205:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box47
+ISEXEC:FALSE
+-250.207922:63.996866:-900.000000
+-203.757922:53.996866:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:MagicBox:Box48
+ISEXEC:FALSE
+104.676855:160.496060:-900.000000
+140.751855:150.496060:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box49
+ISEXEC:FALSE
+-75.803994:40.827484:-900.000000
+-29.353994:30.827484:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box50
+ISEXEC:FALSE
+-145.515014:11.542261:-900.000000
+-105.790014:1.542261:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+FIN_BOX
+BOX
+std:StringSelect:Box33
+ISEXEC:FALSE
+180.417564:-35.556804:-900.000000
+222.577564:-45.556804:-900.000000
+PORT
+In0:"1 0 0"
+PORT
+In1:"0 1 0"
+PORT
+In2:"0 0 1"
+FIN_BOX
+BOX
+std:MagicBox:Box34
+ISEXEC:FALSE
+92.061688:100.413387:-900.000000
+128.136688:90.413387:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box35
+ISEXEC:FALSE
+208.217045:162.784387:-900.000000
+244.292045:152.784387:-900.000000
+FIN_BOX
+CONNECTIONS:40
+CONNECTION
+Box06:PolyData:Box05:Input
+NumberOfControlPoints:0
+CONNECTION
+Box15:Size:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:Box17:In1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box19:In1
+NumberOfControlPoints:0
+CONNECTION
+Box15:Size:Box18:In
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box21:In5
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box21:In1
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box21:In3
+NumberOfControlPoints:0
+CONNECTION
+Box15:Spacing:Box22:In1
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box06:Center
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box24:In1
+NumberOfControlPoints:0
+CONNECTION
+Box15:Size:Box23:In
+NumberOfControlPoints:0
+CONNECTION
+Box41:Out:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+Box41:Out:Box05:Source
+NumberOfControlPoints:0
+CONNECTION
+structuredpoints:structuredpoints:Box41:In
+NumberOfControlPoints:0
+CONNECTION
+boxexecute:boxexecute:Box43:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box06:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box05:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box45:Out:Box22:In0
+NumberOfControlPoints:0
+CONNECTION
+point:point:Box48:In
+NumberOfControlPoints:0
+CONNECTION
+Box48:Out:Box20:In
+NumberOfControlPoints:0
+CONNECTION
+Box48:Out:Box47:In
+NumberOfControlPoints:0
+CONNECTION
+Box47:Out:Box46:In1
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box46:In3
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box46:In5
+NumberOfControlPoints:0
+CONNECTION
+Box48:Out:Box49:In
+NumberOfControlPoints:0
+CONNECTION
+Box49:Out:Box50:In3
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box50:In1
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box50:In5
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:outvtkdataset:outvtkdataset
+NumberOfControlPoints:0
+CONNECTION
+Box33:Out:Box06:Normal
+NumberOfControlPoints:0
+CONNECTION
+orientation:orientation:Box34:In
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box45:In
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box33:In
+NumberOfControlPoints:0
+CONNECTION
+ResolutionPlane:ResolutionPlane:Box35:In
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box06:XResolution
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box06:YResolution
+NumberOfControlPoints:0
+CONNECTION
+Box46:Out:Box45:In0
+NumberOfControlPoints:0
+CONNECTION
+Box50:Out:Box45:In1
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box45:In2
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorVisuPlane.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include vtk
+include creaVtk
+include std
+
+define VectorVisuPlane creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new vtk:ProbeFilter Box05
+
+new creaVtk:PlaneSource Box06
+ set Box06.Center "10 10 10"
+ set Box06.Normal "0 0 1"
+ set Box06.XResolution "100"
+ set Box06.YResolution "100"
+
+new vtk:ImageVtkProperties Box15
+
+new std:GetVectorIntElement Box16
+ set Box16.I "0"
+
+new std:Div Box17
+ set Box17.In2 "2"
+
+new std:GetVectorIntElement Box18
+ set Box18.I "1"
+
+new std:Div Box19
+ set Box19.In2 "2"
+
+new std:GetVectorIntElement Box20
+ set Box20.I "2"
+
+new std:ConcatStrings Box21
+ set Box21.In2 " "
+ set Box21.In4 " "
+
+new std:MathOperationVector Box22
+ set Box22.Type "2"
+
+new std:GetVectorIntElement Box23
+ set Box23.I "2"
+
+new std:Div Box24
+ set Box24.In2 "2"
+
+new std:MagicBox Box41
+
+new std:MagicBox Box43
+
+new std:StringSelect Box45
+
+new std:ConcatStrings Box46
+ set Box46.In2 " "
+ set Box46.In4 " "
+
+new std:GetVectorIntElement Box47
+ set Box47.I "0"
+
+new std:MagicBox Box48
+
+new std:GetVectorIntElement Box49
+ set Box49.I "1"
+
+new std:ConcatStrings Box50
+ set Box50.In2 " "
+ set Box50.In4 " "
+
+new std:StringSelect Box33
+ set Box33.In0 "1 0 0"
+ set Box33.In1 "0 1 0"
+ set Box33.In2 "0 0 1"
+
+new std:MagicBox Box34
+
+new std:MagicBox Box35
+
+
+connect Box06.PolyData Box05.Input
+connect Box15.Size Box16.In
+connect Box16.Out Box17.In1
+connect Box18.Out Box19.In1
+connect Box15.Size Box18.In
+connect Box20.Out Box21.In5
+connect Box17.Out Box21.In1
+connect Box19.Out Box21.In3
+connect Box15.Spacing Box22.In1
+connect Box22.Out Box06.Center
+connect Box23.Out Box24.In1
+connect Box15.Size Box23.In
+connect Box41.Out Box15.In
+connect Box41.Out Box05.Source
+connect Box43.BoxChange Box06.BoxExecute
+connect Box43.BoxChange Box05.BoxExecute
+connect Box45.Out Box22.In0
+connect Box48.Out Box20.In
+connect Box48.Out Box47.In
+connect Box47.Out Box46.In1
+connect Box19.Out Box46.In3
+connect Box24.Out Box46.In5
+connect Box48.Out Box49.In
+connect Box49.Out Box50.In3
+connect Box17.Out Box50.In1
+connect Box24.Out Box50.In5
+connect Box33.Out Box06.Normal
+connect Box34.Out Box45.In
+connect Box34.Out Box33.In
+connect Box35.Out Box06.XResolution
+connect Box35.Out Box06.YResolution
+connect Box46.Out Box45.In0
+connect Box50.Out Box45.In1
+connect Box21.Out Box45.In2
+
+# Complex input ports
+input structuredpoints Box41.In " "
+input boxexecute Box43.BoxExecute " "
+input point Box48.In " "
+input orientation Box34.In " "
+input ResolutionPlane Box35.In " "
+
+# Complex output ports
+output outvtkdataset Box05.Out " "
+
+
+endefine
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorVisuPlane_Widget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:VectorVisuPlane_Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+outwidget
+10.147096:-179.347579:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:8
+COMPLEX_PORT
+structuredpoints
+118.034259:165.342792:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Point
+95.483236:163.994363:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview1_2D
+-109.523616:163.189273:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview2_2D
+-79.035052:161.715922:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview3_2D
+-54.929596:161.100482:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+vtkbaseview_3D
+304.933942:145.606474:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxExecute
+136.897755:166.588357:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+lookuptable
+-168.767355:163.699267:-900.000000
+FIN_COMPLEX_PORT
+BOXES:23
+BOX
+creaVtk:VectorsVisu_Interface:Box01
+ISEXEC:FALSE
+-3.043156:153.547981:-900.000000
+44.281844:143.547981:-900.000000
+FIN_BOX
+BOX
+creaVtk:VectorsVisu:Box03
+ISEXEC:FALSE
+-179.879248:-71.409870:-900.000000
+-142.254248:-81.409870:-900.000000
+FIN_BOX
+BOX
+creaVtk:VectorsVisu:Box04
+ISEXEC:FALSE
+-53.890021:-71.117417:-900.000000
+-16.265021:-81.117417:-900.000000
+FIN_BOX
+BOX
+creaVtk:VectorsVisu:Box05
+ISEXEC:FALSE
+25.906741:-74.169050:-900.000000
+63.531741:-84.169050:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:wxVtkBaseView_Info:Box06
+ISEXEC:FALSE
+-150.446091:63.276704:-900.000000
+-104.296091:53.276704:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box09
+ISEXEC:FALSE
+46.032337:67.058709:-900.000000
+82.107337:57.058709:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box10
+ISEXEC:FALSE
+109.452352:67.977758:-900.000000
+145.527352:57.977758:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:wxVtkBaseView_Info:Box11
+ISEXEC:FALSE
+-79.070331:59.180158:-900.000000
+-32.920331:49.180158:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:wxVtkBaseView_Info:Box12
+ISEXEC:FALSE
+-6.652287:59.730859:-900.000000
+39.497713:49.730859:-900.000000
+FIN_BOX
+BOX
+creaVtk:VectorVisuPlane:Box13
+ISEXEC:FALSE
+213.070490:-10.033221:-900.000000
+255.220490:-20.033221:-900.000000
+PORT
+orientation:"0"
+FIN_BOX
+BOX
+creaVtk:VectorsVisu:Box14
+ISEXEC:FALSE
+138.245167:-121.547117:-900.000000
+175.870167:-131.547117:-900.000000
+PORT
+Orientation:"0"
+FIN_BOX
+BOX
+creaVtk:VectorsVisu:Box15
+ISEXEC:FALSE
+283.742959:-94.464991:-900.000000
+321.367959:-104.464991:-900.000000
+PORT
+Orientation:"1"
+FIN_BOX
+BOX
+creaVtk:VectorsVisu:Box16
+ISEXEC:FALSE
+371.638964:-91.949872:-900.000000
+409.263964:-101.949872:-900.000000
+PORT
+Orientation:"2"
+FIN_BOX
+BOX
+creaVtk:VectorVisuPlane:Box17
+ISEXEC:FALSE
+288.334393:-11.949302:-900.000000
+330.484393:-21.949302:-900.000000
+PORT
+orientation:"1"
+FIN_BOX
+BOX
+creaVtk:VectorVisuPlane:Box18
+ISEXEC:FALSE
+367.652496:-12.437082:-900.000000
+409.802496:-22.437082:-900.000000
+PORT
+orientation:"2"
+FIN_BOX
+BOX
+creaMaracasVisu:wxVtkBaseView_Info:Box20
+ISEXEC:FALSE
+288.011426:71.644160:-900.000000
+334.161426:61.644160:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box21
+ISEXEC:FALSE
+183.524331:65.763428:-900.000000
+219.599331:55.763428:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box24
+ISEXEC:FALSE
+127.554980:-6.909168:-900.000000
+167.254980:-16.909168:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box23
+ISEXEC:FALSE
+-146.616129:-113.623551:-900.000000
+-106.291129:-123.623551:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box25
+ISEXEC:FALSE
+-78.298829:-113.608194:-900.000000
+-37.973829:-123.608194:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box26
+ISEXEC:FALSE
+7.473410:-115.110656:-900.000000
+47.798410:-125.110656:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box27
+ISEXEC:FALSE
+256.664371:-161.894777:-900.000000
+296.989371:-171.894777:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MagicBox:Box28
+ISEXEC:FALSE
+-200.365716:-1.413275:-900.000000
+-164.290716:-11.413275:-900.000000
+FIN_BOX
+CONNECTIONS:85
+CONNECTION
+Box01:widget:outwidget:outwidget
+NumberOfControlPoints:0
+CONNECTION
+Box06:vtkRenderer:Box03:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box03:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box03:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box01:Type:Box03:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box04:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box04:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box01:Type:Box04:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box06:Direction:Box03:Orientation
+NumberOfControlPoints:0
+CONNECTION
+Point:Point:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+structuredpoints:structuredpoints:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:vtkRenderer:Box04:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box11:Direction:Box04:Orientation
+NumberOfControlPoints:0
+CONNECTION
+Box12:vtkRenderer:Box05:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box12:Direction:Box05:Orientation
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview3_2D:wxvtkbaseview3_2D:Box12:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box05:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box05:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box01:Type:Box05:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box13:outvtkdataset:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box17:outvtkdataset:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+Box18:outvtkdataset:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+vtkbaseview_3D:vtkbaseview_3D:Box20:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box20:vtkRenderer:Box14:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box20:vtkRenderer:Box15:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box20:vtkRenderer:Box16:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box13:structuredpoints
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box17:structuredpoints
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box18:structuredpoints
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box13:point
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box17:point
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box18:point
+NumberOfControlPoints:0
+CONNECTION
+Box20:Direction:Box14:Orientation
+NumberOfControlPoints:0
+CONNECTION
+Box20:Direction:Box15:Orientation
+NumberOfControlPoints:0
+CONNECTION
+Box20:Direction:Box16:Orientation
+NumberOfControlPoints:0
+CONNECTION
+boxExecute:boxExecute:Box21:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box13:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box17:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box18:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:Type:Box14:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box01:Type:Box15:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box01:Type:Box16:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box14:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box15:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box16:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box14:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box15:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box16:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box24:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxChange:Box24:In2
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box03:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box14:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box04:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box05:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box15:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box16:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:Resolution:Box13:ResolutionPlane
+NumberOfControlPoints:0
+CONNECTION
+Box01:Resolution:Box17:ResolutionPlane
+NumberOfControlPoints:0
+CONNECTION
+Box01:Resolution:Box18:ResolutionPlane
+NumberOfControlPoints:0
+CONNECTION
+Box06:vtkRenderer:Box23:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxChange:Box23:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box11:vtkRenderer:Box25:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box12:vtkRenderer:Box26:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box20:vtkRenderer:Box27:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxChange:Box25:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxChange:Box26:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxChange:Box27:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:activeXZ:Box03:Active
+NumberOfControlPoints:0
+CONNECTION
+Box01:activeYZ:Box04:Active
+NumberOfControlPoints:0
+CONNECTION
+Box01:activeXY:Box05:Active
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview2_2D:wxvtkbaseview2_2D:Box06:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview1_2D:wxvtkbaseview1_2D:Box11:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box17:outvtkdataset:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:outvtkdataset:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box18:outvtkdataset:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:active3DYZ:Box14:Active
+NumberOfControlPoints:0
+CONNECTION
+Box01:active3DXZ:Box15:Active
+NumberOfControlPoints:0
+CONNECTION
+Box01:active3DXY:Box16:Active
+NumberOfControlPoints:0
+CONNECTION
+lookuptable:lookuptable:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box03:ExternalLut
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box04:ExternalLut
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box05:ExternalLut
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box14:ExternalLut
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box15:ExternalLut
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box16:ExternalLut
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorVisuPlane_Widget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaVtk
+include creaMaracasVisu
+include std
+include vtk
+
+define VectorVisuPlane_Widget creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new creaVtk:VectorsVisu_Interface Box01
+
+new creaVtk:VectorsVisu Box03
+
+new creaVtk:VectorsVisu Box04
+
+new creaVtk:VectorsVisu Box05
+
+new creaMaracasVisu:wxVtkBaseView_Info Box06
+
+new std:MagicBox Box09
+
+new std:MagicBox Box10
+
+new creaMaracasVisu:wxVtkBaseView_Info Box11
+
+new creaMaracasVisu:wxVtkBaseView_Info Box12
+
+new creaVtk:VectorVisuPlane Box13
+ set Box13.orientation "0"
+
+new creaVtk:VectorsVisu Box14
+ set Box14.Orientation "0"
+
+new creaVtk:VectorsVisu Box15
+ set Box15.Orientation "1"
+
+new creaVtk:VectorsVisu Box16
+ set Box16.Orientation "2"
+
+new creaVtk:VectorVisuPlane Box17
+ set Box17.orientation "1"
+
+new creaVtk:VectorVisuPlane Box18
+ set Box18.orientation "2"
+
+new creaMaracasVisu:wxVtkBaseView_Info Box20
+
+new std:MagicBox Box21
+
+new std:MultipleInputs Box24
+
+new vtk:UpdateRender Box23
+ set Box23.Active "true"
+
+new vtk:UpdateRender Box25
+ set Box25.Active "true"
+
+new vtk:UpdateRender Box26
+ set Box26.Active "true"
+
+new vtk:UpdateRender Box27
+ set Box27.Active "true"
+
+new std:MagicBox Box28
+
+
+connect Box06.vtkRenderer Box03.Renderer
+connect Box01.Opacity Box03.Opacity
+connect Box01.ScaleFactor Box03.ScaleFactor
+connect Box01.Type Box03.TypeForm
+connect Box01.Opacity Box04.Opacity
+connect Box01.ScaleFactor Box04.ScaleFactor
+connect Box01.Type Box04.TypeForm
+connect Box06.Direction Box03.Orientation
+connect Box11.vtkRenderer Box04.Renderer
+connect Box11.Direction Box04.Orientation
+connect Box12.vtkRenderer Box05.Renderer
+connect Box12.Direction Box05.Orientation
+connect Box01.Opacity Box05.Opacity
+connect Box01.ScaleFactor Box05.ScaleFactor
+connect Box01.Type Box05.TypeForm
+connect Box13.outvtkdataset Box14.In
+connect Box17.outvtkdataset Box15.In
+connect Box18.outvtkdataset Box16.In
+connect Box20.vtkRenderer Box14.Renderer
+connect Box20.vtkRenderer Box15.Renderer
+connect Box20.vtkRenderer Box16.Renderer
+connect Box10.Out Box13.structuredpoints
+connect Box10.Out Box17.structuredpoints
+connect Box10.Out Box18.structuredpoints
+connect Box09.Out Box13.point
+connect Box09.Out Box17.point
+connect Box09.Out Box18.point
+connect Box20.Direction Box14.Orientation
+connect Box20.Direction Box15.Orientation
+connect Box20.Direction Box16.Orientation
+connect Box21.Out Box13.boxexecute
+connect Box21.Out Box17.boxexecute
+connect Box21.Out Box18.boxexecute
+connect Box01.Type Box14.TypeForm
+connect Box01.Type Box15.TypeForm
+connect Box01.Type Box16.TypeForm
+connect Box01.Opacity Box14.Opacity
+connect Box01.Opacity Box15.Opacity
+connect Box01.Opacity Box16.Opacity
+connect Box01.ScaleFactor Box14.ScaleFactor
+connect Box01.ScaleFactor Box15.ScaleFactor
+connect Box01.ScaleFactor Box16.ScaleFactor
+connect Box21.Out Box24.In1
+connect Box01.boxChange Box24.In2
+connect Box24.BoxChange Box03.BoxExecute
+connect Box24.BoxChange Box14.BoxExecute
+connect Box24.BoxChange Box04.BoxExecute
+connect Box24.BoxChange Box05.BoxExecute
+connect Box24.BoxChange Box15.BoxExecute
+connect Box24.BoxChange Box16.BoxExecute
+connect Box01.Resolution Box13.ResolutionPlane
+connect Box01.Resolution Box17.ResolutionPlane
+connect Box01.Resolution Box18.ResolutionPlane
+connect Box06.vtkRenderer Box23.Renderer
+connect Box01.boxChange Box23.BoxExecute
+connect Box11.vtkRenderer Box25.Renderer
+connect Box12.vtkRenderer Box26.Renderer
+connect Box20.vtkRenderer Box27.Renderer
+connect Box01.boxChange Box25.BoxExecute
+connect Box01.boxChange Box26.BoxExecute
+connect Box01.boxChange Box27.BoxExecute
+connect Box01.activeXZ Box03.Active
+connect Box01.activeYZ Box04.Active
+connect Box01.activeXY Box05.Active
+connect Box17.outvtkdataset Box03.In
+connect Box13.outvtkdataset Box04.In
+connect Box18.outvtkdataset Box05.In
+connect Box01.active3DYZ Box14.Active
+connect Box01.active3DXZ Box15.Active
+connect Box01.active3DXY Box16.Active
+connect Box28.Out Box03.ExternalLut
+connect Box28.Out Box04.ExternalLut
+connect Box28.Out Box05.ExternalLut
+connect Box28.Out Box14.ExternalLut
+connect Box28.Out Box15.ExternalLut
+connect Box28.Out Box16.ExternalLut
+
+# Complex input ports
+input Point Box09.In " "
+input structuredpoints Box10.In " "
+input wxvtkbaseview3_2D Box12.wxVtkBaseView " "
+input vtkbaseview_3D Box20.wxVtkBaseView " "
+input boxExecute Box21.In " "
+input wxvtkbaseview2_2D Box06.wxVtkBaseView " "
+input wxvtkbaseview1_2D Box11.wxVtkBaseView " "
+input lookuptable Box28.In " "
+
+# Complex output ports
+output outwidget Box01.widget " "
+
+
+endefine
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Widget.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Widget.bbg
# ----------------------------------
APP_START
COMPLEXOUTPUTS:1
COMPLEX_PORT
widget
--179.941974:-67.018786:-900.000000
+-64.794419:-71.354886:-900.000000
FIN_COMPLEX_PORT
COMPLEXINPUTS:3
COMPLEX_PORT
vtkImageData_vectors
--219.680681:113.036929:-900.000000
+-134.404040:115.927663:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
vtkRenderer
--81.265493:115.039904:-900.000000
+-3.697475:117.448849:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
Title
--130.329765:114.918814:-900.000000
+-54.207113:115.882392:-900.000000
FIN_COMPLEX_PORT
BOXES:8
BOX
vtk:UpdateRender:Box22
ISEXEC:FALSE
--109.905905:-14.897333:-900.000000
--69.580905:-24.897333:-900.000000
+71.246734:-19.233433:-900.000000
+111.571734:-29.233433:-900.000000
PORT
Active:"true"
FIN_BOX
BOX
wx:LayoutTab:Box17
ISEXEC:FALSE
--184.622210:-20.410541:-900.000000
--84.013417:-30.410541:-900.000000
+-117.596676:-21.541034:-900.000000
+-60.036676:-31.541034:-900.000000
PORT
WinTitle:"VectorsTensors Analysis"
FIN_BOX
BOX
std:MultipleInputs:Box23
ISEXEC:FALSE
--151.066256:11.353972:-900.000000
--95.654261:1.353972:-900.000000
+-57.932570:7.880653:-900.000000
+-18.232570:-2.119347:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
BOX
creaVtk:PlaneVectorVisu_Widget:Box41
ISEXEC:FALSE
--268.440972:51.457315:-900.000000
--157.542180:41.457315:-900.000000
+-147.291399:48.531904:-900.000000
+-97.341399:38.531904:-900.000000
FIN_BOX
BOX
wx:LayoutLine:Box14
ISEXEC:FALSE
--232.798631:5.736817:-900.000000
--98.441282:-4.263183:-900.000000
+-144.819902:7.714371:-900.000000
+-87.259902:-2.285629:-900.000000
PORT
WinTitle:"Field"
FIN_BOX
BOX
creaVtk:VolumeVectorVisu_Widget:Box18
ISEXEC:FALSE
--187.068807:50.505798:-900.000000
--133.195159:40.505798:-900.000000
+-52.700093:49.576898:-900.000000
+-0.650093:39.576898:-900.000000
FIN_BOX
BOX
vtk:vtkImageDataPointerRelay:Box26
ISEXEC:FALSE
--226.504734:87.499150:-900.000000
--142.837799:77.499150:-900.000000
+-159.536072:87.017361:-900.000000
+-107.361072:77.017361:-900.000000
FIN_BOX
BOX
std:MagicBox:Box28
ISEXEC:FALSE
--94.829944:83.888857:-900.000000
--58.754944:73.888857:-900.000000
+-21.330778:79.918028:-900.000000
+14.744222:69.918028:-900.000000
FIN_BOX
CONNECTIONS:16
CONNECTION
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Widget.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Widget.bbs
# ----------------------------------
include std
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - VectorsTensors_Widget.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsTensors_Widget.bbg
# ----------------------------------
APP_START
COMPLEXOUTPUTS:1
COMPLEX_PORT
widget
--87.086702:-131.675720:-900.000000
+-133.205566:-215.108938:-900.000000
FIN_COMPLEX_PORT
COMPLEXINPUTS:3
COMPLEX_PORT
BOX
vtk:UpdateRender:Box22
ISEXEC:FALSE
-112.874685:-20.808003:-900.000000
-158.449685:-30.808003:-900.000000
+91.911565:-119.753930:-900.000000
+132.236565:-129.753930:-900.000000
PORT
Active:"true"
FIN_BOX
BOX
wx:LayoutTab:Box17
ISEXEC:FALSE
--89.942511:-71.713124:-900.000000
--44.367511:-81.713124:-900.000000
+-148.219985:-138.795108:-900.000000
+-90.659985:-148.795108:-900.000000
PORT
WinTitle:"VectorsTensors Analysis"
FIN_BOX
BOX
std:MultipleInputs:Box23
ISEXEC:FALSE
-76.506639:18.351379:-900.000000
-122.081639:8.351379:-900.000000
+32.484087:-86.883484:-900.000000
+72.184087:-96.883484:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
creaVtk:PlaneVectorVisu_Widget:Box41
ISEXEC:FALSE
-290.289955:71.849699:-900.000000
--202.478965:61.849699:-900.000000
+-240.339955:61.849699:-900.000000
FIN_BOX
BOX
wx:LayoutLine:Box14
ISEXEC:FALSE
--231.090102:-2.949602:-900.000000
--136.464715:-12.949602:-900.000000
+-249.537648:23.883192:-900.000000
+-191.977648:13.883192:-900.000000
PORT
WinTitle:"Field"
FIN_BOX
creaVtk:VolumeVectorVisu_Widget:Box18
ISEXEC:FALSE
-214.258652:71.383715:-900.000000
--143.083652:61.383715:-900.000000
+-162.208652:61.383715:-900.000000
FIN_BOX
BOX
wx:LayoutLine:Box16
ISEXEC:FALSE
--40.899412:-16.748818:-900.000000
-4.675588:-26.748818:-900.000000
+-107.142871:-103.536135:-900.000000
+-49.582871:-113.536135:-900.000000
PORT
WinTitle:"Tensors"
FIN_BOX
creaVtk:VolumeTensorVisu_Widget:Box19
ISEXEC:FALSE
60.863865:72.033730:-900.000000
-132.038865:62.033730:-900.000000
+112.563865:62.033730:-900.000000
FIN_BOX
BOX
creaVtk:PlaneTensorVisu_Widget:Box21
ISEXEC:FALSE
--19.798384:71.186398:-900.000000
-51.376616:61.186398:-900.000000
+-17.702072:72.444185:-900.000000
+31.897928:62.444185:-900.000000
FIN_BOX
BOX
creaVtk:PlaneWidget_StreamLineVisu_Widget:Box30
ISEXEC:FALSE
--128.471084:73.231403:-900.000000
--57.296084:63.231403:-900.000000
+-156.561665:28.789589:-900.000000
+-94.686665:18.789589:-900.000000
FIN_BOX
BOX
vtk:vtkImageDataPointerRelay:Box26
ISEXEC:FALSE
-208.540015:141.393307:-900.000000
--137.365015:131.393307:-900.000000
+-154.090517:131.393307:-900.000000
FIN_BOX
BOX
vtk:vtkImageDataPointerRelay:Box27
ISEXEC:FALSE
-89.314298:137.998626:-900.000000
--18.139298:127.998626:-900.000000
+-37.139298:127.998626:-900.000000
FIN_BOX
BOX
std:MagicBox:Box28
ISEXEC:FALSE
123.517825:137.982960:-900.000000
-169.092825:127.982960:-900.000000
+159.592825:127.982960:-900.000000
FIN_BOX
BOX
wx:LayoutTab:Box29
ISEXEC:FALSE
--199.996601:-45.212305:-900.000000
--126.846139:-55.212305:-900.000000
+-175.679382:-102.651254:-900.000000
+-118.119382:-112.651254:-900.000000
PORT
WinTitle:"Vectors"
FIN_BOX
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - VectorsTensors_Widget.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsTensors_Widget.bbs
# ----------------------------------
include std
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Interface.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Interface.bbg
# ----------------------------------
APP_START
COMPLEXBOX:TRUE
COMPLEXBOXNAME:VectorsVisu_Interface
PACKAGENAME:creaVtk
-COMPLEXOUTPUTS:5
+COMPLEXOUTPUTS:13
COMPLEX_PORT
Opacity
-40.353594:-51.001761:-900.000000
+42.538344:-69.870059:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
widget
--69.045254:-49.350565:-900.000000
+-100.028986:-72.786978:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
active
--37.624825:-47.529091:-900.000000
+-309.918405:-54.479031:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
ScaleFactor
-74.070740:-49.457530:-900.000000
+98.010322:-71.281755:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
boxChange
--5.260159:-49.295203:-900.000000
+-6.253227:-75.114980:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Type
+-36.743528:-74.778045:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Resolution
+135.040901:-72.809438:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+activeYZ
+-246.741332:-62.122408:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+activeXZ
+-234.757315:-62.498404:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+activeXY
+-258.301271:-62.762468:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+active3DXY
+-188.230914:-63.118705:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+active3DYZ
+-177.192216:-63.118705:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+active3DXZ
+-166.383492:-61.968841:-900.000000
FIN_COMPLEX_PORT
COMPLEXINPUTS:0
-BOXES:8
+BOXES:23
BOX
wx:CheckBox:Box00
ISEXEC:FALSE
--76.224989:54.666321:-900.000000
--30.649989:44.666321:-900.000000
+-319.671398:229.215607:-900.000000
+-283.346398:219.215607:-900.000000
PORT
-Title:"Active Vector"
+Title:"active"
FIN_BOX
BOX
wx:Slider:Box01
ISEXEC:FALSE
--8.984397:56.398119:-900.000000
-42.415603:46.398119:-900.000000
+-2.231532:70.499689:-900.000000
+49.168468:60.499689:-900.000000
PORT
In:"100"
PORT
BOX
std:Div:Box02
ISEXEC:FALSE
-33.671471:18.616028:-900.000000
-66.446471:8.616028:-900.000000
+41.089791:-19.299830:-900.000000
+70.414791:-29.299830:-900.000000
PORT
In2:"100.0"
FIN_BOX
BOX
wx:LayoutLine:Box03
ISEXEC:FALSE
--85.410221:-1.499463:-900.000000
--27.850221:-11.499463:-900.000000
+-99.083516:16.933184:-900.000000
+-41.523516:6.933184:-900.000000
PORT
-WinTitle:"Vector field"
+Orientation:"H"
FIN_BOX
BOX
wx:LayoutTab:Box04
ISEXEC:FALSE
--83.037560:-20.291032:-900.000000
--25.477560:-30.291032:-900.000000
+-88.602903:-23.326674:-900.000000
+-52.352903:-33.326674:-900.000000
FIN_BOX
BOX
std:MultipleInputs:Box05
ISEXEC:FALSE
-9.535855:-18.209205:-900.000000
-36.039145:-28.209205:-900.000000
+30.164145:-28.209205:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
BOX
wx:Slider:Box06
ISEXEC:FALSE
-58.855363:57.678213:-900.000000
-110.255363:47.678213:-900.000000
+62.595736:71.111066:-900.000000
+113.995736:61.111066:-900.000000
PORT
ChangeResolution:"true"
PORT
PORT
Label:"true"
PORT
-Max:"500000"
+Max:"50000"
PORT
Min:"1"
PORT
BOX
std:Div:Box07
ISEXEC:FALSE
-79.821975:17.274812:-900.000000
-112.596975:7.274812:-900.000000
+85.545028:-22.113257:-900.000000
+114.870028:-32.113257:-900.000000
PORT
In2:"100.0"
FIN_BOX
-CONNECTIONS:14
+BOX
+wx:ComboBox:Box08
+ISEXEC:FALSE
+-27.823446:107.084383:-900.000000
+14.336554:97.084383:-900.000000
+PORT
+In:"Line Arrow"
+PORT
+WinHeight:"50"
+FIN_BOX
+BOX
+wx:LayoutLine:Box09
+ISEXEC:FALSE
+-119.658896:-3.230688:-900.000000
+-62.098896:-13.230688:-900.000000
+PORT
+WinTitle:"Vector Field"
+FIN_BOX
+BOX
+wx:Slider:Box10
+ISEXEC:FALSE
+121.335852:72.977394:-900.000000
+172.735852:62.977394:-900.000000
+PORT
+ChangeResolution:"true"
+PORT
+In:"100"
+PORT
+Label:"true"
+PORT
+Max:"300"
+PORT
+Min:"1"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Resolution"
+FIN_BOX
+BOX
+wx:CheckBox:Box11
+ISEXEC:FALSE
+-274.939074:200.152619:-900.000000
+-238.614074:190.152619:-900.000000
+PORT
+Title:"2DYZ"
+FIN_BOX
+BOX
+wx:CheckBox:Box12
+ISEXEC:FALSE
+-251.538590:186.328512:-900.000000
+-215.213590:176.328512:-900.000000
+PORT
+Title:"2DXZ"
+FIN_BOX
+BOX
+wx:LayoutLine:Box13
+ISEXEC:FALSE
+-236.454901:95.950415:-900.000000
+-178.894901:85.950415:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"Vector field"
+FIN_BOX
+BOX
+wx:CheckBox:Box14
+ISEXEC:FALSE
+-301.923823:215.684098:-900.000000
+-265.598823:205.684098:-900.000000
+PORT
+Title:"2DXY"
+FIN_BOX
+BOX
+wx:CheckBox:Box17
+ISEXEC:FALSE
+-152.599075:223.125680:-900.000000
+-116.274075:213.125680:-900.000000
+PORT
+Title:"3DYZ"
+FIN_BOX
+BOX
+wx:CheckBox:Box18
+ISEXEC:FALSE
+-173.374556:235.667511:-900.000000
+-137.049556:225.667511:-900.000000
+PORT
+Title:"3DXY"
+FIN_BOX
+BOX
+wx:CheckBox:Box19
+ISEXEC:FALSE
+-131.498319:209.301572:-900.000000
+-95.173319:199.301572:-900.000000
+PORT
+Title:"3DXZ"
+FIN_BOX
+BOX
+wx:LayoutLine:Box20
+ISEXEC:FALSE
+-117.812264:98.010113:-900.000000
+-81.237264:88.010113:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"Vector field"
+FIN_BOX
+BOX
+wx:LayoutLine:Box23
+ISEXEC:FALSE
+-213.120660:66.634174:-900.000000
+-155.560660:56.634174:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:MultipleInputs:Box24
+ISEXEC:FALSE
+-88.447185:149.525365:-900.000000
+-48.747185:139.525365:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+std:MultipleInputs:Box25
+ISEXEC:FALSE
+-215.973743:125.671630:-900.000000
+-176.273743:115.671630:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+wx:LayoutLine:Box26
+ISEXEC:FALSE
+-90.551971:51.679193:-900.000000
+-32.991971:41.679193:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:45
CONNECTION
-Box01:Widget:Box03:Widget2
+Box01:Out:Box02:In1
NumberOfControlPoints:0
CONNECTION
-Box00:Widget:Box03:Widget1
+Box02:Out:Opacity:Opacity
NumberOfControlPoints:0
CONNECTION
-Box01:Out:Box02:In1
+Box04:Widget:widget:widget
NumberOfControlPoints:0
CONNECTION
-Box02:Out:Opacity:Opacity
+Box00:Out:active:active
NumberOfControlPoints:0
CONNECTION
-Box03:Widget:Box04:Widget1
+Box06:Widget:Box03:Widget3
NumberOfControlPoints:0
CONNECTION
-Box04:Widget:widget:widget
+Box06:Out:Box07:In1
NumberOfControlPoints:0
CONNECTION
-Box01:BoxChange:Box05:In2
+Box07:Out:ScaleFactor:ScaleFactor
NumberOfControlPoints:0
CONNECTION
-Box00:BoxChange:Box05:In1
+Box05:BoxChange:boxChange:boxChange
NumberOfControlPoints:0
CONNECTION
-Box00:Out:active:active
+Box08:Out:Type:Type
NumberOfControlPoints:0
CONNECTION
-Box06:Widget:Box03:Widget3
+Box10:Widget:Box03:Widget4
NumberOfControlPoints:0
CONNECTION
-Box06:BoxChange:Box05:In3
+Box10:Out:Resolution:Resolution
NumberOfControlPoints:0
CONNECTION
-Box06:Out:Box07:In1
+Box08:BoxChange:Box05:In2
NumberOfControlPoints:0
CONNECTION
-Box07:Out:ScaleFactor:ScaleFactor
+Box01:BoxChange:Box05:In3
NumberOfControlPoints:0
CONNECTION
-Box05:BoxChange:boxChange:boxChange
+Box06:BoxChange:Box05:In4
+NumberOfControlPoints:0
+CONNECTION
+Box10:BoxChange:Box05:In5
+NumberOfControlPoints:0
+CONNECTION
+Box11:Widget:Box13:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box12:Widget:Box13:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:activeYZ:activeYZ
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:activeXZ:activeXZ
+NumberOfControlPoints:0
+CONNECTION
+Box00:Widget:Box13:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box14:Widget:Box13:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:activeXY:activeXY
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:active3DXY:active3DXY
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:active3DYZ:active3DYZ
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:active3DXZ:active3DXZ
+NumberOfControlPoints:0
+CONNECTION
+Box18:Widget:Box20:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box20:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box19:Widget:Box20:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box13:Widget:Box23:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box20:Widget:Box23:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box23:Widget:Box09:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box18:BoxChange:Box24:In1
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box24:In2
+NumberOfControlPoints:0
+CONNECTION
+Box19:BoxChange:Box24:In3
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box25:In1
+NumberOfControlPoints:0
+CONNECTION
+Box14:BoxChange:Box25:In2
+NumberOfControlPoints:0
+CONNECTION
+Box11:BoxChange:Box25:In3
+NumberOfControlPoints:0
+CONNECTION
+Box12:BoxChange:Box25:In4
+NumberOfControlPoints:0
+CONNECTION
+Box24:BoxChange:Box05:In8
+NumberOfControlPoints:0
+CONNECTION
+Box25:BoxChange:Box05:In7
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box26:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box26:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box26:Widget:Box09:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box09:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box04:Widget1
NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Interface.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Interface.bbs
# ----------------------------------
include std
category "<VOID>"
-new CheckBox Box00
- set Box00.Title "Active Vector"
+new wx:CheckBox Box00
+ set Box00.Title "active"
-new Slider Box01
+new wx:Slider Box01
set Box01.In "100"
set Box01.Label "true"
set Box01.Max "100"
set Box01.ReactiveOnTrack "true"
set Box01.Title "Opacity"
-new Div Box02
+new std:Div Box02
set Box02.In2 "100.0"
-new LayoutLine Box03
- set Box03.WinTitle "Vector field"
+new wx:LayoutLine Box03
+ set Box03.Orientation "H"
-new LayoutTab Box04
+new wx:LayoutTab Box04
-new MultipleInputs Box05
+new std:MultipleInputs Box05
set Box05.BoxProcessMode "Reactive"
-new Slider Box06
+new wx:Slider Box06
set Box06.ChangeResolution "true"
set Box06.In "100"
set Box06.Label "true"
- set Box06.Max "500000"
+ set Box06.Max "50000"
set Box06.Min "1"
set Box06.ReactiveOnTrack "true"
set Box06.Title "Scale Factor"
-new Div Box07
+new std:Div Box07
set Box07.In2 "100.0"
+new wx:ComboBox Box08
+ set Box08.In "Line Arrow"
+ set Box08.WinHeight "50"
+
+new wx:LayoutLine Box09
+ set Box09.WinTitle "Vector Field"
+
+new wx:Slider Box10
+ set Box10.ChangeResolution "true"
+ set Box10.In "100"
+ set Box10.Label "true"
+ set Box10.Max "300"
+ set Box10.Min "1"
+ set Box10.ReactiveOnTrack "true"
+ set Box10.Title "Resolution"
+
+new wx:CheckBox Box11
+ set Box11.Title "2DYZ"
+
+new wx:CheckBox Box12
+ set Box12.Title "2DXZ"
+
+new wx:LayoutLine Box13
+ set Box13.Orientation "H"
+ set Box13.WinTitle "Vector field"
+
+new wx:CheckBox Box14
+ set Box14.Title "2DXY"
+
+new wx:CheckBox Box17
+ set Box17.Title "3DYZ"
+
+new wx:CheckBox Box18
+ set Box18.Title "3DXY"
+
+new wx:CheckBox Box19
+ set Box19.Title "3DXZ"
+
+new wx:LayoutLine Box20
+ set Box20.Orientation "H"
+ set Box20.WinTitle "Vector field"
+
+new wx:LayoutLine Box23
+ set Box23.Orientation "H"
+
+new std:MultipleInputs Box24
+ set Box24.BoxProcessMode "Reactive"
+
+new std:MultipleInputs Box25
+ set Box25.BoxProcessMode "Reactive"
+
+new wx:LayoutLine Box26
+ set Box26.Orientation "H"
+
-connect Box01.Widget Box03.Widget2
-connect Box00.Widget Box03.Widget1
connect Box01.Out Box02.In1
-connect Box03.Widget Box04.Widget1
-connect Box01.BoxChange Box05.In2
-connect Box00.BoxChange Box05.In1
connect Box06.Widget Box03.Widget3
-connect Box06.BoxChange Box05.In3
connect Box06.Out Box07.In1
+connect Box10.Widget Box03.Widget4
+connect Box08.BoxChange Box05.In2
+connect Box01.BoxChange Box05.In3
+connect Box06.BoxChange Box05.In4
+connect Box10.BoxChange Box05.In5
+connect Box11.Widget Box13.Widget2
+connect Box12.Widget Box13.Widget3
+connect Box00.Widget Box13.Widget5
+connect Box14.Widget Box13.Widget1
+connect Box18.Widget Box20.Widget1
+connect Box17.Widget Box20.Widget2
+connect Box19.Widget Box20.Widget3
+connect Box13.Widget Box23.Widget1
+connect Box20.Widget Box23.Widget2
+connect Box23.Widget Box09.Widget1
+connect Box18.BoxChange Box24.In1
+connect Box17.BoxChange Box24.In2
+connect Box19.BoxChange Box24.In3
+connect Box00.BoxChange Box25.In1
+connect Box14.BoxChange Box25.In2
+connect Box11.BoxChange Box25.In3
+connect Box12.BoxChange Box25.In4
+connect Box24.BoxChange Box05.In8
+connect Box25.BoxChange Box05.In7
+connect Box08.Widget Box26.Widget1
+connect Box01.Widget Box26.Widget2
+connect Box26.Widget Box09.Widget2
+connect Box03.Widget Box09.Widget3
+connect Box09.Widget Box04.Widget1
# Complex input ports
output active Box00.Out " "
output ScaleFactor Box07.Out " "
output boxChange Box05.BoxChange " "
+output Type Box08.Out " "
+output Resolution Box10.Out " "
+output activeYZ Box11.Out " "
+output activeXZ Box12.Out " "
+output activeXY Box14.Out " "
+output active3DXY Box18.Out " "
+output active3DYZ Box17.Out " "
+output active3DXZ Box19.Out " "
endefine
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Widget.bbg
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Widget.bbg
# ----------------------------------
APP_START
BoxChange
-148.185967:-105.619763:-900.000000
FIN_COMPLEX_PORT
-COMPLEXINPUTS:3
+COMPLEXINPUTS:4
COMPLEX_PORT
renderer
--116.813076:40.976013:-900.000000
+-115.777988:44.672757:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
vtkDataObject
--138.011324:45.349330:-900.000000
+-139.194282:43.574893:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
boxExecute
--196.920121:41.238358:-900.000000
+-196.920121:43.900014:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+orientation
+-95.893542:43.917320:-900.000000
FIN_COMPLEX_PORT
BOXES:3
BOX
std:MultipleInputs:Box07
ISEXEC:FALSE
-199.014629:-6.443575:-900.000000
--148.406139:-16.443575:-900.000000
+-159.314629:-16.443575:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
-CONNECTIONS:10
+CONNECTIONS:12
CONNECTION
Box05:Opacity:Box03:Opacity
NumberOfControlPoints:0
CONNECTION
boxExecute:boxExecute:Box07:In1
NumberOfControlPoints:0
+CONNECTION
+Box05:Type:Box03:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+orientation:orientation:Box03:Orientation
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Widget.bbs
+# - /home/davila/Creatis/C8/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsVisu_Widget.bbs
# ----------------------------------
include std
connect Box05.active Box03.Active
connect Box07.BoxChange Box03.BoxExecute
connect Box05.boxChange Box07.In2
+connect Box05.Type Box03.TypeForm
# Complex input ports
input renderer Box03.Renderer " "
input vtkDataObject Box03.In " "
input boxExecute Box07.In1 " "
+input orientation Box03.Orientation " "
# Complex output ports
output BoxChange Box03.BoxChange " "
--- /dev/null
+# ----------------------------------
+# - 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
+-326.521643:-101.189678:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+voi
+-52.226473:-123.165415:-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:4
+COMPLEX_PORT
+Image
+-168.187558:310.360283:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Execute
+228.203173:299.936940:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+voi_index
+-66.733674:307.314091:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+voi_size
+55.531289:304.814600:-900.000000
+FIN_COMPLEX_PORT
+BOXES:32
+BOX
+creaMaracasVisu:SliderMinMax:Box03
+ISEXEC:FALSE
+-183.678150:126.815992:-900.000000
+-129.198150:116.815992:-900.000000
+PORT
+InMax:"500"
+PORT
+InMin:"0"
+PORT
+ShowActual:"false"
+PORT
+WinClose:"false"
+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"
+PORT
+ShowActual:"false"
+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"
+PORT
+ShowActual:"false"
+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
+-195.304681:222.622717:-900.000000
+-148.854681:212.622717:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box33
+ISEXEC:FALSE
+-179.801153:204.532571:-900.000000
+-133.351153:194.532571:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box34
+ISEXEC:FALSE
+-157.681683:187.336418:-900.000000
+-111.231683:177.336418:-900.000000
+PORT
+I:"2"
+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:"VOI"
+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
+BOX
+std:MagicBox:Box28
+ISEXEC:FALSE
+-77.651260:276.041682:-900.000000
+-41.576260:266.041682:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box29
+ISEXEC:FALSE
+-104.988021:245.650707:-900.000000
+-58.538021:235.650707:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box35
+ISEXEC:FALSE
+-93.858256:230.924994:-900.000000
+-47.408256:220.924994:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box36
+ISEXEC:FALSE
+-76.112550:216.420388:-900.000000
+-29.662550:206.420388:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:MagicBox:Box38
+ISEXEC:FALSE
+46.647627:278.729926:-900.000000
+82.722627:268.729926:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box39
+ISEXEC:FALSE
+6.630210:191.808399:-900.000000
+53.080210:181.808399:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box41
+ISEXEC:FALSE
+16.775677:172.478119:-900.000000
+63.225677:162.478119:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box43
+ISEXEC:FALSE
+29.780635:150.315924:-900.000000
+76.230635:140.315924:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:MathOperationVector:Box44
+ISEXEC:FALSE
+43.734256:246.293026:-900.000000
+91.259256:236.293026:-900.000000
+PORT
+Type:"0"
+FIN_BOX
+BOX
+wx:OutputText:Box45
+ISEXEC:FALSE
+-293.423390:154.955039:-900.000000
+-256.648390:144.955039:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box46
+ISEXEC:FALSE
+-251.928697:138.682746:-900.000000
+-215.153697:128.682746:-900.000000
+FIN_BOX
+CONNECTIONS:60
+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
+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
+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
+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
+CONNECTION
+voi_index:voi_index:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box29:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box35:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box36:In
+NumberOfControlPoints:0
+CONNECTION
+voi_size:voi_size:Box38:In
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box39:ErrorValue
+NumberOfControlPoints:0
+CONNECTION
+Box33:Out:Box41:ErrorValue
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box43:ErrorValue
+NumberOfControlPoints:0
+CONNECTION
+Box38:Out:Box44:In0
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box44:In1
+NumberOfControlPoints:0
+CONNECTION
+Box44:Out:Box39:In
+NumberOfControlPoints:0
+CONNECTION
+Box44:Out:Box41:In
+NumberOfControlPoints:0
+CONNECTION
+Box44:Out:Box43:In
+NumberOfControlPoints:0
+CONNECTION
+Box29:Out:Box03:InMinShow
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box04:InMinShow
+NumberOfControlPoints:0
+CONNECTION
+Box36:Out:Box05:InMinShow
+NumberOfControlPoints:0
+CONNECTION
+Box39:Out:Box03:InMaxShow
+NumberOfControlPoints:0
+CONNECTION
+Box41:Out:Box04:InMaxShow
+NumberOfControlPoints:0
+CONNECTION
+Box43:Out:Box05:InMaxShow
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box03:InMax
+NumberOfControlPoints:0
+CONNECTION
+Box33:Out:Box04:InMax
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box05:InMax
+NumberOfControlPoints:0
+CONNECTION
+Box45:Widget:Box22:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box45:In
+NumberOfControlPoints:0
+CONNECTION
+Box38:Out:Box46:In
+NumberOfControlPoints:0
+CONNECTION
+Box46:Widget:Box24:Widget3
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - 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"
+ set Box03.ShowActual "false"
+ set Box03.WinClose "false"
+
+new creaMaracasVisu:SliderMinMax Box04
+ set Box04.InMax "500"
+ set Box04.InMin "0"
+ set Box04.ShowActual "false"
+
+new creaMaracasVisu:SliderMinMax Box05
+ set Box05.InMax "500"
+ set Box05.InMin "0"
+ set Box05.ShowActual "false"
+
+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 std:MultipleInputs Box40
+
+new wx:CheckBox Box42
+ set Box42.In "true"
+ set Box42.ReactiveOnKeystroke "true"
+ set Box42.Title "VOI"
+
+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"
+
+new std:MagicBox Box28
+
+new std:GetVectorIntElement Box29
+ set Box29.ErrorValue "0"
+ set Box29.I "0"
+
+new std:GetVectorIntElement Box35
+ set Box35.ErrorValue "0"
+ set Box35.I "1"
+
+new std:GetVectorIntElement Box36
+ set Box36.ErrorValue "0"
+ set Box36.I "2"
+
+new std:MagicBox Box38
+
+new std:GetVectorIntElement Box39
+ set Box39.ErrorValue "0"
+ set Box39.I "0"
+
+new std:GetVectorIntElement Box41
+ set Box41.ErrorValue "0"
+ set Box41.I "1"
+
+new std:GetVectorIntElement Box43
+ set Box43.ErrorValue "0"
+ set Box43.I "2"
+
+new std:MathOperationVector Box44
+ set Box44.Type "0"
+
+new wx:OutputText Box45
+
+new wx:OutputText Box46
+
+
+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 Box06.BoxChange Box40.In1
+connect Box42.Widget Box11.Widget1
+connect Box42.BoxChange Box06.In4
+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
+connect Box28.Out Box29.In
+connect Box28.Out Box35.In
+connect Box28.Out Box36.In
+connect Box32.Out Box39.ErrorValue
+connect Box33.Out Box41.ErrorValue
+connect Box34.Out Box43.ErrorValue
+connect Box38.Out Box44.In0
+connect Box28.Out Box44.In1
+connect Box44.Out Box39.In
+connect Box44.Out Box41.In
+connect Box44.Out Box43.In
+connect Box29.Out Box03.InMinShow
+connect Box35.Out Box04.InMinShow
+connect Box36.Out Box05.InMinShow
+connect Box39.Out Box03.InMaxShow
+connect Box41.Out Box04.InMaxShow
+connect Box43.Out Box05.InMaxShow
+connect Box32.Out Box03.InMax
+connect Box33.Out Box04.InMax
+connect Box34.Out Box05.InMax
+connect Box45.Widget Box22.Widget3
+connect Box28.Out Box45.In
+connect Box38.Out Box46.In
+connect Box46.Widget Box24.Widget3
+
+# Complex input ports
+input Image Box31.In " "
+input Execute Box40.In2 " "
+input voi_index Box28.In " "
+input voi_size Box38.In " "
+
+# Complex output ports
+output widget Box11.Widget " "
+output boxchange Box40.BoxChange " "
+output active Box42.Out " "
+output boxchangeRender Box06.BoxChange " "
+output voi Box09.Out " "
+
+
+endefine
--- /dev/null
+# ----------------------------------
+# - 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:8
+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
+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
+COMPLEX_PORT
+VoiIndex
+244.843857:77.603342:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+VoiSize
+262.608573:76.578085:-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
+358.601996:-135.005921:-900.000000
+405.051996:-145.005921:-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:46
+CONNECTION
+execute:execute:Box01:Execute
+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
+CONNECTION
+VoiIndex:VoiIndex:Box01:voi_index
+NumberOfControlPoints:0
+CONNECTION
+VoiSize:VoiSize:Box01:voi_size
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - 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 RenderXY Box04.In " "
+input RenderXZ Box05.In " "
+input RenderYZ Box06.In " "
+input Point Box02.ActualPoint " "
+input image Box23.In " "
+input VoiIndex Box01.voi_index " "
+input VoiSize Box01.voi_size " "
+
+# Complex output ports
+output Widget Box01.widget " "
+output Voi Box01.voi " "
+output boxchangeInterface Box01.boxchangeRender " "
+output index Box09.Out " "
+output size Box14.Out " "
+
+
+endefine
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Interface.bbg
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Interface.bbg
# ----------------------------------
APP_START
COMPLEXBOX:TRUE
COMPLEXBOXNAME:VolumeVectorVisu_Interface
PACKAGENAME:creaVtk
-COMPLEXOUTPUTS:6
+COMPLEXOUTPUTS:9
COMPLEX_PORT
boxChange
--55.620936:-52.838253:-900.000000
+-52.001184:-76.860241:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
widget
--7.184086:-56.055226:-900.000000
+-9.312745:-74.872535:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
AcitiveVector
-80.231895:-54.018263:-900.000000
+38.732011:-76.441184:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
Opacity
-102.436951:-54.580138:-900.000000
+110.514564:-76.141171:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
ScaleFactor
-161.011397:-55.687721:-900.000000
+166.276490:-73.457411:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
Ratio
--91.228359:-50.583288:-900.000000
+59.515777:-74.885497:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+form
+213.982353:-74.143348:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+ActiveBoxWidget
+-77.397252:-75.636223:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RandomTypeOut
+80.971822:-72.710043:-900.000000
FIN_COMPLEX_PORT
COMPLEXINPUTS:0
-BOXES:9
+BOXES:16
BOX
wx:Slider:Box00
ISEXEC:FALSE
--50.906743:62.037478:-900.000000
-0.493257:52.037478:-900.000000
+28.107228:92.608230:-900.000000
+79.507228:82.608230:-900.000000
+PORT
+ChangeResolution:"true"
PORT
In:"30"
PORT
Label:"true"
PORT
-Max:"1000"
+Max:"10000"
PORT
Min:"1"
PORT
BOX
std:MultipleInputs:Box02
ISEXEC:FALSE
--57.320437:18.206815:-900.000000
--11.745437:8.206815:-900.000000
+-23.708229:-13.504221:-900.000000
+15.991771:-23.504221:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
BOX
wx:LayoutLine:Box03
ISEXEC:FALSE
--4.139184:17.027492:-900.000000
-53.420816:7.027492:-900.000000
+62.861204:-17.338021:-900.000000
+120.421204:-27.338021:-900.000000
PORT
WinTitle:"Volume flield"
FIN_BOX
BOX
wx:LayoutTab:Box04
ISEXEC:FALSE
--10.200778:-7.513801:-900.000000
-47.359222:-17.513801:-900.000000
+-12.965722:-34.557818:-900.000000
+44.594278:-44.557818:-900.000000
FIN_BOX
BOX
wx:CheckBox:Box05
ISEXEC:FALSE
-40.200879:64.505359:-900.000000
-85.775879:54.505359:-900.000000
+-20.992880:91.261464:-900.000000
+15.332120:81.261464:-900.000000
PORT
ReactiveOnKeystroke:"true"
PORT
std:Div:Box07
ISEXEC:FALSE
97.629121:16.000693:-900.000000
-130.404121:6.000693:-900.000000
+126.954121:6.000693:-900.000000
PORT
In2:"100.0"
FIN_BOX
PORT
Label:"true"
PORT
-Max:"500000"
+Max:"5000"
PORT
Min:"1"
PORT
std:Div:Box09
ISEXEC:FALSE
158.956759:16.879927:-900.000000
-191.731759:6.879927:-900.000000
+188.281759:6.879927:-900.000000
PORT
In2:"100.0"
FIN_BOX
-CONNECTIONS:18
+BOX
+wx:ComboBox:Box10
+ISEXEC:FALSE
+217.700945:62.835923:-900.000000
+259.860945:52.835923:-900.000000
+PORT
+In:"Line Arrow"
+PORT
+Title:"Form"
+FIN_BOX
+BOX
+wx:LayoutLine:Box11
+ISEXEC:FALSE
+170.175144:40.547736:-900.000000
+227.735144:30.547736:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box12
+ISEXEC:FALSE
+-56.592475:61.660958:-900.000000
+0.967525:51.660958:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"Volume flield"
+FIN_BOX
+BOX
+wx:CheckBox:Box13
+ISEXEC:FALSE
+-98.559689:94.875557:-900.000000
+-62.234689:84.875557:-900.000000
+PORT
+ReactiveOnKeystroke:"true"
+PORT
+Title:"Active Box"
+FIN_BOX
+BOX
+wx:RadioButton:Box15
+ISEXEC:FALSE
+84.727176:93.036895:-900.000000
+148.447176:83.036895:-900.000000
+PORT
+In0:"No random"
+PORT
+In1:"Random (0)"
+FIN_BOX
+BOX
+std:MathOperation:Box16
+ISEXEC:FALSE
+56.218447:68.235579:-900.000000
+97.268447:58.235579:-900.000000
+PORT
+In2:"-1"
+PORT
+Type:"0"
+FIN_BOX
+BOX
+wx:LayoutLine:Box17
+ISEXEC:FALSE
+63.876692:6.529194:-900.000000
+121.436692:-3.470806:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"Volume flield"
+FIN_BOX
+CONNECTIONS:31
CONNECTION
Box00:BoxChange:Box02:In1
NumberOfControlPoints:0
CONNECTION
-Box00:Widget:Box03:Widget2
-NumberOfControlPoints:0
-CONNECTION
Box02:BoxChange:boxChange:boxChange
NumberOfControlPoints:0
CONNECTION
Box04:Widget:widget:widget
NumberOfControlPoints:0
CONNECTION
-Box05:Widget:Box03:Widget3
-NumberOfControlPoints:0
-CONNECTION
Box05:BoxChange:Box02:In3
NumberOfControlPoints:0
CONNECTION
-Box06:Widget:Box03:Widget4
-NumberOfControlPoints:0
-CONNECTION
Box06:Out:Box07:In1
NumberOfControlPoints:0
CONNECTION
Box08:BoxChange:Box02:In5
NumberOfControlPoints:0
CONNECTION
-Box08:Widget:Box03:Widget5
-NumberOfControlPoints:0
-CONNECTION
Box05:Out:AcitiveVector:AcitiveVector
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box02:BoxChange:Box04:BoxExecute
NumberOfControlPoints:0
+CONNECTION
+Box10:Out:form:form
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box11:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box10:Widget:Box11:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box10:BoxChange:Box02:In6
+NumberOfControlPoints:0
+CONNECTION
+Box11:Widget:Box03:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box03:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box12:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box12:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box13:Widget:Box12:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box13:BoxChange:Box02:In2
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:ActiveBoxWidget:ActiveBoxWidget
+NumberOfControlPoints:0
+CONNECTION
+Box00:Widget:Box17:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box15:Widget:Box17:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box03:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:Box16:In1
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:RandomTypeOut:RandomTypeOut
+NumberOfControlPoints:0
+CONNECTION
+Box15:BoxChange:Box02:In8
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Interface.bbs
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Interface.bbs
# ----------------------------------
include std
category "<VOID>"
-new Slider Box00
+new wx:Slider Box00
+ set Box00.ChangeResolution "true"
set Box00.In "30"
set Box00.Label "true"
- set Box00.Max "1000"
+ set Box00.Max "10000"
set Box00.Min "1"
set Box00.ReactiveOnTrack "true"
set Box00.Title "Ratio"
-new MultipleInputs Box02
+new std:MultipleInputs Box02
set Box02.BoxProcessMode "Reactive"
-new LayoutLine Box03
+new wx:LayoutLine Box03
set Box03.WinTitle "Volume flield"
-new LayoutTab Box04
+new wx:LayoutTab Box04
-new CheckBox Box05
+new wx:CheckBox Box05
set Box05.ReactiveOnKeystroke "true"
set Box05.Title "Active Vectors"
-new Slider Box06
+new wx:Slider Box06
set Box06.In "100"
set Box06.Label "true"
set Box06.Max "100"
set Box06.ReactiveOnTrack "true"
set Box06.Title "Opacity"
-new Div Box07
+new std:Div Box07
set Box07.In2 "100.0"
-new Slider Box08
+new wx:Slider Box08
set Box08.ChangeResolution "true"
set Box08.In "100"
set Box08.Label "true"
- set Box08.Max "500000"
+ set Box08.Max "5000"
set Box08.Min "1"
set Box08.ReactiveOnTrack "true"
set Box08.Title "Scale Factor"
-new Div Box09
+new std:Div Box09
set Box09.In2 "100.0"
+new wx:ComboBox Box10
+ set Box10.In "Line Arrow"
+ set Box10.Title "Form"
+
+new wx:LayoutLine Box11
+ set Box11.Orientation "H"
+
+new wx:LayoutLine Box12
+ set Box12.Orientation "H"
+ set Box12.WinTitle "Volume flield"
+
+new wx:CheckBox Box13
+ set Box13.ReactiveOnKeystroke "true"
+ set Box13.Title "Active Box"
+
+new wx:RadioButton Box15
+ set Box15.In0 "No random"
+ set Box15.In1 "Random (0)"
+
+new std:MathOperation Box16
+ set Box16.In2 "-1"
+ set Box16.Type "0"
+
+new wx:LayoutLine Box17
+ set Box17.Orientation "H"
+ set Box17.WinTitle "Volume flield"
+
connect Box00.BoxChange Box02.In1
-connect Box00.Widget Box03.Widget2
connect Box03.Widget Box04.Widget1
-connect Box05.Widget Box03.Widget3
connect Box05.BoxChange Box02.In3
-connect Box06.Widget Box03.Widget4
connect Box06.Out Box07.In1
connect Box08.Out Box09.In1
connect Box06.BoxChange Box02.In4
connect Box08.BoxChange Box02.In5
-connect Box08.Widget Box03.Widget5
connect Box02.BoxChange Box04.BoxExecute
+connect Box08.Widget Box11.Widget1
+connect Box10.Widget Box11.Widget2
+connect Box10.BoxChange Box02.In6
+connect Box11.Widget Box03.Widget7
+connect Box06.Widget Box03.Widget6
+connect Box12.Widget Box03.Widget1
+connect Box05.Widget Box12.Widget2
+connect Box13.Widget Box12.Widget1
+connect Box13.BoxChange Box02.In2
+connect Box00.Widget Box17.Widget2
+connect Box15.Widget Box17.Widget4
+connect Box17.Widget Box03.Widget3
+connect Box15.Out Box16.In1
+connect Box15.BoxChange Box02.In8
# Complex input ports
output Opacity Box07.Out " "
output ScaleFactor Box09.Out " "
output Ratio Box00.Out " "
+output form Box10.Out " "
+output ActiveBoxWidget Box13.Out " "
+output RandomTypeOut Box16.Out " "
endefine
# ----------------------------------
# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Widget.bbg
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Widget.bbg
# ----------------------------------
APP_START
boxchange
73.449532:-77.914560:-900.000000
FIN_COMPLEX_PORT
-COMPLEXINPUTS:2
+COMPLEXINPUTS:3
COMPLEX_PORT
vtkImageData
-28.119201:88.409572:-900.000000
renderer
-102.399936:88.482773:-900.000000
FIN_COMPLEX_PORT
-BOXES:5
+COMPLEX_PORT
+externalLut
+12.095215:91.117290:-900.000000
+FIN_COMPLEX_PORT
+BOXES:9
BOX
creaVtk:VectorsVisu:Box00
ISEXEC:FALSE
--34.809942:-4.756125:-900.000000
-10.765058:-14.756125:-900.000000
+-17.900845:-12.462724:-900.000000
+19.724155:-22.462724:-900.000000
FIN_BOX
BOX
vtk:MaskPoint:Box07
ISEXEC:FALSE
--33.632255:27.751669:-900.000000
-11.942745:17.751669:-900.000000
+-16.666033:44.572575:-900.000000
+19.483967:34.572575:-900.000000
FIN_BOX
BOX
creaVtk:VolumeVectorVisu_Interface:Box02
ISEXEC:FALSE
-46.516412:57.888962:-900.000000
-117.691412:47.888962:-900.000000
+50.966622:84.837457:-900.000000
+104.916622:74.837457:-900.000000
FIN_BOX
BOX
vtk:UpdateRender:Box03
ISEXEC:FALSE
--16.726909:-47.773066:-900.000000
-28.848091:-57.773066:-900.000000
+-4.196952:-69.750559:-900.000000
+36.128048:-79.750559:-900.000000
PORT
Active:"true"
FIN_BOX
BOX
std:MagicBox:Box04
ISEXEC:FALSE
--109.738661:31.553033:-900.000000
--64.163661:21.553033:-900.000000
+-112.198808:64.555673:-900.000000
+-76.123808:54.555673:-900.000000
FIN_BOX
-CONNECTIONS:14
-CONNECTION
-Box07:Out:Box00:In
-NumberOfControlPoints:0
-CONNECTION
-vtkImageData:vtkImageData:Box07:In
-NumberOfControlPoints:0
+BOX
+std:MagicBox:Box06
+ISEXEC:FALSE
+-30.904238:69.101876:-900.000000
+5.170762:59.101876:-900.000000
+FIN_BOX
+BOX
+creaVtk:ClipPolyData:Box08
+ISEXEC:FALSE
+-15.381729:23.829285:-900.000000
+23.443271:13.829285:-900.000000
+PORT
+Inside:"true"
+PORT
+Type:"1"
+FIN_BOX
+BOX
+creaVtk:BoxWidget:Box09
+ISEXEC:FALSE
+-65.717137:44.169788:-900.000000
+-29.042137:34.169788:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box10
+ISEXEC:FALSE
+-64.370903:22.659312:-900.000000
+-24.670903:12.659312:-900.000000
+FIN_BOX
+CONNECTIONS:25
CONNECTION
Box02:AcitiveVector:Box00:Active
NumberOfControlPoints:0
Box02:widget:Widget:Widget
NumberOfControlPoints:0
CONNECTION
-Box02:boxChange:Box07:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
-Box02:boxChange:Box00:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
renderer:renderer:Box04:In
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box02:boxChange:Box03:BoxExecute
NumberOfControlPoints:0
+CONNECTION
+Box02:form:Box00:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+vtkImageData:vtkImageData:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box09:ImplicitFunction:Box08:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box09:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:boxChange:Box10:In2
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:Box10:In1
+NumberOfControlPoints:0
+CONNECTION
+Box10:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box02:ActiveBoxWidget:Box09:Active
+NumberOfControlPoints:0
+CONNECTION
+Box02:AcitiveVector:Box07:Active
+NumberOfControlPoints:0
+CONNECTION
+externalLut:externalLut:Box00:ExternalLut
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box09:ImageInitSize
+NumberOfControlPoints:0
+CONNECTION
+Box02:RandomTypeOut:Box07:RandomType
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Widget.bbs
+# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VolumeVectorVisu_Widget.bbs
# ----------------------------------
include std
category "<VOID>"
-new VectorsVisu Box00
+new creaVtk:VectorsVisu Box00
-new MaskPoint Box07
+new vtk:MaskPoint Box07
-new VolumeVectorVisu_Interface Box02
+new creaVtk:VolumeVectorVisu_Interface Box02
-new UpdateRender Box03
+new vtk:UpdateRender Box03
set Box03.Active "true"
-new MagicBox Box04
+new std:MagicBox Box04
+
+new std:MagicBox Box06
+
+new creaVtk:ClipPolyData Box08
+ set Box08.Inside "true"
+ set Box08.Type "1"
+
+new creaVtk:BoxWidget Box09
+
+new std:MultipleInputs Box10
-connect Box07.Out Box00.In
connect Box02.AcitiveVector Box00.Active
connect Box02.Opacity Box00.Opacity
connect Box02.Ratio Box07.Ratio
connect Box02.ScaleFactor Box00.ScaleFactor
-connect Box02.boxChange Box07.BoxExecute
-connect Box02.boxChange Box00.BoxExecute
connect Box04.Out Box00.Renderer
connect Box04.Out Box03.Renderer
connect Box02.boxChange Box03.BoxExecute
+connect Box02.form Box00.TypeForm
+connect Box06.Out Box07.In
+connect Box07.Out Box08.In
+connect Box08.Out Box00.In
+connect Box09.ImplicitFunction Box08.ImplicitFunction
+connect Box04.Out Box09.Renderer
+connect Box02.boxChange Box10.In2
+connect Box09.BoxChange Box10.In1
+connect Box10.BoxChange Box00.BoxExecute
+connect Box02.ActiveBoxWidget Box09.Active
+connect Box02.AcitiveVector Box07.Active
+connect Box06.Out Box09.ImageInitSize
+connect Box02.RandomTypeOut Box07.RandomType
# Complex input ports
-input vtkImageData Box07.In " "
input renderer Box04.In " "
+input vtkImageData Box06.In " "
+input externalLut Box00.ExternalLut " "
# Complex output ports
output boxchange Box02.boxChange " "
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- vtkProp3D* vtkprop3D=bbGetInputIn();
-
-
- std::string className = vtkprop3D->GetClassName();
- std::string wantedClass = "vtkOpenGLActor";
- if(className == wantedClass)
- {
- ((vtkActor*)vtkprop3D)->GetProperty()->SetOpacity( bbGetInputOpacity() );
- }
-
- if ( bbGetInputTransform()!=NULL )
- {
- vtkprop3D->SetUserTransform( bbGetInputTransform() );
- }
-
-// bbSetOutputOut( vtkactor );
-
- // Interface Update
-
- if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() ))
+ if (bbGetInputIn()!=NULL)
{
-
- if (bbGetInputActive()==true )
- {
- bbGetInputRenderer()->AddActor( vtkprop3D );
- } else {
- bbGetInputRenderer()->RemoveActor( vtkprop3D );
- } //if Active
- backActive=bbGetInputActive();
- } // if Renderer
+ vtkProp3D* vtkprop3D=bbGetInputIn();
+ std::string className = vtkprop3D->GetClassName();
+ std::string wantedClass = "vtkOpenGLActor";
+ if(className == wantedClass)
+ {
+ vtkActor *vtkactor=((vtkActor*)vtkprop3D);
+ vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+ vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
+ double r = bbGetInputColor()[0];
+ double g = bbGetInputColor()[1];
+ double b = bbGetInputColor()[2];
+ vtkactor->GetProperty()->SetColor( r,g,b );
+ }
+
+ if ( bbGetInputTransform()!=NULL )
+ {
+ vtkprop3D->SetUserTransform( bbGetInputTransform() );
+ }
+
+ // bbSetOutputOut( vtkactor );
+
+ // Interface Update
+
+ if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() ))
+ {
+
+ if (bbGetInputActive()==true )
+ {
+ bbGetInputRenderer()->AddActor( vtkprop3D );
+ } else {
+ bbGetInputRenderer()->RemoveActor( vtkprop3D );
+ } //if Active
+ backActive=bbGetInputActive();
+ } // if Renderer
+ }// bbGetInputIn
}
//=====
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- bbSetInputActive(false);
- backActive=bbGetInputActive();
- bbSetInputIn(NULL);
- bbSetInputOpacity(1);
- bbSetInputRenderer(NULL);
+
+ std::vector<double> color;
+ color.push_back(1);
+ color.push_back(0);
+ color.push_back(0);
+ bbSetInputActive( false );
+ backActive=bbGetInputActive();
+ bbSetInputIn( NULL );
+ bbSetInputOpacity( 1 );
+ bbSetInputLineWidth( 0.5 );
+ bbSetInputRenderer( NULL );
+ bbSetInputColor( color );
}
//=====
BBTK_DECLARE_INPUT(Active,bool);
BBTK_DECLARE_INPUT(In,vtkProp3D*);
BBTK_DECLARE_INPUT(Opacity,double);
+ BBTK_DECLARE_INPUT(Color,std::vector<double>);
+ BBTK_DECLARE_INPUT(LineWidth,double);
BBTK_DECLARE_INPUT(Transform,vtkTransform*);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
// BBTK_DECLARE_OUTPUT(Out,double);
BBTK_INPUT(Actor,Active,"Active true/false (default false)",bool,"");
BBTK_INPUT(Actor,In,"First input",vtkProp3D*,"");
BBTK_INPUT(Actor,Opacity,"Opacity 0..1 (default 1)",double,"");
+ BBTK_INPUT(Actor,Color,"(default [1 0 0]red ) RGB color vector [0..1, 0..1, 0..1] )", std::vector<double>,"");
+ BBTK_INPUT(Actor,LineWidth,"(default 0.5 ) With ligne )",double,"");
BBTK_INPUT(Actor,Renderer,"Renderer",vtkRenderer*,"");
// BBTK_OUTPUT(Actor,Out,"First output",double,"");
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkApplyMask.h"
+#include "bbcreaVtkPackage.h"
+
+#include "creaVtk_MACROS.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ApplyMask)
+BBTK_BLACK_BOX_IMPLEMENTATION(ApplyMask,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ApplyMask::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ((bbGetInputImage()!=NULL) && (bbGetInputMask()!=NULL))
+ {
+ int extImage[6];
+ int extMask[6];
+ vtkImageData *resultImage=NULL;
+ bbGetInputImage()->GetExtent( extImage );
+ bbGetInputImage()->GetExtent( extMask );
+ int dimXImage = extImage[1]-extImage[0]+1;
+ int dimYImage = extImage[3]-extImage[2]+1;
+ int dimZImage = extImage[5]-extImage[4]+1;
+ int dimXMask = extMask[1]-extMask[0]+1;
+ int dimYMask = extMask[3]-extMask[2]+1;
+ int dimZMask = extMask[5]-extMask[4]+1;
+ double background = bbGetInputBackground();
+ double bgToAnalice = bbGetInputBackgroundToAnalice();
+
+ if (bbGetInputType()==0)
+ {
+ if (bbGetOutputOut()!=NULL)
+ {
+ bbGetOutputOut()->Delete();
+ }
+
+ resultImage = vtkImageData::New();
+ resultImage->Initialize();
+ resultImage->SetSpacing( bbGetInputImage()->GetSpacing() );
+ resultImage->SetDimensions( dimXImage, dimYImage, dimZImage );
+ resultImage->AllocateScalars( bbGetInputImage()->GetScalarType(),1 );
+ } // if Type==0
+
+ if (bbGetInputType()==1)
+ {
+ resultImage=bbGetInputImage();
+ } // if Type==1
+
+ if (bbGetInputType()==2)
+ {
+ resultImage=bbGetInputImage();
+ } // if Type==2
+
+ if (bbGetInputType()==3)
+ {
+ resultImage=bbGetInputImage();
+ } // if Type==3
+
+
+ if ((dimXImage==dimXMask) &&
+ (dimYImage==dimYMask) &&
+ (dimZImage==dimZMask))
+ {
+ long int i, size = dimXImage * dimYImage * dimZImage;
+ DEF_POINTER_IMAGE_VTK_CREA(vI,ssI,pI,stI, bbGetInputImage() );
+ DEF_POINTER_IMAGE_VTK_CREA(vM,ssM,pM,stM, bbGetInputMask() );
+ DEF_POINTER_IMAGE_VTK_CREA(vO,ssO,pO,stO, resultImage );
+long int k1omp=(double)(size-1)*0.0;
+long int k2omp=(double)(size-1)*0.2;
+long int k3omp=(double)(size-1)*0.4;
+long int k4omp=(double)(size-1)*0.6;
+long int k5omp=(double)(size-1)*0.8;
+long int k6omp=(double)(size-1)*1.0;
+printf("EED ApplyMask::Process (with openmp)\n");
+ #pragma omp parallel for
+ for (i=0; i<size;i++)
+ {
+if ( (k1omp==i) || (k2omp==i) || (k3omp==i) ||
+ (k4omp==i) || (k5omp==i) || (k6omp==i) ) { printf(" %d%\n", (int)(((double)i/(double)(size-1))*100 )); }
+ double vItmpOMP;
+ double vMtmpOMP;
+ double vOtmpOMP;
+ GETVALUE2_VTK_CREA(vMtmpOMP,pM,stM,i);
+ if (bbGetInputType()==0) //Applay mask to new Image
+ {
+ GETVALUE2_VTK_CREA(vItmpOMP,pI,stI,i);
+ if (vMtmpOMP!=bgToAnalice)
+ {
+ vOtmpOMP = vItmpOMP;
+ } else {
+ vOtmpOMP = background;
+ } // if vM
+ SETVALUE2_VTK_CREA(vOtmpOMP,pO,stO,i);
+ } // if Type==0
+ if (bbGetInputType()==1) //Modifiy the Input image with the Label value in Mask place
+ {
+ if (vMtmpOMP!=bgToAnalice)
+ {
+ vOtmpOMP = bbGetInputLabel();
+ SETVALUE2_VTK_CREA(vOtmpOMP,pO,stO,i);
+ }
+ } // if Type==1
+ if (bbGetInputType()==2) //Modifiy the Input image with the Mask value
+ {
+ if (vMtmpOMP!=bgToAnalice)
+ {
+ vOtmpOMP = vMtmpOMP;
+ SETVALUE2_VTK_CREA(vOtmpOMP,pO,stO,i);
+ }
+ } // if Type==2
+ } // for
+ } //if dim
+ resultImage->Modified();
+ bbSetOutputOut( resultImage );
+ } // if Image && Mask
+}
+//=====
+// 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)
+//=====
+void ApplyMask::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputImage(NULL);
+ bbSetInputMask(NULL);
+ bbSetInputBackground(0); // output image Type 0
+ bbSetInputBackgroundToAnalice(0);
+ bbSetInputLabel(255);
+ bbSetInputType(0);
+ bbSetOutputOut(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ApplyMask::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void ApplyMask::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkApplyMask_h_INCLUDED__
+#define __bbcreaVtkApplyMask_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ApplyMask
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ApplyMask,bbtk::AtomicBlackBox);
+//=====
+// 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(Background,double);
+ BBTK_DECLARE_INPUT(BackgroundToAnalice,double);
+ BBTK_DECLARE_INPUT(Label,double);
+ BBTK_DECLARE_INPUT(Image,vtkImageData*);
+ BBTK_DECLARE_INPUT(Mask,vtkImageData*);
+ BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ApplyMask,bbtk::AtomicBlackBox);
+ BBTK_NAME("ApplyMask");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(ApplyMask,Background,"(default 0) type 0: Background value in output image type 1: Nothing type 2: Nothing",double,"");
+ BBTK_INPUT(ApplyMask,BackgroundToAnalice,"(default 0) Background to check in the mask ",double,"");
+ BBTK_INPUT(ApplyMask,Label,"(double 255) type 0: Nothing type 1: valueOut in the mask type 2: Nothing ",double,"");
+ BBTK_INPUT(ApplyMask,Image,"Input image",vtkImageData*,"");
+ BBTK_INPUT(ApplyMask,Mask,"Input mask",vtkImageData*,"");
+ BBTK_INPUT(ApplyMask,Type,"(default 0) 0:Create new image 1:Modify the Image input with Label value at the mask place 2: Modify the Image input with the value of the mask",int,"");
+ BBTK_OUTPUT(ApplyMask,Out,"Output image",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(ApplyMask);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkApplyMask_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkApplyTransformToPoint3D.h"
+#include "bbcreaVtkPackage.h"
+#include "vtkTransform.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ApplyTransformToPoint3D)
+BBTK_BLACK_BOX_IMPLEMENTATION(ApplyTransformToPoint3D,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ApplyTransformToPoint3D::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+ if ((bbGetInputPoint().size()==3) && (bbGetInputDirectionInPoint().size()==3) )
+ {
+ double point[3] , newPoint[3];
+ point[0] = bbGetInputPoint()[0];
+ point[1] = bbGetInputPoint()[1];
+ point[2] = bbGetInputPoint()[2];
+ bbGetInputTransform()->TransformPoint( point,newPoint );
+ std::vector<double> out;
+ out.push_back( newPoint[0] );
+ out.push_back( newPoint[1] );
+ out.push_back( newPoint[2] );
+ bbSetOutputOut( out );
+
+ double pointDir[3] , newPointDir[3];
+ pointDir[0] = bbGetInputPoint()[0]+bbGetInputDirectionInPoint()[0];
+ pointDir[1] = bbGetInputPoint()[1]+bbGetInputDirectionInPoint()[1];
+ pointDir[2] = bbGetInputPoint()[2]+bbGetInputDirectionInPoint()[2];
+ bbGetInputTransform()->TransformPoint( pointDir,newPointDir );
+ std::vector<double> outDir;
+ outDir.push_back( newPointDir[0]-newPoint[0] );
+ outDir.push_back( newPointDir[1]-newPoint[1] );
+ outDir.push_back( newPointDir[2]-newPoint[2] );
+ bbSetOutputOutDirection( outDir );
+ } else {
+ printf("EED Warning! ApplyTransformToPoint3D::Process Incoherent sizes Point(3)=%d DirectionInPoint(3)=%d\n", bbGetInputPoint().size(),bbGetInputDirectionInPoint().size() );
+ }// if Point size
+}
+
+//=====
+// 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)
+//=====
+void ApplyTransformToPoint3D::bbUserSetDefaultValues()
+{
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+
+ std::vector<double> point;
+ point.push_back(0);
+ point.push_back(0);
+ point.push_back(0);
+ bbSetInputPoint( point );
+ std::vector<double> dir;
+ dir.push_back(0);
+ dir.push_back(0);
+ dir.push_back(1);
+ bbSetInputDirectionInPoint( dir );
+ bbSetInputTransform(NULL);
+}
+
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ApplyTransformToPoint3D::bbUserInitializeProcessing()
+{
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+}
+
+//=====
+// 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)
+//=====
+void ApplyTransformToPoint3D::bbUserFinalizeProcessing()
+{
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+}
+
+} // EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkApplyTransformToPoint3D_h_INCLUDED__
+#define __bbcreaVtkApplyTransformToPoint3D_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+#include "vtkLinearTransform.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ApplyTransformToPoint3D
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ApplyTransformToPoint3D,bbtk::AtomicBlackBox);
+//=====
+// 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(Point,std::vector<double>);
+ BBTK_DECLARE_INPUT(DirectionInPoint,std::vector<double>);
+ BBTK_DECLARE_INPUT(Transform,vtkLinearTransform*);
+ BBTK_DECLARE_OUTPUT(Out,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(OutDirection,std::vector<double>);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ApplyTransformToPoint3D,bbtk::AtomicBlackBox);
+ BBTK_NAME("ApplyTransformToPoint3D");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ApplyTransformToPoint3D,Point,"(default [0,0,0]) Point 3D [x,y,z]",std::vector<double>,"");
+ BBTK_INPUT(ApplyTransformToPoint3D,DirectionInPoint,"(default [0,0,1]) Direction from point [x,y,z]",std::vector<double>,"");
+ BBTK_INPUT(ApplyTransformToPoint3D,Transform,"vtkLinearTransform",vtkLinearTransform*,"");
+
+ BBTK_OUTPUT(ApplyTransformToPoint3D,Out,"Point 3D [x,y,z] after Transform ",std::vector<double>,"");
+ BBTK_OUTPUT(ApplyTransformToPoint3D,OutDirection,"Direction 3D [x,y,z] after Transform",std::vector<double>,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ApplyTransformToPoint3D);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkApplyTransformToPoint3D_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkBooleanOperationPolyDataFilter.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkBooleanOperationPolyDataFilter.h"
+#include "vtkCleanPolyData.h"
+#include "vtkTriangleFilter.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,BooleanOperationPolyDataFilter)
+BBTK_BLACK_BOX_IMPLEMENTATION(BooleanOperationPolyDataFilter,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void BooleanOperationPolyDataFilter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ((bbGetInputIn1()!=NULL) && (bbGetInputIn2()!=NULL) )
+ {
+
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
+ vtkCleanPolyData *clean1 = vtkCleanPolyData::New();
+ vtkCleanPolyData *clean2 = vtkCleanPolyData::New();
+ clean1->SetInputData( bbGetInputIn1() );
+ clean2->SetInputData( bbGetInputIn2() );
+ clean1->Update();
+ clean2->Update();
+ vtkTriangleFilter *triangle1 = vtkTriangleFilter::New();
+ vtkTriangleFilter *triangle2 = vtkTriangleFilter::New();
+ triangle1->SetInputData( clean1->GetOutput() );
+ triangle2->SetInputData( clean2->GetOutput() );
+ triangle1->Update();
+ triangle2->Update();
+
+ vtkBooleanOperationPolyDataFilter *booleanOperation = vtkBooleanOperationPolyDataFilter::New();
+ booleanOperation->SetInputData(0, triangle1->GetOutput() );
+ booleanOperation->SetInputData(1, triangle2->GetOutput() );
+
+ if (bbGetInputOperation()==0 )
+ {
+ booleanOperation->SetOperationToUnion();
+ }
+ if (bbGetInputOperation()==1 )
+ {
+ booleanOperation->SetOperationToIntersection();
+ }
+ if (bbGetInputOperation()==2 )
+ {
+ booleanOperation->SetOperationToDifference();
+ }
+ booleanOperation->Update();
+ bbSetOutputOut( booleanOperation->GetOutput() );
+ } else {
+ printf("EED Warnning! BooleanOperationPolyDataFilter::Process vtkPolyData In1 or In2 is EMPTY\n");
+ } // if In1 In2 != NULL
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void BooleanOperationPolyDataFilter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn1(NULL);
+ bbSetInputIn2(NULL);
+ bbSetInputOperation(0);
+
+}
+//=====
+// 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)
+//=====
+void BooleanOperationPolyDataFilter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void BooleanOperationPolyDataFilter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkBooleanOperationPolyDataFilter_h_INCLUDED__
+#define __bbcreaVtkBooleanOperationPolyDataFilter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT BooleanOperationPolyDataFilter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(BooleanOperationPolyDataFilter,bbtk::AtomicBlackBox);
+//=====
+// 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(In1,vtkPolyData*);
+ BBTK_DECLARE_INPUT(In2,vtkPolyData*);
+ BBTK_DECLARE_INPUT(Operation,int);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(BooleanOperationPolyDataFilter,bbtk::AtomicBlackBox);
+ BBTK_NAME("BooleanOperationPolyDataFilter");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(BooleanOperationPolyDataFilter,In1,"vtkPolyData",vtkPolyData*,"");
+ BBTK_INPUT(BooleanOperationPolyDataFilter,In2,"vtkPolyData",vtkPolyData*,"");
+ BBTK_INPUT(BooleanOperationPolyDataFilter,Operation,"(defalut 0) 0:Union 1:Intersection 2:Difference",int,"");
+
+ BBTK_OUTPUT(BooleanOperationPolyDataFilter,Out,"vtkPolyData",vtkPolyData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(BooleanOperationPolyDataFilter);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkBooleanOperationPolyDataFilter_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkBoxWidget.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkRenderWindow.h"
+#include "vtkCommand.h"
+
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,BoxWidget)
+BBTK_BLACK_BOX_IMPLEMENTATION(BoxWidget,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+
+class bbBoxWidgetCallback : public vtkCommand
+ {
+ public:
+ BoxWidget *_box;
+ static bbBoxWidgetCallback *New()
+ {
+ return new bbBoxWidgetCallback;
+ }
+ void SetBox( BoxWidget* box )
+ {
+ _box=box;
+ }
+
+ void Execute(vtkObject *caller, unsigned long, void*) override
+ {
+ vtkBoxWidget *vtkwidget = reinterpret_cast<vtkBoxWidget*>(caller);
+ vtkwidget->GetPlanes( _box->planes );
+ _box->bbSignalOutputModification(std::string("ImplicitFunction"));
+ }
+ };
+
+
+
+void BoxWidget::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+ if ( bbGetInputRenderer()!=NULL )
+ {
+ if (firsttime==true)
+ {
+ firsttime = false;
+ boxWidget = vtkBoxWidget::New();
+ planes = vtkPlanes::New();
+ boxWidget->SetInteractor( bbGetInputRenderer()->GetRenderWindow()->GetInteractor() );
+ boxWidget->SetPlaceFactor(1.25);
+ if (bbGetInputImageInitSize()!=NULL)
+ {
+ int ext[6];
+ bbGetInputImageInitSize()->GetExtent( ext );
+ double spc[3];
+ bbGetInputImageInitSize()->GetSpacing( spc );
+ boxWidget->PlaceWidget( ext[0]*spc[0] , ext[1]*spc[0] , ext[2]*spc[1] , ext[3]*spc[1] , ext[4]*spc[2] , ext[5]*spc[2] );
+ } else {
+ boxWidget->PlaceWidget(0,500,0,500,0,500);
+ }// if ImageInitSize
+ boxWidget->GetPlanes( planes );
+ } // if firsttime
+
+ // boxWidget->SetProp3D(coneActor);
+ bbBoxWidgetCallback *callback = bbBoxWidgetCallback::New();
+ callback->SetBox( this );
+ boxWidget->AddObserver(vtkCommand::InteractionEvent, callback);
+
+ if (bbGetInputActive()==true)
+ {
+ boxWidget->On();
+ } else {
+ boxWidget->Off();
+ } // if Active
+ bbSetOutputImplicitFunction( planes );
+ } else {
+ printf("EED Warnning! BoxWidget::Process vtkRenderer not set.\n");
+ }// vtkRenderer != NULL
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void BoxWidget::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ firsttime=true;
+ bbSetInputRenderer(NULL);
+ bbSetInputActive( false );
+ bbSetInputImageInitSize(NULL);
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void BoxWidget::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void BoxWidget::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkBoxWidget_h_INCLUDED__
+#define __bbcreaVtkBoxWidget_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkBoxWidget.h"
+#include "vtkRenderer.h"
+#include "vtkImplicitFunction.h"
+#include "vtkPlanes.h"
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT BoxWidget
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(BoxWidget,bbtk::AtomicBlackBox);
+//=====
+// 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( Active , bool );
+ BBTK_DECLARE_INPUT( Renderer , vtkRenderer* );
+ BBTK_DECLARE_INPUT( ImageInitSize , vtkImageData* );
+ BBTK_DECLARE_OUTPUT( ImplicitFunction , vtkImplicitFunction* );
+ BBTK_PROCESS(Process);
+ void Process();
+
+ bool firsttime;
+ vtkBoxWidget *boxWidget;
+ vtkPlanes *planes;
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(BoxWidget,bbtk::AtomicBlackBox);
+ BBTK_NAME("BoxWidget");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(BoxWidget,Active,"(default false) true/false",bool,"");
+ BBTK_INPUT(BoxWidget,ImageInitSize,"(default NULL=> 0,500,0,500,0,500) Boudaring image size ",vtkImageData*,"");
+ BBTK_INPUT(BoxWidget,Renderer,"vtkRenderer",vtkRenderer*,"");
+
+ BBTK_OUTPUT(BoxWidget,ImplicitFunction,"vtkImplicitFunction",vtkImplicitFunction*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(BoxWidget);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkBoxWidget_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkClipPolyData.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkExtractPoints.h"
+#include "vtkClipPolyData.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ClipPolyData)
+BBTK_BLACK_BOX_IMPLEMENTATION(ClipPolyData,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ClipPolyData::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ((bbGetInputIn()!=NULL) && (bbGetInputImplicitFunction()!=NULL) )
+ {
+ if (bbGetInputType()==0)
+ {
+ vtkClipPolyData *clip = vtkClipPolyData::New();
+ clip->SetInputData( bbGetInputIn() );
+ clip->SetClipFunction( bbGetInputImplicitFunction() );
+ clip->GenerateClipScalarsOn();
+ clip->GenerateClippedOutputOff();
+ if (bbGetInputInside()==true)
+ {
+ clip->InsideOutOn();
+ } else {
+ clip->InsideOutOff();
+ }
+ clip->Update();
+ bbSetOutputOut( clip->GetOutput() );
+ } // Type 0
+ if (bbGetInputType()==1)
+ {
+ vtkExtractPoints *clip = vtkExtractPoints::New();
+ clip->SetInputData( bbGetInputIn() );
+ clip->SetImplicitFunction( bbGetInputImplicitFunction() );
+ if (bbGetInputInside()==true)
+ {
+ clip->ExtractInsideOn();
+ } else {
+ clip->ExtractInsideOff();
+ }
+ clip->Update();
+ bbSetOutputOut( clip->GetOutput() );
+ } // type 1
+ } else {
+ printf("EED Warnning! ClipPolyData::Process In or ImplicitFunction is EMPTY\n");
+ } // if In ImplicitFunction != NULL
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ClipPolyData::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn( NULL );
+ bbSetInputType( 0 );
+ bbSetInputInside( true );
+ bbSetInputImplicitFunction( NULL );
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ClipPolyData::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void ClipPolyData::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkClipPolyData_h_INCLUDED__
+#define __bbcreaVtkClipPolyData_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+#include "vtkImplicitFunction.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ClipPolyData
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ClipPolyData,bbtk::AtomicBlackBox);
+//=====
+// 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(Type,int);
+ BBTK_DECLARE_INPUT(In,vtkPolyData*);
+ BBTK_DECLARE_INPUT(Inside,bool);
+ BBTK_DECLARE_INPUT(ImplicitFunction,vtkImplicitFunction*);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ClipPolyData,bbtk::AtomicBlackBox);
+ BBTK_NAME("ClipPolyData");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ClipPolyData,Type,"(default 0) 0:surface vtkClipPolydata 1:points vtkExtractPoints",int,"");
+ BBTK_INPUT(ClipPolyData,In,"vtkPolyData",vtkPolyData*,"");
+ BBTK_INPUT(ClipPolyData,Inside,"(defalut true) Inside true, Outside false",bool,"");
+ BBTK_INPUT(ClipPolyData,ImplicitFunction,"vtkImplicitFunction",vtkImplicitFunction*,"");
+
+ BBTK_OUTPUT(ClipPolyData,Out,"vtkPolyData",vtkPolyData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ClipPolyData);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkClipPolyData_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkCreateMeshFromPoints.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkTriangleStrip.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,CreateMeshFromPoints)
+BBTK_BLACK_BOX_IMPLEMENTATION(CreateMeshFromPoints,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void CreateMeshFromPoints::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+ std::vector<double> lstX = bbGetInputLstX();
+ std::vector<double> lstY = bbGetInputLstY();
+ std::vector<double> lstZ = bbGetInputLstZ();
+ std::vector<int> lstIndexs = bbGetInputLstIndexs();
+ if ( (lstIndexs.size()<=1) || (lstX.size()==0) || (lstX.size()!=lstY.size()) || (lstY.size()!=lstZ.size()) )
+ {
+ printf("Warnning! CreateMeshFromPoints::Process: List of points X Y Z and LstIndexes is not correct\n");
+ bbSetOutputOut(NULL);
+ } else {
+ int ii,sizeSegment1,sizeSegment2;
+ int endSegment;
+// vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
+ if (points!=NULL) points->Delete();
+ points = vtkPoints::New();
+ int i,sizeLstX = lstX.size();
+ for (i=0;i<sizeLstX;i++)
+ {
+ points->InsertNextPoint(lstX[i],lstY[i],lstZ[i]);
+ } // for i
+// vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();
+ if (cells!=NULL) cells->Delete();
+ cells = vtkCellArray::New();
+ int maxElements;
+ int maxSegment1,maxSegment2;
+ int iSeg1,iSeg2;
+ int iGeneral = 0;
+ int sizeLstIdexes=lstIndexs.size();
+ for (i=0; i<sizeLstIdexes-1;i++)
+ {
+ sizeSegment1 = lstIndexs[i];
+ sizeSegment2 = lstIndexs[i+1];
+ vtkSmartPointer<vtkTriangleStrip> triangleStrip = vtkSmartPointer<vtkTriangleStrip>::New();
+ triangleStrip->GetPointIds()->SetNumberOfIds(sizeSegment1+sizeSegment2);
+ maxElements=sizeSegment1;
+ if (maxElements<sizeSegment2) maxElements=sizeSegment2;
+ maxSegment1 = iGeneral+sizeSegment1;
+ maxSegment2 = iGeneral+sizeSegment1+sizeSegment2;
+ iSeg1 = iGeneral;
+ iSeg2 = iGeneral+sizeSegment1;
+ for (ii=0; ii<maxElements; ii++)
+ {
+ triangleStrip->GetPointIds()->SetId(ii*2 ,iSeg1);
+ triangleStrip->GetPointIds()->SetId(ii*2+1,iSeg2);
+ iSeg1++;
+ iSeg2++;
+ if (iSeg1>=maxSegment1) iSeg1=maxSegment1-1;
+ if (iSeg2>=maxSegment2) iSeg2=maxSegment2-1;
+ } // for ii
+ iGeneral=iGeneral+sizeSegment1;
+ cells->InsertNextCell(triangleStrip);
+ } //for LstIndexs
+// vtkPolyData *polydata = vtkPolyData::New();
+ if (polydata!=NULL) polydata->Delete();
+ polydata = vtkPolyData::New();
+ polydata->SetPoints(points);
+ polydata->SetStrips(cells);
+// vtkCleanPolyData *clean=vtkCleanPolyData::New();
+ if (clean!=NULL) clean->Delete();
+ clean = vtkCleanPolyData::New();
+ clean->SetInputData(polydata);
+ clean->Update();
+// vtkTriangleFilter *triangle = vtkTriangleFilter::New();
+ if (triangle!=NULL) triangle->Delete();
+ triangle = vtkTriangleFilter::New();
+ triangle->SetInputData( clean->GetOutput() );
+ triangle->Update();
+ bbSetOutputOut( clean->GetOutput() );
+ }// if listXYZ size
+}
+//=====
+// 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)
+//=====
+void CreateMeshFromPoints::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+// bbSetInputIn(0);
+ points = NULL;
+ cells = NULL;
+ polydata = NULL;
+ clean = NULL;
+ triangle = NULL;
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void CreateMeshFromPoints::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void CreateMeshFromPoints::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
+#define __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPoints.h"
+#include "vtkCellArray.h"
+#include "vtkPolyData.h"
+#include "vtkCleanPolyData.h"
+#include "vtkTriangleFilter.h"
+
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT CreateMeshFromPoints
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(CreateMeshFromPoints,bbtk::AtomicBlackBox);
+//=====
+// 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(LstX,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstY,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstZ,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstIndexs,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkPoints *points;
+ vtkCellArray *cells;
+ vtkPolyData *polydata;
+ vtkCleanPolyData *clean;
+ vtkTriangleFilter *triangle;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(CreateMeshFromPoints,bbtk::AtomicBlackBox);
+ BBTK_NAME("CreateMeshFromPoints");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(CreateMeshFromPoints,LstX,"List X point",std::vector<double>,"");
+ BBTK_INPUT(CreateMeshFromPoints,LstY,"List Y point",std::vector<double>,"");
+ BBTK_INPUT(CreateMeshFromPoints,LstZ,"List Z point",std::vector<double>,"");
+ BBTK_INPUT(CreateMeshFromPoints,LstIndexs,"Number of points by segment",std::vector<int>,"");
+
+ BBTK_OUTPUT(CreateMeshFromPoints,Out,"vtkPolyData",vtkPolyData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(CreateMeshFromPoints);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkCutter.h"
+#include "bbcreaVtkPackage.h"
+#include "vtkCutter.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Cutter)
+BBTK_BLACK_BOX_IMPLEMENTATION(Cutter,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void Cutter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ // See example in:
+ // https://kitware.github.io/vtk-examples/site/Cxx/VisualizationAlgorithms/Cutter/
+
+ vtkCutter *cutter;
+
+ cutter = vtkCutter::New();
+ cutter->SetInputData( bbGetInputIn() );
+ cutter->SetCutFunction( bbGetInputImplicitFunction() );
+ cutter->Update();
+ bbSetOutputOut( cutter->GetOutput() );
+
+
+}
+//=====
+// 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)
+//=====
+void Cutter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+// bbSetInputIn(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void Cutter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void Cutter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkCutter_h_INCLUDED__
+#define __bbcreaVtkCutter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+#include "vtkPolyData.h"
+#include "vtkImplicitFunction.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT Cutter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Cutter,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkPolyData*);
+ BBTK_DECLARE_INPUT(ImplicitFunction,vtkImplicitFunction*);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(Cutter,bbtk::AtomicBlackBox);
+ BBTK_NAME("Cutter");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("vtkCutter");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(Cutter,In,"vtkPolyData input",vtkPolyData*,"");
+ BBTK_INPUT(Cutter,ImplicitFunction,"vtkImpliciteFunction ex.: vtkBox, vtkCone, vtkCylender, vtkPlane, vtkSphere(s), vtkQuadric, ETC.",vtkImplicitFunction*,"");
+
+ BBTK_OUTPUT(Cutter,Out,"vtkPolyData output",vtkPolyData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(Cutter);
+//=====
+// 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)
+//=====
+} // EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkCutter_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkDelaunay3D.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkPoints.h"
+#include "vtkDelaunay2D.h"
+#include "vtkDelaunay3D.h"
+#include "vtkShrinkFilter.h"
+#include "vtkGeometryFilter.h"
+#include <vtkUnstructuredGrid.h>
+#include <vtkCleanPolyData.h>
+
+#include <vtkPCANormalEstimation.h>
+#include <vtkSignedDistance.h>
+#include <vtkExtractSurface.h>
+#include <vtkPointData.h>
+
+#include <vtkSurfaceReconstructionFilter.h>
+#include <vtkContourFilter.h>
+#include <vtkReverseSense.h>
+
+
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Delaunay3D)
+BBTK_BLACK_BOX_IMPLEMENTATION(Delaunay3D,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void Delaunay3D::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ std::vector<double> lstX=bbGetInputLstPointsX();
+ std::vector<double> lstY=bbGetInputLstPointsY();
+ std::vector<double> lstZ=bbGetInputLstPointsZ();
+ if (lstX.size()!=0)
+ {
+ vtkPoints *points = vtkPoints::New();
+ int i,size=lstX.size();
+ for (i=0;i<size;i++)
+ {
+ points->InsertNextPoint( lstX[i], lstY[i], lstZ[i] );
+ } // for i
+
+ vtkPolyData *inputpolydata = vtkPolyData::New();
+ inputpolydata->SetPoints( points );
+
+/* Delaunay */
+ vtkDelaunay3D* delaunay = vtkDelaunay3D::New();
+ delaunay->SetInputData( inputpolydata );
+ delaunay->SetTolerance( bbGetInputTolerance() ); //0.01
+ delaunay->SetAlpha( bbGetInputAlpha() ); //0.2
+ delaunay->BoundingTriangulationOff();
+ delaunay->Update();
+ vtkGeometryFilter *geometry = vtkGeometryFilter::New();
+ geometry->SetInputData( delaunay->GetOutput() );
+ geometry->Update();
+ bbSetOutputOut( geometry->GetOutput() );
+ } else {
+ printf("Warnning! Delaunay3D::Process: list of points empty. \n");
+ } // if lstX.size
+}
+
+//=====
+// 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)
+//=====
+void Delaunay3D::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputTolerance( 0 );
+ bbSetInputAlpha( 0 );
+}
+//=====
+// 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)
+//=====
+void Delaunay3D::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void Delaunay3D::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkDelaunay3D_h_INCLUDED__
+#define __bbcreaVtkDelaunay3D_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT Delaunay3D
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Delaunay3D,bbtk::AtomicBlackBox);
+//=====
+// 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(Tolerance,double);
+ BBTK_DECLARE_INPUT(Alpha,double);
+ BBTK_DECLARE_INPUT(LstPointsX,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstPointsY,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstPointsZ,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData *);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(Delaunay3D,bbtk::AtomicBlackBox);
+ BBTK_NAME("Delaunay3D");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(Delaunay3D,Tolerance,"(default 0) Delaunay Tolerance",double,"");
+ BBTK_INPUT(Delaunay3D,Alpha,"(default 0) Delaunay Alpha",double,"");
+ BBTK_INPUT(Delaunay3D,LstPointsX,"Vector of points X",std::vector<double>,"");
+ BBTK_INPUT(Delaunay3D,LstPointsY,"Vector of points Y",std::vector<double>,"");
+ BBTK_INPUT(Delaunay3D,LstPointsZ,"Vector of points Z",std::vector<double>,"");
+
+ BBTK_OUTPUT(Delaunay3D,Out,"vtkPolyData",vtkPolyData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(Delaunay3D);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkDelaunay3D_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkDistanceMap.h"
+#include "bbcreaVtkPackage.h"
+
+#include "creaVtk_MACROS.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,DistanceMap)
+BBTK_BLACK_BOX_IMPLEMENTATION(DistanceMap,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void DistanceMap::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+ if ( (bbGetInputIn()!=NULL) && (bbGetInputPoint1().size()==3) )
+ {
+
+ int ext[6];
+ int dim[3];
+ long int dimX,dimXY;
+ double spc[3];
+ bbGetInputIn()->GetSpacing(spc);
+ bbGetInputIn()->GetExtent(ext);
+ dim[0] = ext[1]-ext[0]+1;
+ dim[1] = ext[3]-ext[2]+1;
+ dim[2] = ext[5]-ext[4]+1;
+ dimX = dim[0];
+ dimXY = dim[0]*dim[1];
+ if (imageoutput!=NULL)
+ {
+ imageoutput->Delete();
+ }
+ imageoutput = vtkImageData::New();
+ imageoutput->Initialize();
+ imageoutput->SetSpacing( spc );
+ imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
+
+ //EED 2017-01-01 Migration VTK7
+ #if (VTK_MAJOR_VERSION <= 5)
+ imageoutput->SetScalarType( VTK_DOUBLE );
+ imageoutput->AllocateScalars();
+ #endif
+ #if (VTK_MAJOR_VERSION >= 6)
+ imageoutput->AllocateScalars( VTK_DOUBLE,1 );
+ #endif
+ imageoutput->Modified();
+
+ memset( imageoutput->GetScalarPointer() ,0, sizeof(double)*dim[0]*dim[1]*dim[2] );
+ std::vector<int> lst1X;
+ std::vector<int> lst1Y;
+ std::vector<int> lst1Z;
+
+ std::vector<int> lst2X;
+ std::vector<int> lst2Y;
+ std::vector<int> lst2Z;
+
+ lst1X.push_back( bbGetInputPoint1()[0] );
+ lst1Y.push_back( bbGetInputPoint1()[1]);
+ lst1Z.push_back( bbGetInputPoint1()[2]);
+
+ long int i,size;
+ double glIn,glOut;
+ double depth=0;
+ int px,py,pz;
+ int pxOut,pyOut,pzOut;
+ double tmpValue;
+
+
+ DEF_POINTER_IMAGE_VTK_CREA(vIn,ssIn,pIn,stIn,bbGetInputIn())
+ DEF_POINTER_IMAGE_VTK_CREA(vOut,ssOut,pOut,stOut,imageoutput)
+
+ while (lst1X.size()>0)
+ {
+ depth=depth+bbGetInputSlope();
+ size=lst1X.size();
+ for (i=0;i<size;i++)
+ {
+ GETVALUE2_VTK_CREA(glIn,pIn,stIn, lst1X[i] + lst1Y[i]*dimX + lst1Z[i]*dimXY )
+
+// glIn=bbGetInputIn()->GetScalarComponentAsDouble( lst1X[i], lst1Y[i], lst1Z[i], 0);
+ if (glIn!=0)
+ {
+ GETVALUE2_VTK_CREA(glOut,pOut,stOut, lst1X[i] + lst1Y[i]*dimX + lst1Z[i]*dimXY )
+// glOut=imageoutput->GetScalarComponentAsDouble( lst1X[i], lst1Y[i], lst1Z[i], 0);
+ if (glOut==0)
+ {
+ tmpValue = depth + (255-glIn)*bbGetInputAverageRadius()*2;
+ SETVALUE2_VTK_CREA(tmpValue,pOut,stOut, lst1X[i] + lst1Y[i]*dimX + lst1Z[i]*dimXY )
+// imageoutput->SetScalarComponentFromDouble( lst1X[i], lst1Y[i], lst1Z[i], 0, depth+(255-glIn)*bbGetInputAverageRadius()*2);
+ pxOut=lst1X[i]; pyOut=lst1Y[i]; pzOut=lst1Z[i];
+
+
+ for (px=lst1X[i]-1;px<=lst1X[i]+1;px++)
+ {
+ for (py=lst1Y[i]-1;py<=lst1Y[i]+1;py++)
+ {
+ for (pz=lst1Z[i]-1;pz<=lst1Z[i]+1;pz++)
+ {
+ if (!( (px==lst1X[i]) && (py==lst1Y[i]) && (pz==lst1Z[i]) ))
+ {
+ if ((px>=0) && (px<dim[0]) && (py>=0) && (py<dim[1]) && (pz>=0) && (pz<dim[2]) )
+ {
+ GETVALUE2_VTK_CREA(glOut,pOut,stOut, px + py*dimX + pz*dimXY )
+// glOut=imageoutput->GetScalarComponentAsDouble( px,py,pz , 0);
+ } else {
+ glOut=-1;
+ } // if px py pz inside the image
+ if (glOut==0) { lst2X.push_back(px); lst2Y.push_back( py ); lst2Z.push_back( pz ); }
+ } // if
+ } // for kk
+ } // fo jj
+ } // for ii
+
+ if ( bbGetInputPoint2().size()==3)
+ {
+ if ( (bbGetInputPoint2()[0]==lst1X[i]) && (bbGetInputPoint2()[1]==lst1Y[i]) && (bbGetInputPoint2()[2]==lst1Z[i]) )
+ {
+ i=size; // out of for lst1
+ lst2X.clear();
+ lst2Y.clear();
+ lst2Z.clear();
+ } // if Arrive to Point2
+ } // Point size 3
+
+ }
+
+ }// If glIn
+
+ } // for lst1
+
+ lst1X.clear();
+ lst1Y.clear();
+ lst1Z.clear();
+
+ size=lst2X.size();
+ for (i=0;i<size;i++)
+ {
+ lst1X.push_back( lst2X[i] );
+ lst1Y.push_back( lst2Y[i] );
+ lst1Z.push_back( lst2Z[i] );
+ } // for lst2
+
+ lst2X.clear();
+ lst2Y.clear();
+ lst2Z.clear();
+
+ } // while lstX
+
+
+ std::vector<int> lstPointOut;
+ lstPointOut.push_back( pxOut );
+ lstPointOut.push_back( pyOut );
+ lstPointOut.push_back( pzOut );
+
+ std::vector<int> lstPathXOut;
+ std::vector<int> lstPathYOut;
+ std::vector<int> lstPathZOut;
+
+ lstPathXOut.push_back( pxOut );
+ lstPathYOut.push_back( pyOut );
+ lstPathZOut.push_back( pzOut );
+
+ // find Path
+ bool ok2;
+ bool ok = true;
+ double min = imageoutput->GetScalarComponentAsDouble( pxOut,pyOut,pzOut , 0);
+ int pxOutBack;
+ int pyOutBack;
+ int pzOutBack;
+ while (ok==true)
+ {
+ ok2=false;
+ for (px=pxOut-1;px<=pxOut+1;px++)
+ {
+ for (py=pyOut-1;py<=pyOut+1;py++)
+ {
+ for (pz=pzOut-1;pz<=pzOut+1;pz++)
+ {
+ if ((px>=0) && (px<dim[0]) && (py>=0) && (py<dim[1]) && (pz>=0) && (pz<dim[2]) )
+ {
+ GETVALUE2_VTK_CREA(glOut,pOut,stOut, px + py*dimX + pz*dimXY )
+// glOut=imageoutput->GetScalarComponentAsDouble( px,py,pz , 0);
+ if ( (glOut<min) && (glOut!=0) )
+ {
+ min = glOut;
+ pxOutBack = px;
+ pyOutBack = py;
+ pzOutBack = pz;
+ ok2 = true;
+ } // if min
+ } // if
+ } // for pz
+ } // fo py
+ } // for px
+
+ if (ok2==true)
+ {
+ pxOut=pxOutBack;
+ pyOut=pyOutBack;
+ pzOut=pzOutBack;
+ lstPathXOut.push_back( pxOut );
+ lstPathYOut.push_back( pyOut );
+ lstPathZOut.push_back( pzOut );
+ } else {
+ ok=false;
+ }
+ } // while
+
+ bbSetOutputOut( imageoutput );
+ bbSetOutputFinalPoint( lstPointOut );
+ bbSetOutputLengthPixels( lstPathXOut.size() );
+
+ // invert list of points
+ size=lstPathXOut.size();
+ long int size2=size/2;
+ int tmp;
+ for (i=0; i<size2;i++)
+ {
+ tmp= lstPathXOut[i]; lstPathXOut[i]=lstPathXOut[size-1-i]; lstPathXOut[size-1-i]=tmp;
+ tmp= lstPathYOut[i]; lstPathYOut[i]=lstPathYOut[size-1-i]; lstPathYOut[size-1-i]=tmp;
+ tmp= lstPathZOut[i]; lstPathZOut[i]=lstPathZOut[size-1-i]; lstPathZOut[size-1-i]=tmp;
+ } // for invert list
+
+ bbSetOutputLstPathXOut( lstPathXOut );
+ bbSetOutputLstPathYOut( lstPathYOut );
+ bbSetOutputLstPathZOut( lstPathZOut );
+ } else {
+ printf("EED Warnning! DistanceMap::Process In or Point1 is EMPTY\n");
+ } // if In Point1
+
+}
+//=====
+// 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)
+//=====
+void DistanceMap::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ bbSetInputAverageRadius(10);
+ bbSetInputSlope(10);
+ imageoutput=NULL;
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void DistanceMap::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void DistanceMap::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkDistanceMap_h_INCLUDED__
+#define __bbcreaVtkDistanceMap_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT DistanceMap
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(DistanceMap,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_INPUT(Slope,double);
+ BBTK_DECLARE_INPUT(AverageRadius,double);
+ BBTK_DECLARE_INPUT(Point1, std::vector<int>);
+ BBTK_DECLARE_INPUT(Point2, std::vector<int>);
+
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(LengthPixels, int );
+ BBTK_DECLARE_OUTPUT(FinalPoint,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(LstPathXOut,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(LstPathYOut,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(LstPathZOut,std::vector<int>);
+
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkImageData* imageoutput;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(DistanceMap,bbtk::AtomicBlackBox);
+ BBTK_NAME("DistanceMap");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("Normaly mask or mask[0 255] + gaussian[5]");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(DistanceMap,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(DistanceMap,Slope,"(default 10) Slope",double,"");
+ BBTK_INPUT(DistanceMap,AverageRadius,"(default 10) Average Radius of the tube",double,"");
+ BBTK_INPUT(DistanceMap,Point1,"Start point",std::vector<int>,"");
+ BBTK_INPUT(DistanceMap,Point2,"End point (There is no guarantee of reaching this point.)",std::vector<int>,"");
+
+ BBTK_OUTPUT(DistanceMap,Out,"Output image",vtkImageData*,"");
+ BBTK_OUTPUT(DistanceMap,LengthPixels,"Path Length",int,"");
+ BBTK_OUTPUT(DistanceMap,FinalPoint,"Final Point",std::vector<int>,"");
+ BBTK_OUTPUT(DistanceMap,LstPathXOut,"Vector path X",std::vector<int>,"");
+ BBTK_OUTPUT(DistanceMap,LstPathYOut,"Vector path Y",std::vector<int>,"");
+ BBTK_OUTPUT(DistanceMap,LstPathZOut,"Vector path Z",std::vector<int>,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(DistanceMap);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkDistanceMap_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkFillHolesFilter.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkFillHolesFilter.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,FillHolesFilter)
+BBTK_BLACK_BOX_IMPLEMENTATION(FillHolesFilter,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void FillHolesFilter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if (bbGetInputIn()!=NULL)
+ {
+ vtkFillHolesFilter *filler = vtkFillHolesFilter::New();
+ filler->SetInputData( bbGetInputIn() );
+ filler->SetHoleSize( bbGetInputHoleSize() );
+ filler->Update();
+ bbSetOutputOut( filler->GetOutput() );
+ } // if
+
+}
+//=====
+// 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)
+//=====
+void FillHolesFilter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ bbSetInputHoleSize(500);
+}
+//=====
+// 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)
+//=====
+void FillHolesFilter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void FillHolesFilter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkFillHolesFilter_h_INCLUDED__
+#define __bbcreaVtkFillHolesFilter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT FillHolesFilter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(FillHolesFilter,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkPolyData*);
+ BBTK_DECLARE_INPUT(HoleSize,double);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(FillHolesFilter,bbtk::AtomicBlackBox);
+ BBTK_NAME("FillHolesFilter");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("vtk - Mesh fill holes");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(FillHolesFilter,In,"Input mesh polydata",vtkPolyData*,"");
+ BBTK_INPUT(FillHolesFilter,HoleSize,"(default 500) Hole size",double,"");
+ BBTK_OUTPUT(FillHolesFilter,Out,"Output mesh",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(FillHolesFilter);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkFillHolesFilter_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkGetCameraInfo.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkCamera.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,GetCameraInfo)
+BBTK_BLACK_BOX_IMPLEMENTATION(GetCameraInfo,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void GetCameraInfo::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+ if (bbGetInputvtkRenderer()!=NULL)
+ {
+ double px,py,pz;
+ bbGetInputvtkRenderer()->GetActiveCamera()->GetPosition(px,py,pz);
+ std::vector<double> position;
+ position.push_back(px);
+ position.push_back(py);
+ position.push_back(pz);
+ bbSetOutputPosition(position);
+
+ double vx,vy,vz;
+ bbGetInputvtkRenderer()->GetActiveCamera()->GetViewUp(vx,vy,vz);
+ std::vector<double> viewup;
+ viewup.push_back(vx);
+ viewup.push_back(vy);
+ viewup.push_back(vz);
+ bbSetOutputViewUp(viewup);
+
+ double fx,fy,fz;
+ bbGetInputvtkRenderer()->GetActiveCamera()->GetFocalPoint(fx,fy,fz);
+ std::vector<double> focalpoint;
+ focalpoint.push_back(fx);
+ focalpoint.push_back(fy);
+ focalpoint.push_back(fz);
+ bbSetOutputFocalPoint(focalpoint);
+ }
+}
+//=====
+// 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)
+//=====
+void GetCameraInfo::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputvtkRenderer(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void GetCameraInfo::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void GetCameraInfo::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkGetCameraInfo_h_INCLUDED__
+#define __bbcreaVtkGetCameraInfo_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkRenderer.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT GetCameraInfo
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(GetCameraInfo,bbtk::AtomicBlackBox);
+//=====
+// 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(vtkRenderer,vtkRenderer*);
+ BBTK_DECLARE_OUTPUT( ViewUp, std::vector<double> );
+ BBTK_DECLARE_OUTPUT( FocalPoint, std::vector<double> );
+ BBTK_DECLARE_OUTPUT( Position, std::vector<double> );
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(GetCameraInfo,bbtk::AtomicBlackBox);
+ BBTK_NAME("GetCameraInfo");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(GetCameraInfo,vtkRenderer,"vtkRenderer default NULL", vtkRenderer* ,"");
+ BBTK_OUTPUT(GetCameraInfo,ViewUp,"ViewUp[x,y,z]",std::vector<double>,"");
+ BBTK_OUTPUT(GetCameraInfo,FocalPoint,"FocalPoint[x,y,z]",std::vector<double>,"");
+ BBTK_OUTPUT(GetCameraInfo,Position,"Position[x,y,z]",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(GetCameraInfo);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkGetCameraInfo_h_INCLUDED__
+
//=====
void GrayLevel::Process()
{
-
// THE MAIN PROCESSING METHOD BODY
// Here we simply set the input 'In' value to the output 'Out'
// And print out the output value
// (the one provided in the attribute 'name' of the tag 'input')
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
- vtkImageData *m_image = vtkImageData::New();
- m_image = bbGetInputImage();
-
- int grayLevel = 0;
- std::vector<double> coord = bbGetInputCoordinate();
- grayLevel = m_image->GetScalarComponentAsDouble(coord[0],coord[1],coord[2],0);
+// vtkImageData *m_image = vtkImageData::New();
+// m_image = bbGetInputImage();
+ double grayLevel = -9999;
+ std::vector<double> coord = bbGetInputCoordinate();
+ int ext[6];
+ int maxX,maxY,maxZ;
+ double px,py,pz;
+ if (bbGetInputImage()!=NULL)
+ {
+ double spc[3];
+ bbGetInputImage()->GetSpacing(spc);
+ bbGetInputImage()->GetExtent(ext);
+ maxX = ext[1]-ext[0]+1;
+ maxY = ext[3]-ext[2]+1;
+ maxZ = ext[5]-ext[4]+1;
+ if (coord.size()==3)
+ {
+ if (bbGetInputWithSpacing()==true)
+ {
+ px = coord[0]/spc[0];
+ py = coord[1]/spc[1];
+ pz = coord[2]/spc[2];
+ } else {
+ px = coord[0];
+ py = coord[1];
+ pz = coord[2];
+ }// if
+ px=round(px);
+ py=round(py);
+ pz=round(pz);
+ if ( (px>=0) && (px<maxX) && (py>=0) && (py<maxY) &&(pz>=0) && (pz<maxZ) )
+ {
+ grayLevel = bbGetInputImage()->GetScalarComponentAsDouble( px,py,pz,0);
+ } else {
+ grayLevel = -9991;
+ } // if px py pz
+ } // coord
+ std::vector<double> lstGL;
+ std::vector<double> lstX = bbGetInputLstPointsX();
+ std::vector<double> lstY = bbGetInputLstPointsY();
+ std::vector<double> lstZ = bbGetInputLstPointsZ();
+ if ( (lstX.size()==lstY.size()) && (lstY.size()==lstZ.size()) )
+ {
+ long int i,size=lstX.size();
+ for (i=0;i<size;i++)
+ {
+ if (bbGetInputWithSpacing()==true)
+ {
+ px = lstX[i]/spc[0];
+ py = lstY[i]/spc[1];
+ pz = lstZ[i]/spc[2];
+ } else {
+ px = lstX[i];
+ py = lstY[i];
+ pz = lstZ[i];
+ }// if
+ px = round(px);
+ py = round(py);
+ pz = round(pz);
+ if ( (px>=0) && (px<maxX) && (py>=0) && (py<maxY) &&(pz>=0) && (pz<maxZ) )
+ {
+ lstGL.push_back( bbGetInputImage()->GetScalarComponentAsDouble( px, py,pz,0) );
+ } else {
+ lstGL.push_back( -9991 );
+ }
+ }// for
+ bbSetOutputLstGrayLevel(lstGL);
+ } // if size of Lst
+ } // InputImage
bbSetOutputGrayLevel(grayLevel);
-
}
+
//=====
// 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)
//=====
void GrayLevel::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputImage(NULL);
-
+ bbSetInputWithSpacing(false);
}
//=====
// 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)
// 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(Image,vtkImageData*);
+ BBTK_DECLARE_INPUT(WithSpacing,bool);
BBTK_DECLARE_INPUT(Coordinate,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstPointsX,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstPointsY,std::vector<double>);
+ BBTK_DECLARE_INPUT(LstPointsZ,std::vector<double>);
BBTK_DECLARE_OUTPUT(GrayLevel,double);
+ BBTK_DECLARE_OUTPUT(LstGrayLevel,std::vector<double>);
BBTK_PROCESS(Process);
void Process();
//=====
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(GrayLevel,bbtk::AtomicBlackBox);
-BBTK_NAME("GrayLevel");
-BBTK_AUTHOR("Monica ESPINOSA");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(GrayLevel,Image,"Image",vtkImageData*,"");
-BBTK_INPUT(GrayLevel,Coordinate,"Coordinate Of Point ",std::vector<double>,"");
-BBTK_OUTPUT(GrayLevel,GrayLevel,"GrayLevel",double,"");
+ BBTK_NAME("GrayLevel");
+ BBTK_AUTHOR("Monica ESPINOSA");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(GrayLevel,Image,"Image",vtkImageData*,"");
+ BBTK_INPUT(GrayLevel,WithSpacing,"default (false) With spacing of the image",bool,"");
+ BBTK_INPUT(GrayLevel,Coordinate,"Coordinate Of Point ",std::vector<double>,"");
+ BBTK_INPUT(GrayLevel,LstPointsX," List of points in X",std::vector<double>,"");
+ BBTK_INPUT(GrayLevel,LstPointsY," List of points in X",std::vector<double>,"");
+ BBTK_INPUT(GrayLevel,LstPointsZ," List of points in X",std::vector<double>,"");
+
+ BBTK_OUTPUT(GrayLevel,GrayLevel,"GrayLevel",double,"");
+ BBTK_OUTPUT(GrayLevel,LstGrayLevel,"List of GrayLevels for the list of points",std::vector<double>,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(GrayLevel);
//=====
// 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)
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkHausdorffDistancePointSetFilter.h"
+#include "bbcreaVtkPackage.h"
+
+#include <vtkHausdorffDistancePointSetFilter.h>
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,HausdorffDistancePointSetFilter)
+BBTK_BLACK_BOX_IMPLEMENTATION(HausdorffDistancePointSetFilter,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void HausdorffDistancePointSetFilter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ((bbGetInputInA()!=NULL) && (bbGetInputInB()!=NULL) )
+ {
+ vtkHausdorffDistancePointSetFilter *hausdorff = vtkHausdorffDistancePointSetFilter::New();
+ hausdorff->SetInputData(0, bbGetInputInA() );
+ hausdorff->SetInputData(1, bbGetInputInB() );
+
+// hausdorff->SetTargetDistanceMethodToPointToCell();
+ hausdorff->SetTargetDistanceMethodToPointToPoint();
+
+ hausdorff->Update();
+ double rdAB,rdBA,hd;
+ hausdorff->GetRelativeDistance(rdAB,rdBA);
+ hd=hausdorff->GetHausdorffDistance();
+ bbSetOutputRelativeDistanceAtoB( rdAB );
+ bbSetOutputRelativeDistanceBtoA( rdBA );
+ bbSetOutputHausdorffDistance( hd );
+ bbSetOutputOutA( (vtkPolyData*) (hausdorff->GetOutput(0)) );
+ bbSetOutputOutB( (vtkPolyData*) (hausdorff->GetOutput(1)) );
+ } // if
+}
+//=====
+// 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)
+//=====
+void HausdorffDistancePointSetFilter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputInA(NULL);
+ bbSetInputInB(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void HausdorffDistancePointSetFilter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void HausdorffDistancePointSetFilter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkHausdorffDistancePointSetFilter_h_INCLUDED__
+#define __bbcreaVtkHausdorffDistancePointSetFilter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkPolyData.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT HausdorffDistancePointSetFilter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(HausdorffDistancePointSetFilter,bbtk::AtomicBlackBox);
+//=====
+// 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(InA,vtkPolyData*);
+ BBTK_DECLARE_INPUT(InB,vtkPolyData*);
+
+ BBTK_DECLARE_OUTPUT(RelativeDistanceAtoB,double);
+ BBTK_DECLARE_OUTPUT(RelativeDistanceBtoA,double);
+ BBTK_DECLARE_OUTPUT(HausdorffDistance,double);
+ BBTK_DECLARE_OUTPUT(OutA,vtkPolyData*);
+ BBTK_DECLARE_OUTPUT(OutB,vtkPolyData*);
+
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(HausdorffDistancePointSetFilter,bbtk::AtomicBlackBox);
+ BBTK_NAME("HausdorffDistancePointSetFilter");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("Output Mesh with HausdorffDistance and RelativeDistance vector information ");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(HausdorffDistancePointSetFilter,InA,"Mesh A",vtkPolyData*,"");
+ BBTK_INPUT(HausdorffDistancePointSetFilter,InB,"Mesh B",vtkPolyData*,"");
+
+ BBTK_OUTPUT(HausdorffDistancePointSetFilter,RelativeDistanceAtoB,"Relative distance A to B",double,"");
+ BBTK_OUTPUT(HausdorffDistancePointSetFilter,RelativeDistanceBtoA,"Relative distance B to A",double,"");
+ BBTK_OUTPUT(HausdorffDistancePointSetFilter,HausdorffDistance,"Hausdorff distance",double,"");
+
+ BBTK_OUTPUT(HausdorffDistancePointSetFilter,OutA,"Output Mesh with 'Distance' vector information",vtkPolyData*,"");
+ BBTK_OUTPUT(HausdorffDistancePointSetFilter,OutB,"Output Mesh with 'Distance' vector information",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(HausdorffDistancePointSetFilter);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkHausdorffDistancePointSetFilter_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkImageAppendComponents.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageAppendComponents)
+BBTK_BLACK_BOX_IMPLEMENTATION(ImageAppendComponents,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ImageAppendComponents::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if (_appendFilter!=NULL)
+ {
+ _appendFilter->Delete();
+ } //
+ _appendFilter = vtkImageAppendComponents::New();
+ _appendFilter->SetInputData( bbGetInputIn0() );
+ _appendFilter->AddInputData( bbGetInputIn1() );
+ _appendFilter->AddInputData( bbGetInputIn2() );
+ _appendFilter->AddInputData( bbGetInputIn3() );
+ _appendFilter->Update();
+ bbSetOutputOut( _appendFilter->GetOutput() );
+}
+//=====
+// 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)
+//=====
+void ImageAppendComponents::bbUserSetDefaultValues()
+{
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ _appendFilter=NULL;
+ bbSetInputIn0(NULL);
+ bbSetInputIn1(NULL);
+ bbSetInputIn2(NULL);
+ bbSetInputIn3(NULL);
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ImageAppendComponents::bbUserInitializeProcessing()
+{
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+}
+//=====
+// 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)
+//=====
+void ImageAppendComponents::bbUserFinalizeProcessing()
+{
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+}
+
+}// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkImageAppendComponents_h_INCLUDED__
+#define __bbcreaVtkImageAppendComponents_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+#include "vtkImageAppendComponents.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ImageAppendComponents
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ImageAppendComponents,bbtk::AtomicBlackBox);
+//=====
+// 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(In0,vtkImageData*);
+ BBTK_DECLARE_INPUT(In1,vtkImageData*);
+ BBTK_DECLARE_INPUT(In2,vtkImageData*);
+ BBTK_DECLARE_INPUT(In3,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkImageAppendComponents *_appendFilter;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ImageAppendComponents,bbtk::AtomicBlackBox);
+ BBTK_NAME("ImageAppendComponents");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ImageAppendComponents,In0,"Image Component",vtkImageData*,"");
+ BBTK_INPUT(ImageAppendComponents,In1,"Image Component",vtkImageData*,"");
+ BBTK_INPUT(ImageAppendComponents,In2,"Image Component",vtkImageData*,"");
+ BBTK_INPUT(ImageAppendComponents,In3,"Image Component",vtkImageData*,"");
+
+ BBTK_OUTPUT(ImageAppendComponents,Out,"Output image with some components",vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ImageAppendComponents);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkImageAppendComponents_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkImageConnectivityFilter.h"
+#include "bbcreaVtkPackage.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageConnectivityFilter)
+BBTK_BLACK_BOX_IMPLEMENTATION(ImageConnectivityFilter,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ImageConnectivityFilter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+
+ if (bbGetInputIn()!=NULL){
+ if (imgConnfilter) {imgConnfilter->Delete();}
+ imgConnfilter=vtkImageConnectivityFilter::New();
+ imgConnfilter->SetInputData( bbGetInputIn() );
+ if (bbGetInputExtractionMode()==0) // LargestRegion
+ {
+ imgConnfilter->SetExtractionModeToLargestRegion();
+ } // ExtractionMode
+
+ if (bbGetInputExtractionMode()==1) // AllRegions
+ {
+ printf("EED Warning!!!! ImageConnectivityFilter - AllRegions Not Implemented\n ");
+ } // ExtractionMode
+ if (bbGetInputExtractionMode()==2) // SeededRegions
+ {
+ printf("EED Warning!!!! ImageConnectivityFilter - SeededRegions Not Implemented\n ");
+ } // ExtractionMode
+
+ if (bbGetInputScalarRange().size()==2)
+ {
+ imgConnfilter->SetScalarRange( bbGetInputScalarRange()[0], bbGetInputScalarRange()[1] );
+ } // Range
+ imgConnfilter->Update();
+ bbSetOutputOut( imgConnfilter->GetOutput() );
+ } else {
+ printf("EED Warning!!!! ImageConnectivityFilter - Input image not defined.\n ");
+ }// In
+
+}
+//=====
+// 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)
+//=====
+void ImageConnectivityFilter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+// bbSetInputScalarRange();
+ imgConnfilter=NULL;
+ bbSetInputExtractionMode(0);
+
+}
+//=====
+// 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)
+//=====
+void ImageConnectivityFilter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void ImageConnectivityFilter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkImageConnectivityFilter_h_INCLUDED__
+#define __bbcreaVtkImageConnectivityFilter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageData.h>
+#include <vtkImageConnectivityFilter.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ImageConnectivityFilter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ImageConnectivityFilter,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_INPUT(ExtractionMode,int);
+ BBTK_DECLARE_INPUT(ScalarRange,std::vector< double >);
+
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkImageConnectivityFilter* imgConnfilter;
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ImageConnectivityFilter,bbtk::AtomicBlackBox);
+ BBTK_NAME("ImageConnectivityFilter");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ImageConnectivityFilter,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(ImageConnectivityFilter,ExtractionMode,"(default 0) 0=LargestRegion 1=AllRegions 2=SeededRegions",int,"");
+ BBTK_INPUT(ImageConnectivityFilter,ScalarRange,"threshold [Min Max]",std::vector< double >,"");
+
+ BBTK_OUTPUT(ImageConnectivityFilter,Out,"Output image",vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ImageConnectivityFilter);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkImageConnectivityFilter_h_INCLUDED__
+
vtkImageData* ImageContinuousDilate3D::dilateFilterRecursive(vtkImageData* image, int repetitions, double x, double y, double z)
{
- vtkImageContinuousDilate3D *dilateFilter = vtkImageContinuousDilate3D ::New();
+ vtkImageContinuousDilate3D *dilateFilter = vtkImageContinuousDilate3D::New();
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
dilateFilter->SetInput (image);
void ImageContinuousDilate3D::bbUserInitializeProcessing()
{
-
-
}
void ImageContinuousDilate3D::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
}
-}
-// EO namespace bbcreaVtk
+
+} // EO namespace bbcreaVtk
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageContinuousDilate3D,bbtk::AtomicBlackBox);
-BBTK_NAME("ImageContinuousDilate3D");
-BBTK_AUTHOR("Carlos Torres");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(ImageContinuousDilate3D,X,"X (default 3)",double,"");
-BBTK_INPUT(ImageContinuousDilate3D,Y,"Y (default 3)",double,"");
-BBTK_INPUT(ImageContinuousDilate3D,Z,"Z (default 3)",double,"");
-BBTK_INPUT(ImageContinuousDilate3D,Repetitions,"Repetitions (default 0, it works minimum ones) ",int,"");
-BBTK_INPUT(ImageContinuousDilate3D,Image,"Image input",vtkImageData*,"");
-BBTK_OUTPUT(ImageContinuousDilate3D,Out,"Image output",vtkImageData*,"");
+ BBTK_NAME("ImageContinuousDilate3D");
+ BBTK_AUTHOR("Carlos Torres");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ImageContinuousDilate3D,X,"X (default 3)",double,"");
+ BBTK_INPUT(ImageContinuousDilate3D,Y,"Y (default 3)",double,"");
+ BBTK_INPUT(ImageContinuousDilate3D,Z,"Z (default 3)",double,"");
+ BBTK_INPUT(ImageContinuousDilate3D,Repetitions,"Repetitions (default 0, it works minimum ones) ",int,"");
+ BBTK_INPUT(ImageContinuousDilate3D,Image,"Image input",vtkImageData*,"");
+
+ BBTK_OUTPUT(ImageContinuousDilate3D,Out,"Image output",vtkImageData*,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(ImageContinuousDilate3D);
//=====
// 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)
#include "bbcreaVtkImageContinuousErode3D.h"
#include "bbcreaVtkPackage.h"
+
+#include "vtkImageContinuousErode3D.h"
+
+
namespace bbcreaVtk
{
void ImageContinuousErode3D::bbUserSetDefaultValues()
{
-
+ bbSetInputX(3);
+ bbSetInputY(3);
+ bbSetInputY(3);
+ bbSetInputRepetitions(0);
}
//=====
// 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)
//=====
void ImageContinuousErode3D::bbUserInitializeProcessing()
{
- bbSetInputX(3);
- bbSetInputY(3);
- bbSetInputY(3);
- bbSetInputRepetitions(0);
}
//=====
// 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)
#include "bbcreaVtk_EXPORT.h"
#include "bbtkAtomicBlackBox.h"
#include "iostream"
+
#include "vtkImageData.h"
-#include "vtkImageContinuousErode3D.h"
namespace bbcreaVtk
{
//=====
// 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(Repetitions,int);
BBTK_DECLARE_INPUT(X,double);
BBTK_DECLARE_INPUT(Y,double);
BBTK_DECLARE_INPUT(Z,double);
- BBTK_DECLARE_INPUT(Repetitions,int);
BBTK_DECLARE_INPUT(Image,vtkImageData*);
BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
BBTK_PROCESS(Process);
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageContinuousErode3D,bbtk::AtomicBlackBox);
-BBTK_NAME("ImageContinuousErode3D");
-BBTK_AUTHOR("Carlos Torres");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(ImageContinuousErode3D,X,"X (default 3)",double,"");
-BBTK_INPUT(ImageContinuousErode3D,Y,"Y (default 3)",double,"");
-BBTK_INPUT(ImageContinuousErode3D,Z,"Z (default 3)",double,"");
-BBTK_INPUT(ImageContinuousErode3D,Repetitions,"Repetitions (default 0, it works minimum ones)",int,"");
-BBTK_INPUT(ImageContinuousErode3D,Image,"Image input",vtkImageData*,"");
-BBTK_OUTPUT(ImageContinuousErode3D,Out,"Image output",vtkImageData*,"");
+ BBTK_NAME("ImageContinuousErode3D");
+ BBTK_AUTHOR("Carlos Torres");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ImageContinuousErode3D,X,"X (default 3)",double,"");
+ BBTK_INPUT(ImageContinuousErode3D,Y,"Y (default 3)",double,"");
+ BBTK_INPUT(ImageContinuousErode3D,Z,"Z (default 3)",double,"");
+ BBTK_INPUT(ImageContinuousErode3D,Repetitions,"Repetitions (default 0, it works minimum ones)",int,"");
+ BBTK_INPUT(ImageContinuousErode3D,Image,"Image input",vtkImageData*,"");
+
+ BBTK_OUTPUT(ImageContinuousErode3D,Out,"Image output",vtkImageData*,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(ImageContinuousErode3D);
//=====
// 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)
} // for j
} //c4
-
+ newData->Modified();
bbSetOutputOut( newData );
}
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputIn(NULL);
- bbSetInputType("x+y+z+");
+ bbSetInputType("x-y-z+");
bbSetInputInsideVol(true);
std::vector<int> point;
point.push_back(0);
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(ImageCutByAxis,In,"Input image",vtkImageData*,"");
- BBTK_INPUT(ImageCutByAxis,Type,"x y z x+y+ x-y+ x+y- x-y- y+z+ y+z- y-z+ y-z- x+z+ x+z- x-z+ x-z- x+y+z+ x-y+z+ x+y-z+ x+y+z- x-y-z+ x-y+z- x+y-z- x-y-z-",std::string,"");
+ BBTK_INPUT(ImageCutByAxis,Type,"(default x-y-z+) missing all options:x y z x+y+ x-y+ x+y- x-y- y+z+ y+z- y-z+ y-z- x+z+ x+z- x-z+ x-z- x+y+z+ x-y+z+ x+y-z+ x+y+z- x-y-z+ x-y+z- x+y-z- x-y-z-",std::string,"");
BBTK_INPUT(ImageCutByAxis,InsideVol,"Inside volume",bool,"");
BBTK_INPUT(ImageCutByAxis,Point,"First input",std::vector<int>,"");
BBTK_INPUT(ImageCutByAxis,TypeOrientation,"TypeOrientation (default 0) 0=XY 1=XZ 2=YZ",int,"");
//=====
void ImageDataStructuredPoints::Process()
{
- vtkImageData* imageX = bbGetInputX();
- vtkImageData* imageY = bbGetInputY();
- vtkImageData* imageZ = bbGetInputZ();
-
- vtkImageDataStrucPoints idsp;
-
- idsp.joinComponents(imageX, imageY, imageZ);
- bbSetOutputImageEnsemble( idsp.getStructuredPoints() );
-
+ vtkImageDataStrucPoints idsp;
+ idsp.joinComponents(bbGetInputX(), bbGetInputY(), bbGetInputZ(),
+ bbGetInputData1(), bbGetInputData2(), bbGetInputData3(),
+ bbGetInputData4(), bbGetInputData5(), bbGetInputData6() );
+ bbSetOutputImageEnsemble( idsp.getStructuredPoints() );
}
//=====
// 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)
//=====
void ImageDataStructuredPoints::bbUserSetDefaultValues()
{
-
+ bbSetInputX(NULL);
+ bbSetInputY(NULL);
+ bbSetInputZ(NULL);
+ bbSetInputData1(NULL);
+ bbSetInputData2(NULL);
+ bbSetInputData3(NULL);
+ bbSetInputData4(NULL);
+ bbSetInputData5(NULL);
+ bbSetInputData6(NULL);
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
BBTK_DECLARE_INPUT(X, vtkImageData*);
BBTK_DECLARE_INPUT(Y, vtkImageData*);
BBTK_DECLARE_INPUT(Z, vtkImageData*);
+ BBTK_DECLARE_INPUT(Data1, vtkImageData*);
+ BBTK_DECLARE_INPUT(Data2, vtkImageData*);
+ BBTK_DECLARE_INPUT(Data3, vtkImageData*);
+ BBTK_DECLARE_INPUT(Data4, vtkImageData*);
+ BBTK_DECLARE_INPUT(Data5, vtkImageData*);
+ BBTK_DECLARE_INPUT(Data6, vtkImageData*);
BBTK_DECLARE_OUTPUT(ImageEnsemble, vtkImageData*);
BBTK_PROCESS(Process);
void Process();
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageDataStructuredPoints,bbtk::AtomicBlackBox);
-BBTK_NAME("ImageDataStructuredPoints");
-BBTK_AUTHOR("Carlos Torres");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(ImageDataStructuredPoints,X,"Image X",vtkImageData*,"");
-BBTK_INPUT(ImageDataStructuredPoints,Y,"Image Y",vtkImageData*,"");
-BBTK_INPUT(ImageDataStructuredPoints,Z,"Image Z",vtkImageData*,"");
-BBTK_OUTPUT(ImageDataStructuredPoints,ImageEnsemble,"Image Ensemble",vtkImageData*,"");
+ BBTK_NAME("ImageDataStructuredPoints");
+ BBTK_AUTHOR("Carlos Torres");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(ImageDataStructuredPoints,X,"Image X",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Y,"Image Y",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Z,"Image Z",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Data1,"You need: No Data or Data1 or Data1..3 or Data1..6",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Data2,"You need: No Data or Data1 or Data1..3 or Data1..6",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Data3,"You need: No Data or Data1 or Data1..3 or Data1..6",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Data4,"You need: No Data or Data1 or Data1..3 or Data1..6",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Data5,"You need: No Data or Data1 or Data1..3 or Data1..6",vtkImageData*,"");
+ BBTK_INPUT(ImageDataStructuredPoints,Data6,"You need: No Data or Data1 or Data1..3 or Data1..6",vtkImageData*,"");
+ BBTK_OUTPUT(ImageDataStructuredPoints,ImageEnsemble,"Image Ensemble",vtkImageData*,"");
BBTK_END_DESCRIBE_BLACK_BOX(ImageDataStructuredPoints);
//=====
// 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)
bbSetOutputOut2( NULL );
bbSetOutputOut3( NULL );
- if (bbGetInputComponent0()!=-1)
- {
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- IEC0->SetInput( bbGetInputIn() );
-#else
- IEC0->SetInputData( bbGetInputIn() );
-#endif
- IEC0->SetComponents( bbGetInputComponent0() );
- IEC0->Update();
- bbSetOutputOut0( IEC0->GetOutput() );
- }
-
- if (bbGetInputComponent1()!=-1)
- {
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- IEC1->SetInput( bbGetInputIn() );
-#else
- IEC1->SetInputData( bbGetInputIn() );
-#endif
- IEC1->SetComponents( bbGetInputComponent1() );
- IEC1->Update();
- bbSetOutputOut1( IEC1->GetOutput() );
- }
-
- if (bbGetInputComponent2()!=-1)
- {
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- IEC2->SetInput( bbGetInputIn() );
-#else
- IEC2->SetInputData( bbGetInputIn() );
-#endif
- IEC2->SetComponents( bbGetInputComponent2() );
- IEC2->Update();
- bbSetOutputOut2( IEC2->GetOutput() );
- }
-
- if (bbGetInputComponent3()!=-1)
- {
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- IEC3->SetInput( bbGetInputIn() );
-#else
- IEC3->SetInputData( bbGetInputIn() );
-#endif
- IEC3->SetComponents( bbGetInputComponent2() );
- IEC3->Update();
- bbSetOutputOut3( IEC3->GetOutput() );
- }
-
-
+// InputComponent 0..3
+ if (bbGetInputType()==0)
+ {
+
+ if (bbGetInputComponent0()!=-1)
+ {
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ IEC0->SetInput( bbGetInputIn() );
+ #else
+ IEC0->SetInputData( bbGetInputIn() );
+ #endif
+ IEC0->SetComponents( bbGetInputComponent0() );
+ IEC0->Update();
+ bbSetOutputOut0( IEC0->GetOutput() );
+ }
+
+ if (bbGetInputComponent1()!=-1)
+ {
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ IEC1->SetInput( bbGetInputIn() );
+ #else
+ IEC1->SetInputData( bbGetInputIn() );
+ #endif
+ IEC1->SetComponents( bbGetInputComponent1() );
+ IEC1->Update();
+ bbSetOutputOut1( IEC1->GetOutput() );
+ }
+
+ if (bbGetInputComponent2()!=-1)
+ {
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ IEC2->SetInput( bbGetInputIn() );
+ #else
+ IEC2->SetInputData( bbGetInputIn() );
+ #endif
+ IEC2->SetComponents( bbGetInputComponent2() );
+ IEC2->Update();
+ bbSetOutputOut2( IEC2->GetOutput() );
+ }
+
+ if (bbGetInputComponent3()!=-1)
+ {
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ IEC3->SetInput( bbGetInputIn() );
+ #else
+ IEC3->SetInputData( bbGetInputIn() );
+ #endif
+ IEC3->SetComponents( bbGetInputComponent2() );
+ IEC3->Update();
+ bbSetOutputOut3( IEC3->GetOutput() );
+ }
+ } // Type 0
+
+// List of components
+ if (bbGetInputType()==1)
+ {
+ int i,size=lstIEC.size();
+ for (i=0; i<size; i++)
+ {
+ lstIEC[i]->Delete();
+ } // for i
+ lstIEC.clear();
+ lstOut.clear();
+ int nrCmp = bbGetInputIn()->GetNumberOfScalarComponents();
+ for (i=0; i<nrCmp; i++)
+ {
+ vtkImageExtractComponents* IEC;
+ IEC=vtkImageExtractComponents::New();
+ IEC->SetInputData( bbGetInputIn() );
+ IEC->SetComponents( i );
+ IEC->Update();
+ lstIEC.push_back( IEC);
+ lstOut.push_back( IEC->GetOutput() );
+ } // for i
+ bbSetOutputLstOut( lstOut );
+ } // Type 1
}
+
//=====
// 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)
//=====
void ImageExtractComponents::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputIn(NULL);
bbSetInputComponent1(-1);
bbSetInputComponent2(-1);
bbSetInputComponent3(-1);
-
+ bbSetInputType(0);
}
+
//=====
// 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)
//=====
//=====
void ImageExtractComponents::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
IEC0->Delete();
IEC1->Delete();
IEC2->Delete();
IEC3->Delete();
-
+ int i,size=lstIEC.size();
+ for (i=0; i<size; i++)
+ {
+ lstIEC[i]->Delete();
+ } // for i
+ lstIEC.clear();
}
-
}
// EO namespace bbcreaVtk
//=====
#ifndef __bbcreaVtkImageExtractComponents_h_INCLUDED__
#define __bbcreaVtkImageExtractComponents_h_INCLUDED__
+
#include "bbcreaVtk_EXPORT.h"
#include "bbtkAtomicBlackBox.h"
#include "iostream"
+#include <vector>
#include <vtkImageData.h>
#include <vtkImageExtractComponents.h>
BBTK_DECLARE_INPUT(Component1,int);
BBTK_DECLARE_INPUT(Component2,int);
BBTK_DECLARE_INPUT(Component3,int);
- BBTK_DECLARE_OUTPUT(Out0,vtkImageData *);
- BBTK_DECLARE_OUTPUT(Out1,vtkImageData *);
- BBTK_DECLARE_OUTPUT(Out2,vtkImageData *);
- BBTK_DECLARE_OUTPUT(Out3,vtkImageData *);
+ BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_OUTPUT(Out0,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out1,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out2,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out3,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(LstOut,std::vector< vtkImageData* >);
+
BBTK_PROCESS(Process);
void Process();
vtkImageExtractComponents* IEC1;
vtkImageExtractComponents* IEC2;
vtkImageExtractComponents* IEC3;
+ std::vector<vtkImageExtractComponents*> lstIEC;
+ std::vector<vtkImageData*> lstOut;
+
//=====
// 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_AUTHOR("InfoDev");
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
+
BBTK_INPUT(ImageExtractComponents,In,"Input image",vtkImageData*,"");
BBTK_INPUT(ImageExtractComponents,Component0,"Component 0 (default -1)",int,"");
BBTK_INPUT(ImageExtractComponents,Component1,"Component 1 (default -1)",int,"");
BBTK_INPUT(ImageExtractComponents,Component2,"Component 2 (default -1)",int,"");
BBTK_INPUT(ImageExtractComponents,Component3,"Component 3 (default -1)",int,"");
+ BBTK_INPUT(ImageExtractComponents,Type,"(default 0) 0=Out comp.0..3 , 1=Out List of all components",int,"");
+
BBTK_OUTPUT(ImageExtractComponents,Out0,"Output image 0",vtkImageData*,"");
BBTK_OUTPUT(ImageExtractComponents,Out1,"Output image 1",vtkImageData*,"");
BBTK_OUTPUT(ImageExtractComponents,Out2,"Output image 2",vtkImageData*,"");
BBTK_OUTPUT(ImageExtractComponents,Out3,"Output image 3",vtkImageData*,"");
-BBTK_END_DESCRIBE_BLACK_BOX(ImageExtractComponents);
+ BBTK_OUTPUT(ImageExtractComponents,LstOut,"List of all components by single images",std::vector< vtkImageData* >,"");
+
+ BBTK_END_DESCRIBE_BLACK_BOX(ImageExtractComponents);
//=====
// 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)
//=====
-}
-// EO namespace bbcreaVtk
+
+
+} // EO namespace bbcreaVtk
#endif // __bbcreaVtkImageExtractComponents_h_INCLUDED__
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkImageThreshold.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageThreshold)
+BBTK_BLACK_BOX_IMPLEMENTATION(ImageThreshold,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ImageThreshold::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if (filter!=NULL)
+ {
+ filter->Delete();
+ filter=NULL;
+ } // if
+ filter = vtkImageThreshold::New();
+
+ if (bbGetInputIn()!=NULL)
+ {
+ filter->SetInValue( bbGetInputInValue() );
+ filter->SetOutValue( bbGetInputOutValue() );
+ filter->SetInputData( bbGetInputIn() );
+ filter->ThresholdBetween( bbGetInputLower(),bbGetInputUpper() );
+ filter->Update();
+ bbSetOutputOut( filter->GetOutput() );
+ } else {
+ bbSetOutputOut( NULL );
+ }// In
+}
+//=====
+// 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)
+//=====
+void ImageThreshold::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ filter=NULL;
+ bbSetInputIn(NULL);
+ bbSetInputLower(0);
+ bbSetInputUpper(10000);
+ bbSetInputInValue(255);
+ bbSetInputOutValue(0);
+}
+//=====
+// 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)
+//=====
+void ImageThreshold::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void ImageThreshold::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkImageThreshold_h_INCLUDED__
+#define __bbcreaVtkImageThreshold_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+#include <vtkImageThreshold.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ImageThreshold
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ImageThreshold,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_INPUT(Lower,double);
+ BBTK_DECLARE_INPUT(Upper,double);
+ BBTK_DECLARE_INPUT(InValue,double);
+ BBTK_DECLARE_INPUT(OutValue,double);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkImageThreshold *filter;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ImageThreshold,bbtk::AtomicBlackBox);
+ BBTK_NAME("ImageThreshold");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(ImageThreshold,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(ImageThreshold,Lower,"(default 0) Lower threshold",double,"");
+ BBTK_INPUT(ImageThreshold,Upper,"(default 10000) Upper threshold",double,"");
+ BBTK_INPUT(ImageThreshold,InValue,"(default 255) In value",double,"");
+ BBTK_INPUT(ImageThreshold,OutValue,"(default 0) Out Value",double,"");
+ BBTK_OUTPUT(ImageThreshold,Out,"Output image",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(ImageThreshold);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkImageThreshold_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkImageThresholdConnectivity.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageThresholdConnectivity)
+BBTK_BLACK_BOX_IMPLEMENTATION(ImageThresholdConnectivity,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ImageThresholdConnectivity::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+
+ printf("EED ImageThresholdConnectivity::Process Error this box is not implemented .... \n");
+ printf("EED ImageThresholdConnectivity::Process Error this box is not implemented .... \n");
+ printf("EED ImageThresholdConnectivity::Process Error this box is not implemented .... \n");
+ printf("EED ImageThresholdConnectivity::Process Error this box is not implemented .... \n");
+}
+//=====
+// 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)
+//=====
+void ImageThresholdConnectivity::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ImageThresholdConnectivity::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void ImageThresholdConnectivity::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkImageThresholdConnectivity_h_INCLUDED__
+#define __bbcreaVtkImageThresholdConnectivity_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageData.h>
+#include <vtkImageThresholdConnectivity.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ImageThresholdConnectivity
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ImageThresholdConnectivity,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ImageThresholdConnectivity,bbtk::AtomicBlackBox);
+ BBTK_NAME("ImageThresholdConnectivity");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("vtkImageThresholdConnectivity");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ImageThresholdConnectivity,In,"Input image",vtkImageData*,"");
+
+ BBTK_OUTPUT(ImageThresholdConnectivity,Out,"Output image",vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ImageThresholdConnectivity);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkImageThresholdConnectivity_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+
+
+
+#include <vtkActor.h>
+#include <vtkDoubleArray.h>
+#include <vtkIntArray.h>
+#include <vtkInteractorStyleTrackballCamera.h>
+#include <vtkKMeansStatistics.h>
+#include <vtkMultiBlockDataSet.h>
+#include <vtkNamedColors.h>
+#include <vtkNew.h>
+#include <vtkPointData.h>
+#include <vtkPoints.h>
+#include <vtkPolyData.h>
+#include <vtkPolyDataMapper.h>
+#include <vtkProperty.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkRenderer.h>
+#include <vtkTable.h>
+#include <vtkVertexGlyphFilter.h>
+#include <vtkXMLPolyDataWriter.h>
+
+#include <sstream>
+
+
+
+#include "bbcreaVtkKMeansStatistics.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,KMeansStatistics)
+BBTK_BLACK_BOX_IMPLEMENTATION(KMeansStatistics,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void KMeansStatistics::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+
+ printf("EED KMeansStatistics::Process Start\n");
+
+ vtkNew<vtkTable> inputData;
+ int ext[6];
+ int dimX,dimY,dimZ;
+ bbGetInputIn()->GetExtent(ext);
+ dimX = ext[1]-ext[0]+1;
+ dimY = ext[3]-ext[2]+1;
+ dimZ = ext[5]-ext[4]+1;
+
+ vtkImageData *resultImage = vtkImageData::New();
+ resultImage->Initialize();
+ resultImage->SetSpacing( bbGetInputIn()->GetSpacing() );
+ resultImage->SetDimensions( dimX, dimY, dimZ );
+ resultImage->AllocateScalars( VTK_SHORT ,1 );
+
+ long int size= dimX*dimY*dimZ;
+ vtkDoubleArray *doubleArrayX = vtkDoubleArray::New();
+ vtkDoubleArray *doubleArrayY = vtkDoubleArray::New();
+ vtkDoubleArray *doubleArrayZ = vtkDoubleArray::New();
+ vtkDoubleArray *doubleArrayValue1 = vtkDoubleArray::New();
+ vtkDoubleArray *doubleArrayValue2 = vtkDoubleArray::New();
+ vtkDoubleArray *doubleArrayValue3 = vtkDoubleArray::New();
+ doubleArrayX->SetNumberOfComponents(1);
+ doubleArrayY->SetNumberOfComponents(1);
+ doubleArrayZ->SetNumberOfComponents(1);
+ doubleArrayValue1->SetNumberOfComponents(1);
+ doubleArrayValue2->SetNumberOfComponents(1);
+ doubleArrayValue3->SetNumberOfComponents(1);
+ doubleArrayX->SetName("X");
+ doubleArrayY->SetName("Y");
+ doubleArrayZ->SetName("Z");
+ doubleArrayValue1->SetName("Value1");
+ doubleArrayValue2->SetName("Value2");
+ doubleArrayValue3->SetName("Value3");
+ doubleArrayX->SetNumberOfTuples( size );
+ doubleArrayY->SetNumberOfTuples( size );
+ doubleArrayZ->SetNumberOfTuples( size );
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=1) { doubleArrayValue1->SetNumberOfTuples( size ); }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=2) { doubleArrayValue2->SetNumberOfTuples( size ); }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=3) { doubleArrayValue3->SetNumberOfTuples( size ); }
+
+ double value;
+ int x,y,z;
+ for ( z=0 ; z<dimZ ; z++ )
+ {
+ for ( y=0 ; y<dimY ; y++ )
+ {
+ for ( x=0 ; x<dimX ; x++ )
+ {
+ doubleArrayX->SetValue(x + y*dimX + z*dimX*dimY, x );
+ doubleArrayY->SetValue(x + y*dimX + z*dimX*dimY, y );
+ doubleArrayZ->SetValue(x + y*dimX + z*dimX*dimY, z );
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=1)
+ {
+ value = bbGetInputIn()->GetScalarComponentAsDouble(x,y,z,0);
+ doubleArrayValue1->SetValue( x + y*dimX + z*dimX*dimY , value );
+ }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=2)
+ {
+ value = bbGetInputIn()->GetScalarComponentAsDouble(x,y,z,1);
+ doubleArrayValue2->SetValue( x + y*dimX + z*dimX*dimY , value );
+ }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=3)
+ {
+ value = bbGetInputIn()->GetScalarComponentAsDouble(x,y,z,2);
+ doubleArrayValue3->SetValue( x + y*dimX + z*dimX*dimY , value );
+ }
+ } // for x
+ } // for y
+ }// for z
+
+ inputData->AddColumn(doubleArrayX);
+ inputData->AddColumn(doubleArrayY);
+ inputData->AddColumn(doubleArrayZ);
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=1) { inputData->AddColumn(doubleArrayValue1); }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=2) { inputData->AddColumn(doubleArrayValue2); }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=3) { inputData->AddColumn(doubleArrayValue3); }
+
+
+ printf("EED KMeansStatistics::Process 1\n");
+
+ vtkNew<vtkKMeansStatistics> kMeansStatistics;
+ kMeansStatistics->SetInputData(vtkStatisticsAlgorithm::INPUT_DATA, inputData);
+ kMeansStatistics->SetColumnStatus(inputData->GetColumnName(0), 1);
+ kMeansStatistics->SetColumnStatus(inputData->GetColumnName(1), 1);
+ kMeansStatistics->SetColumnStatus(inputData->GetColumnName(2), 1);
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=1) { kMeansStatistics->SetColumnStatus(inputData->GetColumnName(3), 1); }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=2) { kMeansStatistics->SetColumnStatus(inputData->GetColumnName(4), 1); }
+ if (bbGetInputIn()->GetNumberOfScalarComponents()>=3) { kMeansStatistics->SetColumnStatus(inputData->GetColumnName(5), 1); }
+
+ kMeansStatistics->RequestSelectedColumns();
+ kMeansStatistics->SetAssessOption(true);
+ kMeansStatistics->SetDefaultNumberOfClusters( bbGetInputNumberOfClusters() );
+ kMeansStatistics->Update();
+
+// Display the results
+// kMeansStatistics->GetOutput()->Dump();
+ for ( z=0 ; z<dimZ ; z++ )
+ {
+ for ( y=0 ; y<dimY ; y++ )
+ {
+ for ( x=0 ; x<dimX ; x++ )
+ {
+ long int r = x+y*dimX+z*dimX*dimY;
+ vtkVariant v = kMeansStatistics->GetOutput()->GetValue( r, kMeansStatistics->GetOutput()->GetNumberOfColumns() - 1);
+ resultImage->SetScalarComponentFromDouble(x,y,z,0,(double) (v.ToInt()) );
+ } // for x
+ } // for y
+ }// for z
+ bbSetOutputOut( resultImage );
+ printf("EED KMeansStatistics::Process Start\n");
+}
+//=====
+// 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)
+//=====
+void KMeansStatistics::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ bbSetInputNumberOfClusters(3);
+
+}
+//=====
+// 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)
+//=====
+void KMeansStatistics::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void KMeansStatistics::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkKMeansStatistics_h_INCLUDED__
+#define __bbcreaVtkKMeansStatistics_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageData.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT KMeansStatistics
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(KMeansStatistics,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_INPUT(NumberOfClusters,int);
+
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(KMeansStatistics,bbtk::AtomicBlackBox);
+ BBTK_NAME("KMeansStatistics");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(KMeansStatistics,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(KMeansStatistics,NumberOfClusters,"(default 3) Number of Clusters", int ,"");
+
+ BBTK_OUTPUT(KMeansStatistics,Out,"Output image with labels",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(KMeansStatistics);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkKMeansStatistics_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkLstOfVoxels.h"
+#include "bbcreaVtkPackage.h"
+
+#include "creaVtk_MACROS.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,LstOfVoxels)
+BBTK_BLACK_BOX_IMPLEMENTATION(LstOfVoxels,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void LstOfVoxels::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+ if (bbGetInputIn()!=NULL)
+ {
+ DEF_POINTER_IMAGE_VTK_CREA(vIn,ssIn,pIn,stIn,bbGetInputIn()) \
+ std::vector<int> lstX;
+ std::vector<int> lstY;
+ std::vector<int> lstZ;
+ std::vector<double> lstValues;
+ int ext[6];
+ bbGetInputIn()->GetExtent(ext);
+ int dim[3];
+ dim[0]=ext[1]-ext[0]+1;
+ dim[1]=ext[3]-ext[2]+1;
+ dim[2]=ext[5]-ext[4]+1;
+ int i,j,k;
+ long int index=0;
+
+
+ int rangeType=0;
+ if (bbGetInputRange().size()==2)
+ {
+ rangeType=1;
+ }
+ bool addPoint;
+
+
+ for (k=0 ; k<dim[2] ; k++)
+ {
+ for (j=0 ; j<dim[1] ; j++)
+ {
+ for (i=0 ; i<dim[0] ; i++)
+ {
+ addPoint=false;
+ GETVALUE2_VTK_CREA(vIn,pIn,stIn,index)
+ if (rangeType==0)
+ {
+ if (vIn!=0)
+ {
+ addPoint=true;
+ } // if vIn ==0
+ } else {
+ if ( (vIn>=bbGetInputRange()[0]) && (vIn<=bbGetInputRange()[1]) )
+ {
+ addPoint=true;
+ } // if vIn ==0
+ } // if rangeType
+
+
+ if (addPoint==true)
+ {
+ lstX.push_back(i);
+ lstY.push_back(j);
+ lstZ.push_back(k);
+ lstValues.push_back(vIn);
+ } // if vIn ==0
+
+ index++;
+ } // for i
+ } // for j
+ } // for k
+ bbSetOutputLstX( lstX );
+ bbSetOutputLstY( lstY );
+ bbSetOutputLstZ( lstZ );
+ bbSetOutputLstValues( lstValues );
+ } else {
+ printf("EED Warning!! LstOfVoxels image not set.\n");
+ }// In
+
+}
+//=====
+// 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)
+//=====
+void LstOfVoxels::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void LstOfVoxels::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void LstOfVoxels::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkLstOfVoxels_h_INCLUDED__
+#define __bbcreaVtkLstOfVoxels_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vector"
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT LstOfVoxels
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(LstOfVoxels,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_INPUT(Range,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(LstX,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(LstY,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(LstZ,std::vector<int>);
+ BBTK_DECLARE_OUTPUT(LstValues,std::vector<double>);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(LstOfVoxels,bbtk::AtomicBlackBox);
+ BBTK_NAME("LstOfVoxels");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(LstOfVoxels,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(LstOfVoxels,Range,"Threshold [Min Max]",std::vector<double>,"");
+ BBTK_OUTPUT(LstOfVoxels,LstX,"List of x points",std::vector<int>,"");
+ BBTK_OUTPUT(LstOfVoxels,LstY,"List of y points",std::vector<int>,"");
+ BBTK_OUTPUT(LstOfVoxels,LstZ,"List of z points",std::vector<int>,"");
+ BBTK_OUTPUT(LstOfVoxels,LstValues,"List of z points",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(LstOfVoxels);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkLstOfVoxels_h_INCLUDED__
+
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+printf("EED MHDFileInfo::Process %s \n", bbGetInputFileName().c_str() );
std::string inputfilename;
inputfilename=bbGetInputFileName();
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkMagnitudVector.h"
+#include "bbcreaVtkPackage.h"
+#include "creaVtk_MACROS.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MagnitudVector)
+BBTK_BLACK_BOX_IMPLEMENTATION(MagnitudVector,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void MagnitudVector::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ( (bbGetInputvX()!=NULL) && (bbGetInputvY()!=NULL) && (bbGetInputvZ()!=NULL) )
+ {
+ if (imageoutput!=NULL)
+ {
+ imageoutput->Delete();
+ }
+ imageoutput = vtkImageData::New();
+ imageoutput->Initialize();
+ imageoutput->SetSpacing( bbGetInputvX()->GetSpacing() );
+ int dim[3];
+ int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ bbGetInputvX()->GetWholeExtent(ext );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputvX()->GetExtent(ext );
+#endif
+ dim[0]=ext[1]-ext[0]+1;
+ dim[1]=ext[3]-ext[2]+1;
+ dim[2]=ext[5]-ext[4]+1;
+ imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
+ imageoutput->SetExtent( ext );
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ imageoutput->SetWholeExtent( ext );
+ imageoutput->SetScalarType( VTK_DOUBLE );
+ imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ imageoutput->AllocateScalars( VTK_DOUBLE,1 );
+#endif
+
+ DEF_POINTER_IMAGE_VTK_CREA(vvX,ssvX,pvX,stvX,bbGetInputvX() )
+ DEF_POINTER_IMAGE_VTK_CREA(vvY,ssvY,pvY,stvY,bbGetInputvY() )
+ DEF_POINTER_IMAGE_VTK_CREA(vvZ,ssvZ,pvZ,stvZ,bbGetInputvZ() )
+ DEF_POINTER_IMAGE_VTK_CREA(vOut,ssOut,pOut,stOut,imageoutput )
+ long int i, size=dim[0]*dim[1]*dim[2];
+
+long int k1omp=(double)(size-1)*0.0;
+long int k2omp=(double)(size-1)*0.2;
+long int k3omp=(double)(size-1)*0.4;
+long int k4omp=(double)(size-1)*0.6;
+long int k5omp=(double)(size-1)*0.8;
+long int k6omp=(double)(size-1)*1.0;
+printf("EED MagnitudVector::Process (with openmp)\n");
+ #pragma omp parallel for
+ for (i=0; i<size; i++)
+ {
+if ( (k1omp==i) || (k2omp==i) || (k3omp==i) ||
+ (k4omp==i) || (k5omp==i) || (k6omp==i) ) { printf(" %d%\n", (int)(((double)i/(double)(size-1))*100 )); }
+ double vvXtmpOMP;
+ double vvYtmpOMP;
+ double vvZtmpOMP;
+ GETVALUE2_VTK_CREA(vvXtmpOMP,pvX,stvX,i)
+ GETVALUE2_VTK_CREA(vvYtmpOMP,pvY,stvY,i)
+ GETVALUE2_VTK_CREA(vvZtmpOMP,pvZ,stvZ,i)
+ if ( (vvXtmpOMP==0) && (vvYtmpOMP==0) &&(vvZtmpOMP==0) )
+ {
+ SETVALUE2_VTK_CREA( 0 ,pOut,stOut,i)
+ } else {
+ SETVALUE2_VTK_CREA( sqrt(vvXtmpOMP*vvXtmpOMP + vvYtmpOMP*vvYtmpOMP + vvZtmpOMP*vvZtmpOMP) ,pOut,stOut,i)
+ } // if vvX vvY vvZ != 0
+
+ } // for i
+
+ }// vX vY vZ != NULL
+
+ bbSetOutputOut( imageoutput );
+}
+//=====
+// 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)
+//=====
+void MagnitudVector::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ imageoutput=NULL;
+ bbSetInputvX(NULL);
+ bbSetInputvY(NULL);
+ bbSetInputvZ(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void MagnitudVector::bbUserInitializeProcessing()
+{
+
+ imageoutput=NULL;
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void MagnitudVector::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkMagnitudVector_h_INCLUDED__
+#define __bbcreaVtkMagnitudVector_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT MagnitudVector
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(MagnitudVector,bbtk::AtomicBlackBox);
+//=====
+// 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(vX,vtkImageData*);
+ BBTK_DECLARE_INPUT(vY,vtkImageData*);
+ BBTK_DECLARE_INPUT(vZ,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkImageData* imageoutput;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(MagnitudVector,bbtk::AtomicBlackBox);
+ BBTK_NAME("MagnitudVector");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(MagnitudVector,vX,"component X of the vector",vtkImageData*,"");
+ BBTK_INPUT(MagnitudVector,vY,"component Y of the vector",vtkImageData*,"");
+ BBTK_INPUT(MagnitudVector,vZ,"component Z of the vector",vtkImageData*,"");
+ BBTK_OUTPUT(MagnitudVector,Out,"Image with the Magnitud",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(MagnitudVector);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkMagnitudVector_h_INCLUDED__
+
#include <vtkBox.h>
#include <vtkPlane.h>
#include <vtkClipPolyData.h>
-
+#include <vtkPolyDataNormals.h>
namespace bbcreaVtk
{
vtkPlane *clipPlane = vtkPlane::New();
vtkBox *clipBox = vtkBox::New();
vtkClipPolyData *clipper = vtkClipPolyData::New();
+// clipper->GenerateClipScalarsOn();
+// clipper->GenerateClippedOutputOff();
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
clipper -> SetInput( bbGetInputIn() );
#else
+// vtkPolyDataNormals *nn = vtkPolyDataNormals::New();
+// nn->SetInputData( bbGetInputIn() );
+// clipper -> SetInputData( nn->GetOutput() );
clipper -> SetInputData( bbGetInputIn() );
#endif
clipper->SetInsideOut( bbGetInputInsideVol() );
-
int a; // correction border
if (bbGetInputInsideVol()==false)
{
} else {
a=0;
}
-
int px=bbGetInputPoint()[0];
int py=bbGetInputPoint()[1];
int pz=bbGetInputPoint()[2];
-
if ( bbGetInputType()=="x" ) { clipPlane->SetNormal(1, 0, 0); ok=1; } else
if ( bbGetInputType()=="y" ) { clipPlane->SetNormal(0, 1, 0); ok=1; } else
if ( bbGetInputType()=="z" ) { clipPlane->SetNormal(0, 0, 1); ok=1; } else
-
if ( bbGetInputType()=="x+y+" ) { clipBox->SetBounds(px ,px+sb ,py ,py+sb ,pz-sb ,pz+sb ); ok=2; } else
if ( bbGetInputType()=="x-y+" ) { clipBox->SetBounds(px-sb,px+a ,py ,py+sb ,pz-sb ,pz+sb ); ok=2; } else
if ( bbGetInputType()=="x+y-" ) { clipBox->SetBounds(px ,px+sb ,py-sb ,py+a ,pz-sb ,pz+sb ); ok=2; } else
if ( bbGetInputType()=="x+z-" ) { clipBox->SetBounds(px ,px+sb ,py-sb ,py+sb ,pz-sb ,pz+a ); ok=2; } else
if ( bbGetInputType()=="x-z-" ) { clipBox->SetBounds(px-sb,px+a ,py-sb ,py+sb ,pz-sb ,pz+a ); ok=2; } else
-
if ( bbGetInputType()=="x+y+z+" ) { clipBox->SetBounds(px ,px+sb ,py ,py+sb ,pz ,pz+sb ); ok=2; } else
if ( bbGetInputType()=="x-y+z+" ) { clipBox->SetBounds(px-sb,px+a ,py ,py+sb ,pz ,pz+sb ); ok=2; } else
if ( bbGetInputType()=="x+y-z+" ) { clipBox->SetBounds(px ,px+sb ,py-sb ,py+a ,pz ,pz+sb ); ok=2; } else
if (ok==1) {
clipPlane -> SetOrigin(px,py,pz);
+ clipPlane -> Modified();
clipper -> SetClipFunction(clipPlane);
+ clipper -> Update();
bbSetOutputOut( clipper->GetOutput() );
- } else if (ok==2) {
-
- clipper -> SetClipFunction(clipBox);
+ } else if (ok==2) {
+ clipBox -> Modified();
+ clipper -> SetClipFunction(clipBox);
+ clipper -> Update();
bbSetOutputOut( clipper->GetOutput() );
} else {
bbSetOutputOut( bbGetInputIn() );
BBTK_DESCRIPTION("MeshCutByAxis");
BBTK_CATEGORY("empty");
BBTK_INPUT(MeshCutByAxis,In,"Mesh to be cut",vtkPolyData*,"");
- BBTK_INPUT(MeshCutByAxis,Type,"x y z x+y+ x-y+ x+y- x-y- y+z+ y+z- y-z+ y-z- x+z+ x+z- x-z+ x-z- x+y+z+ x-y+z+ x+y-z+ x+y+z- x-y-z+ x-y+z- x+y-z- x-y-z-",std::string,"");
+ BBTK_INPUT(MeshCutByAxis,Type,"(defalut x+y+z+) x y z x+y+ x-y+ x+y- x-y- y+z+ y+z- y-z+ y-z- x+z+ x+z- x-z+ x-z- x+y+z+ x-y+z+ x+y-z+ x+y+z- x-y-z+ x-y+z- x+y-z- x-y-z-",std::string,"");
BBTK_INPUT(MeshCutByAxis,InsideVol,"Inside volume",bool,"");
BBTK_INPUT(MeshCutByAxis,Point,"First input",std::vector<int>,"");
BBTK_OUTPUT(MeshCutByAxis,Out,"First output",vtkPolyData*,"");
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkMeshReduction_DecimatePro.h"
+#include "bbcreaVtkPackage.h"
+
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshReduction_DecimatePro)
+BBTK_BLACK_BOX_IMPLEMENTATION(MeshReduction_DecimatePro,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void MeshReduction_DecimatePro::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+
+ if (firsttime==true)
+ {
+ firsttime = false;
+ decimatepro = vtkDecimatePro::New();
+ }
+ decimatepro->SetInputData( bbGetInputIn() );
+ decimatepro->SetTargetReduction( bbGetInputTargetReduction() );
+ decimatepro->PreserveTopologyOn();
+ decimatepro->Update();
+ bbSetOutputOut(decimatepro->GetOutput() );
+}
+//=====
+// 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)
+//=====
+void MeshReduction_DecimatePro::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ firsttime = true;
+ decimatepro = NULL;
+ bbSetInputIn(NULL);
+ bbSetInputTargetReduction(0.5);
+}
+//=====
+// 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)
+//=====
+void MeshReduction_DecimatePro::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void MeshReduction_DecimatePro::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+ if (decimatepro!=NULL)
+ {
+ decimatepro->Delete();
+ }
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkMeshReduction_DecimatePro_h_INCLUDED__
+#define __bbcreaVtkMeshReduction_DecimatePro_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+#include "vtkDecimatePro.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT MeshReduction_DecimatePro
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(MeshReduction_DecimatePro,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkPolyData*);
+ BBTK_DECLARE_INPUT(TargetReduction,double);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ bool firsttime;
+ vtkDecimatePro *decimatepro;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(MeshReduction_DecimatePro,bbtk::AtomicBlackBox);
+ BBTK_NAME("MeshReduction_DecimatePro");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(MeshReduction_DecimatePro,In,"vtkPolyData*",vtkPolyData*,"");
+ BBTK_INPUT(MeshReduction_DecimatePro,TargetReduction,"[0-1] (default 0.5)",double,"");
+ BBTK_OUTPUT(MeshReduction_DecimatePro,Out,"vtkPolyData*",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(MeshReduction_DecimatePro);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkMeshReduction_DecimatePro_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkMeshReduction_QuadricDecimation.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshReduction_QuadricDecimation)
+BBTK_BLACK_BOX_IMPLEMENTATION(MeshReduction_QuadricDecimation,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void MeshReduction_QuadricDecimation::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+
+ if (firsttime==true)
+ {
+ firsttime =false;
+ quadricdecimation = vtkQuadricDecimation::New();
+ }
+ quadricdecimation->SetInputData( bbGetInputIn() );
+
+ quadricdecimation->SetTargetReduction( bbGetInputTargetReduction() );
+
+ quadricdecimation->Update();
+ bbSetOutputOut(quadricdecimation->GetOutput() );
+}
+//=====
+// 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)
+//=====
+void MeshReduction_QuadricDecimation::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ firsttime = true;
+ quadricdecimation = NULL;
+ bbSetInputIn(NULL);
+ bbSetInputTargetReduction(0.5);
+}
+//=====
+// 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)
+//=====
+void MeshReduction_QuadricDecimation::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void MeshReduction_QuadricDecimation::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+ if (quadricdecimation!=NULL)
+ {
+ quadricdecimation->Delete();
+ }
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkMeshReduction_QuadricDecimation_h_INCLUDED__
+#define __bbcreaVtkMeshReduction_QuadricDecimation_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkQuadricDecimation.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT MeshReduction_QuadricDecimation
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(MeshReduction_QuadricDecimation,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkPolyData*);
+ BBTK_DECLARE_INPUT(TargetReduction,double);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ bool firsttime;
+ vtkQuadricDecimation *quadricdecimation;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(MeshReduction_QuadricDecimation,bbtk::AtomicBlackBox);
+ BBTK_NAME("MeshReduction_QuadricDecimation");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(MeshReduction_QuadricDecimation,In,"vtkPolyData*",vtkPolyData*,"");
+ BBTK_INPUT(MeshReduction_QuadricDecimation,TargetReduction,"[0-1] (default 0.5)",double,"");
+ BBTK_OUTPUT(MeshReduction_QuadricDecimation,Out,"vtkPolyData*",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(MeshReduction_QuadricDecimation);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkMeshReduction_QuadricDecimation_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkMultipleOperations.h"
+#include "bbcreaVtkPackage.h"
+
+#include "creaVtk_MACROS.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MultipleOperations)
+BBTK_BLACK_BOX_IMPLEMENTATION(MultipleOperations,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void MultipleOperations::Process()
+{
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+ if ( bbGetInputInLst().size()>0 )
+ {
+ int extImage[6];
+ vtkImageData *resultImage=NULL;
+ bbGetInputInLst()[0]->GetExtent( extImage );
+ int dimXImage = extImage[1]-extImage[0]+1;
+ int dimYImage = extImage[3]-extImage[2]+1;
+ int dimZImage = extImage[5]-extImage[4]+1;
+ if (bbGetOutputOut()!=NULL)
+ {
+ bbGetOutputOut()->Delete();
+ }
+ resultImage = vtkImageData::New();
+ resultImage->Initialize();
+ resultImage->SetSpacing( bbGetInputInLst()[0]->GetSpacing() );
+ resultImage->SetDimensions( dimXImage, dimYImage, dimZImage );
+ resultImage->AllocateScalars( bbGetInputInLst()[0]->GetScalarType(),1 );
+ long int index,size=dimXImage*dimYImage*dimZImage;
+ DEF_POINTER_IMAGE_VTK_CREA(vOut,ssOut,pOut,stOut,resultImage )
+ if (bbGetInputType()==20)
+ {
+
+long int k1omp=(double)(size-1)*0.0;
+long int k2omp=(double)(size-1)*0.2;
+long int k3omp=(double)(size-1)*0.4;
+long int k4omp=(double)(size-1)*0.6;
+long int k5omp=(double)(size-1)*0.8;
+long int k6omp=(double)(size-1)*1.0;
+
+printf("EED MultipleOperations::Process (with openmp)\n");
+#pragma omp parallel for
+ for (index=0;index<size;index++)
+ {
+if ( (k1omp==index) || (k2omp==index) || (k3omp==index) ||
+ (k4omp==index) || (k5omp==index) || (k6omp==index) ) { printf(" %d%\n", (int)(((double)index/(double)(size-1))*100 )); }
+
+ DEF_POINTER_IMAGE_VTK_CREA(vIn ,ssIn ,pIn ,stIn ,bbGetInputInLst()[0] )
+ int iLst,sizeLst= bbGetInputInLst().size();
+ double vInBack,acumDiff;
+ acumDiff=0;
+ for (iLst=0;iLst<sizeLst;iLst++) // volumes
+ {
+ pIn=(char*)( bbGetInputInLst()[iLst]->GetScalarPointer() );
+ GETVALUE2_VTK_CREA(vIn,pIn,stIn,index)
+ if (iLst!=0)
+ {
+ acumDiff = acumDiff+abs(vIn-vInBack);
+ }
+ vInBack=vIn;
+ } // for iLst
+ acumDiff = acumDiff/sizeLst;
+ SETVALUE2_VTK_CREA(acumDiff,pOut,stOut,index)
+ } // for index
+ } // if Type==20
+ bbSetOutputOut( resultImage );
+ } // if InLst size
+}
+//=====
+// 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)
+//=====
+void MultipleOperations::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+
+ bbSetInputType(0);
+ bbSetOutputOut(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void MultipleOperations::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void MultipleOperations::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkMultipleOperations_h_INCLUDED__
+#define __bbcreaVtkMultipleOperations_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageData.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT MultipleOperations
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(MultipleOperations,bbtk::AtomicBlackBox);
+//=====
+// 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(InLst,std::vector<vtkImageData*>);
+ BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(MultipleOperations,bbtk::AtomicBlackBox);
+ BBTK_NAME("MultipleOperations");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(MultipleOperations,InLst,"List input images ",std::vector<vtkImageData*>,"");
+ BBTK_INPUT(MultipleOperations,Type,"(default 0) 0, 20 average-difference ",int,"");
+ BBTK_OUTPUT(MultipleOperations,Out,"Output image",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(MultipleOperations);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkMultipleOperations_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkNIFTIImageReader.h"
+#include "bbcreaVtkPackage.h"
+
+#include <vtkNIFTIImageReader.h>
+#include <vtkStringArray.h>
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,NIFTIImageReader)
+BBTK_BLACK_BOX_IMPLEMENTATION(NIFTIImageReader,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void NIFTIImageReader::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+ std::vector<vtkImageData*> lstImages;
+
+ if (bbGetInputType()==0)
+ {
+ vtkNIFTIImageReader* reader=vtkNIFTIImageReader::New();
+ if ( bbGetInputFileNames().size()==1)
+ {
+ reader->SetFileName( bbGetInputFileNames()[0].c_str() );
+ reader->Update();
+ } else {
+ vtkStringArray *lstFileNames=vtkStringArray::New();
+ int i,size=bbGetInputFileNames().size();
+ for (i=0;i<size;i++)
+ {
+printf("EED Warnning, somethin is not working ???? NIFTIImageReader::Process() %s\n ", bbGetInputFileNames()[i].c_str() );
+ lstFileNames->InsertNextValue( bbGetInputFileNames()[i].c_str() );
+ } // for i
+ reader->SetFileNames( lstFileNames );
+ reader->Update();
+ } // FileNames
+ lstImages.push_back( reader->GetOutput() );
+ } // Type 0
+
+ if (bbGetInputType()==1)
+ {
+ int i,size=bbGetInputFileNames().size();
+ for (i=0;i<size;i++)
+ {
+ vtkNIFTIImageReader* reader=vtkNIFTIImageReader::New();
+ reader->SetFileName( bbGetInputFileNames()[i].c_str() );
+ reader->Update();
+ lstImages.push_back( reader->GetOutput() );
+ } // for i
+ } // Type 1
+
+
+ if (lstImages.size()>=1) { bbSetOutputOut( lstImages[0] ); } else {bbSetOutputOut( NULL ); }
+ bbSetOutputOutVector( lstImages );
+}
+//=====
+// 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)
+//=====
+void NIFTIImageReader::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputType(0);
+
+}
+//=====
+// 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)
+//=====
+void NIFTIImageReader::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void NIFTIImageReader::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkNIFTIImageReader_h_INCLUDED__
+#define __bbcreaVtkNIFTIImageReader_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT NIFTIImageReader
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(NIFTIImageReader,bbtk::AtomicBlackBox);
+//=====
+// 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(Type,int);
+ BBTK_DECLARE_INPUT(FileNames,std::vector < std::string >);
+ BBTK_DECLARE_OUTPUT(Out, vtkImageData*);
+ BBTK_DECLARE_OUTPUT(OutVector, std::vector< vtkImageData* >);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(NIFTIImageReader,bbtk::AtomicBlackBox);
+ BBTK_NAME("NIFTIImageReader");
+ BBTK_AUTHOR("Info-Dev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(NIFTIImageReader,Type,"(default 0) 0:Use FileNames by slice 1:Use FileNames by volumes",int,"");
+ BBTK_INPUT(NIFTIImageReader,FileNames,"List of file names",std::vector<std::string>,"");
+ BBTK_OUTPUT(NIFTIImageReader,Out,"Output image",vtkImageData*,"");
+ BBTK_OUTPUT(NIFTIImageReader,OutVector,"Vector of image",std::vector<vtkImageData*>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(NIFTIImageReader);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkNIFTIImageReader_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkPlane.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkPlane.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Plane)
+BBTK_BLACK_BOX_IMPLEMENTATION(Plane,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void Plane::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ vtkPlane *plane = NULL;
+ if ( (bbGetInputOrigin().size()==3) && (bbGetInputNormal().size()==3) )
+ {
+ plane = vtkPlane::New();
+ plane->SetOrigin( bbGetInputOrigin()[0],bbGetInputOrigin()[1],bbGetInputOrigin()[2] );
+ plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
+ }
+ bbSetOutputOut( plane );
+}
+
+//=====
+// 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)
+//=====
+void Plane::bbUserSetDefaultValues()
+{
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ std::vector<double> origin;
+ std::vector<double> normal;
+ origin.push_back(0);
+ origin.push_back(0);
+ origin.push_back(0);
+ normal.push_back(0);
+ normal.push_back(0);
+ normal.push_back(1);
+ bbSetInputOrigin( origin );
+ bbSetInputNormal( normal );
+}
+
+//=====
+// 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)
+//=====
+void Plane::bbUserInitializeProcessing()
+{
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+}
+
+//=====
+// 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)
+//=====
+void Plane::bbUserFinalizeProcessing()
+{
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+}
+
+} // EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkPlane_h_INCLUDED__
+#define __bbcreaVtkPlane_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+#include "vtkImplicitFunction.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT Plane
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Plane,bbtk::AtomicBlackBox);
+//=====
+// 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(Origin,std::vector<double>);
+ BBTK_DECLARE_INPUT(Normal,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(Out,vtkImplicitFunction*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(Plane,bbtk::AtomicBlackBox);
+ BBTK_NAME("Plane");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("Implicite Function of VTK");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(Plane,Origin,"(default [0,0,0]) point [x,y,z]",std::vector<double>,"");
+ BBTK_INPUT(Plane,Normal,"(default [0,0,1]) vector [x,y,z]",std::vector<double>,"");
+
+ BBTK_OUTPUT(Plane,Out,"vtkImplicitFuntion",vtkImplicitFunction*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(Plane);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkPlane_h_INCLUDED__
+
//=====
void PlaneSource::Process()
{
- vtkPlaneSource *plane;
- plane = vtkPlaneSource::New();
- double p0[3];
- p0[0]=0;
- p0[1]=0;
- p0[2]=0;
+ double c[3];
+ double p0[3];
double p1[3];
- p1[0]=0;
- p1[1]=1;
- p1[2]=0;
- double p2[3];
- p2[0]=0;
- p2[1]=0;
- p2[2]=1;
- double c[3];
- c[0]=bbGetInputCenter()[0];
- c[1]=bbGetInputCenter()[1];
- c[2]=bbGetInputCenter()[2];
+ double p2[3];
+ vtkPlaneSource *plane;
+ plane = vtkPlaneSource::New();
+ c[0] = bbGetInputCenter()[0];
+ c[1] = bbGetInputCenter()[1];
+ c[2] = bbGetInputCenter()[2];
+ p0[0] = 0;
+ p0[1] = 0;
+ p0[2] = 0;
+
+
+ bool byNormal=true;
+ double size=350;
+
+ // xy
+ if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==1) )
+ {
+ byNormal= false;
+ p1[0] = size;
+ p1[1] = 0;
+ p1[2] = 0;
+ p2[0] = 0;
+ p2[1] = size;
+ p2[2] = 0;
+ }
+
+ // xz
+ if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==1) && (bbGetInputNormal()[2]==0) )
+ {
+ byNormal= false;
+ p1[0] = size;
+ p1[1] = 0;
+ p1[2] = 0;
+ p2[0] = 0;
+ p2[1] = 0;
+ p2[2] = size;
+ }
+
+ // yz
+ if ((bbGetInputNormal()[0]==1) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==0) )
+ {
+ byNormal= false;
+ p1[0] = 0;
+ p1[1] = size;
+ p1[2] = 0;
+ p2[0] = 0;
+ p2[1] = 0;
+ p2[2] = size;
+ }
plane->SetResolution( bbGetInputXResolution(), bbGetInputYResolution() );
- plane->SetOrigin( p0 );
- plane->SetPoint1( p1 );
- plane->SetPoint2( p2 );
- plane->Update( );
- plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
- plane->Update( );
- plane->SetCenter( c );
+ if (byNormal==false)
+ {
+ plane->SetOrigin( p0 );
+ plane->SetPoint1( p1 );
+ plane->SetPoint2( p2 );
+ } else {
+ plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
+ printf("EED PlaneSource. Missing mechanism to define the size of the plane\n");
+ }
+ plane->SetCenter( c );
+
plane->Update( );
bbSetOutputPlane( (vtkDataSet*)plane );
bbSetOutputPolyData( plane->GetOutput() );
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
- _boxcreavtkplanewidget.SetActive( bbGetInputActive() );
- _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
- _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
- _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() );
- _boxcreavtkplanewidget.Process();
- bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() );
- bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() );
- bbSetOutputNormal( _boxcreavtkplanewidget.GetNormal() );
+ if ((bbGetInputIn()==NULL) || (bbGetInputRenderer()==NULL))
+ {
+ bbSetOutputOut( NULL );
+ std::vector<double> center;
+ std::vector<double> normal;
+ bbSetOutputCenter( center );
+ bbSetOutputNormal( normal );
+ } else {
+ _boxcreavtkplanewidget.SetActive( bbGetInputActive() );
+ _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
+ _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
+ _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() );
+ _boxcreavtkplanewidget.Process();
+ bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() );
+ bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() );
+ bbSetOutputNormal( _boxcreavtkplanewidget.GetNormal() );
+ }
}
//=====
// 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)
#include <vtkPropPicker.h>
#include <vtkCellPicker.h>
#include <vtkRenderWindow.h>
-#include <vtkRenderWindowInteractor.h>
#include <vtkRendererCollection.h>
namespace bbcreaVtk
{
+creaVtkCallbackPointPicker::creaVtkCallbackPointPicker(void)
+{
+ boxPointPicker=NULL;
+}
+void creaVtkCallbackPointPicker::setBox(PointPicker *box)
+{
+ boxPointPicker=box;
+}
void creaVtkCallbackPointPicker::Execute(vtkObject *caller, unsigned long, void*)
{
- printf("creaVtkCallbackPointPicker EED Picker\n");
- vtkRenderWindowInteractor *iren = static_cast<vtkRenderWindowInteractor*>(caller);
-
- int* pos = iren->GetEventPosition();
- vtkCellPicker *picker = vtkCellPicker::New();
- picker->SetTolerance(0.0005);
- picker->Pick(pos[0], pos[1], 0, iren->GetRenderWindow()->GetRenderers()->GetFirstRenderer() );
-
- if(picker->GetCellId() != -1)
- {
- printf("creaVtkCallbackPointPicker EED picker OK\n");
- } else {
- printf("creaVtkCallbackPointPicker EED picker --\n");
- } // if
-
+ if (boxPointPicker!=NULL)
+ {
+ if (boxPointPicker->bbGetInputActive()==true)
+ {
+// printf("creaVtkCallbackPointPicker EED Picker\n");
+ vtkRenderWindowInteractor *iren = static_cast<vtkRenderWindowInteractor*>(caller);
+ int* pos = iren->GetEventPosition();
+ vtkCellPicker *picker = vtkCellPicker::New();
+ picker->SetTolerance(0.0005);
+ picker->Pick(pos[0], pos[1], 0, iren->GetRenderWindow()->GetRenderers()->GetFirstRenderer() );
+ double point[3];
+
+ if(picker->GetCellId() != -1)
+ {
+// printf("creaVtkCallbackPointPicker EED picker OK\n");
+ picker->GetPickPosition(point);
+ std::vector<double> vecPoint;
+ vecPoint.push_back( point[0] );
+ vecPoint.push_back( point[1] );
+ vecPoint.push_back( point[2] );
+ boxPointPicker->bbSetOutputPoint( vecPoint );
+ boxPointPicker->bbSetOutputMesh( picker->GetProp3D() );
+ boxPointPicker->bbSetOutputPointId( picker->GetPointId() );
+ boxPointPicker->bbSetOutputCellId( picker->GetCellId() );
+ boxPointPicker->bbSignalOutputModification();
+ } else {
+// printf("creaVtkCallbackPointPicker EED picker --\n");
+ } // if
+ }
+ } // if boxPoiintPicker
/*
{
<< " " << worldPosition[2] << endl;
vtkSmartPointer<vtkIdTypeArray> ids =
- vtkSmartPointer<vtkIdTypeArray>::New();
+ vtkSmartPointer<vtkIdTypeArray>::New()creaVtkCallbackPointPicker *callPicker;
ids->SetNumberOfComponents(1);
ids->InsertNextValue(picker->GetCellId());
if (firsttime==true)
{
-
-printf("EED PointPicker::Process Firsttime \n");
firsttime = false;
// vtkCellPicker *picker = vtkCellPicker::New();
// vtkPropPicker *picker = vtkCellPicker::New();
bbGetInputRenderer()->GetRenderWindow()->GetInteractor()->SetPicker(picker);
*/
- creaVtkCallbackPointPicker *callPicker = creaVtkCallbackPointPicker::New();
- vtkRenderWindowInteractor *vrwi = bbGetInputRenderer()->GetRenderWindow()->GetInteractor();
- vrwi->AddObserver( vtkCommand::EndPickEvent , callPicker );
- vrwi->AddObserver( vtkCommand::StartPickEvent , callPicker );
- vrwi->AddObserver( vtkCommand::MouseMoveEvent , callPicker );
+ callPicker = creaVtkCallbackPointPicker::New();
+ callPicker->setBox( this );
} // if firsttime
+
+ if (bbGetInputRenderer()!=NULL)
+ {
+ vtkRenderWindowInteractor *vrwi = bbGetInputRenderer()->GetRenderWindow()->GetInteractor();
+ vrwi->RemoveObserver( callPicker );
+
+ if (bbGetInputTypeEvent()==0)
+ {
+ // Nothing
+ } else if (bbGetInputTypeEvent()==1)
+ {
+ vrwi->AddObserver( vtkCommand::MouseMoveEvent , callPicker );
+ } else if (bbGetInputTypeEvent()==2)
+ {
+ vrwi->AddObserver( vtkCommand::LeftButtonPressEvent , callPicker );
+ } else if (bbGetInputTypeEvent()==3)
+ {
+#if VTK_MAJOR_VERSION >= 9
+ vrwi->AddObserver( vtkCommand::LeftButtonDoubleClickEvent , callPicker );
+#else
+ printf("EED Warnning! PointPicker LeftButtonPressEvent since vtk 9 \n");
+#endif
+ } // if TypeEvent
+ // ....See vtkCommand EventIds
+ } // if bbGetInputRenderer()
+
+
+
+
}
//=====
// 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)
//=====
void PointPicker::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
// bbSetInputIn(0);
-
- firsttime=true;
+ bbSetInputActive(true);
+ bbSetInputTypeEvent(0);
+ bbSetOutputMesh(NULL);
+ bbSetOutputPointId(-1);
+ bbSetOutputCellId(-1);
+ firsttime=true;
+ callPicker=NULL;
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
#include "vtkCommand.h"
#include "vtkRenderer.h"
+#include "vtkProp3D.h"
+#include <vtkRenderWindowInteractor.h>
+
namespace bbcreaVtk
{
+class PointPicker;
//---------------------------------------------
class creaVtkCallbackPointPicker : public vtkCommand
{
+
public:
+ creaVtkCallbackPointPicker();
+
static creaVtkCallbackPointPicker *New() { return new creaVtkCallbackPointPicker; }
void Delete() { delete this; }
virtual void Execute(vtkObject *caller, unsigned long, void*);
+ void setBox(PointPicker *box);
+ private:
+ PointPicker *boxPointPicker;
};
//---------------------------------------------
//---------------------------------------------
+typedef long int longInt;
class bbcreaVtk_EXPORT PointPicker
:
//=====
// 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(Active,bool);
+ BBTK_DECLARE_INPUT(TypeEvent,int );
BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
- BBTK_DECLARE_OUTPUT(Out,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(Point,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(Mesh,vtkProp3D*);
+ BBTK_DECLARE_OUTPUT(PointId,longInt);
+ BBTK_DECLARE_OUTPUT(CellId,longInt);
BBTK_PROCESS(Process);
void Process();
bool firsttime;
+ creaVtkCallbackPointPicker *callPicker;
+
//=====
// 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_BEGIN_DESCRIBE_BLACK_BOX(PointPicker,bbtk::AtomicBlackBox);
-BBTK_NAME("PointPicker");
-BBTK_AUTHOR("InfoDev");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(PointPicker,Renderer,"vtk Renderer",vtkRenderer*,"");
-BBTK_OUTPUT(PointPicker,Out,"First output",std::vector<double>,"");
+ BBTK_NAME("PointPicker");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(PointPicker,Active,"(true default) true/false",bool,"");
+ BBTK_INPUT(PointPicker,TypeEvent,"(0 default) 0:NOTHING, 1:MouseMoveEvent 2:LeftButtonPressEvent 3:LeftButtonDoubleClickEvent",int,"");
+ BBTK_INPUT(PointPicker,Renderer,"vtk Renderer",vtkRenderer*,"");
+
+ BBTK_OUTPUT(PointPicker,Point,"Point (double)",std::vector<double>,"");
+ BBTK_OUTPUT(PointPicker,Mesh,"Mesh",vtkProp3D*,"");
+ BBTK_OUTPUT(PointPicker,PointId,"Point Id in Mesh",longInt,"");
+ BBTK_OUTPUT(PointPicker,CellId,"Cell Id in Mesh",longInt,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(PointPicker);
//=====
// 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)
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkPolyDataInfo.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PolyDataInfo)
+BBTK_BLACK_BOX_IMPLEMENTATION(PolyDataInfo,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void PolyDataInfo::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+ if ( bbGetInputIn()!=NULL)
+ {
+ bbSetOutputNumberOfCells( bbGetInputIn()->GetNumberOfCells() );
+ bbSetOutputNumberOfLines( bbGetInputIn()->GetNumberOfLines() );
+ bbSetOutputNumberOfPieces( bbGetInputIn()->GetNumberOfPieces() );
+ bbSetOutputNumberOfPoints( bbGetInputIn()->GetNumberOfPoints() );
+ bbSetOutputNumberOfPolys( bbGetInputIn()->GetNumberOfPolys() );
+ bbSetOutputNumberOfStrips( bbGetInputIn()->GetNumberOfStrips() );
+ bbSetOutputNumberOfVerts( bbGetInputIn()->GetNumberOfVerts() );
+
+ if (bbGetInputPoints()==true)
+ {
+ std::vector<double> lstIds;
+ std::vector<double> lstPointsX;
+ std::vector<double> lstPointsY;
+ std::vector<double> lstPointsZ;
+ double p1[3];
+ double p2[3];
+ long int i,size= bbGetInputIn()->GetNumberOfPoints();
+ for (i=0;i<size;i++)
+ {
+ if (bbGetInputIdsPoints()==true)
+ {
+ lstIds.push_back(i);
+ } // IdsPoints
+ if (bbGetInputTransform()!=NULL)
+ {
+ bbGetInputIn()->GetPoint(i,p1);
+ bbGetInputTransform()->TransformPoint(p1,p2);
+ } else {
+ bbGetInputIn()->GetPoint(i,p2);
+ }
+ lstPointsX.push_back(p2[0]);
+ lstPointsY.push_back(p2[1]);
+ lstPointsZ.push_back(p2[2]);
+ } // for i
+ bbSetOutputLstIdsPoints(lstIds);
+ bbSetOutputLstPointsX(lstPointsX);
+ bbSetOutputLstPointsY(lstPointsY);
+ bbSetOutputLstPointsZ(lstPointsZ);
+ } // Points
+ } else {
+ bbSetOutputNumberOfCells(-1);
+ bbSetOutputNumberOfLines(-1);
+ bbSetOutputNumberOfPieces(-1);
+ bbSetOutputNumberOfPoints(-1);
+ bbSetOutputNumberOfPolys(-1);
+ bbSetOutputNumberOfStrips(-1);
+ bbSetOutputNumberOfVerts(-1);
+ }// if
+
+}
+//=====
+// 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)
+//=====
+void PolyDataInfo::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ bbSetOutputNumberOfCells(-9999);
+ bbSetOutputNumberOfLines(-9999);
+ bbSetOutputNumberOfPoints(-9999);
+ bbSetOutputNumberOfPieces(-9999);
+ bbSetOutputNumberOfPolys(-9999);
+ bbSetOutputNumberOfStrips(-9999);
+ bbSetOutputNumberOfVerts(-9999);
+ bbSetInputIdsPoints(false);
+ bbSetInputPoints(false);
+ bbSetInputTransform(NULL);
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void PolyDataInfo::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void PolyDataInfo::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkPolyDataInfo_h_INCLUDED__
+#define __bbcreaVtkPolyDataInfo_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+#include "vtkLinearTransform.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT PolyDataInfo
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(PolyDataInfo,bbtk::AtomicBlackBox);
+//=====
+// 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 , vtkPolyData* );
+ BBTK_DECLARE_INPUT( Points , bool );
+ BBTK_DECLARE_INPUT( IdsPoints , bool );
+ BBTK_DECLARE_INPUT( Transform , vtkLinearTransform* );
+
+ BBTK_DECLARE_OUTPUT( NumberOfCells , double );
+ BBTK_DECLARE_OUTPUT( NumberOfLines , double );
+ BBTK_DECLARE_OUTPUT( NumberOfPoints , double );
+ BBTK_DECLARE_OUTPUT( NumberOfPieces , double );
+ BBTK_DECLARE_OUTPUT( NumberOfPolys , double );
+ BBTK_DECLARE_OUTPUT( NumberOfStrips , double );
+ BBTK_DECLARE_OUTPUT( NumberOfVerts , double );
+ BBTK_DECLARE_OUTPUT( LstIdsPoints , std::vector<double> );
+ BBTK_DECLARE_OUTPUT( LstPointsX , std::vector<double> );
+ BBTK_DECLARE_OUTPUT( LstPointsY , std::vector<double> );
+ BBTK_DECLARE_OUTPUT( LstPointsZ , std::vector<double> );
+
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(PolyDataInfo,bbtk::AtomicBlackBox);
+ BBTK_NAME("PolyDataInfo");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(PolyDataInfo,In,"vtkPolyData", vtkPolyData* ,"");
+ BBTK_INPUT(PolyDataInfo,IdsPoints,"(default false) Extract ids of the mesh or not.", bool ,"");
+ BBTK_INPUT(PolyDataInfo,Points,"(default false) Extract points of the mesh or not.", bool ,"");
+ BBTK_INPUT(PolyDataInfo,Transform,"vtkTransform", vtkLinearTransform* ,"");
+
+ BBTK_OUTPUT(PolyDataInfo,NumberOfCells,"Number of Cells",double,"");
+ BBTK_OUTPUT(PolyDataInfo,NumberOfLines,"Number of Lines",double,"");
+ BBTK_OUTPUT(PolyDataInfo,NumberOfPoints,"Number of Points",double,"");
+ BBTK_OUTPUT(PolyDataInfo,NumberOfPieces,"Number of Pieces",double,"");
+ BBTK_OUTPUT(PolyDataInfo,NumberOfPolys,"Number of Ploys",double,"");
+ BBTK_OUTPUT(PolyDataInfo,NumberOfStrips,"Number of Strips",double,"");
+ BBTK_OUTPUT(PolyDataInfo,NumberOfVerts,"Number of Verts",double,"");
+ BBTK_OUTPUT(PolyDataInfo,LstIdsPoints,"List of Ids of points (if input Ids=true)",std::vector<double>,"");
+ BBTK_OUTPUT(PolyDataInfo,LstPointsX,"List of X of points (if input Points=true)",std::vector<double>,"");
+ BBTK_OUTPUT(PolyDataInfo,LstPointsY,"List of Y of points (if input Points=true)",std::vector<double>,"");
+ BBTK_OUTPUT(PolyDataInfo,LstPointsZ,"List of Z of points (if input Points=true)",std::vector<double>,"");
+
+
+BBTK_END_DESCRIBE_BLACK_BOX(PolyDataInfo);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkPolyDataInfo_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkPolyDataToImageData.h"
+#include "bbcreaVtkPackage.h"
+
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PolyDataToImageData)
+BBTK_BLACK_BOX_IMPLEMENTATION(PolyDataToImageData,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void PolyDataToImageData::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ((bbGetInputInPolyData()!=NULL) && (bbGetInputInImage()!=NULL) )
+ {
+printf("EED Warnning!! PolyDataToImageData::Process Clean this code .................;\n ");
+ int ext[6];
+ bbGetInputInImage()->GetExtent( ext );
+// vtkCleanPolyData *clean1 = vtkCleanPolyData::New();
+ if (clean1!=NULL) clean1->Delete();
+ clean1 = vtkCleanPolyData::New();
+ clean1->SetInputData( bbGetInputInPolyData() );
+ clean1->Update();
+ vtkTriangleFilter *triangle1 = vtkTriangleFilter::New();
+ triangle1->SetInputData( clean1->GetOutput() );
+ triangle1->Update();
+// vtkPolyDataToImageStencil *dataToStencil = vtkPolyDataToImageStencil::New();
+ if (dataToStencil!=NULL) dataToStencil->Delete();
+ dataToStencil = vtkPolyDataToImageStencil::New();
+ dataToStencil->SetInputData( triangle1->GetOutput() );
+ dataToStencil->SetOutputWholeExtent( ext );
+ dataToStencil->Update();
+// vtkExtractVOI *extract = vtkExtractVOI::New();
+ if (extract!=NULL) extract->Delete();
+ extract = vtkExtractVOI::New();
+ extract->SetVOI( ext );
+ extract->SetSampleRate(1, 1, 1);
+ extract->SetInputData( bbGetInputInImage() );
+ extract->ReleaseDataFlagOff();
+ extract->Update();
+// vtkImageStencil *stencil = vtkImageStencil::New();
+ if (stencil!=NULL) stencil->Delete();
+ stencil = vtkImageStencil::New();
+ stencil->SetInputData( extract->GetOutput() );
+ stencil->Update();
+ stencil->SetStencilData( dataToStencil->GetOutput() );
+ stencil->ReverseStencilOn();
+ stencil->SetBackgroundValue( bbGetInputBackgroundValue() );
+ stencil->Update();
+ bbSetOutputOut( stencil->GetOutput() );
+ } else {
+ printf("EED Warnning! PolyDataToImageData::Process > Missing Image or PolyData inputs\n");
+ bbSetOutputOut( NULL);
+ }// if In NULL
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void PolyDataToImageData::bbUserSetDefaultValues()
+{
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputInPolyData(NULL);
+ bbSetInputInImage(NULL);
+ bbSetInputBackgroundValue(255);
+}
+//=====
+// 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)
+//=====
+void PolyDataToImageData::bbUserInitializeProcessing()
+{
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+ clean1 = NULL;
+ dataToStencil = NULL;
+ extract = NULL;
+ stencil = NULL;
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void PolyDataToImageData::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkPolyDataToImageData_h_INCLUDED__
+#define __bbcreaVtkPolyDataToImageData_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+#include "vtkImageData.h"
+#include "vtkPolyDataToImageStencil.h"
+#include "vtkImageStencil.h"
+#include "vtkCleanPolyData.h"
+#include "vtkTriangleFilter.h"
+#include "vtkExtractVOI.h"
+#include "vtkExtractVOI.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT PolyDataToImageData
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(PolyDataToImageData,bbtk::AtomicBlackBox);
+//=====
+// 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(InImage,vtkImageData*);
+ BBTK_DECLARE_INPUT(BackgroundValue,double);
+
+ BBTK_DECLARE_INPUT(InPolyData,vtkPolyData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkCleanPolyData *clean1;
+ vtkPolyDataToImageStencil *dataToStencil;
+ vtkExtractVOI *extract;
+ vtkImageStencil *stencil;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(PolyDataToImageData,bbtk::AtomicBlackBox);
+ BBTK_NAME("PolyDataToImageData");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(PolyDataToImageData,InImage,"Image to put Result",vtkImageData*,"");
+ BBTK_INPUT(PolyDataToImageData,BackgroundValue,"(default 255) Background value",double,"");
+ BBTK_INPUT(PolyDataToImageData,InPolyData,"Input vtkPolyData",vtkPolyData*,"");
+
+ BBTK_OUTPUT(PolyDataToImageData,Out,"Output vtkImageData",vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(PolyDataToImageData);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkPolyDataToImageData_h_INCLUDED__
+
vtkImageData* ReadMHDPlane::CreateDefaultImage()
{
+ vtkImageData *newImage = NULL;
+/*
+ newImage = vtkImageData::New();
int i;
int sizeX, sizeY, sizeZ;
- sizeX = 200;
+ sizeX = 1;
sizeY = sizeX;
sizeZ = 1;
vtkImageData *newImage = vtkImageData::New();
newImage->AllocateScalars();
newImage->Update();
#else
- newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+// newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+ newImage->AllocateScalars(VTK_SHORT,1);
#endif
- memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 );
- for (i=0; i<sizeX; i++)
- {
- newImage->SetScalarComponentFromDouble(i,i,0, 0, 255 );
- newImage->SetScalarComponentFromDouble(i,sizeY-1-i,0, 0, 255 );
- } // for i
+// memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*sizeZ*sizeof(unsigned char) );
+ memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*sizeof(short) );
+// for (i=0; i<sizeX; i++)
+// {
+// newImage->SetScalarComponentFromDouble(i,i ,0, 0, 255 );
+// newImage->SetScalarComponentFromDouble(i,sizeY-1-i ,0, 0, 255 );
+// } // for i
+ newImage->Modified();
+*/
return newImage;
}
vtkImageData* ReadMHDPlane::ChangeOrientation(vtkImageData* imgOrg)
{
- int width = bbGetInputWidth();
- int ext[6];
- int sizeXOrg, sizeYOrg,sizeZOrg;
- int sizeXDst, sizeYDst,sizeZDst;
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- imgOrg->GetWholeExtent(ext);
-#else
- imgOrg->GetExtent(ext);
-#endif
- int sizeLine;
-
- sizeXOrg = ext[1]-ext[0]+1;
- sizeYOrg = ext[3]-ext[2]+1;
- sizeZOrg = ext[5]-ext[4]+1;
+ vtkImageData *imgDst = NULL;
- if (bbGetInputDirectionPlane()=="XY")
- {
- sizeXDst = ext[1]-ext[0]+1;
- sizeYDst = ext[3]-ext[2]+1;
- sizeZDst = width;
- } // XY
- if (bbGetInputDirectionPlane()=="YZ")
- {
- sizeXDst = width;
- sizeYDst = ext[1]-ext[0]+1;
- sizeZDst = ext[3]-ext[2]+1;
- sizeLine = sizeYDst;
- } // YZ
- if (bbGetInputDirectionPlane()=="ZX")
+ if (imgOrg!=NULL)
{
- sizeXDst = ext[1]-ext[0]+1;
- sizeYDst = width;
- sizeZDst = ext[3]-ext[2]+1;
- sizeLine = sizeXDst;
- } // ZX
- vtkImageData *imgDst = vtkImageData::New();
- imgDst->Initialize();
- imgDst->SetSpacing( imgOrg->GetSpacing() );
- imgDst->SetDimensions( sizeXDst,sizeYDst,sizeZDst );
- imgDst->SetExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- imgDst->SetWholeExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
- imgDst->SetScalarType( imgOrg->GetScalarType() );
- imgDst->SetNumberOfScalarComponents(1);
- imgDst->AllocateScalars();
- imgDst->Update();
-#else
- imgDst->AllocateScalars(imgOrg->GetScalarType(),1);
-#endif
+ int width;
+ int ext[6];
+ int sizeXOrg, sizeYOrg,sizeZOrg;
+ int sizeXDst, sizeYDst,sizeZDst;
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ imgOrg->GetWholeExtent(ext);
+ #else
+ imgOrg->GetExtent(ext);
+ #endif
+ int sizeLine;
+
+ sizeXOrg = ext[1]-ext[0]+1;
+ sizeYOrg = ext[3]-ext[2]+1;
+ sizeZOrg = ext[5]-ext[4]+1;
+ width=sizeZOrg;
+
+ if (bbGetInputDirectionPlane()=="XY")
+ {
+ sizeXDst = ext[1]-ext[0]+1;
+ sizeYDst = ext[3]-ext[2]+1;
+ sizeZDst = width;
+ } // XY
+ if (bbGetInputDirectionPlane()=="YZ")
+ {
+ sizeXDst = width;
+ sizeYDst = ext[1]-ext[0]+1;
+ sizeZDst = ext[3]-ext[2]+1;
+ sizeLine = sizeYDst;
+ } // YZ
+ if (bbGetInputDirectionPlane()=="ZX")
+ {
+ sizeXDst = ext[1]-ext[0]+1;
+ sizeYDst = width;
+ sizeZDst = ext[3]-ext[2]+1;
+ sizeLine = sizeXDst;
+ } // ZX
+ imgDst = vtkImageData::New();
+ imgDst->Initialize();
+ imgDst->SetSpacing( imgOrg->GetSpacing() );
+ imgDst->SetDimensions( sizeXDst,sizeYDst,sizeZDst );
+ imgDst->SetExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
+
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ imgDst->SetWholeExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
+ imgDst->SetScalarType( imgOrg->GetScalarType() );
+ imgDst->SetNumberOfScalarComponents(1);
+ imgDst->AllocateScalars();
+ imgDst->Update();
+ #else
+ imgDst->AllocateScalars(imgOrg->GetScalarType(),1);
+ #endif
- char *ptrDst,*ptrOrg;
- int sizeBytes = imgOrg->GetScalarSize();
- int sizeLineBytes = sizeLine*imgOrg->GetScalarSize();
- int xx,yy,zz;
+ char *ptrDst,*ptrOrg;
+ int sizeBytes = imgOrg->GetScalarSize();
+ int sizeLineBytes = sizeLine*imgOrg->GetScalarSize();
+ int xx,yy,zz;
- long int sizeXDstBytes = sizeXDst*sizeBytes;
- long int sizeXYDstBytes = sizeXDst*sizeYDst*sizeBytes;
- long int sizeXYDstBytes2 = sizeXDst*sizeYDst*sizeBytes*2;
- long int sizeXYZDstBytes = sizeXDst*sizeYDst*sizeZDst*sizeBytes;
- long int sizeXYZDstBytes1 = sizeXDst*sizeYDst*(sizeZDst-1)*sizeBytes;
+ long int sizeXDstBytes = sizeXDst*sizeBytes;
+ long int sizeXYDstBytes = sizeXDst*sizeYDst*sizeBytes;
+ long int sizeXYDstBytes2 = sizeXDst*sizeYDst*sizeBytes*2;
+ long int sizeXYZDstBytes = sizeXDst*sizeYDst*sizeZDst*sizeBytes;
+ long int sizeXYZDstBytes1 = sizeXDst*sizeYDst*(sizeZDst-1)*sizeBytes;
- ptrOrg = (char*)( imgOrg->GetScalarPointer() );
+ ptrOrg = (char*)( imgOrg->GetScalarPointer() );
- if (bbGetInputDirectionPlane()=="XY")
- {
- memcpy ( imgDst->GetScalarPointer(), ptrOrg , sizeXDst*sizeYDst*sizeZDst*(imgOrg->GetScalarSize()) );
- } // if XY
+ if (bbGetInputDirectionPlane()=="XY")
+ {
+ memcpy ( imgDst->GetScalarPointer(), ptrOrg , sizeXDst*sizeYDst*sizeZDst*(imgOrg->GetScalarSize()) );
+ } // if XY
- if (bbGetInputDirectionPlane()=="ZX")
- {
- ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-00-1) );
- for( zz=0 ; zz<sizeZOrg ; zz++)
+ if (bbGetInputDirectionPlane()=="ZX")
{
-// ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-00-1) );
- for( yy=0 ; yy<sizeYOrg ; yy++)
+ ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-00-1) );
+ for( zz=0 ; zz<sizeZOrg ; zz++)
{
-// ptrOrg=(char*)( imgOrg->GetScalarPointer(0,yy,zz) );
-// ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-yy-1) );
- memcpy ( ptrDst, ptrOrg , sizeLineBytes );
- ptrOrg = ptrOrg + sizeLineBytes;
- ptrDst = ptrDst - sizeXYDstBytes;
- } // for yy
- ptrDst = ptrDst + sizeXDstBytes;
- ptrDst = ptrDst + sizeXYZDstBytes;
- } // for zz
- } // ZX
-
- if (bbGetInputDirectionPlane()=="YZ")
- {
- ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-0-1) );
- for( zz=0 ; zz<sizeZOrg ; zz++)
+ // ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-00-1) );
+ for( yy=0 ; yy<sizeYOrg ; yy++)
+ {
+ // ptrOrg=(char*)( imgOrg->GetScalarPointer(0,yy,zz) );
+ // ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-yy-1) );
+ memcpy ( ptrDst, ptrOrg , sizeLineBytes );
+ ptrOrg = ptrOrg + sizeLineBytes;
+ ptrDst = ptrDst - sizeXYDstBytes;
+ } // for yy
+ ptrDst = ptrDst + sizeXDstBytes;
+ ptrDst = ptrDst + sizeXYZDstBytes;
+ } // for zz
+ } // ZX
+
+ if (bbGetInputDirectionPlane()=="YZ")
{
- ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-0-1) );
- for( yy=0 ; yy<sizeYOrg ; yy++)
+ ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-0-1) );
+ for( zz=0 ; zz<sizeZOrg ; zz++)
{
-// ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-yy-1) );
- for( xx=0 ; xx<sizeXOrg ; xx++)
+ ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-0-1) );
+ for( yy=0 ; yy<sizeYOrg ; yy++)
{
-// ptrOrg=(char*)( imgOrg->GetScalarPointer(xx,yy,zz) );
-// ptrDst=(char*)( imgDst->GetScalarPointer(zz,xx,sizeYOrg-yy-1) );
- memcpy ( ptrDst, ptrOrg , sizeBytes );
- ptrOrg+= sizeBytes;
- ptrDst+= sizeXDstBytes;
- } /// for xx
- ptrDst = ptrDst - sizeXYDstBytes2;
- } // for yy
- ptrDst = ptrDst + sizeXYZDstBytes;
-// ptrDst++;
- } // for zz
- } // ZX
-
+ // ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-yy-1) );
+ for( xx=0 ; xx<sizeXOrg ; xx++)
+ {
+ // ptrOrg=(char*)( imgOrg->GetScalarPointer(xx,yy,zz) );
+ // ptrDst=(char*)( imgDst->GetScalarPointer(zz,xx,sizeYOrg-yy-1) );
+ memcpy ( ptrDst, ptrOrg , sizeBytes );
+ ptrOrg+= sizeBytes;
+ ptrDst+= sizeXDstBytes;
+ } /// for xx
+ ptrDst = ptrDst - sizeXYDstBytes2;
+ } // for yy
+ ptrDst = ptrDst + sizeXYZDstBytes;
+ // ptrDst++;
+ } // for zz
+ } // ZX
+ } // if imgOrg
return imgDst;
}
long int headersize=0;
vtkImageData *newImage=NULL;
char mystring[250];
- char strTmp[30];
- char strTmp2[30];
+ char strTmp[250];
+ char strTmp2[250];
FILE *ffIn = fopen( fileNameIn.c_str() , "r");
long long dataSize;
if (ffIn!=NULL)
BBTK_INPUT(ReadMHDPlane,FileName,"Image file name",std::string,"");
BBTK_INPUT(ReadMHDPlane,Slice,"Slice number",int,"");
BBTK_INPUT(ReadMHDPlane,Width,"(1 default) Number of slices to be read",int,"");
- BBTK_INPUT(ReadMHDPlane,DirectionPlane,"Direction plane: XY (default), YZ , XZ",std::string,"");
+ BBTK_INPUT(ReadMHDPlane,DirectionPlane,"Direction plane: XY (default), YZ , ZX",std::string,"");
BBTK_INPUT(ReadMHDPlane,Type,"(1 default) 0 = Normal mhd, 1 = lseek64",int,"");
BBTK_OUTPUT(ReadMHDPlane,Out,"Image 2D",vtkImageData*,"");
BBTK_OUTPUT(ReadMHDPlane,Out2,"Image 2D in the good orientation",vtkImageData*,"");
#include "bbcreaVtkScalarBarActor.h"
#include "bbcreaVtkPackage.h"
-#include <vtkScalarBarActor.h>
namespace bbcreaVtk
{
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-printf ("EED ScalarBarActor Start\n");
if (firsttime==true)
{
firsttime=false;
- vtkScalarBarActor* scalarbarActor = vtkScalarBarActor::New();
+ scalarbarActor = vtkScalarBarActor::New();
scalarbarActor->SetLookupTable( bbGetInputLookupTable() );
- scalarbarActor->SetTitle("Value");
- scalarbarActor->SetNumberOfLabels(4);
+ scalarbarActor->SetTitle( bbGetInputTitle().c_str() );
+ scalarbarActor->SetNumberOfLabels(5);
+ if (bbGetInputDisplayPosition().size()==2)
+ {
+ scalarbarActor->SetDisplayPosition( bbGetInputDisplayPosition()[0] , bbGetInputDisplayPosition()[1] );
+ } //if
int fontsize = scalarbarActor->GetLabelTextProperty()->GetFontSize();
scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
if (bbGetInputRenderer()!=NULL)
{
bbGetInputRenderer()->AddActor2D( scalarbarActor );
- }
+ } // if
} // firsttime
-printf ("EED ScalarBarActor End\n");
+ if (scalarbarActor!=NULL)
+ {
+ scalarbarActor->SetVisibility( bbGetInputActive() );
+ } // if scalarbarActor NULL
}
// Here we initialize the input 'In' to 0
bbSetInputLookupTable(NULL);
bbSetInputRenderer(NULL);
- firsttime=true;
-
+ bbSetInputTitle("Value");
+ bbSetInputActive(true);
+ firsttime = true;
+ scalarbarActor = NULL;
+
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
#include <vtkRenderer.h>
#include <vtkScalarsToColors.h>
#include <vtkTextProperty.h>
+#include <vtkScalarBarActor.h>
namespace bbcreaVtk
{
// 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(LookupTable,vtkScalarsToColors*);
+ BBTK_DECLARE_INPUT(DisplayPosition,std::vector<double>);
+ BBTK_DECLARE_INPUT(Title,std::string);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
+ BBTK_DECLARE_INPUT(Active,bool);
// BBTK_DECLARE_OUTPUT(Out,double);
BBTK_PROCESS(Process);
void Process();
bool firsttime;
+ vtkScalarBarActor *scalarbarActor;
//=====
// 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_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(ScalarBarActor,LookupTable,"LookupTable",vtkScalarsToColors*,"");
+ BBTK_INPUT(ScalarBarActor,DisplayPosition,"(default EMPTY) [x,y] ",std::vector<double>,"");
+ BBTK_INPUT(ScalarBarActor,Title,"('Value' default) Title",std::string,"");
BBTK_INPUT(ScalarBarActor,Renderer,"Renderer",vtkRenderer*,"");
+ BBTK_INPUT(ScalarBarActor,Active,"(true default) Active true/false",bool,"");
// BBTK_OUTPUT(ScalarBarActor,Out,"First output",double,"");
BBTK_END_DESCRIBE_BLACK_BOX(ScalarBarActor);
//=====
#include "bbcreaVtkScalarsToColors.h"
#include "bbcreaVtkPackage.h"
+#include "vtkLookupTable.h"
+#include "vtkObjectFactory.h"
+
namespace bbcreaVtk
{
+class /*VTK_COMMON_EXPORT*/ vtkLookupTableDirectionVector2 : public vtkScalarsToColors
+{
+public:
+ // Description:
+ // Construct with range=[0,1]; and hsv ranges set up for rainbow color table
+ // (from red to blue).
+ static vtkLookupTableDirectionVector2 *New();
+ vtkTypeMacro(vtkLookupTableDirectionVector2,vtkScalarsToColors);
+ void PrintSelf(ostream& os, vtkIndent indent);
+ double *GetRange() { return this->GetTableRange(); };
+ void SetRange(double min, double max) { this->SetTableRange(min, max); };
+ void SetRange(double rng[2]) { this->SetRange(rng[0], rng[1]); };
+ void SetTableRange(double r[2]);
+ virtual void SetTableRange(double min, double max);
+ vtkGetVectorMacro(TableRange,double,2);
+ unsigned char *MapValue(double v);
+ void GetColor(double x, double rgb[3]);
+ void MapScalarsThroughTable2(void *input, unsigned char *output,
+ int inputDataType, int numberOfValues,
+ int inputIncrement, int outputIncrement);
+ void SetTypeTable( int typetable );
+protected:
+ double TableRange[2];
+ vtkLookupTableDirectionVector2(int sze=256, int ext=256);
+ ~vtkLookupTableDirectionVector2();
+private:
+ int TypeTable; //EED
+ vtkLookupTableDirectionVector2(const vtkLookupTableDirectionVector2&); // Not implemented.
+ void operator=(const vtkLookupTableDirectionVector2&); // Not implemented.
+};
+
+
+
+
+vtkStandardNewMacro(vtkLookupTableDirectionVector2);
+
+// Construct with range=(0,1); and hsv ranges set up for rainbow color table
+// (from red to blue).
+vtkLookupTableDirectionVector2::vtkLookupTableDirectionVector2(int sze, int ext)
+{
+ this->TableRange[0] = 0.0;
+ this->TableRange[1] = 1.0;
+ TypeTable=0;
+}
+
+//----------------------------------------------------------------------------
+vtkLookupTableDirectionVector2::~vtkLookupTableDirectionVector2()
+{
+}
+
+unsigned char *vtkLookupTableDirectionVector2::MapValue(double v)
+{
+
+ //int idx = this->GetIndex(v);
+ //return (this->Table->GetPointer(0) + 4*idx);
+ return 0;
+}
+
+void vtkLookupTableDirectionVector2::GetColor(double v, double rgb[3])
+{
+// unsigned char *rgb8 = this->MapValue(v);
+// rgb[0] = rgb8[0]/255.0;
+// rgb[1] = rgb8[1]/255.0;
+// rgb[2] = rgb8[2]/255.0;
+
+ rgb[0] = 1;
+ rgb[1] = 1;
+ rgb[2] = 0;
+}
+
+
+void vtkLookupTableDirectionVector2::SetTableRange(double r[2])
+{
+ this->SetTableRange(r[0],r[1]);
+}
+
+void vtkLookupTableDirectionVector2::SetTypeTable( int typetable )
+{
+ TypeTable=typetable;
+}
+
+//----------------------------------------------------------------------------
+// Set the minimum/maximum scalar values for scalar mapping. Scalar values
+// less than minimum range value are clamped to minimum range value.
+// Scalar values greater than maximum range value are clamped to maximum
+// range value.
+void vtkLookupTableDirectionVector2::SetTableRange(double rmin, double rmax)
+{
+ if (rmax < rmin)
+ {
+ vtkErrorMacro("Bad table range: ["<<rmin<<", "<<rmax<<"]");
+ return;
+ }
+
+ if (this->TableRange[0] == rmin && this->TableRange[1] == rmax)
+ {
+ return;
+ }
+
+ this->TableRange[0] = rmin;
+ this->TableRange[1] = rmax;
+
+ this->Modified();
+}
+
+
+
+//----------------------------------------------------------------------------
+// Although this is a relatively expensive calculation,
+// it is only done on the first render. Colors are cached
+// for subsequent renders.
+template<class T>
+void vtkLookupTableMapDirVectorEED2(vtkLookupTableDirectionVector2 *self, T *input,
+ unsigned char *output, int length,
+ int inIncr, int outFormat,int TypeTable)
+{
+
+ if (TypeTable==0)
+ {
+ double sum;
+ int i;
+ double dirx,diry,dirz;
+ for (i = 0; i < length; ++i)
+ {
+ dirx = static_cast<T>(input[0]);
+ diry = static_cast<T>(input[1]);
+ dirz = static_cast<T>(input[2]);
+ input = input+inIncr;
+ sum = sqrt( dirx*dirx + diry*diry + dirz*dirz );
+ *output++ = (unsigned char) abs( (255*dirx/sum) );
+ *output++ = (unsigned char) abs( (255*diry/sum) );
+ *output++ = (unsigned char) abs( (255*dirz/sum) );
+ *output++ = 255;
+ // printf("%d %d %d ",(int)(255*dirx/sum),(int)(255*diry/sum),(int)(255*dirz/sum));
+ // printf(" C %d %f %f %f \n",inIncr,dirx,diry,dirz);
+
+ } // for
+ } // typeTable == 0
+
+ if (TypeTable==1)
+ {
+ int i;
+ for (i = 0; i < length; ++i)
+ {
+ *output++ = static_cast<T>(input[0]); // red
+ *output++ = static_cast<T>(input[1]); // green
+ *output++ = static_cast<T>(input[2]); // blue
+// *output++ = 255;
+ input = input+inIncr;
+ } // for
+ } // typeTable == 1
+
+
+}
+
+
+//----------------------------------------------------------------------------
+void vtkLookupTableDirectionVector2::MapScalarsThroughTable2(void *input,
+ unsigned char *output,
+ int inputDataType,
+ int numberOfValues,
+ int inputIncrement,
+ int outputFormat)
+{
+// if (this->UseMagnitude && inputIncrement > 1)
+// {
+ switch (inputDataType)
+ {
+ vtkTemplateMacro( vtkLookupTableMapDirVectorEED2(this,static_cast<VTK_TT*>(input),output,
+ numberOfValues,inputIncrement,outputFormat,TypeTable);
+ return
+ );
+ case VTK_BIT:
+ vtkErrorMacro("Cannot comput magnitude of bit array.");
+ break;
+ default:
+ vtkErrorMacro(<< "MapImageThroughTable: Unknown input ScalarType");
+ } /// switch
+// } //if
+}
+
+
+//----------------------------------------------------------------------------
+void vtkLookupTableDirectionVector2::PrintSelf(ostream& os, vtkIndent indent)
+{
+ this->Superclass::PrintSelf(os,indent);
+}
+
+
+
+
+
+
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ScalarsToColors)
BBTK_BLACK_BOX_IMPLEMENTATION(ScalarsToColors,bbtk::AtomicBlackBox);
//=====
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-printf("EED ScalarsToColors::Process Start\n");
- if (firsttime==true)
- {
- firsttime=false;
+
+// if (firsttime==true)
+// {
+// firsttime=false;
// Create the color map
- if (bbGetInputType()==0)
+ if ((bbGetInputType()==0) || (bbGetInputType()==100) )
{
- _colorLookupTable = vtkLookupTable::New();
+ vtkLookupTable *colorLookupTable = vtkLookupTable::New();
if (bbGetInputRange().size()==2)
{
- _colorLookupTable->SetRange( bbGetInputRange()[0],bbGetInputRange()[1]);
-// _colorLookupTable->SetTableRange( bbGetInputRange()[0],bbGetInputRange()[1]);
+ colorLookupTable->SetRange( bbGetInputRange()[0],bbGetInputRange()[1]);
+// colorLookupTable->SetTableRange( bbGetInputRange()[0],bbGetInputRange()[1]);
+ colorLookupTable->UseBelowRangeColorOn();
+ colorLookupTable->UseAboveRangeColorOn();
} else {
- _colorLookupTable->SetRange(0,255);
+ colorLookupTable->SetRange(0,255);
}
- _colorLookupTable->SetNumberOfTableValues(1000);
- _colorLookupTable->Build();
+ int NumberOfColors=1000;
+ int NumberOfColorsHalf=NumberOfColors/2;
+ colorLookupTable->SetNumberOfTableValues( NumberOfColors );
+ colorLookupTable->Build();
double rgba1[4];
double rgba2[4];
int iLookTable;
- for (iLookTable = 0; iLookTable<500; iLookTable++)
+ for (iLookTable = 0; iLookTable<NumberOfColorsHalf; iLookTable++)
{
- _colorLookupTable->GetTableValue( iLookTable, rgba1);
- _colorLookupTable->GetTableValue(1000-1-iLookTable, rgba2);
- _colorLookupTable->SetTableValue(1000-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
- _colorLookupTable->SetTableValue( iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+ colorLookupTable->GetTableValue( iLookTable, rgba1 );
+ colorLookupTable->GetTableValue(NumberOfColors-1-iLookTable, rgba2 );
+ colorLookupTable->SetTableValue(NumberOfColors-1-iLookTable, rgba1[0],rgba1[1],rgba1[2],rgba1[3] );
+ colorLookupTable->SetTableValue( iLookTable, rgba2[0],rgba2[1],rgba2[2],rgba2[3] );
} // for iLookTable
- double rgba[4];
- _colorLookupTable->GetTableValue(0,rgba);
- rgba[3]=0;
- _colorLookupTable->SetTableValue(0,rgba);
-
- int i,iMax;
-
- iMax=(1000/16)*4;
- for (i=0;i<iMax;i++)
- {
-
- _colorLookupTable->GetTableValue(500+i, rgba);
- rgba[3]=(double)i/(double)iMax;
- _colorLookupTable->SetTableValue(500+i,rgba);
- _colorLookupTable->GetTableValue(500-i, rgba);
- rgba[3]=(double)i/(double)iMax;
- _colorLookupTable->SetTableValue(500-i,rgba);
-
- } // for
-
-
-/*
- iMax=100;
- for (i=0;i<iMax;i++)
+
+ // Transparency
+ if (bbGetInputType()==0)
{
-
- _colorLookupTable->GetTableValue(500+100+i, rgba);
- rgba[3]=(double)i/(double)iMax;
- _colorLookupTable->SetTableValue(500+100+i,rgba);
- _colorLookupTable->GetTableValue(500-100-i, rgba);
- rgba[3]=(double)i/(double)iMax;
- _colorLookupTable->SetTableValue(500-100-i,rgba);
-
- } // for
-
- iMax=200;
- for (i=0;i<iMax;i++)
- {
- _colorLookupTable->GetTableValue(500+i, rgba);
- rgba[3]=0;
- _colorLookupTable->SetTableValue(500+i,rgba);
- _colorLookupTable->GetTableValue(500-i, rgba);
+ // First Element
+ double rgba[4];
+ colorLookupTable->GetTableValue(0,rgba);
rgba[3]=0;
- _colorLookupTable->SetTableValue(500-i,rgba);
- } // for
-*/
-
+ colorLookupTable->SetTableValue(0,rgba);
-
- } // if Type 0
+ colorLookupTable->UseBelowRangeColorOn();
+ colorLookupTable->UseAboveRangeColorOn();
+ if (bbGetInputBelowAboveRangeTransparence()==true)
+ {
+ colorLookupTable->SetBelowRangeColor(1,1,1,0); // White transparent
+ colorLookupTable->SetAboveRangeColor(1,1,1,0); // White transparent
+ } else {
+ colorLookupTable->SetBelowRangeColor(1,1,1,1); // White transparent
+ colorLookupTable->SetAboveRangeColor(1,1,1,1); // White transparent
+ }
+
+ // Middle range
+ int i,iMax=(NumberOfColors/16)*4;
+ for (i=0;i<iMax;i++)
+ {
+ colorLookupTable->GetTableValue(NumberOfColorsHalf+i, rgba);
+ rgba[3]=(double)i/(double)iMax;
+ colorLookupTable->SetTableValue(NumberOfColorsHalf+i,rgba);
+ colorLookupTable->GetTableValue(NumberOfColorsHalf-i, rgba);
+ rgba[3]=(double)i/(double)iMax;
+ colorLookupTable->SetTableValue(NumberOfColorsHalf-i,rgba);
+ } // for
+ } //if Type 0
+
+ colorLookupTable->Modified();
+ _scalarstocolors = colorLookupTable;
+ } // if Type 0 || 100
//EED 2018-06-8 ***********************ARDS Projet***********************************************
- if (bbGetInputType()==1)
+ if ((bbGetInputType()==1) || (bbGetInputType()==101) )
{
- _colorLookupTable = vtkLookupTable::New();
+ vtkLookupTable *colorLookupTable = vtkLookupTable::New();
if (bbGetInputRange().size()==2)
{
- _colorLookupTable->SetRange( bbGetInputRange()[0],bbGetInputRange()[1]);
-// _colorLookupTable->SetTableRange( bbGetInputRange()[0],bbGetInputRange()[1]);
+ colorLookupTable->SetRange( bbGetInputRange()[0],bbGetInputRange()[1]);
+// colorLookupTable->SetTableRange( bbGetInputRange()[0],bbGetInputRange()[1]); ????????
+// colorLookupTable->SetBelowRangeColor(1,1,1,1); // White transparent
+// colorLookupTable->SetAboveRangeColor(1,1,1,1); // White transparent
+ colorLookupTable->UseBelowRangeColorOn();
+ colorLookupTable->UseAboveRangeColorOn();
+ if (bbGetInputBelowAboveRangeTransparence()==true)
+ {
+ colorLookupTable->SetBelowRangeColor(1,1,1,0); // White transparent
+ colorLookupTable->SetAboveRangeColor(1,1,1,0); // White transparent
+ } else {
+ colorLookupTable->SetBelowRangeColor(1,1,1,1); // White transparent
+ colorLookupTable->SetAboveRangeColor(1,1,1,1); // White transparent
+ }
} else {
- _colorLookupTable->SetRange(0,255);
+ colorLookupTable->SetRange(0,255);
}
- _colorLookupTable->SetValueRange(0.0, 1.0); // from black to white
- _colorLookupTable->SetSaturationRange(0.0, 0.0); // no color saturation
- _colorLookupTable->SetRampToLinear();
- _colorLookupTable->Build();
- double rgba[4];
- _colorLookupTable->GetTableValue(0,rgba);
- rgba[3]=0;
- _colorLookupTable->SetTableValue(0,rgba);
- } // IF
+ colorLookupTable->SetValueRange(0.0, 1.0); // from black to white
+ colorLookupTable->SetSaturationRange(0.0, 0.0); // no color saturation
+ colorLookupTable->SetRampToLinear();
+ colorLookupTable->Build();
+ // Transparency
+ if (bbGetInputType()==1)
+ {
+ // First Element
+ double rgba[4];
+ colorLookupTable->GetTableValue(0,rgba);
+ rgba[3]=0;
+ colorLookupTable->SetTableValue(0,rgba);
+ } // if Type 1
+ _scalarstocolors = colorLookupTable;
+ } // If Type 1 || 101
+ if (bbGetInputType()==2) // Direction Color Vector
+ {
+ vtkLookupTableDirectionVector2 *_LutEED = vtkLookupTableDirectionVector2::New();
+ _LutEED->SetVectorModeToRGBColors();
+ _LutEED->SetTypeTable(0);
+ _scalarstocolors = _LutEED;
+ } // If Type 2
+ if (bbGetInputType()==3) // Componets image rgb [0 255]
+ {
+ vtkLookupTableDirectionVector2 *_LutEED = vtkLookupTableDirectionVector2::New();
+ _LutEED->SetVectorModeToRGBColors();
+ _LutEED->SetTypeTable(1); // for components image
+ _scalarstocolors = _LutEED;
+ } // If Type 3
- } // firsttime
+// } // firsttime
double rgb[3];
std::vector<double>colorRGB;
- _colorLookupTable->GetColor( bbGetInputScalarValue() , rgb );
+ _scalarstocolors->GetColor( bbGetInputScalarValue() , rgb );
colorRGB.push_back( rgb[0] );
colorRGB.push_back( rgb[1] );
colorRGB.push_back( rgb[2] );
bbSetOutputColor( colorRGB );
- bbSetOutputLookupTable(_colorLookupTable);
+ bbSetOutputLookupTable( _scalarstocolors );
-printf("EED ScalarsToColors::Process End\n");
}
//=====
range.push_back( 1 );
bbSetInputRange(range);
bbSetInputScalarValue(0);
- firsttime=true;
-
- _colorLookupTable=NULL;
+ bbSetInputBelowAboveRangeTransparence(true);
+// firsttime = true;
+ _scalarstocolors = NULL;
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
BBTK_DECLARE_INPUT(Type,int);
BBTK_DECLARE_INPUT(ScalarValue,double);
+ BBTK_DECLARE_INPUT(BelowAboveRangeTransparence,bool);
BBTK_DECLARE_INPUT(Range,std::vector<double> );
BBTK_DECLARE_OUTPUT(Color, std::vector<double> );
BBTK_DECLARE_OUTPUT(LookupTable,vtkScalarsToColors*);
BBTK_PROCESS(Process);
void Process();
- bool firsttime;
- vtkLookupTable *_colorLookupTable;
+// bool firsttime;
+ vtkScalarsToColors *_scalarstocolors;
vtkColorTransferFunction *_volumeColor;
BBTK_AUTHOR("Info-Dev");
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
- BBTK_INPUT(ScalarsToColors,Type,"0 (default) Type of color table",int,"");
+ BBTK_INPUT(ScalarsToColors,Type,"(0 default) 0=JET(transparent for first element and middle range); 100=As 0 without transparace; 1=RangeTable (transparent for first element); 101=As 1 without transparace; 2=DirectionColorRGB; 3=ComponentColorRGB[0-255]",int,"");
BBTK_INPUT(ScalarsToColors,ScalarValue,"Scalar value -> Color OUT",double,"");
+ BBTK_INPUT(ScalarsToColors,BelowAboveRangeTransparence,"(default true) Transparence for Before and After range true/false",bool,"");
BBTK_INPUT(ScalarsToColors,Range,"Min Max range",std::vector<double>,"");
BBTK_OUTPUT(ScalarsToColors,Color,"Color",std::vector<double>,"");
BBTK_OUTPUT(ScalarsToColors,LookupTable,"LookupTable",vtkScalarsToColors*,"");
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkScreenShot.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkWindowToImageFilter.h"
+#include "vtkPNGWriter.h"
+#include "vtkWindow.h"
+
+// #include "vtkFFMPEGWriter.h"
+
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ScreenShot)
+BBTK_BLACK_BOX_IMPLEMENTATION(ScreenShot,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void ScreenShot::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ vtkWindowToImageFilter *wif = vtkWindowToImageFilter::New();
+ if (bbGetInputSize().size()==2)
+ {
+ bbGetInputvtkRenderer()->GetVTKWindow()->SetSize( bbGetInputSize()[0], bbGetInputSize()[1] );
+ }
+ wif->SetInput( bbGetInputvtkRenderer()->GetVTKWindow() );
+ wif->SetMagnification( bbGetInputScale()[0] );
+// wif->SetScale( bbGetInputScale()[0], bbGetInputScale()[1] );
+ wif->SetInputBufferTypeToRGB();
+ wif->ReadFrontBufferOff();
+ wif->Update();
+ vtkPNGWriter *writer = vtkPNGWriter::New();
+ writer->SetFileName( bbGetInputFileName().c_str() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ writer->SetInput( wif->GetOutput() );
+#else
+ writer->SetInputData( wif->GetOutput() );
+#endif
+
+
+ writer->Write();
+
+/*
+ vtkFFMPEGWriter *writer2 = vtkFFMPEGWriter::New();
+ writer2->SetInput(wif->GetOutput());
+ for (int i=0; i<10; i++)
+ {
+ // update
+ writer2->Write();
+ } // for
+ writer2->End;
+*/
+}
+//=====
+// 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)
+//=====
+void ScreenShot::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputvtkRenderer(NULL);
+ bbSetInputFileName("ScreenShot-BBTK.png");
+
+ std::vector<int> scale;
+ scale.push_back(1);
+ scale.push_back(1);
+ bbSetInputScale(scale);
+
+}
+//=====
+// 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)
+//=====
+void ScreenShot::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void ScreenShot::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkScreenShot_h_INCLUDED__
+#define __bbcreaVtkScreenShot_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkRenderer.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ScreenShot
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ScreenShot,bbtk::AtomicBlackBox);
+//=====
+// 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(FileName,std::string);
+ BBTK_DECLARE_INPUT(Size,std::vector<int>);
+ BBTK_DECLARE_INPUT(Scale,std::vector<int>);
+ BBTK_DECLARE_INPUT(vtkRenderer,vtkRenderer*);
+// BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(ScreenShot,bbtk::AtomicBlackBox);
+ BBTK_NAME("ScreenShot");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(ScreenShot,Size,"[sX,sY] size of the render window. Default [actual window sX, actual window sY]",std::vector<int>,"");
+ BBTK_INPUT(ScreenShot,Scale,"[scaleX,scaleY] default [1,1]",std::vector<int>,"");
+ BBTK_INPUT(ScreenShot,FileName,"File Name Default:ScreenShot-BBTK.png",std::string,"");
+ BBTK_INPUT(ScreenShot,vtkRenderer,"First input",vtkRenderer*,"");
+// BBTK_OUTPUT(ScreenShot,Out,"First output",double,"");
+BBTK_END_DESCRIBE_BLACK_BOX(ScreenShot);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkScreenShot_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkSetCameraInfo.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkCamera.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,SetCameraInfo)
+BBTK_BLACK_BOX_IMPLEMENTATION(SetCameraInfo,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void SetCameraInfo::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+ if (bbGetInputvtkRenderer()!=NULL)
+ {
+ double px,py,pz;
+ px=bbGetInputPosition()[0];
+ py=bbGetInputPosition()[1];
+ pz=bbGetInputPosition()[2];
+ bbGetInputvtkRenderer()->GetActiveCamera()->SetPosition(px,py,pz);
+ double fx,fy,fz;
+ fx=bbGetInputFocalPoint()[0];
+ fy=bbGetInputFocalPoint()[1];
+ fz=bbGetInputFocalPoint()[2];
+ bbGetInputvtkRenderer()->GetActiveCamera()->SetFocalPoint(fx,fy,fz);
+ double vx,vy,vz;
+ vx=bbGetInputViewUp()[0];
+ vy=bbGetInputViewUp()[1];
+ vz=bbGetInputViewUp()[2];
+ bbGetInputvtkRenderer()->GetActiveCamera()->SetViewUp(vx,vy,vz);
+ } // if
+
+}
+//=====
+// 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)
+//=====
+void SetCameraInfo::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputvtkRenderer( NULL );
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void SetCameraInfo::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void SetCameraInfo::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkSetCameraInfo_h_INCLUDED__
+#define __bbcreaVtkSetCameraInfo_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkRenderer.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT SetCameraInfo
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(SetCameraInfo,bbtk::AtomicBlackBox);
+//=====
+// 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(vtkRenderer,vtkRenderer*);
+ BBTK_DECLARE_INPUT(ViewUp,std::vector<double>);
+ BBTK_DECLARE_INPUT(FocalPoint,std::vector<double>);
+ BBTK_DECLARE_INPUT(Position,std::vector<double>);
+// BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(SetCameraInfo,bbtk::AtomicBlackBox);
+ BBTK_NAME("SetCameraInfo");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(SetCameraInfo,vtkRenderer,"vtkRenderer",vtkRenderer*,"");
+ BBTK_INPUT(SetCameraInfo,ViewUp,"ViewUp[x,y,z]",std::vector<double>,"");
+ BBTK_INPUT(SetCameraInfo,FocalPoint,"FocalPoint[x,y,z]",std::vector<double>,"");
+ BBTK_INPUT(SetCameraInfo,Position,"Position[x,y,z]",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(SetCameraInfo);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkSetCameraInfo_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkStlReader.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkSTLReader.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,StlReader)
+BBTK_BLACK_BOX_IMPLEMENTATION(StlReader,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void StlReader::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+ vtkSTLReader *reader = vtkSTLReader::New();
+ reader->SetFileName( bbGetInputFileName().c_str() );
+ reader->Update();
+ bbSetOutputOut( reader->GetOutput() );
+
+}
+//=====
+// 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)
+//=====
+void StlReader::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetOutputOut(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void StlReader::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void StlReader::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkStlReader_h_INCLUDED__
+#define __bbcreaVtkStlReader_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT StlReader
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(StlReader,bbtk::AtomicBlackBox);
+//=====
+// 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(FileName,std::string);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(StlReader,bbtk::AtomicBlackBox);
+ BBTK_NAME("StlReader");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(StlReader,FileName,"File Name",std::string,"");
+ BBTK_OUTPUT(StlReader,Out,"vtkPolyData",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(StlReader);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkStlReader_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkStlWriter.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkSTLWriter.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,StlWriter)
+BBTK_BLACK_BOX_IMPLEMENTATION(StlWriter,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void StlWriter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ((bbGetInputIn()!=NULL) && (bbGetInputFileName()!=""))
+ {
+ vtkSTLWriter *writer = vtkSTLWriter::New();
+ if (bbGetInputAscii()==true)
+ {
+ writer->SetFileTypeToASCII();
+ } else {
+ writer->SetFileTypeToBinary();
+ } // if Ascii
+ writer->SetInputData( bbGetInputIn() );
+ writer->SetFileName( bbGetInputFileName().c_str() );
+ writer->Write();
+ writer->Delete();
+ } // if In Filename
+
+}
+//=====
+// 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)
+//=====
+void StlWriter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ bbSetInputFileName("");
+ bbSetInputAscii(true);
+
+}
+//=====
+// 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)
+//=====
+void StlWriter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void StlWriter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkStlWriter_h_INCLUDED__
+#define __bbcreaVtkStlWriter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT StlWriter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(StlWriter,bbtk::AtomicBlackBox);
+//=====
+// 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(FileName,std::string);
+ BBTK_DECLARE_INPUT(In,vtkPolyData*);
+ BBTK_DECLARE_INPUT(Ascii,bool);
+// BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(StlWriter,bbtk::AtomicBlackBox);
+ BBTK_NAME("StlWriter");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(StlWriter,FileName,"File Name",std::string,"");
+ BBTK_INPUT(StlWriter,In,"vtkPolyData (Mesh)",vtkPolyData*,"");
+ BBTK_INPUT(StlWriter,Ascii,"(true defaimt) true Ascii / false Binary",bool,"");
+// BBTK_OUTPUT(StlWriter,Out,"First output",double,"");
+BBTK_END_DESCRIBE_BLACK_BOX(StlWriter);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkStlWriter_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkStripper.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkStripper.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Stripper)
+BBTK_BLACK_BOX_IMPLEMENTATION(Stripper,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void Stripper::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ( bbGetInputIn()!=NULL )
+ {
+ vtkStripper *strips = vtkStripper::New();
+ strips->SetInputData( bbGetInputIn() );
+ strips->Update();
+ vtkPolyData *poly = vtkPolyData::New();
+ poly->SetPoints( strips->GetOutput()->GetPoints() );
+ poly->SetPolys( strips->GetOutput()->GetLines() );
+ bbSetOutputOut( poly );
+ } // if bbGetInputIn
+}
+//=====
+// 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)
+//=====
+void Stripper::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void Stripper::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void Stripper::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkStripper_h_INCLUDED__
+#define __bbcreaVtkStripper_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT Stripper
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Stripper,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkPolyData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(Stripper,bbtk::AtomicBlackBox);
+ BBTK_NAME("Stripper");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("Close contour polydata ??");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(Stripper,In,"Input mesh",vtkPolyData*,"");
+ BBTK_OUTPUT(Stripper,Out,"Output mesh",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(Stripper);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkStripper_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkTurnImage.h"
+#include "bbcreaVtkPackage.h"
+
+#include "creaVtk_MACROS.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,TurnImage)
+BBTK_BLACK_BOX_IMPLEMENTATION(TurnImage,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void TurnImage::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+ if (bbGetInputIn()!=NULL)
+ {
+ int dim[3];
+ int ext[6];
+ bbGetInputIn()->GetExtent(ext);
+ dim[0] = ext[1]-ext[0]+1;
+ dim[1] = ext[3]-ext[2]+1;
+ dim[2] = ext[5]-ext[4]+1;
+ double spc[3];
+ bbGetInputIn()->GetSpacing(spc);
+
+ vtkImageData *newImage = vtkImageData::New();
+ newImage->Initialize();
+ if (bbGetInputDir()==1)
+ {
+ newImage->SetSpacing( spc[1],spc[2],spc[0] );
+ newImage->SetDimensions( dim[1],dim[2], dim[0] );
+ } else if (bbGetInputDir()==2)
+ {
+ newImage->SetSpacing( spc[0],spc[2],spc[1] );
+ newImage->SetDimensions( dim[0],dim[2], dim[1] );
+ } else {
+ newImage->SetSpacing( spc[0],spc[1],spc[2] );
+ newImage->SetDimensions( dim[0],dim[1], dim[2] );
+ }// if Dir
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
+ newImage->SetNumberOfScalarComponents(1);
+ newImage->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ newImage->AllocateScalars( bbGetInputIn()->GetScalarType(),1 );
+#endif
+
+ DEF_POINTER_IMAGE_VTK_CREA(vIn,ssIn,pIn,stIn,bbGetInputIn())
+ DEF_POINTER_IMAGE_VTK_CREA(vNI,ssNI,pNI,stNI,newImage)
+
+ long int index=0;
+ int i,j,k;
+ double value;
+ for (k=0;k<dim[2];k++)
+ {
+ for (j=0;j<dim[1];j++)
+ {
+ for (i=0;i<dim[0];i++)
+ {
+ GETVALUE2_VTK_CREA(vIn,pIn,stIn,index)
+// value = bbGetInputIn()->GetScalarComponentAsDouble (i,j,k,0);
+ if (bbGetInputDir()==1)
+ {
+ SETVALUE2_VTK_CREA(vIn,pNI,stNI, j + (dim[2]-k-1)*dim[1] + i*dim[1]*dim[2] )
+// newImage->SetScalarComponentFromDouble(j,dim[2]-k-1,i,0,value);
+ } else if (bbGetInputDir()==2)
+ {
+ SETVALUE2_VTK_CREA(vIn,pNI,stNI, i + (dim[2]-k-1)*dim[0] + j*dim[0]*dim[2] )
+// newImage->SetScalarComponentFromDouble(i,dim[2]-k-1,j,0,value);
+ } else {
+ SETVALUE2_VTK_CREA(vIn,pNI,stNI,index)
+// newImage->SetScalarComponentFromDouble(i,j,k,0,value);
+ }// if Dir
+ index++;
+ } // for i
+ } // for j
+ } // for k
+ bbSetOutputOut(newImage);
+ } else {
+ bbSetOutputOut(NULL);
+ }// if In!=NULL
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void TurnImage::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ bbSetInputDir(0);
+
+}
+//=====
+// 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)
+//=====
+void TurnImage::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void TurnImage::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkTurnImage_h_INCLUDED__
+#define __bbcreaVtkTurnImage_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT TurnImage
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(TurnImage,bbtk::AtomicBlackBox);
+//=====
+// 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,vtkImageData*);
+ BBTK_DECLARE_INPUT(Dir,int);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(TurnImage,bbtk::AtomicBlackBox);
+ BBTK_NAME("TurnImage");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(TurnImage,In,"Input Image",vtkImageData*,"");
+ BBTK_INPUT(TurnImage,Dir,"(default 0) 0:XY(original) 1:YZ 2:XZ",int,"");
+
+ BBTK_OUTPUT(TurnImage,Out,"Output image",vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(TurnImage);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkTurnImage_h_INCLUDED__
+
vectorsvisu.SetOpacity( bbGetInputOpacity() );
vectorsvisu.SetRenderer( bbGetInputRenderer() );
vectorsvisu.SetTypeForm( bbGetInputTypeForm() );
+ vectorsvisu.SetOrientation( bbGetInputOrientation() );
+ vectorsvisu.SetExternalLut( bbGetInputExternalLut() );
vectorsvisu.Process();
- bbSetOutputOut( vectorsvisu.GetProp3D() );
-
+ bbSetOutputOut( vectorsvisu.GetProp3D() );
}
//=====
// 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)
bbSetInputScaleFactor(500);
bbSetInputOpacity(1);
bbSetInputTypeForm(0);
+ bbSetInputOrientation(-1);
+ bbSetInputExternalLut(NULL);
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
#include "vtkRenderer.h"
#include "vtkDataObject.h"
+#include "vtkScalarsToColors.h"
#include "vtkVectorsVisu.h"
BBTK_DECLARE_INPUT(ScaleFactor,double);
BBTK_DECLARE_INPUT(Opacity,double);
BBTK_DECLARE_INPUT(TypeForm,int);
+ BBTK_DECLARE_INPUT(Orientation,int);
+ BBTK_DECLARE_INPUT(ExternalLut,vtkScalarsToColors*);
BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
BBTK_PROCESS(Process);
void Process();
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorsVisu,bbtk::AtomicBlackBox);
-BBTK_NAME("VectorsVisu");
-BBTK_AUTHOR("ED at InfoDev Creatis");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
- BBTK_INPUT(VectorsVisu,Active,"Active (false default)",bool,"");
- BBTK_INPUT(VectorsVisu,In,"(needed) vtkDataObject. (Example vtkDataObject<-vtkDataSet<-vtkPointSet<-vtkPolyData (parrent class) )",vtkDataObject*,"");
- BBTK_INPUT(VectorsVisu,ScaleFactor,"Scale factor (500 default)",double,"");
- BBTK_INPUT(VectorsVisu,Opacity,"Opacity (1 default)",double,"");
- BBTK_INPUT(VectorsVisu,Renderer,"vtkRenderer",vtkRenderer*,"");
- BBTK_INPUT(VectorsVisu,TypeForm,"0 Line, 1 Arrow (default 0)",int,"");
- BBTK_OUTPUT(VectorsVisu,Out,"vtkProp3D of an vtkActor",vtkProp3D*,"");
+ BBTK_NAME("VectorsVisu");
+ BBTK_AUTHOR("ED at InfoDev Creatis");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(VectorsVisu,Active,"Active (false default)",bool,"");
+ BBTK_INPUT(VectorsVisu,In,"(needed) vtkDataObject. (Example vtkDataObject<-vtkDataSet<-vtkPointSet<-vtkPolyData (parrent class) )",vtkDataObject*,"");
+ BBTK_INPUT(VectorsVisu,ScaleFactor,"Scale factor (500 default)",double,"");
+ BBTK_INPUT(VectorsVisu,Opacity,"Opacity (1 default)",double,"");
+ BBTK_INPUT(VectorsVisu,Renderer,"vtkRenderer",vtkRenderer*,"");
+ BBTK_INPUT(VectorsVisu,TypeForm,"0 Line, 1 Arrow (default 0)",int,"");
+ BBTK_INPUT(VectorsVisu,Orientation,"(default -1) -1=3D, 0=yz, 1=xz, 2=xy",int,"");
+ BBTK_INPUT(VectorsVisu,ExternalLut,"Lookuptable",vtkScalarsToColors*,"");
+
+ BBTK_OUTPUT(VectorsVisu,Out,"vtkProp3D of an vtkActor",vtkProp3D*,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(VectorsVisu);
//=====
// 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)
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkVoiMPR.h"
+#include "bbcreaVtkPackage.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,VoiMPR)
+BBTK_BLACK_BOX_IMPLEMENTATION(VoiMPR,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void VoiMPR::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if (bbGetInputIn().size()!=6)
+ {
+ printf("EED Warning box not defined.\n");
+ } else {
+ bool showActorXY;
+ bool showActorYZ;
+ bool showActorXZ;
+
+ 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]>=vecVOI[0]) && (vecPoint[0]<=vecVOI[1]) )
+ {
+ showActorYZ=bbGetInputActive() && true;
+ } else {
+ showActorYZ=bbGetInputActive() && false;
+ }
+ if ((vecPoint[1]>=vecVOI[2]) && (vecPoint[1]<=vecVOI[3]) )
+ {
+ showActorXZ=bbGetInputActive() && true;
+ } else {
+ showActorXZ=bbGetInputActive() && false;
+ }
+ if ((vecPoint[2]>=vecVOI[4]) && (vecPoint[2]<=vecVOI[5]) )
+ {
+ showActorXY=bbGetInputActive() && true;
+ } else {
+ showActorXY=bbGetInputActive() && false;
+ }
+
+ } else {
+ showActorXY=bbGetInputActive();
+ showActorYZ=bbGetInputActive();
+ showActorXZ=bbGetInputActive();
+ }
+
+ if (bbGetInputXYrender()!=NULL)
+ {
+ dep=-900;
+ 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 )
+ {
+ if (actorAddedXY==false)
+ {
+ bbGetInputXYrender()->AddActor(polygonActorXY);
+ actorAddedXY=true;
+ } //
+ } else {
+ if (actorAddedXY==true)
+ {
+ bbGetInputXYrender()->RemoveActor(polygonActorXY);
+ actorAddedXY=false;
+ } //
+ }// Active
+ } // if XYrender
+ if (bbGetInputYZrender()!=NULL)
+ {
+ dep=900;
+ 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 )
+ {
+ if (actorAddedYZ==false)
+ {
+ bbGetInputYZrender()->AddActor(polygonActorYZ);
+ actorAddedYZ=true;
+ } //
+ } else {
+ if (actorAddedYZ==true)
+ {
+ bbGetInputYZrender()->RemoveActor(polygonActorYZ);
+ actorAddedYZ=false;
+ } //
+ }// Active
+ } // if XYrender
+ if (bbGetInputXZrender()!=NULL)
+ {
+ dep=-900;
+ 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 )
+ {
+ if (actorAddedXZ==false)
+ {
+ bbGetInputXZrender()->AddActor(polygonActorXZ);
+ actorAddedXZ=true;
+ } //
+ } else {
+ if (actorAddedXZ==true)
+ {
+ bbGetInputXZrender()->RemoveActor(polygonActorXZ);
+ actorAddedXZ=false;
+ } //
+ }// Active
+ } // if XYrender
+ } // In size
+}
+//=====
+// 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)
+//=====
+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;
+ 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)
+//=====
+void VoiMPR::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+ pointsXY = vtkPoints ::New();
+ linesXY = vtkCellArray ::New();
+ polygonXY = vtkPolyData ::New();
+ polygonMapperXY = vtkPolyDataMapper ::New();
+ polygonActorXY = vtkActor ::New();
+ pointsXY -> SetNumberOfPoints(4);
+ pointsXY -> SetPoint(0, 0, 0, 0);
+ pointsXY -> SetPoint(1, 0, 0, 0);
+ pointsXY -> SetPoint(2, 0, 0, 0);
+ pointsXY -> SetPoint(3, 0, 0, 0);
+ linesXY -> InsertNextCell(5);
+ linesXY -> InsertCellPoint(0);
+ linesXY -> InsertCellPoint(1);
+ linesXY -> InsertCellPoint(2);
+ linesXY -> InsertCellPoint(3);
+ linesXY -> InsertCellPoint(0);
+ polygonXY -> SetPoints(pointsXY);
+ polygonXY -> SetLines(linesXY);
+ polygonMapperXY -> SetInputData(polygonXY);
+ polygonMapperXY -> Update();
+ polygonActorXY -> SetMapper(polygonMapperXY);
+
+
+ pointsXZ = vtkPoints ::New();
+ linesXZ = vtkCellArray ::New();
+ polygonXZ = vtkPolyData ::New();
+ polygonMapperXZ = vtkPolyDataMapper ::New();
+ polygonActorXZ = vtkActor ::New();
+ pointsXZ -> SetNumberOfPoints(4);
+ pointsXZ -> SetPoint(0, 0, 0, 0);
+ pointsXZ -> SetPoint(1, 0, 0, 0);
+ pointsXZ -> SetPoint(2, 0, 0, 0);
+ pointsXZ -> SetPoint(3, 0, 0, 0);
+ linesXZ -> InsertNextCell(5);
+ linesXZ -> InsertCellPoint(0);
+ linesXZ -> InsertCellPoint(1);
+ linesXZ -> InsertCellPoint(2);
+ linesXZ -> InsertCellPoint(3);
+ linesXZ -> InsertCellPoint(0);
+ polygonXZ -> SetPoints(pointsXZ);
+ polygonXZ -> SetLines(linesXZ);
+ polygonMapperXZ -> SetInputData(polygonXZ);
+ polygonMapperXZ -> Update();
+ polygonActorXZ -> SetMapper(polygonMapperXZ);
+
+ pointsYZ = vtkPoints ::New();
+ linesYZ = vtkCellArray ::New();
+ polygonYZ = vtkPolyData ::New();
+ polygonMapperYZ = vtkPolyDataMapper ::New();
+ polygonActorYZ = vtkActor ::New();
+ pointsYZ ->SetNumberOfPoints(4);
+ pointsYZ ->SetPoint(0, 0, 0, 0);
+ pointsYZ ->SetPoint(1, 0, 0, 0);
+ pointsYZ ->SetPoint(2, 0, 0, 0);
+ pointsYZ ->SetPoint(3, 0, 0, 0);
+ linesYZ ->InsertNextCell(5);
+ linesYZ ->InsertCellPoint(0);
+ linesYZ ->InsertCellPoint(1);
+ linesYZ ->InsertCellPoint(2);
+ linesYZ ->InsertCellPoint(3);
+ linesYZ ->InsertCellPoint(0);
+ polygonYZ -> SetPoints(pointsYZ);
+ polygonYZ -> SetLines(linesYZ);
+ polygonMapperYZ -> SetInputData(polygonYZ);
+ polygonMapperYZ -> Update();
+ polygonActorYZ -> SetMapper(polygonMapperYZ);
+}
+//=====
+// 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)
+//=====
+void VoiMPR::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkVoiMPR_h_INCLUDED__
+#define __bbcreaVtkVoiMPR_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPoints.h"
+#include "vtkCellArray.h"
+#include "vtkPolyData.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkActor.h"
+#include "vtkRenderer.h"
+
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT VoiMPR
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(VoiMPR,bbtk::AtomicBlackBox);
+//=====
+// 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*);
+ BBTK_DECLARE_INPUT(XZrender,vtkRenderer*);
+ BBTK_DECLARE_INPUT(Active,bool);
+// BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkPoints *pointsXY;
+ vtkCellArray *linesXY;
+ vtkPolyData *polygonXY;
+ vtkPolyDataMapper *polygonMapperXY;
+ vtkActor *polygonActorXY;
+ bool actorAddedXY;
+
+ vtkPoints *pointsXZ;
+ vtkCellArray *linesXZ;
+ vtkPolyData *polygonXZ;
+ vtkPolyDataMapper *polygonMapperXZ;
+ vtkActor *polygonActorXZ;
+ bool actorAddedXZ;
+
+ vtkPoints *pointsYZ;
+ vtkCellArray *linesYZ;
+ vtkPolyData *polygonYZ;
+ vtkPolyDataMapper *polygonMapperYZ;
+ vtkActor *polygonActorYZ;
+ bool actorAddedYZ;
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(VoiMPR,bbtk::AtomicBlackBox);
+ BBTK_NAME("VoiMPR");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ 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*,"");
+ BBTK_INPUT(VoiMPR,XZrender,"vtkRenderer XZ",vtkRenderer*,"");
+ BBTK_INPUT(VoiMPR,Active,"(default true) Visible true / Not visible false",bool,"");
+// BBTK_OUTPUT(VoiMPR,Out,"First output",double,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkVoiMPR_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkVoxelGrid.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkVoxelGrid.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,VoxelGrid)
+BBTK_BLACK_BOX_IMPLEMENTATION(VoxelGrid,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void VoxelGrid::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+ vtkVoxelGrid *voxelgrid = vtkVoxelGrid::New();
+ voxelgrid->SetInputData( bbGetInputImage() );
+ voxelgrid->SetConfigurationStyleToManual();
+ voxelgrid->SetDivisions( bbGetInputDivisionsX(),bbGetInputDivisionsY(),bbGetInputDivisionsZ() );
+
+// voxelgrid->SetConfigurationStyleToLeafSize();
+// voxelgrid->SetLeafSize( bbGetInputDivisionsX(),bbGetInputDivisionsY(),bbGetInputDivisionsZ() );
+
+// voxelgrid->SetConfigurationStyleToAutomatic();
+// voxelgrid->SetNumberOfPointsPerBin( bbGetInputDivisionsX() );
+ voxelgrid->Update();
+
+ bbSetOutputOut( voxelgrid->GetOutput() );
+}
+//=====
+// 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)
+//=====
+void VoxelGrid::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputImage(NULL);
+ bbSetInputDivisionsX(100);
+ bbSetInputDivisionsY(100);
+ bbSetInputDivisionsZ(100);
+
+}
+//=====
+// 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)
+//=====
+void VoxelGrid::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void VoxelGrid::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkVoxelGrid_h_INCLUDED__
+#define __bbcreaVtkVoxelGrid_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+
+#include "vtkDataObject.h"
+#include "vtkPolyData.h"
+
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT VoxelGrid
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(VoxelGrid,bbtk::AtomicBlackBox);
+//=====
+// 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(Image,vtkDataObject*);
+ BBTK_DECLARE_INPUT(DivisionsX,int);
+ BBTK_DECLARE_INPUT(DivisionsY,int);
+ BBTK_DECLARE_INPUT(DivisionsZ,int);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(VoxelGrid,bbtk::AtomicBlackBox);
+ BBTK_NAME("VoxelGrid");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(VoxelGrid,Image,"Input image",vtkDataObject*,"");
+ BBTK_INPUT(VoxelGrid,DivisionsX,"X divisions",int,"");
+ BBTK_INPUT(VoxelGrid,DivisionsY,"Y divisions",int,"");
+ BBTK_INPUT(VoxelGrid,DivisionsZ,"Z divisions",int,"");
+
+ BBTK_OUTPUT(VoxelGrid,Out,"Output vtkPolydata",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(VoxelGrid);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkVoxelGrid_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkWriteLstImages.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkMetaImageWriter.h"
+#include <vtkNIFTIImageWriter.h>
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,WriteLstImages)
+BBTK_BLACK_BOX_IMPLEMENTATION(WriteLstImages,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void WriteLstImages::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+
+printf("EED WriteLstImages::Process Start\n");
+ vtkImageData *inImg;
+ std::string txtNum;
+ int i,size=bbGetInputLstImages().size();
+ for (i=0;i<size;i++)
+ {
+printf(" EED WriteLstImages::Process i=%d\n",i );
+
+ txtNum=std::to_string(i);
+ while (txtNum.length()<=5)
+ {
+ txtNum="0"+txtNum;
+ } // while
+
+ inImg=bbGetInputLstImages()[i];
+ if (bbGetInputType()==0) // mhd
+ {
+ vtkMetaImageWriter* w = vtkMetaImageWriter::New();
+ w->SetInputData( inImg );
+ w->SetCompression( bbGetInputCompression() );
+ w->SetFileDimensionality(inImg->GetDataDimension()); // NTU
+ std::string filename = bbGetInputOutputDir()+"/"+bbGetInputFileName()+"-"+txtNum+".mhd";
+ w->SetFileName(filename.c_str());
+ w->Write();
+ w->Delete();
+ } // Type
+
+ if (bbGetInputType()==1) // NIFTI
+ {
+ vtkNIFTIImageWriter* w = vtkNIFTIImageWriter::New();
+ w->SetInputData( inImg );
+ std::string filename = bbGetInputOutputDir()+"/"+bbGetInputFileName()+"-"+txtNum+".nii";
+ w->SetFileName(filename.c_str());
+ w->Write();
+ w->Delete();
+ } // Type
+
+
+
+ } // for i
+printf("EED WriteLstImages::Process END\n");
+
+}
+//=====
+// 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)
+//=====
+void WriteLstImages::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputType(0);
+ bbSetInputCompression(false);
+ bbSetInputFileName("void");
+ bbSetInputOutputDir(".");
+}
+//=====
+// 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)
+//=====
+void WriteLstImages::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void WriteLstImages::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkWriteLstImages_h_INCLUDED__
+#define __bbcreaVtkWriteLstImages_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vector>
+#include "vtkImageData.h"
+
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT WriteLstImages
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(WriteLstImages,bbtk::AtomicBlackBox);
+//=====
+// 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(Type,int);
+ BBTK_DECLARE_INPUT(OutputDir,std::string);
+ BBTK_DECLARE_INPUT(LstImages,std::vector< vtkImageData* >);
+ BBTK_DECLARE_INPUT(FileName,std::string);
+ BBTK_DECLARE_INPUT(Compression,bool);
+// BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(WriteLstImages,bbtk::AtomicBlackBox);
+ BBTK_NAME("WriteLstImages");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(WriteLstImages,Type,"(default 0) 0:mhd 1:nii",int,"");
+ BBTK_INPUT(WriteLstImages,OutputDir,"Output directory",std::string,"");
+ BBTK_INPUT(WriteLstImages,LstImages,"Lst of images",std::vector< vtkImageData* >,"");
+ BBTK_INPUT(WriteLstImages,FileName,"File name (no extension)",std::string,"");
+ BBTK_INPUT(WriteLstImages,Compression,"(Default false) true/false just for mhd",bool,"");
+
+// BBTK_OUTPUT(WriteLstImages,Out,"First output",double,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(WriteLstImages);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkWriteLstImages_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtksave_YZ_XZ_volume.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkMetaImageReader.h"
+#include "vtkMetaImageWriter.h"
+#include "vtkImageData.h"
+#include "creaVtk_MACROS.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,save_YZ_XZ_volume)
+BBTK_BLACK_BOX_IMPLEMENTATION(save_YZ_XZ_volume,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void save_YZ_XZ_volume::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+ FILE *ff = fopen(bbGetInputFileName().c_str(),"r");
+ if (ff!=NULL)
+ {
+ fclose(ff);
+ vtkMetaImageReader *reader=vtkMetaImageReader::New();
+ reader->SetFileName(bbGetInputFileName().c_str());
+ reader->Update();
+ vtkImageData *image = reader->GetOutput();
+ int dim[3];
+ int ext[6];
+ image->GetExtent(ext);
+ dim[0] = ext[1]-ext[0]+1;
+ dim[1] = ext[3]-ext[2]+1;
+ dim[2] = ext[5]-ext[4]+1;
+ double spc[3];
+ image->GetSpacing(spc);
+
+ vtkImageData *newImageYZ = vtkImageData::New();
+ newImageYZ->Initialize();
+ newImageYZ->SetSpacing( spc[1],spc[2],spc[0] );
+ newImageYZ->SetDimensions( dim[1],dim[2], dim[0] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ newImageYZ->SetScalarType( image->GetScalarType() );
+ newImageYZ->SetNumberOfScalarComponents(1);
+ newImageYZ->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ newImageYZ->AllocateScalars( image->GetScalarType(),1 );
+#endif
+
+ vtkImageData *newImageZX = vtkImageData::New();
+ newImageZX->Initialize();
+ newImageZX->SetSpacing( spc[0],spc[2],spc[1] );
+ newImageZX->SetDimensions( dim[0],dim[2], dim[1] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ newImageZX->SetScalarType( image->GetScalarType() );
+ newImageZX->SetNumberOfScalarComponents(1);
+ newImageZX->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ newImageZX->AllocateScalars( image->GetScalarType(),1 );
+#endif
+
+ DEF_POINTER_IMAGE_VTK_CREA(imageV,imageSS,imageP,imageST,image)
+ DEF_POINTER_IMAGE_VTK_CREA(newImageYZ_V,newImageYZ_SS,newImageYZ_P,newImageYZ_ST,newImageYZ)
+ DEF_POINTER_IMAGE_VTK_CREA(newImageZX_V,newImageZX_SS,newImageZX_P,newImageZX_ST,newImageZX)
+ long int newImageYZ_index;
+ long int newImageZX_index;
+
+ int i,j,k;
+// double value;
+ for (k=0;k<dim[2];k++)
+ {
+ for (j=0;j<dim[1];j++)
+ {
+ for (i=0;i<dim[0];i++)
+ {
+// value = image->GetScalarComponentAsDouble (i,j,k,0);
+ GETVALUE_VTK_CREA(imageV,imageP,imageST)
+ imageP=imageP+imageSS;
+
+// newImageYZ->SetScalarComponentFromDouble( j , dim[2]-k-1 , i , 0 , value );
+ newImageYZ_index=j + (dim[2]-k-1)*dim[1] + i*dim[1]*dim[2];
+ SETVALUE2_VTK_CREA(imageV,newImageYZ_P,newImageYZ_ST,newImageYZ_index)
+
+// newImageZX->SetScalarComponentFromDouble( i , dim[2]-k-1 , j , 0 ,value );
+ newImageZX_index=i + (dim[2]-k-1)*dim[0] + j*dim[0]*dim[2];
+ SETVALUE2_VTK_CREA(imageV,newImageZX_P,newImageZX_ST,newImageZX_index)
+ } // for i
+ } // for j
+ } // for k
+
+ //-- Split FileName
+ std::size_t found = bbGetInputFileName().find_last_of("/\\");
+ std::string path = bbGetInputFileName().substr(0,found+1);
+ std::string filename = bbGetInputFileName().substr(found+1);
+#ifdef _WIN32
+ path=path+"YZ_ZX\\";
+#else
+ path=path+"YZ_ZX/";
+#endif
+ std::string command_mkdir = "mkdir "+path;
+ system(command_mkdir.c_str());
+ std::string newFileNameYZ = path+filename+"_YZ.mhd";
+ std::string newFileNameZX = path+filename+"_ZX.mhd";
+
+ //-- Save _YZ
+ vtkMetaImageWriter * writerYZ = vtkMetaImageWriter::New();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ writerYZ->SetInput(newImageYZ);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ writerYZ->SetInputData(newImageYZ);
+#endif
+ writerYZ->SetFileName(newFileNameYZ.c_str());
+ writerYZ->SetCompression( bbGetInputCompression() );
+ writerYZ->Write();
+
+ //-- Save _ZX
+ vtkMetaImageWriter * writerZX = vtkMetaImageWriter::New();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ writerZX->SetInput(newImageZX);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ writerZX->SetInputData(newImageZX);
+#endif
+ writerZX->SetFileName(newFileNameZX.c_str());
+ writerZX->SetCompression( bbGetInputCompression() );
+ writerZX->Write();
+
+ } else {
+ printf("EED Save-YZ-XZ-planes::Process %s Not Exist!\n", bbGetInputFileName().c_str() );
+ }
+}
+//=====
+// 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)
+//=====
+void save_YZ_XZ_volume::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputFileName("");
+ bbSetInputCompression( false );
+}
+//=====
+// 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)
+//=====
+void save_YZ_XZ_volume::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void save_YZ_XZ_volume::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtksave_YZ_XZ_volume_h_INCLUDED__
+#define __bbcreaVtksave_YZ_XZ_volume_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT save_YZ_XZ_volume
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(save_YZ_XZ_volume,bbtk::AtomicBlackBox);
+//=====
+// 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(FileName,std::string);
+ BBTK_DECLARE_INPUT(Compression,bool);
+// BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(save_YZ_XZ_volume,bbtk::AtomicBlackBox);
+ BBTK_NAME("save_YZ_XZ_volume");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(save_YZ_XZ_volume,FileName,"File name",std::string,"");
+ BBTK_INPUT(save_YZ_XZ_volume,Compression,"(default false) Compression true/false",bool,"");
+
+//BBTK_OUTPUT(save_YZ_XZ_volume,Out,"First output",double,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(save_YZ_XZ_volume);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtksave_YZ_XZ_volume_h_INCLUDED__
+
--- /dev/null
+/*=========================================================================
+
+ Program: Visualization Toolkit
+ Module: vtkHausdorffDistancePointSetFilter.cxx
+
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+ All rights reserved.
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notice for more information.
+
+=========================================================================*/
+// Copyright (c) 2011 LTSI INSERM U642
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation and/or
+// other materials provided with the distribution.
+// * Neither name of LTSI, INSERM nor the names
+// of any contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "vtkHausdorffDistancePointSetFilter.h"
+
+#include "vtkDoubleArray.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkObjectFactory.h"
+#include "vtkPointData.h"
+
+#include "vtkCellLocator.h"
+#include "vtkGenericCell.h"
+#include "vtkKdTreePointLocator.h"
+#include "vtkPointSet.h"
+#include "vtkSmartPointer.h"
+
+vtkStandardNewMacro(vtkHausdorffDistancePointSetFilter);
+
+//------------------------------------------------------------------------------
+vtkHausdorffDistancePointSetFilter::vtkHausdorffDistancePointSetFilter()
+{
+ this->RelativeDistance[0] = 0.0;
+ this->RelativeDistance[1] = 0.0;
+ this->HausdorffDistance = 0.0;
+
+ this->SetNumberOfInputPorts(2);
+ this->SetNumberOfInputConnections(0, 1);
+ this->SetNumberOfInputConnections(1, 1);
+
+ this->SetNumberOfOutputPorts(2);
+
+ this->TargetDistanceMethod = POINT_TO_POINT;
+}
+
+//------------------------------------------------------------------------------
+vtkHausdorffDistancePointSetFilter::~vtkHausdorffDistancePointSetFilter() = default;
+
+//------------------------------------------------------------------------------
+int vtkHausdorffDistancePointSetFilter::RequestData(vtkInformation* vtkNotUsed(request),
+ vtkInformationVector** inputVector, vtkInformationVector* outputVector)
+{
+ // Get the info objects
+ vtkInformation* inInfoA = inputVector[0]->GetInformationObject(0);
+ vtkInformation* inInfoB = inputVector[1]->GetInformationObject(0);
+ vtkInformation* outInfoA = outputVector->GetInformationObject(0);
+ vtkInformation* outInfoB = outputVector->GetInformationObject(1);
+
+ if (inInfoA == nullptr || inInfoB == nullptr)
+ {
+ return 0;
+ }
+
+ // Get the input
+ vtkPointSet* inputA = vtkPointSet::SafeDownCast(inInfoA->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPointSet* inputB = vtkPointSet::SafeDownCast(inInfoB->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPointSet* outputA = vtkPointSet::SafeDownCast(outInfoA->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPointSet* outputB = vtkPointSet::SafeDownCast(outInfoB->Get(vtkDataObject::DATA_OBJECT()));
+
+ if (inputA->GetNumberOfPoints() == 0 || inputB->GetNumberOfPoints() == 0)
+ {
+ return 0;
+ }
+
+ // Re-initialize the distances
+ this->RelativeDistance[0] = 0.0;
+ this->RelativeDistance[1] = 0.0;
+ this->HausdorffDistance = 0.0;
+
+ // TODO: using vtkStaticCellLocator, vtkStaticPointLocator is going to be much faster.
+ // Need to investigate and replace if appropriate.
+ vtkSmartPointer<vtkKdTreePointLocator> pointLocatorA =
+ vtkSmartPointer<vtkKdTreePointLocator>::New();
+ vtkSmartPointer<vtkKdTreePointLocator> pointLocatorB =
+ vtkSmartPointer<vtkKdTreePointLocator>::New();
+
+ vtkSmartPointer<vtkCellLocator> cellLocatorA = vtkSmartPointer<vtkCellLocator>::New();
+ vtkSmartPointer<vtkCellLocator> cellLocatorB = vtkSmartPointer<vtkCellLocator>::New();
+
+ if (this->TargetDistanceMethod == POINT_TO_POINT)
+ {
+ pointLocatorA->SetDataSet(inputA);
+ pointLocatorA->BuildLocator();
+ pointLocatorB->SetDataSet(inputB);
+ pointLocatorB->BuildLocator();
+ }
+ else
+ {
+ cellLocatorA->SetDataSet(inputA);
+ cellLocatorA->BuildLocator();
+ cellLocatorB->SetDataSet(inputB);
+ cellLocatorB->BuildLocator();
+ }
+
+ double dist;
+ double currentPoint[3];
+ double closestPoint[3];
+ vtkIdType cellId;
+ vtkSmartPointer<vtkGenericCell> cell = vtkSmartPointer<vtkGenericCell>::New();
+ int subId;
+
+ vtkSmartPointer<vtkDoubleArray> distanceAToB = vtkSmartPointer<vtkDoubleArray>::New();
+ distanceAToB->SetNumberOfComponents(1);
+ distanceAToB->SetNumberOfTuples(inputA->GetNumberOfPoints());
+ distanceAToB->SetName("Distance");
+
+ vtkSmartPointer<vtkDoubleArray> distanceBToA = vtkSmartPointer<vtkDoubleArray>::New();
+ distanceBToA->SetNumberOfComponents(1);
+ distanceBToA->SetNumberOfTuples(inputB->GetNumberOfPoints());
+ distanceBToA->SetName("Distance");
+
+ // Find the nearest neighbors to each point and add edges between them,
+ // if they do not already exist and they are not self loops
+ for (int i = 0; i < inputA->GetNumberOfPoints(); i++)
+ {
+ inputA->GetPoint(i, currentPoint);
+ if (this->TargetDistanceMethod == POINT_TO_POINT)
+ {
+ vtkIdType closestPointId = pointLocatorB->FindClosestPoint(currentPoint);
+ inputB->GetPoint(closestPointId, closestPoint);
+ }
+ else
+ {
+ cellLocatorB->FindClosestPoint(currentPoint, closestPoint, cell, cellId, subId, dist);
+ }
+
+ dist = std::sqrt(std::pow(currentPoint[0] - closestPoint[0], 2) +
+ std::pow(currentPoint[1] - closestPoint[1], 2) +
+ std::pow(currentPoint[2] - closestPoint[2], 2));
+ distanceAToB->SetValue(i, dist);
+
+ if (dist > this->RelativeDistance[0])
+ {
+ this->RelativeDistance[0] = dist;
+ }
+ }
+
+ for (int i = 0; i < inputB->GetNumberOfPoints(); i++)
+ {
+ inputB->GetPoint(i, currentPoint);
+ if (this->TargetDistanceMethod == POINT_TO_POINT)
+ {
+ vtkIdType closestPointId = pointLocatorA->FindClosestPoint(currentPoint);
+ inputA->GetPoint(closestPointId, closestPoint);
+ }
+ else
+ {
+ cellLocatorA->FindClosestPoint(currentPoint, closestPoint, cell, cellId, subId, dist);
+ }
+
+ dist = std::sqrt(std::pow(currentPoint[0] - closestPoint[0], 2) +
+ std::pow(currentPoint[1] - closestPoint[1], 2) +
+ std::pow(currentPoint[2] - closestPoint[2], 2));
+ distanceBToA->SetValue(i, dist);
+
+ if (dist > this->RelativeDistance[1])
+ {
+ this->RelativeDistance[1] = dist;
+ }
+ }
+
+ if (this->RelativeDistance[0] >= RelativeDistance[1])
+ {
+ this->HausdorffDistance = this->RelativeDistance[0];
+ }
+ else
+ {
+ this->HausdorffDistance = this->RelativeDistance[1];
+ }
+
+ vtkSmartPointer<vtkDoubleArray> relativeDistanceAtoB = vtkSmartPointer<vtkDoubleArray>::New();
+ relativeDistanceAtoB->SetNumberOfComponents(1);
+ relativeDistanceAtoB->SetName("RelativeDistanceAtoB");
+ relativeDistanceAtoB->InsertNextValue(RelativeDistance[0]);
+
+ vtkSmartPointer<vtkDoubleArray> relativeDistanceBtoA = vtkSmartPointer<vtkDoubleArray>::New();
+ relativeDistanceBtoA->SetNumberOfComponents(1);
+ relativeDistanceBtoA->SetName("RelativeDistanceBtoA");
+ relativeDistanceBtoA->InsertNextValue(RelativeDistance[1]);
+
+ vtkSmartPointer<vtkDoubleArray> hausdorffDistanceFieldDataA =
+ vtkSmartPointer<vtkDoubleArray>::New();
+ hausdorffDistanceFieldDataA->SetNumberOfComponents(1);
+ hausdorffDistanceFieldDataA->SetName("HausdorffDistance");
+ hausdorffDistanceFieldDataA->InsertNextValue(HausdorffDistance);
+
+ vtkSmartPointer<vtkDoubleArray> hausdorffDistanceFieldDataB =
+ vtkSmartPointer<vtkDoubleArray>::New();
+ hausdorffDistanceFieldDataB->SetNumberOfComponents(1);
+ hausdorffDistanceFieldDataB->SetName("HausdorffDistance");
+ hausdorffDistanceFieldDataB->InsertNextValue(HausdorffDistance);
+
+ outputA->DeepCopy(inputA);
+ outputA->GetPointData()->AddArray(distanceAToB);
+ outputA->GetFieldData()->AddArray(relativeDistanceAtoB);
+ outputA->GetFieldData()->AddArray(hausdorffDistanceFieldDataA);
+
+ outputB->DeepCopy(inputB);
+ outputB->GetPointData()->AddArray(distanceBToA);
+ outputB->GetFieldData()->AddArray(relativeDistanceBtoA);
+ outputB->GetFieldData()->AddArray(hausdorffDistanceFieldDataB);
+
+ return 1;
+}
+
+//------------------------------------------------------------------------------
+int vtkHausdorffDistancePointSetFilter::FillInputPortInformation(int port, vtkInformation* info)
+{
+ // The input should be two vtkPointsSets
+ if (port == 0)
+ {
+ info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPointSet");
+ return 1;
+ }
+ if (port == 1)
+ {
+ info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPointSet");
+ return 1;
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void vtkHausdorffDistancePointSetFilter::PrintSelf(ostream& os, vtkIndent indent)
+{
+ this->Superclass::PrintSelf(os, indent);
+ os << indent << "HausdorffDistance: " << this->GetHausdorffDistance() << "\n";
+ os << indent << "RelativeDistance: " << this->GetRelativeDistance()[0] << ", "
+ << this->GetRelativeDistance()[1] << "\n";
+ os << indent << "TargetDistanceMethod: " << this->GetTargetDistanceMethodAsString() << "\n";
+}
+
--- /dev/null
+/*=========================================================================
+
+ Program: Visualization Toolkit
+ Module: vtkHausdorffDistancePointSetFilter.h
+
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+ All rights reserved.
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notice for more information.
+
+=========================================================================*/
+// Copyright (c) 2011 LTSI INSERM U642
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation and/or
+// other materials provided with the distribution.
+// * Neither name of LTSI, INSERM nor the names
+// of any contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/** @class vtkHausdorffDistancePointSetFilter
+ * @brief Compute Hausdorff distance between two point sets
+ *
+ * This class computes the relative and hausdorff distances from two point
+ * sets (input port 0 and input port 1). If no topology is specified (ie.
+ * vtkPointSet or vtkPolyData without vtkPolys), the distances are
+ * computed between point location. If polys exist (ie triangulation),
+ * the TargetDistanceMethod allows for an interpolation of the cells to
+ * ensure a better minimal distance exploration.
+ *
+ * The outputs (port 0 and 1) have the same geometry and topology as its
+ * respective input port. Two FieldData arrays are added : HausdorffDistance
+ * and RelativeDistance. The former is equal on both outputs whereas the
+ * latter may differ. A PointData containing the specific point minimal
+ * distance is also added to both outputs.
+ *
+ * @author Frederic Commandeur
+ * @author Jerome Velut
+ * @author LTSI
+ *
+ * @see https://www.vtkjournal.org/browse/publication/839
+ */
+
+#ifndef vtkHausdorffDistancePointSetFilter_h
+#define vtkHausdorffDistancePointSetFilter_h
+
+#include "vtkFiltersModelingModule.h" // For export macro
+#include "vtkPointSetAlgorithm.h"
+
+class /*VTKFILTERSMODELING_EXPORT */ vtkHausdorffDistancePointSetFilter : public vtkPointSetAlgorithm
+{
+public:
+ ///@{
+ /**
+ * Standard methods for construction, type and printing.
+ */
+ static vtkHausdorffDistancePointSetFilter* New();
+ vtkTypeMacro(vtkHausdorffDistancePointSetFilter, vtkPointSetAlgorithm);
+ void PrintSelf(ostream& os, vtkIndent indent) override;
+ ///@}
+
+ ///@{
+ /**
+ * Get the Relative Distance from A to B and B to A.
+ */
+ vtkGetVector2Macro(RelativeDistance, double);
+ ///@}
+
+ ///@{
+ /**
+ * Get the Hausdorff Distance.
+ */
+ vtkGetMacro(HausdorffDistance, double);
+ ///@}
+
+ enum DistanceMethod
+ {
+ POINT_TO_POINT,
+ POINT_TO_CELL
+ };
+
+ ///@{
+ /**
+ * Specify the strategy for computing the distance. If no topology is specified (ie.
+ * vtkPointSet or vtkPolyData without vtkPolys), the distances are
+ * computed between point location. If polys exist (i.e. triangulation),
+ * the TargetDistanceMethod allows for an interpolation of the cells to
+ * ensure a better minimal distance exploration.
+ *
+ */
+ vtkSetMacro(TargetDistanceMethod, int);
+ vtkGetMacro(TargetDistanceMethod, int);
+ void SetTargetDistanceMethodToPointToPoint() { this->SetTargetDistanceMethod(POINT_TO_POINT); }
+ void SetTargetDistanceMethodToPointToCell() { this->SetTargetDistanceMethod(POINT_TO_CELL); }
+ const char* GetTargetDistanceMethodAsString();
+ ///@}
+
+protected:
+ vtkHausdorffDistancePointSetFilter();
+ ~vtkHausdorffDistancePointSetFilter() override;
+
+ int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
+ int FillInputPortInformation(int port, vtkInformation* info) override;
+
+ int TargetDistanceMethod; //!< point-to-point if 0, point-to-cell if 1
+ double RelativeDistance[2]; //!< relative distance between inputs
+ double HausdorffDistance; //!< hausdorff distance (max(relative distance))
+
+private:
+ vtkHausdorffDistancePointSetFilter(const vtkHausdorffDistancePointSetFilter&) = delete;
+ void operator=(const vtkHausdorffDistancePointSetFilter&) = delete;
+};
+inline const char* vtkHausdorffDistancePointSetFilter::GetTargetDistanceMethodAsString()
+{
+ if (this->TargetDistanceMethod == POINT_TO_POINT)
+ {
+ return "PointToPoint";
+ }
+ else
+ {
+ return "PointToCell";
+ }
+}
+#endif
+
vtkImageDataStrucPoints::vtkImageDataStrucPoints()
{
+ _structuredPoints=NULL;
}
vtkImageDataStrucPoints::~vtkImageDataStrucPoints()
{
}
-void vtkImageDataStrucPoints::joinComponents(vtkImageData* imageX, vtkImageData* imageY, vtkImageData* imageZ)
-{
- int ext[6];
- imageY->Modified();
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- imageY->Update();
- imageY->GetWholeExtent(ext);
-#else
- imageY->GetExtent(ext);
-#endif
- int dim[3];
- double spc[3];
- dim[0]=ext[1]-ext[0]+1;
- dim[1]=ext[3]-ext[2]+1;
- dim[2]=ext[5]-ext[4]+1;
- std::cout<<"dim "<< dim[0] <<" "<< dim[1] <<" "<< dim[2] <<std::endl;
-
- imageY->GetSpacing(spc);
-
-
- double *ptrX = (double *)imageX->GetScalarPointer();
- double *ptrY = (double *)imageY->GetScalarPointer();
- double *ptrZ = (double *)imageZ->GetScalarPointer();
-
- long int sizeimage = dim[0]*dim[1]*dim[2];
-
- vtkDoubleArray *array = vtkDoubleArray::New();
- array->SetNumberOfTuples(sizeimage);
- array->SetNumberOfComponents(3);
- array->Allocate(sizeimage*3, 100 ); // ???
- array->SetName("velocity");
-
- double vx;
- double vy;
- double vz;
-
- int i;
-
-printf("EED vtkImageDataStrucPoints::joinComponents sizeimage %d\n", sizeimage );
- for( i = 0 ; i < sizeimage ; i++ )
- {
- vx = *ptrX;
- vy = *ptrY;
- vz = *ptrZ;
- ptrX++;
- ptrY++;
- ptrZ++;
- array->SetTuple3(i,vx, vy , vz );
- } // for i
-
- _structuredPoints = vtkStructuredPoints::New();
- _structuredPoints->SetDimensions(dim[0], dim[1], dim[2]);
- _structuredPoints->SetSpacing(spc);
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- _structuredPoints->SetScalarTypeToDouble();
- _structuredPoints->SetNumberOfScalarComponents(3);
-#else
- vtkInformation* info=_structuredPoints->GetInformation();
- vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_DOUBLE, 3);
-
-#endif
-
- _structuredPoints->GetPointData()->SetVectors(array);
- _structuredPoints->GetPointData()->SetNumberOfTuples(sizeimage);
- _structuredPoints->Modified();
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- _structuredPoints->Update();
-#else
- //...
-#endif
-
-/*
- _structuredPoints->Print(cout);
- vtkStructuredPointsWriter *writer2 = vtkStructuredPointsWriter::New();
- writer2->SetFileName("/home/davila/tmp/VectorfromCal_EED_ups.vtk");
- //writer->SetFileTypeToBinary();
- writer2->SetFileTypeToASCII();
- writer2->SetTensorsName("VectorfromCal");
- writer2->SetFieldDataName("GlyphVector");
- writer2->SetScalarsName("Scalar");
- writer2->SetInput(_structuredPoints);
- writer2->Write();
-*/
-
-
+void vtkImageDataStrucPoints::joinComponents(vtkImageData* imageX, vtkImageData* imageY, vtkImageData* imageZ,
+ vtkImageData* Data1, vtkImageData* Data2, vtkImageData* Data3 ,
+ vtkImageData* Data4, vtkImageData* Data5, vtkImageData* Data6 )
+{
+ if ((imageX!=NULL) && (imageY!=NULL) && (imageZ!=NULL) )
+ {
+ int ext[6];
+ imageY->Modified();
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ imageY->Update();
+ imageY->GetWholeExtent(ext);
+ #else
+ imageY->GetExtent(ext);
+ #endif
+ int dim[3];
+ double spc[3];
+ dim[0]=ext[1]-ext[0]+1;
+ dim[1]=ext[3]-ext[2]+1;
+ dim[2]=ext[5]-ext[4]+1;
+ imageY->GetSpacing(spc);
+ double *ptrX=NULL, *ptrY=NULL, *ptrZ=NULL;
+ double *ptrD1=NULL, *ptrD2=NULL, *ptrD3=NULL, *ptrD4=NULL, *ptrD5=NULL, *ptrD6=NULL;
+ if (imageX!=NULL) ptrX = (double *)imageX->GetScalarPointer();
+ if (imageY!=NULL) ptrY = (double *)imageY->GetScalarPointer();
+ if (imageZ!=NULL) ptrZ = (double *)imageZ->GetScalarPointer();
+ if (Data1 !=NULL) ptrD1 = (double *)Data1->GetScalarPointer();
+ if (Data2 !=NULL) ptrD2 = (double *)Data2->GetScalarPointer();
+ if (Data3 !=NULL) ptrD3 = (double *)Data3->GetScalarPointer();
+ if (Data4 !=NULL) ptrD4 = (double *)Data4->GetScalarPointer();
+ if (Data5 !=NULL) ptrD5 = (double *)Data5->GetScalarPointer();
+ if (Data6 !=NULL) ptrD6 = (double *)Data6->GetScalarPointer();
+ long int sizeimage = dim[0]*dim[1]*dim[2];
+ int components=3;
+ // if ((Data1!=NULL) && (Data2==NULL) && (Data3==NULL) && (Data4==NULL) && (Data5==NULL) && (Data6==NULL) ) { components=4; }
+ // if ((Data1!=NULL) && (Data2!=NULL) && (Data3!=NULL) && (Data4==NULL) && (Data5==NULL) && (Data6==NULL) ) { components=6; }
+ // if ((Data1!=NULL) && (Data2!=NULL) && (Data3!=NULL) && (Data4!=NULL) && (Data5!=NULL) && (Data6!=NULL) ) { components=9; }
+ vtkDoubleArray *array = vtkDoubleArray::New();
+ array->SetNumberOfTuples(sizeimage);
+ array->SetNumberOfComponents(components);
+ array->Allocate(sizeimage*components, 100 ); // ???
+ array->SetName("velocity");
+
+ vtkDoubleArray *array2 = vtkDoubleArray::New();
+ array2->SetNumberOfTuples(sizeimage);
+ array2->SetNumberOfComponents(1);
+ array2->Allocate(sizeimage*1, 100 ); // ???
+ array2->SetName("angle");
+ printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+ printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+ printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+ printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+ printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+ printf("EED Warnning .... vtkImageDataStrucPoints::joinComponents Limpiar este codigo ........ \n");
+ double vx,vy,vz,d1=0,d2=0,d3=0,d4=0,d5=0,d6=0;
+ int i;
+ for( i = 0 ; i < sizeimage ; i++ )
+ {
+ if (ptrX !=NULL) { vx = *ptrX; ptrX++; } else { vx=0; }
+ if (ptrY !=NULL) { vy = *ptrY; ptrY++; } else { vy=0; }
+ if (ptrZ !=NULL) { vz = *ptrZ; ptrZ++; } else { vz=0; }
+ if (ptrD1!=NULL) { d1 = *ptrD1; ptrD1++;}
+ if (ptrD2!=NULL) { d2 = *ptrD2; ptrD2++;}
+ if (ptrD3!=NULL) { d3 = *ptrD3; ptrD3++;}
+ if (ptrD4!=NULL) { d4 = *ptrD4; ptrD4++;}
+
+ if (components==3) { array->SetTuple3(i,vx,vy,vz); }
+ if (components==3) { array2->SetTuple1(i,d1); }
+ // if (components==4) { array->SetTuple4(i,vx,vy,vz,d1); }
+ // if (components==6) { array->SetTuple6(i,vx,vy,vz,d1,d2,d3); }
+ // if (components==9) { array->SetTuple9(i,vx,vy,vz,d1,d2,d3,d4,d5,d6); }
+ } // for i
+
+ _structuredPoints = vtkStructuredPoints::New();
+ _structuredPoints->SetDimensions(dim[0], dim[1], dim[2]);
+ _structuredPoints->SetSpacing(spc);
+
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ _structuredPoints->SetScalarTypeToDouble();
+ _structuredPoints->SetNumberOfScalarComponents(3);
+ #else
+ vtkInformation* info=_structuredPoints->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_DOUBLE, 3);
+
+ #endif
+
+ _structuredPoints->GetPointData()->SetVectors(array);
+ _structuredPoints->GetPointData()->AddArray(array2);
+ _structuredPoints->GetPointData()->SetNumberOfTuples(sizeimage);
+ _structuredPoints->Modified();
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ _structuredPoints->Update();
+ #else
+ //...
+ #endif
+
+ /*
+ _structuredPoints->Print(cout);
+ vtkStructuredPointsWriter *writer2 = vtkStructuredPointsWriter::New();
+ writer2->SetFileName("/home/davila/tmp/VectorfromCal_EED_ups.vtk");
+ //writer->SetFileTypeToBinary();
+ writer2->SetFileTypeToASCII();
+ writer2->SetTensorsName("VectorfromCal");
+ writer2->SetFieldDataName("GlyphVector");
+ writer2->SetScalarsName("Scalar");
+ writer2->SetInput(_structuredPoints);
+ writer2->Write();
+ */
+
+ } else {
+ printf("EED Warnning! vtkImageDataStrucPoints::joinComponents imageX or image Y or image Z is EMPTY\n");
+ _structuredPoints=NULL;
+ } // imageX imageY imageZ
}
vtkStructuredPoints* vtkImageDataStrucPoints::getStructuredPoints()
public :
vtkImageDataStrucPoints();
~vtkImageDataStrucPoints();
- void joinComponents(vtkImageData* imageX, vtkImageData* imageY, vtkImageData* imageZ);
+ void joinComponents(vtkImageData* imageX, vtkImageData* imageY, vtkImageData* imageZ,
+ vtkImageData* Data1, vtkImageData* Data2, vtkImageData* Data3,
+ vtkImageData* Data4 , vtkImageData* Data5 , vtkImageData* Data6 );
vtkStructuredPoints* getStructuredPoints();
vtkStructuredPoints* _structuredPoints;
ss = vtkSphereSource::New();
superquadratic = vtkSuperquadricSource::New();
cs = vtkCubeSource::New();
- tg = vtkTensorGlyph::New();
+
+ tg = NULL;
+
pdn = vtkPolyDataNormals::New();
pd = vtkPolyData::New();
pod = vtkPointData::New();
{
if(GetTypeForm()==2) // source superquadratic
{
+ if (tg==NULL) { tg = vtkTensorGlyph::New(); }
+
superquadratic->SetThetaResolution(20);
superquadratic->SetPhiResolution(20);
#if VTK_MAJOR_VERSION <= 5
int inIncr, int outFormat)
{
double tmp,sum;
-// double *mag;
int i, j;
double dirx,diry,dirz;
-
-
-inIncr=3;
- printf("EED length %d %p\n", length,input);
-// mag = new double[length];
+ double angle;
for (i = 0; i < length; ++i)
{
- dirx = 0;
- diry = 0;
- dirz = 0;
- sum = 0;
- for (j = 0; j < inIncr; ++j)
- {
- if (j==0) dirx= static_cast<T>(*input);
- if (j==1) diry= static_cast<T>(*input);
- if (j==2) dirz= static_cast<T>(*input);
- tmp = static_cast<T>(*input);
- sum += (tmp * tmp);
- ++input;
- }
- sum=sqrt(sum);
- *output++ = (unsigned char) abs( (255*dirx/sum) );
- *output++ = (unsigned char) abs( (255*diry/sum) );
- *output++ = (unsigned char) abs( (255*dirz/sum) );
- *output++ = 255;
-// printf("%d %d %d ",(int)(255*dirx/sum),(int)(255*diry/sum),(int)(255*dirz/sum));
-// printf(" C %d %f %f %f \n",inIncr,dirx,diry,dirz);
- }
-
-// vtkLookupTableMapData(self, mag, output, length, 1, outFormat);
-
-// delete [] mag;
+ dirx = static_cast<T>(input[0]);
+ diry = static_cast<T>(input[1]);
+ dirz = static_cast<T>(input[2]);
+ input = input+inIncr;
+ sum = sqrt( dirx*dirx + diry*diry + dirz*dirz );
+ *output++ = (unsigned char) abs( (255*dirx/sum) );
+ *output++ = (unsigned char) abs( (255*diry/sum) );
+ *output++ = (unsigned char) abs( (255*dirz/sum) );
+ *output++ = 255;
+ // printf("%d %d %d ",(int)(255*dirx/sum),(int)(255*diry/sum),(int)(255*dirz/sum));
+ // printf(" C %d %f %f %f \n",inIncr,dirx,diry,dirz);
+
+ } // for
}
int inputIncrement,
int outputFormat)
{
- printf("vtkLookupTableEED::MapScalarsThroughTable2 inputIncrement=%d inputDataType=%d\n",inputIncrement,inputDataType);
// if (this->UseMagnitude && inputIncrement > 1)
// {
switch (inputDataType)
_dataobject = NULL;
_renderer = NULL;
_typeForm = 0;
+ _orientation = 0;
- _LutEED = vtkLookupTableDirectionVector::New();
+ _LutEED = vtkLookupTableDirectionVector::New();
+ _externalLut = NULL;
//_LutEED->SetVectorMode(0);
//_LutEED->SetVectorModeToMagnitude();
//_LutEED->SetVectorModeToComponent();
//------------------------------------------------------------------------------
void vtkVectorsTensorsVisuBase::VisibilityActor()
{
-
if ( (_active==true) && (_actorAdded==false) ){
if (GetRenderer()!=NULL)
{
}
}
+//------------------------------------------------------------------------------
+void vtkVectorsTensorsVisuBase::SetOrientation(int orientation)
+{
+ _orientation = orientation;
+}
+
+//------------------------------------------------------------------------------
+int vtkVectorsTensorsVisuBase::GetOrientation()
+{
+ return _orientation;
+}
+
+//------------------------------------------------------------------------------
+void vtkVectorsTensorsVisuBase::SetExternalLut(vtkScalarsToColors* lut)
+{
+ _externalLut=lut;
+}
void SetTypeForm(int);
void SetColorLaw(int);
void SetColor(std::vector<double>);
+ void SetOrientation(int orientation);
+ void SetExternalLut(vtkScalarsToColors* lut);
bool GetActive();
vtkDataObject* GetDataObject();
double GetOpacity();
vtkProp3D* GetProp3D();
int GetTypeForm();
+ int GetOrientation();
virtual void Process();
void VisibilityActor();
vtkDataObject *_dataobject;
vtkRenderer *_renderer;
int _typeForm;
+ int _orientation;
protected:
bool _firsttime;
vtkSmartPointer<vtkPolyDataMapper> _pdm;
vtkSmartPointer<vtkActor> _actor;
vtkLookupTableDirectionVector *_LutEED;
+ vtkScalarsToColors *_externalLut; // lookuptable
+
int _colorlaw;
double _colorR,_colorG,_colorB;
};
//Borrame
#include "vtkPointData.h"
+#include "vtkArrayData.h"
+#include "vtkDataObject.h"
+#include <vtkPointData.h>
+#include <vtkAppendPolyData.h>
//------------------------------------------------------------------------------
vtkVectorsVisu::vtkVectorsVisu()
:vtkVectorsTensorsVisuBase()
{
- _vtkarrowsource = vtkArrowSource::New();
- _vtkglyph = vtkGlyph3D::New();
- _vtklinesource = vtkLineSource::New();
+ _vtkarrowsource = vtkArrowSource::New();
+ _vtkglyph = NULL;
+ _vtklineGlyphPolyData = NULL;
+ _trans = vtkTransform ::New();
+ double sizeCross = 0.05;
+
double point1[3];
double point2[3];
- point1[0]=1;
- point1[1]=0;
- point1[2]=0;
- point2[0]=-1;
- point2[1]=0;
- point2[2]=0;
- _vtklinesource->SetPoint1( point1 );
- _vtklinesource->SetPoint2( point2 );
+
+ point1[0] = 1;
+ point1[1] = 0;
+ point1[2] = 0;
+ point2[0] = -1;
+ point2[1] = 0;
+ point2[2] = 0;
+ vtkLineSource *vtklinesource1 = vtkLineSource ::New();
+ vtklinesource1->SetPoint1( point1 );
+ vtklinesource1->SetPoint2( point2 );
+ vtklinesource1->Update();
+
+ point1[0] = 0;
+ point1[1] = sizeCross;
+ point1[2] = 0;
+ point2[0] = 0;
+ point2[1] = -sizeCross;
+ point2[2] = 0;
+ vtkLineSource *vtklinesource2 = vtkLineSource ::New();
+ vtklinesource2->SetPoint1( point1 );
+ vtklinesource2->SetPoint2( point2 );
+ vtklinesource2->Update();
+
+ point1[0] = 0;
+ point1[1] = 0;
+ point1[2] = sizeCross;
+ point2[0] = 0;
+ point2[1] = 0;
+ point2[2] = -sizeCross;
+ vtkLineSource *vtklinesource3 = vtkLineSource ::New();
+ vtklinesource3->SetPoint1( point1 );
+ vtklinesource3->SetPoint2( point2 );
+ vtklinesource3->Update();
+
+
+ vtkAppendPolyData *appendPolyData = vtkAppendPolyData::New();
+ appendPolyData->AddInputData( vtklinesource1->GetOutput() );
+ appendPolyData->AddInputData( vtklinesource2->GetOutput() );
+ appendPolyData->AddInputData( vtklinesource3->GetOutput() );
+ appendPolyData->Update();
+ _vtklineGlyphPolyData = appendPolyData->GetOutput();
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void vtkVectorsVisu::Process()
{
+ if (_vtkglyph==NULL)
+ {
+ if (GetOrientation()==-1)
+ {
+ _vtkglyph = vtkGlyph3D::New();
+ } // _orientation
+ if ((GetOrientation()>=0) && (GetOrientation()<=2))
+ {
+ _vtkglyph = vtkGlyph3D::New();
+// _vtkglyph = vtkGlyph2D::New();
+ } // _orientation
+ } // _vtkglyph NULL
+
+
if(_active==true)
{
-#if VTK_MAJOR_VERSION <= 5
- _vtkglyph->SetInput( GetDataObject() );
-#else
- _vtkglyph->SetInputData( GetDataObject() );
-#endif
- if(GetTypeForm()==1) // source Arrow
+
+ if (GetDataObject()!=NULL)
+ {
+ #if VTK_MAJOR_VERSION <= 5
+ _vtkglyph->SetInput( GetDataObject() );
+ #else
+ _vtkglyph->SetInputData( GetDataObject() );
+ #endif
+ if(GetTypeForm()==1) // source Arrow
+ {
+ #if VTK_MAJOR_VERSION <= 5
+ _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
+ #else
+ _vtkarrowsource->Update();
+ _vtkglyph->SetSourceData( _vtkarrowsource->GetOutput() );
+ #endif
+ } else { // source Line
+ #if VTK_MAJOR_VERSION <= 5
+ _vtkglyph->SetSource( _vtklineGlyphPolyData );
+ #else
+ _vtkglyph->SetSourceData( _vtklineGlyphPolyData );
+ #endif
+ }
+ _vtkglyph->SetScaleModeToScaleByVector();
+
+
+ if (_externalLut==NULL)
{
-#if VTK_MAJOR_VERSION <= 5
- _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
-#else
- _vtkarrowsource->Update();
- _vtkglyph->SetSourceData( _vtkarrowsource->GetOutput() );
-#endif
- } else { // source Line
-#if VTK_MAJOR_VERSION <= 5
- _vtkglyph->SetSource( _vtklinesource->GetOutput() );
-#else
- _vtklinesource->Update();
- _vtkglyph->SetSourceData( _vtklinesource->GetOutput() );
-#endif
- }
- _vtkglyph->SetScaleModeToScaleByVector();
- _vtkglyph->SetColorModeToColorByVector();
- _vtkglyph->SetScaleFactor( GetScaleFactor() );
- _vtkglyph->Update();
+ _vtkglyph->SetColorModeToColorByVector();
+ } else {
+ _vtkglyph->SetColorModeToColorByScalar();
+ } // if _externalLut
-#if VTK_MAJOR_VERSION <= 5
- _pdm->SetInput( _vtkglyph->GetOutput());
-#else
- _pdm->SetInputData( _vtkglyph->GetOutput());
-#endif
+ _vtkglyph->SetScaleFactor( GetScaleFactor() );
+ _vtkglyph->Update();
-vtkPointData *data = _vtkglyph->GetOutput()->GetPointData();
-//printf("EED -------------------------------------------\n");
-//_vtkglyph->GetOutput()->Print(std::cout);
-//printf("EED -------------------------------------------\n");
-//data->Print(std::cout);
-int i,sizeDa = data->GetNumberOfArrays();
-for (i=0;i<sizeDa;i++)
-{
- data->GetArray(i)->Print(std::cout);
-}
+ #if VTK_MAJOR_VERSION <= 5
+ _pdm->SetInput( _vtkglyph->GetOutput());
+ #else
+ _pdm->SetInputData( _vtkglyph->GetOutput());
+ #endif
+
+ vtkPointData *data = _vtkglyph->GetOutput()->GetPointData();
+ //printf("EED -------------------------------------------\n");
+ //_vtkglyph->GetOutput()->Print(std::cout);
+ //printf("EED -------------------------------------------\n");
+ //data->Print(std::cout);
+ //int i,sizeDa = data->GetNumberOfArrays();
+ //for (i=0;i<sizeDa;i++)
+ //{
+ // data->GetArray(i)->Print(std::cout);
+ //}
+
+ if (_externalLut==NULL)
+ {
+ _pdm->ScalarVisibilityOn();
+ _pdm->SetColorModeToMapScalars();
+ // _pdm->SetColorModeToDefault();
+ // _pdm->SetColorModeToDirectScalars(); // NOT compile
+ _pdm->SetScalarModeToUsePointFieldData();
+ // _pdm->ImmediateModeRenderingOn(); // obsolete
+ _LutEED->SetVectorModeToComponent();
+ //_LutEED->SetVectorModeToRGBColors();
+ //_LutEED->SetVectorModeToMagnitud();
+ // _pdm->SetScalarModeToUsePointFieldData();
+ _pdm->SetLookupTable( _LutEED );
+ _pdm->SelectColorArray( "GlyphVector" );
+ } else {
+ data->SetActiveScalars("angle");
+
+ _pdm->ScalarVisibilityOn();
+ double scalarRange[2];
+ scalarRange[0]=0;
+ scalarRange[1]=40;
+ printf("EED warnnning ..... vtkVectorsVisu::Process clean scalar Range ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process clean scalar Range ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process clean scalar Range ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process clean scalar Range ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process clean scalar Range ......\n");
+ _pdm->SetScalarRange(scalarRange);
+ _pdm->SetColorModeToMapScalars();
+ // _pdm->SetColorModeToDefault();
+ // _pdm->SetColorModeToDirectScalars(); // NOT compile
+ // _pdm->SetScalarModeToUsePointFieldData();
+// _pdm->ImmediateModeRenderingOn(); // obsolete
+ _pdm->SetLookupTable( _externalLut );
+ _pdm->SelectColorArray( "angle" );
+ } // if _externalLut
+
+ printf("EED warnnning ..... vtkVectorsVisu::Process Clean angle ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process Clean angle ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process Clean angle ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process Clean angle ......\n");
+ printf("EED warnnning ..... vtkVectorsVisu::Process Clean angle ......\n");
+
+ /*
+ _vtkglyph->Update();
+ vtkPointData *pointdata=_vtkglyph->GetOutput()->GetPointData();
+ int i,size=pointdata->GetNumberOfArrays();
+ for (i=0;i<size;i++)
+ {
+ vtkDataArray *array=pointdata->GetArray(i);
+ printf(" vtkVectorsVisu::Process array name %d:<%s> size:%d\n", i, array->GetName(), array->GetSize() );
+ }
+ */
+
+
+ // vSliceMapperVec->SetLookupTable( vGreenToRedLut );
+ // vSliceMapperVec->SetColorModeToMapScalars();
+
+ #if VTK_MAJOR_VERSION <= 5
+ // ..
+ #else
+ _pdm->Update();
+ #endif
+
+ // Orientation -1 3D OK
+
+ // Orientation 0 2D yz
+ if (GetOrientation()==0)
+ {
+ _trans->Identity();
+ _trans->Translate(900,0,0);
+ _actor->SetUserTransform(_trans);
+ }
+ // Orientation 1 2D xz
+ if (GetOrientation()==1)
+ {
+ _trans->Identity();
+ _trans->Translate(0,-900,0);
+ _actor->SetUserTransform(_trans);
+ }
+ // Orientation 2 2D xy
+ if (GetOrientation()==2)
+ {
+ _trans->Identity();
+ _trans->Translate(0,0,-900);
+ _actor->SetUserTransform(_trans);
+ }
+
+ _actor->SetMapper( _pdm );
+ _actor->GetProperty()->SetOpacity( GetOpacity() );
+ } else {
+ printf("EED Warnning! vtkVectorsVisu::Process GetDataObject() is EMPTY\n");
+ }// if GetDataObject()!=NULL
_pdm->ScalarVisibilityOn();
_pdm->SetColorModeToMapScalars();
#endif
_actor->SetMapper( _pdm );
_actor->GetProperty()->SetOpacity( GetOpacity() );
- }// if _active
+ } else {
+ _vtkglyph->SetInputData( NULL );
+ _vtkglyph->Update();
+ }// if _active
VisibilityActor();
}
#include "vtkArrowSource.h"
#include "vtkLineSource.h"
+
#include "vtkGlyph3D.h"
+#include "vtkGlyph2D.h"
+#include <vtkTransform.h>
+
//---------------------------------------------
// Class Name: vtkVectorsVisu
// [classdescription]
virtual void Process();
-
//--Method template----------------------------
// void FunctionName(int& parameterA);
//---------------------------------------------
private:
vtkArrowSource *_vtkarrowsource;
- vtkLineSource *_vtklinesource;
- vtkGlyph3D *_vtkglyph;
+ vtkPolyData *_vtklineGlyphPolyData;
+ vtkGlyph3D *_vtkglyph;
+ vtkTransform *_trans;
};
//-end of _vtkVectorsVISU_H_------------------------------------------------------