]> Creatis software - creaVtk.git/commitdiff
dlkj
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 11 Sep 2014 15:09:11 +0000 (17:09 +0200)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 11 Sep 2014 15:09:11 +0000 (17:09 +0200)
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/creaVtk

32 files changed:
bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Interface.bbg
bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Interface.bbs
bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Widget.bbg
bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Widget.bbs
bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbg [new file with mode: 0644]
bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbs [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineColorInfo.cxx [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineColorInfo.h [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineVisu.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineVisu.h
bbtk_creaVtk_PKG/src/bbcreaVtkStreamTracer.cxx [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkStreamTracer.h [new file with mode: 0644]
lib/creaVtk/creaVtkStreamLine.cpp
lib/creaVtk/creaVtkStreamLine.h
lib/creaVtk/creaVtkStreamTracer.cpp [new file with mode: 0644]
lib/creaVtk/creaVtkStreamTracer.h [new file with mode: 0644]
lib/creaVtk/vtkStreamLineCreateColorInfo.cpp [new file with mode: 0644]
lib/creaVtk/vtkStreamLineCreateColorInfo.h [new file with mode: 0644]
lib/creaVtk/vtkTensorsVisu.cpp
lib/creaVtk/vtkVectorsTensorsVisuBase.cpp
lib/creaVtk/vtkVectorsTensorsVisuBase.h
lib/creaVtk/vtkVectorsVisu.cpp

index a607a2abb3f09cdd0dfbb22b7dc2a67925a56e6d..d46f5c10fada81ce085861a5572f5eed0ad45b7b 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Interface.bbg
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Interface.bbg
 # ----------------------------------
 
 APP_START
@@ -13,7 +13,7 @@ PACKAGENAME:creaVtk
 COMPLEXOUTPUTS:8
 COMPLEX_PORT
 boxChange
--62.565379:-78.187196:-900.000000
+-105.187753:-83.433027:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 widget
@@ -21,19 +21,19 @@ widget
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 ActivePlane
--35.207993:-79.393730:-900.000000
+-57.830638:-83.983832:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 ActiveStreamLine
--6.787570:-80.384681:-900.000000
+-15.967774:-80.384681:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 TypeStreamLine
-48.736401:-82.305574:-900.000000
+84.801487:-80.010523:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Resolution
-72.202351:-82.038197:-900.000000
+68.267978:-77.120231:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Opacity
@@ -56,8 +56,8 @@ FIN_BOX
 BOX
 wx:LayoutLine:Box01
 ISEXEC:FALSE
-10.121381:-40.100538:-900.000000
-67.681381:-50.100538:-900.000000
+-6.927569:-39.444809:-900.000000
+50.632431:-49.444809:-900.000000
 PORT
 WinTitle:"StreamLine"
 FIN_BOX
@@ -128,8 +128,8 @@ FIN_BOX
 BOX
 std:MultipleInputs:Box07
 ISEXEC:FALSE
--79.976543:-40.697310:-900.000000
--34.401543:-50.697310:-900.000000
+-117.680951:-39.057988:-900.000000
+-72.105951:-49.057988:-900.000000
 PORT
 BoxProcessMode:"Reactive"
 FIN_BOX
index 0bd34454a5ea235e036e29d8e0da29e9a3238df1..829058ce96dae754f3545fe1e6222ee62052ee9a 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Interface.bbs
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Interface.bbs
 # ----------------------------------
 
 include std
@@ -95,5 +95,6 @@ output boxChange Box07.BoxChange " "
 output Opacity Box08.Out " "
 output ScaleFactor Box10.Out " "
 
+message    
 
 endefine
index 0d4cfd6c28c4bbaba9d8cd2ad88fb4fa939a8a66..0d83e76eed089e9e9f282a1de689c422fbfbb694 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Widget.bbg
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Widget.bbg
 # ----------------------------------
 
 APP_START
@@ -13,11 +13,11 @@ PACKAGENAME:creaVtk
 COMPLEXOUTPUTS:2
 COMPLEX_PORT
 Widget
--2.239362:-103.517011:-900.000000
+14.888453:-130.094656:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 boxchange
--21.059819:-100.774311:-900.000000
+-16.630212:-130.600334:-900.000000
 FIN_COMPLEX_PORT
 COMPLEXINPUTS:2
 COMPLEX_PORT
@@ -28,12 +28,12 @@ COMPLEX_PORT
 In
 99.025068:96.869980:-900.000000
 FIN_COMPLEX_PORT
-BOXES:5
+BOXES:6
 BOX
 creaVtk:StreamLineVisu:Box00
 ISEXEC:FALSE
--68.950102:-59.006785:-900.000000
--23.375102:-69.006785:-900.000000
+-68.064181:-82.926665:-900.000000
+-22.489181:-92.926665:-900.000000
 PORT
 Active:"true"
 PORT
@@ -42,8 +42,8 @@ FIN_BOX
 BOX
 creaVtk:PlaneWidget:Box01
 ISEXEC:FALSE
-15.270694:-28.357144:-900.000000
-60.845694:-38.357144:-900.000000
+15.861308:-23.632229:-900.000000
+61.436308:-33.632229:-900.000000
 PORT
 Active:"true"
 PORT
@@ -67,10 +67,15 @@ ISEXEC:FALSE
 81.238099:47.686190:-900.000000
 152.413099:37.686190:-900.000000
 FIN_BOX
-CONNECTIONS:17
-CONNECTION
-Box01:Out:Box00:Source
-NumberOfControlPoints:0
+BOX
+creaVtk:StreamTracer:Box05
+ISEXEC:FALSE
+10.778711:-57.880203:-900.000000
+56.353711:-67.880203:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+CONNECTIONS:19
 CONNECTION
 Renderer:Renderer:Box02:In
 NumberOfControlPoints:0
@@ -108,9 +113,6 @@ CONNECTION
 In:In:Box04:In
 NumberOfControlPoints:0
 CONNECTION
-Box04:Out:Box00:In
-NumberOfControlPoints:0
-CONNECTION
 Box03:boxChange:boxchange:boxchange
 NumberOfControlPoints:0
 CONNECTION
@@ -119,4 +121,16 @@ NumberOfControlPoints:0
 CONNECTION
 Box03:ScaleFactor:Box00:ScaleFactor
 NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box05:Source
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box00:PolyData
+NumberOfControlPoints:0
+CONNECTION
+Box03:boxChange:Box05:BoxExecute
+NumberOfControlPoints:0
 APP_END
index bfc8e5d4fd36d4af3e3fa455114062ef420d26ae..06ae9d88997218b7f431ebc22f6d70a230e07dac 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Widget.bbs
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneWidget_StreamLineVisu_Widget.bbs
 # ----------------------------------
 
 include std
@@ -30,8 +30,10 @@ new PlaneWidget_StreamLineVisu_Interface Box03
 
 new vtkImageDataPointerRelay Box04
 
+new StreamTracer Box05
+  set Box05.Active "true"
+
 
-connect Box01.Out Box00.Source
 connect Box02.Out Box00.Renderer
 connect Box02.Out Box01.Renderer
 connect Box03.ActivePlane Box01.Active
@@ -41,9 +43,12 @@ connect Box03.Resolution Box01.Resolution
 connect Box03.boxChange Box01.BoxExecute
 connect Box03.boxChange Box00.BoxExecute
 connect Box04.Out Box01.In
-connect Box04.Out Box00.In
 connect Box03.TypeStreamLine Box00.TypeForm
 connect Box03.ScaleFactor Box00.ScaleFactor
+connect Box01.Out Box05.Source
+connect Box04.Out Box05.In
+connect Box05.Out Box00.PolyData
+connect Box03.boxChange Box05.BoxExecute
 
 # Complex input ports
 input Renderer Box02.In " "
@@ -53,5 +58,6 @@ input In Box04.In " "
 output Widget Box03.widget " "
 output boxchange Box03.boxChange " "
 
+message    
 
 endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbg b/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbg
new file mode 100644 (file)
index 0000000..b6814ff
--- /dev/null
@@ -0,0 +1,173 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:PointBySpacing
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+PointOut
+141.443758:-66.114148:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:2
+COMPLEX_PORT
+PointIn
+102.118356:102.960033:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Spacing
+241.552372:102.960033:-900.000000
+FIN_COMPLEX_PORT
+BOXES:12
+BOX
+std:GetVectorIntElement:Box17
+ISEXEC:FALSE
+38.045732:41.891151:-900.000000
+109.220732:31.891151:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:Mul:Box18
+ISEXEC:FALSE
+62.309811:6.496758:-900.000000
+95.084811:-3.503242:-900.000000
+FIN_BOX
+BOX
+std:GetVectorDoubleElement:Box21
+ISEXEC:FALSE
+66.046829:25.255118:-900.000000
+137.221829:15.255118:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:ConcatStrings:Box22
+ISEXEC:FALSE
+137.088107:-30.728878:-900.000000
+182.663107:-40.728878:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+PORT
+In5:"10"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box23
+ISEXEC:FALSE
+144.598773:36.917121:-900.000000
+215.773773:26.917121:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:Mul:Box24
+ISEXEC:FALSE
+139.640155:2.357662:-900.000000
+172.415155:-7.642338:-900.000000
+FIN_BOX
+BOX
+std:GetVectorDoubleElement:Box25
+ISEXEC:FALSE
+152.561450:23.203357:-900.000000
+223.736450:13.203357:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box26
+ISEXEC:FALSE
+225.902988:38.194526:-900.000000
+297.077988:28.194526:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:Mul:Box27
+ISEXEC:FALSE
+239.730391:-7.636545:-900.000000
+272.505391:-17.636545:-900.000000
+FIN_BOX
+BOX
+std:GetVectorDoubleElement:Box28
+ISEXEC:FALSE
+251.816752:25.315697:-900.000000
+322.991752:15.315697:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:MagicBox:Box30
+ISEXEC:FALSE
+93.351546:80.416809:-900.000000
+138.926546:70.416809:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box31
+ISEXEC:FALSE
+237.377701:81.669210:-900.000000
+282.952701:71.669210:-900.000000
+FIN_BOX
+CONNECTIONS:18
+CONNECTION
+Box17:Out:Box18:In1
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box18:In2
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box22:In1
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box24:In1
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:Box24:In2
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box27:In1
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box27:In2
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box22:In3
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box22:In5
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:PointOut:PointOut
+NumberOfControlPoints:0
+CONNECTION
+PointIn:PointIn:Box30:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box17:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box23:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box26:In
+NumberOfControlPoints:0
+CONNECTION
+Spacing:Spacing:Box31:In
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box25:In
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box21:In
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbs b/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbs
new file mode 100644 (file)
index 0000000..5bd18d3
--- /dev/null
@@ -0,0 +1,76 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include std
+
+define PointBySpacing creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new GetVectorIntElement Box17
+  set Box17.I "0"
+
+new Mul Box18
+
+new GetVectorDoubleElement Box21
+  set Box21.I "0"
+
+new ConcatStrings Box22
+  set Box22.In2 " "
+  set Box22.In4 " "
+  set Box22.In5 "10"
+
+new GetVectorIntElement Box23
+  set Box23.I "1"
+
+new Mul Box24
+
+new GetVectorDoubleElement Box25
+  set Box25.I "1"
+
+new GetVectorIntElement Box26
+  set Box26.I "2"
+
+new Mul Box27
+
+new GetVectorDoubleElement Box28
+  set Box28.I "2"
+
+new MagicBox Box30
+
+new MagicBox Box31
+
+
+connect Box17.Out Box18.In1
+connect Box21.Out Box18.In2
+connect Box18.Out Box22.In1
+connect Box23.Out Box24.In1
+connect Box25.Out Box24.In2
+connect Box26.Out Box27.In1
+connect Box28.Out Box27.In2
+connect Box24.Out Box22.In3
+connect Box27.Out Box22.In5
+connect Box30.Out Box17.In
+connect Box30.Out Box23.In
+connect Box30.Out Box26.In
+connect Box31.Out Box28.In
+connect Box31.Out Box25.In
+connect Box31.Out Box21.In
+
+# Complex input ports
+input PointIn Box30.In " "
+input Spacing Box31.In " "
+
+# Complex output ports
+output PointOut Box22.Out " "
+
+message Interpreter 0
+
+endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbg b/bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbg
new file mode 100644 (file)
index 0000000..a85677f
--- /dev/null
@@ -0,0 +1,265 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:StreamLineVisu_Interface
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:8
+COMPLEX_PORT
+boxChange
+-113.369025:-150.034464:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+widget
+-48.630334:-149.760482:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+ActivePlane
+-135.139054:-148.567562:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+TypeStreamLine
+28.800341:-147.959366:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Opacity
+89.116948:-151.518417:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+ScaleFactor
+110.791653:-147.483768:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+ColorLaw
+46.032088:-147.643538:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SolidColor
+63.483808:-147.675570:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:1
+COMPLEX_PORT
+title
+61.722224:146.533080:-900.000000
+FIN_COMPLEX_PORT
+BOXES:13
+BOX
+wx:LayoutLine:Box01
+ISEXEC:FALSE
+-38.566043:-18.841960:-900.000000
+18.993957:-28.841960:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:Slider:Box03
+ISEXEC:FALSE
+-21.459848:57.360182:-900.000000
+29.940152:47.360182:-900.000000
+PORT
+In:"100"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity"
+FIN_BOX
+BOX
+wx:CheckBox:Box06
+ISEXEC:FALSE
+-149.172105:78.641763:-900.000000
+-103.597105:68.641763:-900.000000
+PORT
+In:"false"
+PORT
+ReactiveOnKeystroke:"true"
+PORT
+Title:"Active"
+FIN_BOX
+BOX
+std:MultipleInputs:Box07
+ISEXEC:FALSE
+-111.025399:-98.590305:-900.000000
+-65.450399:-108.590305:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+std:Div:Box08
+ISEXEC:FALSE
+63.290934:-35.232995:-900.000000
+96.065934:-45.232995:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:Slider:Box09
+ISEXEC:FALSE
+54.804375:61.772496:-900.000000
+106.204375:51.772496:-900.000000
+PORT
+ChangeResolution:"true"
+PORT
+In:"40"
+PORT
+Label:"true"
+PORT
+Max:"500"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"ScaleFactor"
+FIN_BOX
+BOX
+std:Div:Box10
+ISEXEC:FALSE
+110.082722:-38.817858:-900.000000
+142.857722:-48.817858:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box12
+ISEXEC:FALSE
+-49.451026:-44.289828:-900.000000
+8.108974:-54.289828:-900.000000
+PORT
+Orientation:"V"
+PORT
+WinTitle:"StreamLine"
+FIN_BOX
+BOX
+wx:LayoutTab:Box16
+ISEXEC:FALSE
+-55.035744:-61.476431:-900.000000
+2.524256:-71.476431:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box14
+ISEXEC:FALSE
+27.278677:10.555703:-900.000000
+84.838677:0.555703:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:ComboBox:Box15
+ISEXEC:FALSE
+-77.204288:85.611035:-900.000000
+-31.629288:75.611035:-900.000000
+PORT
+In:"Tube Ribbon Line "
+PORT
+Selection:"2"
+PORT
+Title:"Form"
+FIN_BOX
+BOX
+wx:ComboBox:Box17
+ISEXEC:FALSE
+-45.746054:70.570954:-900.000000
+-0.171054:60.570954:-900.000000
+PORT
+In:"Direction Magnitude Solide"
+PORT
+Title:"Color law"
+FIN_BOX
+BOX
+wx:ColourSelectorButton:Box18
+ISEXEC:FALSE
+12.845442:104.821885:-900.000000
+84.020442:94.821885:-900.000000
+FIN_BOX
+CONNECTIONS:26
+CONNECTION
+Box06:BoxChange:Box07:In2
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:ActivePlane:ActivePlane
+NumberOfControlPoints:0
+CONNECTION
+Box03:BoxChange:Box07:In6
+NumberOfControlPoints:0
+CONNECTION
+Box07:BoxChange:boxChange:boxChange
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box08:In1
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Opacity:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box10:In1
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:Box07:In7
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:ScaleFactor:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box12:Widget:Box16:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box16:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+title:title:Box12:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+Box15:BoxChange:Box07:In5
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box07:In3
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:TypeStreamLine:TypeStreamLine
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:ColorLaw:ColorLaw
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box14:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box14:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box15:Widget:Box01:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:Box01:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:SolidColor:SolidColor
+NumberOfControlPoints:0
+CONNECTION
+Box18:BoxChange:Box07:In4
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box14:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Widget:Box01:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box14:Widget:Box12:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box12:Widget2
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbs b/bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbs
new file mode 100644 (file)
index 0000000..a8dfdc5
--- /dev/null
@@ -0,0 +1,106 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/StreamLineVisu_Interface.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include wx
+include std
+
+define StreamLineVisu_Interface creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new LayoutLine Box01
+  set Box01.Orientation "H"
+
+new Slider Box03
+  set Box03.In "100"
+  set Box03.Label "true"
+  set Box03.Max "100"
+  set Box03.Min "0"
+  set Box03.ReactiveOnTrack "true"
+  set Box03.Title "Opacity"
+
+new CheckBox Box06
+  set Box06.In "false"
+  set Box06.ReactiveOnKeystroke "true"
+  set Box06.Title "Active"
+
+new MultipleInputs Box07
+  set Box07.BoxProcessMode "Reactive"
+
+new Div Box08
+  set Box08.In2 "100"
+
+new Slider Box09
+  set Box09.ChangeResolution "true"
+  set Box09.In "40"
+  set Box09.Label "true"
+  set Box09.Max "500"
+  set Box09.Min "0"
+  set Box09.ReactiveOnTrack "true"
+  set Box09.Title "ScaleFactor"
+
+new Div Box10
+  set Box10.In2 "100"
+
+new LayoutLine Box12
+  set Box12.Orientation "V"
+  set Box12.WinTitle "StreamLine"
+
+new LayoutTab Box16
+
+new LayoutLine Box14
+  set Box14.Orientation "H"
+
+new ComboBox Box15
+  set Box15.In "Tube Ribbon Line "
+  set Box15.Selection "2"
+  set Box15.Title "Form"
+
+new ComboBox Box17
+  set Box17.In "Direction Magnitude Solide"
+  set Box17.Title "Color law"
+
+new ColourSelectorButton Box18
+
+
+connect Box06.BoxChange Box07.In2
+connect Box03.BoxChange Box07.In6
+connect Box03.Out Box08.In1
+connect Box09.Out Box10.In1
+connect Box09.BoxChange Box07.In7
+connect Box12.Widget Box16.Widget1
+connect Box15.BoxChange Box07.In5
+connect Box17.BoxChange Box07.In3
+connect Box09.Widget Box14.Widget3
+connect Box03.Widget Box14.Widget2
+connect Box15.Widget Box01.Widget1
+connect Box17.Widget Box01.Widget2
+connect Box18.BoxChange Box07.In4
+connect Box06.Widget Box14.Widget1
+connect Box18.Widget Box01.Widget3
+connect Box14.Widget Box12.Widget1
+connect Box01.Widget Box12.Widget2
+
+# Complex input ports
+input title Box12.WinTitle " "
+
+# Complex output ports
+output ActivePlane Box06.Out " "
+output boxChange Box07.BoxChange " "
+output Opacity Box08.Out " "
+output ScaleFactor Box10.Out " "
+output widget Box16.Widget " "
+output TypeStreamLine Box15.Out " "
+output ColorLaw Box17.Out " "
+output SolidColor Box18.Out " "
+
+message    
+
+endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbg
new file mode 100644 (file)
index 0000000..d20666e
--- /dev/null
@@ -0,0 +1,119 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:StreamLine_Visu_Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+-60.685622:-10.631058:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:4
+COMPLEX_PORT
+polydata
+5.758490:95.679520:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+renderer
+19.933234:93.907677:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxExecute
+-25.839377:94.202985:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Title
+-105.746835:95.913932:-900.000000
+FIN_COMPLEX_PORT
+BOXES:5
+BOX
+creaVtk:StreamLineVisu:Box00
+ISEXEC:FALSE
+-16.684854:10.631058:-900.000000
+28.890146:0.631058:-900.000000
+FIN_BOX
+BOX
+creaVtk:StreamLineVisu_Interface:Box01
+ISEXEC:FALSE
+-106.753539:74.417404:-900.000000
+-35.578539:64.417404:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box02
+ISEXEC:FALSE
+-34.107977:49.020989:-900.000000
+11.467023:39.020989:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box03
+ISEXEC:FALSE
+51.235793:10.335751:-900.000000
+96.810793:0.335751:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MagicBox:Box04
+ISEXEC:FALSE
+44.739035:48.135067:-900.000000
+90.314035:38.135067:-900.000000
+FIN_BOX
+CONNECTIONS:16
+CONNECTION
+Box01:ActivePlane:Box00:Active
+NumberOfControlPoints:0
+CONNECTION
+Box01:Opacity:Box00:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box01:ScaleFactor:Box00:ScaleFactor
+NumberOfControlPoints:0
+CONNECTION
+Box01:TypeStreamLine:Box00:TypeForm
+NumberOfControlPoints:0
+CONNECTION
+Box01:widget:Widget:Widget
+NumberOfControlPoints:0
+CONNECTION
+polydata:polydata:Box00:PolyData
+NumberOfControlPoints:0
+CONNECTION
+boxExecute:boxExecute:Box02:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:boxChange:Box02:In2
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+renderer:renderer:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box00:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box03:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:Box03:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Title:Title:Box01:title
+NumberOfControlPoints:0
+CONNECTION
+Box01:SolidColor:Box00:Color
+NumberOfControlPoints:0
+CONNECTION
+Box01:ColorLaw:Box00:ColorLaw
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbs
new file mode 100644 (file)
index 0000000..0a7c285
--- /dev/null
@@ -0,0 +1,55 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/StreamLine_Visu_Widget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaVtk
+include std
+include vtk
+
+define StreamLine_Visu_Widget creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new StreamLineVisu Box00
+
+new StreamLineVisu_Interface Box01
+
+new MultipleInputs Box02
+  set Box02.BoxProcessMode "Reactive"
+
+new UpdateRender Box03
+  set Box03.Active "true"
+
+new MagicBox Box04
+
+
+connect Box01.ActivePlane Box00.Active
+connect Box01.Opacity Box00.Opacity
+connect Box01.ScaleFactor Box00.ScaleFactor
+connect Box01.TypeStreamLine Box00.TypeForm
+connect Box01.boxChange Box02.In2
+connect Box02.BoxChange Box00.BoxExecute
+connect Box04.Out Box00.Renderer
+connect Box04.Out Box03.Renderer
+connect Box02.BoxChange Box03.BoxExecute
+connect Box01.SolidColor Box00.Color
+connect Box01.ColorLaw Box00.ColorLaw
+
+# Complex input ports
+input polydata Box00.PolyData " "
+input boxExecute Box02.In1 " "
+input renderer Box04.In " "
+input Title Box01.title " "
+
+# Complex output ports
+output Widget Box01.widget " "
+
+message    
+
+endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbg
new file mode 100644 (file)
index 0000000..ad2d054
--- /dev/null
@@ -0,0 +1,112 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:StreamlineExploration_Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widget
+-87.086702:-131.675720:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:3
+COMPLEX_PORT
+vtkImageData_vectors
+-202.201495:171.786415:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+vtkRenderer
+128.828216:174.474869:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Title
+-83.966322:173.231649:-900.000000
+FIN_COMPLEX_PORT
+BOXES:7
+BOX
+vtk:UpdateRender:Box22
+ISEXEC:FALSE
+168.162416:-18.581651:-900.000000
+213.737416:-28.581651:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:LayoutTab:Box17
+ISEXEC:FALSE
+-89.942511:-71.713124:-900.000000
+-32.382511:-81.713124:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box23
+ISEXEC:FALSE
+76.506639:18.351379:-900.000000
+122.081639:8.351379:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+creaVtk:PlaneWidget_StreamLineVisu_Widget:Box30
+ISEXEC:FALSE
+-128.471084:73.231403:-900.000000
+-57.296084:63.231403:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box26
+ISEXEC:FALSE
+-208.540015:141.393307:-900.000000
+-137.365015:131.393307:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box28
+ISEXEC:FALSE
+123.517825:137.982960:-900.000000
+169.092825:127.982960:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box14
+ISEXEC:FALSE
+-114.309291:-7.256705:-900.000000
+-56.749291:-17.256705:-900.000000
+FIN_BOX
+CONNECTIONS:11
+CONNECTION
+Box23:BoxChange:Box22:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box30:boxchange:Box23:In5
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box30:In
+NumberOfControlPoints:0
+CONNECTION
+vtkImageData_vectors:vtkImageData_vectors:Box26:In
+NumberOfControlPoints:0
+CONNECTION
+vtkRenderer:vtkRenderer:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box22:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box30:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Title:Title:Box14:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+Box30:Widget:Box14:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box14:Widget:Box17:Widget1
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbs
new file mode 100644 (file)
index 0000000..7759d21
--- /dev/null
@@ -0,0 +1,55 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include vtk
+include wx
+include std
+include creaVtk
+
+define StreamlineExploration_Widget creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new UpdateRender Box22
+  set Box22.Active "true"
+
+new LayoutTab Box17
+
+new MultipleInputs Box23
+  set Box23.BoxProcessMode "Reactive"
+
+new PlaneWidget_StreamLineVisu_Widget Box30
+
+new vtkImageDataPointerRelay Box26
+
+new MagicBox Box28
+
+new LayoutLine Box14
+
+
+connect Box23.BoxChange Box22.BoxExecute
+connect Box30.boxchange Box23.In5
+connect Box26.Out Box30.In
+connect Box28.Out Box22.Renderer
+connect Box28.Out Box30.Renderer
+connect Box30.Widget Box14.Widget1
+connect Box14.Widget Box17.Widget1
+
+# Complex input ports
+input vtkImageData_vectors Box26.In " "
+input vtkRenderer Box28.In " "
+input Title Box14.WinTitle " "
+
+# Complex output ports
+output widget Box17.Widget " "
+
+message    
+
+endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbg
new file mode 100644 (file)
index 0000000..1f823c2
--- /dev/null
@@ -0,0 +1,134 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:TensorsExploration_Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widget
+-152.287466:-34.191082:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:3
+COMPLEX_PORT
+vtkImageData_tensors
+-84.383009:173.600108:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+vtkRenderer
+28.811510:167.511681:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Title
+-134.616966:175.362823:-900.000000
+FIN_COMPLEX_PORT
+BOXES:8
+BOX
+vtk:UpdateRender:Box22
+ISEXEC:FALSE
+50.421230:29.527651:-900.000000
+95.996230:19.527651:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:LayoutTab:Box17
+ISEXEC:FALSE
+-155.143275:4.881948:-900.000000
+-97.583275:-5.118052:-900.000000
+PORT
+WinTitle:"VectorsTensors Analysis"
+FIN_BOX
+BOX
+std:MultipleInputs:Box23
+ISEXEC:FALSE
+3.709669:55.066372:-900.000000
+49.284669:45.066372:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+wx:LayoutLine:Box16
+ISEXEC:FALSE
+-66.220097:53.516083:-900.000000
+-8.660097:43.516083:-900.000000
+PORT
+WinTitle:"Tensors"
+FIN_BOX
+BOX
+creaVtk:VolumeTensorVisu_Widget:Box19
+ISEXEC:FALSE
+15.919649:97.987432:-900.000000
+87.094649:87.987432:-900.000000
+FIN_BOX
+BOX
+creaVtk:PlaneTensorVisu_Widget:Box21
+ISEXEC:FALSE
+-83.100097:95.241049:-900.000000
+-11.925097:85.241049:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box27
+ISEXEC:FALSE
+-89.314298:137.998626:-900.000000
+-18.139298:127.998626:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box28
+ISEXEC:FALSE
+21.602067:137.982960:-900.000000
+67.177067:127.982960:-900.000000
+FIN_BOX
+CONNECTIONS:15
+CONNECTION
+Box23:BoxChange:Box22:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box19:boxchange:Box23:In3
+NumberOfControlPoints:0
+CONNECTION
+Box19:Widget:Box16:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box21:boxchange:Box23:In4
+NumberOfControlPoints:0
+CONNECTION
+Box21:Widget:Box16:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box21:vtkImageData
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box19:vtkImageData
+NumberOfControlPoints:0
+CONNECTION
+vtkImageData_tensors:vtkImageData_tensors:Box27:In
+NumberOfControlPoints:0
+CONNECTION
+vtkRenderer:vtkRenderer:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box22:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box21:renderer
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box19:renderer
+NumberOfControlPoints:0
+CONNECTION
+Box16:Widget:Box17:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Title:Title:Box17:WinTitle
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbs
new file mode 100644 (file)
index 0000000..6d962b5
--- /dev/null
@@ -0,0 +1,63 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include vtk
+include wx
+include std
+include creaVtk
+
+define TensorsExploration_Widget creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new UpdateRender Box22
+  set Box22.Active "true"
+
+new LayoutTab Box17
+  set Box17.WinTitle "VectorsTensors Analysis"
+
+new MultipleInputs Box23
+  set Box23.BoxProcessMode "Reactive"
+
+new LayoutLine Box16
+  set Box16.WinTitle "Tensors"
+
+new VolumeTensorVisu_Widget Box19
+
+new PlaneTensorVisu_Widget Box21
+
+new vtkImageDataPointerRelay Box27
+
+new MagicBox Box28
+
+
+connect Box23.BoxChange Box22.BoxExecute
+connect Box19.boxchange Box23.In3
+connect Box19.Widget Box16.Widget2
+connect Box21.boxchange Box23.In4
+connect Box21.Widget Box16.Widget1
+connect Box27.Out Box21.vtkImageData
+connect Box27.Out Box19.vtkImageData
+connect Box28.Out Box22.Renderer
+connect Box28.Out Box21.renderer
+connect Box28.Out Box19.renderer
+connect Box16.Widget Box17.Widget1
+
+# Complex input ports
+input vtkImageData_tensors Box27.In " "
+input vtkRenderer Box28.In " "
+input Title Box17.WinTitle " "
+
+# Complex output ports
+output widget Box17.Widget " "
+
+message    
+
+endefine
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbg
new file mode 100644 (file)
index 0000000..1efcce9
--- /dev/null
@@ -0,0 +1,134 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:VectorsExploration_Widget
+PACKAGENAME:creaVtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widget
+-153.237662:-116.543147:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:3
+COMPLEX_PORT
+vtkImageData_vectors
+-202.201495:171.786415:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+vtkRenderer
+-59.902043:169.419594:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Title
+-96.827992:172.211702:-900.000000
+FIN_COMPLEX_PORT
+BOXES:8
+BOX
+vtk:UpdateRender:Box22
+ISEXEC:FALSE
+-20.567843:-23.636926:-900.000000
+25.007157:-33.636926:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:LayoutTab:Box17
+ISEXEC:FALSE
+-180.737946:-42.745057:-900.000000
+-123.177946:-52.745057:-900.000000
+PORT
+WinTitle:"VectorsTensors Analysis"
+FIN_BOX
+BOX
+std:MultipleInputs:Box23
+ISEXEC:FALSE
+-112.223620:13.296104:-900.000000
+-66.648620:3.296104:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+creaVtk:PlaneVectorVisu_Widget:Box41
+ISEXEC:FALSE
+-290.289955:71.849699:-900.000000
+-219.114955:61.849699:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box14
+ISEXEC:FALSE
+-221.145840:-2.517243:-900.000000
+-163.585840:-12.517243:-900.000000
+PORT
+WinTitle:"Field"
+FIN_BOX
+BOX
+creaVtk:VolumeVectorVisu_Widget:Box18
+ISEXEC:FALSE
+-214.258652:71.383715:-900.000000
+-143.083652:61.383715:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box26
+ISEXEC:FALSE
+-208.540015:141.393307:-900.000000
+-137.365015:131.393307:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box28
+ISEXEC:FALSE
+-65.212434:132.927685:-900.000000
+-19.637434:122.927685:-900.000000
+FIN_BOX
+CONNECTIONS:15
+CONNECTION
+Box23:BoxChange:Box22:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box41:boxchange:Box23:In1
+NumberOfControlPoints:0
+CONNECTION
+Box41:Widget:Box14:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Widget:Box14:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box18:boxchange:Box23:In2
+NumberOfControlPoints:0
+CONNECTION
+Box17:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box18:vtkImageData
+NumberOfControlPoints:0
+CONNECTION
+vtkImageData_vectors:vtkImageData_vectors:Box26:In
+NumberOfControlPoints:0
+CONNECTION
+vtkRenderer:vtkRenderer:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box22:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box41:renderer
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box18:renderer
+NumberOfControlPoints:0
+CONNECTION
+Box26:Out:Box41:vtkImageData
+NumberOfControlPoints:0
+CONNECTION
+Box14:Widget:Box17:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Title:Title:Box14:WinTitle
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbs
new file mode 100644 (file)
index 0000000..bec8a33
--- /dev/null
@@ -0,0 +1,63 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include vtk
+include wx
+include std
+include creaVtk
+
+define VectorsExploration_Widget creaVtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new UpdateRender Box22
+  set Box22.Active "true"
+
+new LayoutTab Box17
+  set Box17.WinTitle "VectorsTensors Analysis"
+
+new MultipleInputs Box23
+  set Box23.BoxProcessMode "Reactive"
+
+new PlaneVectorVisu_Widget Box41
+
+new LayoutLine Box14
+  set Box14.WinTitle "Field"
+
+new VolumeVectorVisu_Widget Box18
+
+new vtkImageDataPointerRelay Box26
+
+new MagicBox Box28
+
+
+connect Box23.BoxChange Box22.BoxExecute
+connect Box41.boxchange Box23.In1
+connect Box41.Widget Box14.Widget1
+connect Box18.Widget Box14.Widget2
+connect Box18.boxchange Box23.In2
+connect Box26.Out Box18.vtkImageData
+connect Box28.Out Box22.Renderer
+connect Box28.Out Box41.renderer
+connect Box28.Out Box18.renderer
+connect Box26.Out Box41.vtkImageData
+connect Box14.Widget Box17.Widget1
+
+# Complex input ports
+input vtkImageData_vectors Box26.In " "
+input vtkRenderer Box28.In " "
+input Title Box14.WinTitle " "
+
+# Complex output ports
+output widget Box17.Widget " "
+
+message    
+
+endefine
diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineColorInfo.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineColorInfo.cxx
new file mode 100644 (file)
index 0000000..1a89926
--- /dev/null
@@ -0,0 +1,82 @@
+//===== 
+// Before editing this file, make 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 "bbcreaVtkStreamLineColorInfo.h"
+#include "bbcreaVtkPackage.h"
+
+
+#include "vtkStreamLineCreateColorInfo.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,StreamLineColorInfo)
+BBTK_BLACK_BOX_IMPLEMENTATION(StreamLineColorInfo,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 StreamLineColorInfo::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;
+  
+
+       vtkStreamLineCreateColorInfo colorinfo;
+       colorinfo.SetStreamLinesIn( bbGetInputIn() );
+       colorinfo.Process();
+       bbSetOutputOut( colorinfo.GetStreamLinesOut() );
+
+}
+//===== 
+// Before editing this file, make 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 StreamLineColorInfo::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 StreamLineColorInfo::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 StreamLineColorInfo::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+  
+}
+}
+// EO namespace bbcreaVtk
+
+
diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineColorInfo.h b/bbtk_creaVtk_PKG/src/bbcreaVtkStreamLineColorInfo.h
new file mode 100644 (file)
index 0000000..287c5f7
--- /dev/null
@@ -0,0 +1,47 @@
+//===== 
+// Before editing this file, make 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 __bbcreaVtkStreamLineColorInfo_h_INCLUDED__
+#define __bbcreaVtkStreamLineColorInfo_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT StreamLineColorInfo
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(StreamLineColorInfo,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(StreamLineColorInfo,bbtk::AtomicBlackBox);
+       BBTK_NAME("StreamLineColorInfo");
+       BBTK_AUTHOR("Info-Dev");
+       BBTK_DESCRIPTION("No Description.");
+       BBTK_CATEGORY("empty");
+       BBTK_INPUT(StreamLineColorInfo,In,"Stream Line vtkPolydata",vtkPolyData*,"");
+       BBTK_OUTPUT(StreamLineColorInfo,Out,"Stream Line vtkPolydata",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(StreamLineColorInfo);
+//===== 
+// Before editing this file, make 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 // __bbcreaVtkStreamLineColorInfo_h_INCLUDED__
+
index b0ff0160b57a7cd4c4e87128c426de7f2e004ad0..eb202b9e1150730d3f61e09b2d86fd70473a87fc 100644 (file)
@@ -26,17 +26,17 @@ void StreamLineVisu::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-printf("EED StreamLineVisu::Process Start\n");
-     creavtkstreamline.SetActive( bbGetInputActive() );
-     creavtkstreamline.SetDataObject( bbGetInputIn() );
-     creavtkstreamline.SetSourcePoints( bbGetInputSource() );  // source
-     creavtkstreamline.SetOpacity( bbGetInputOpacity() );
-     creavtkstreamline.SetRenderer( bbGetInputRenderer() );
-     creavtkstreamline.SetScaleFactor( bbGetInputScaleFactor() );
-     creavtkstreamline.SetTypeForm( bbGetInputTypeForm() );
+
+     creavtkstreamline.SetActive(                      bbGetInputActive()              );
+     creavtkstreamline.SetPolyData(            bbGetInputPolyData()    );
+     creavtkstreamline.SetOpacity(                     bbGetInputOpacity()             );
+     creavtkstreamline.SetRenderer(            bbGetInputRenderer()    );
+     creavtkstreamline.SetScaleFactor(         bbGetInputScaleFactor() );
+     creavtkstreamline.SetTypeForm(            bbGetInputTypeForm()    );
+     creavtkstreamline.SetColorLaw(            bbGetInputColorLaw()    );
+     creavtkstreamline.SetColor(                       bbGetInputColor()               );
      creavtkstreamline.Process();
      bbSetOutputOut( creavtkstreamline.GetProp3D() );
-printf("EED StreamLineVisu::Process End\n");
   
 }
 //===== 
@@ -49,6 +49,7 @@ void StreamLineVisu::bbUserSetDefaultValues()
 //    Here we initialize the input 'In' to 0
    bbSetInputActive(false);
    bbSetInputIn(NULL);
+   bbSetInputPolyData(NULL);
    bbSetInputRenderer(NULL);
    bbSetInputOpacity(1);
   
index 302c45588dd610726a119a8e9288a3c6bce16d09..4e37bdee53cecf1d2d952fef43c54340f6c82e79 100644 (file)
@@ -9,12 +9,12 @@
 
 #include "vtkDataObject.h"
 #include "vtkDataSet.h"
+
+#include "vtkPolyData.h"
 #include "vtkRenderer.h"
 
 #include "creaVtkStreamLine.h"
 
-
-
 namespace bbcreaVtk
 {
 
@@ -26,13 +26,19 @@ class bbcreaVtk_EXPORT StreamLineVisu
 //===== 
 // Before editing this file, make 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(In,vtkDataObject*);
   BBTK_DECLARE_INPUT(Source,vtkDataSet*);
+
+
+  BBTK_DECLARE_INPUT(Active,bool);
+  BBTK_DECLARE_INPUT(PolyData,vtkPolyData*);
   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
   BBTK_DECLARE_INPUT(Opacity,double);
   BBTK_DECLARE_INPUT(ScaleFactor,double);
   BBTK_DECLARE_INPUT(TypeForm,int);
+  BBTK_DECLARE_INPUT(ColorLaw,int);
+  BBTK_DECLARE_INPUT(Color, std::vector<double> );
   BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
   BBTK_PROCESS(Process);
   void Process();
@@ -52,12 +58,14 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(StreamLineVisu,bbtk::AtomicBlackBox);
  BBTK_CATEGORY("empty");
 
  BBTK_INPUT(StreamLineVisu,Active,"Active (false default)",bool,"");
- BBTK_INPUT(StreamLineVisu,In,"(needed) vtkDataObject. (Example vtkDataObject<-vtkDataSet<-vtkPointSet<-vtkPolyData (parrent class) )",vtkDataObject*,"");
- BBTK_INPUT(StreamLineVisu,Source,"(needed) vtkDataSet. (Example vtkPointSource->GetOutput() )",vtkDataSet*,"");
+ BBTK_INPUT(StreamLineVisu,PolyData,"(needed) vtkPolyData.",vtkPolyData*,"");
  BBTK_INPUT(StreamLineVisu,Opacity,"Opacity (1 default)",double,"");
  BBTK_INPUT(StreamLineVisu,Renderer,"vtkRenderer",vtkRenderer*,"");
  BBTK_INPUT(StreamLineVisu,ScaleFactor,"Scale factor",double,"");
- BBTK_INPUT(StreamLineVisu,TypeForm,"Type of form : 0(default) Tube, 1 Ribbon",int,"");
+ BBTK_INPUT(StreamLineVisu,TypeForm,"Type of form : 0(default) Tubes, 1 Ribbons,2 Lines",int,"");
+ BBTK_INPUT(StreamLineVisu,ColorLaw,"(default 0) 0=Direction 1=MagnitudDirection 2=Solid",int,"");
+ BBTK_INPUT(StreamLineVisu,Color,"In case of ColorLaw=Solid the color is [R,G,B] 0..1",std::vector<double>,"");
+
  BBTK_OUTPUT(StreamLineVisu,Out,"vtkProp3D of an vtkActor",vtkProp3D*,"");
 
 BBTK_END_DESCRIBE_BLACK_BOX(StreamLineVisu);
diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkStreamTracer.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkStreamTracer.cxx
new file mode 100644 (file)
index 0000000..45fdd21
--- /dev/null
@@ -0,0 +1,80 @@
+//===== 
+// Before editing this file, make 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 "bbcreaVtkStreamTracer.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,StreamTracer)
+BBTK_BLACK_BOX_IMPLEMENTATION(StreamTracer,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 StreamTracer::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;
+  
+     creavtkstreamtracer.SetActive( bbGetInputActive() );
+     creavtkstreamtracer.SetDataObject( bbGetInputIn() );
+     creavtkstreamtracer.SetSourcePoints( bbGetInputSource() );  // source
+     creavtkstreamtracer.Process();
+     bbSetOutputOut( creavtkstreamtracer.GetPolyData() );
+
+}
+//===== 
+// Before editing this file, make 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 StreamTracer::bbUserSetDefaultValues()
+{
+
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+   bbSetInputActive(true);
+   bbSetInputIn(NULL);
+   bbSetInputSource(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 StreamTracer::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 StreamTracer::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+  
+}
+}
+// EO namespace bbcreaVtk
+
+
diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkStreamTracer.h b/bbtk_creaVtk_PKG/src/bbcreaVtkStreamTracer.h
new file mode 100644 (file)
index 0000000..c53b80e
--- /dev/null
@@ -0,0 +1,59 @@
+//===== 
+// Before editing this file, make 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 __bbcreaVtkStreamTracer_h_INCLUDED__
+#define __bbcreaVtkStreamTracer_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkDataObject.h"
+#include "vtkDataSet.h"
+#include "vtkPolyData.h"
+
+#include "creaVtkStreamTracer.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT StreamTracer
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(StreamTracer,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(In,vtkDataObject*);
+  BBTK_DECLARE_INPUT(Source,vtkDataSet*);
+  BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+  BBTK_PROCESS(Process);
+  void Process();
+
+private:
+   creaVtkStreamTracer  creavtkstreamtracer;
+
+//===== 
+// Before editing this file, make 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(StreamTracer,bbtk::AtomicBlackBox);
+       BBTK_NAME("StreamTracer");
+       BBTK_AUTHOR("InfoDev Creatis");
+       BBTK_DESCRIPTION("No Description.");
+       BBTK_CATEGORY("empty");
+       BBTK_INPUT(StreamTracer,Active,"Active true/false (default true)",bool,"");
+       BBTK_INPUT(StreamTracer,In,"(needed) vtkDataObject. (Example vtkDataObject<-vtkDataSet<-vtkPointSet<-vtkPolyData (parrent class) )",vtkDataObject*,"");
+       BBTK_INPUT(StreamTracer,Source,"(needed) vtkDataSet. (Example vtkPointSource->GetOutput() )",vtkDataSet*,"");
+       BBTK_OUTPUT(StreamTracer,Out,"vtkPolyData output",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(StreamTracer);
+//===== 
+// Before editing this file, make 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 // __bbcreaVtkStreamTracer_h_INCLUDED__
+
index 5085b1da5cb2bc992b18cc48f91b477853de141b..fedfcb6e1f431184563a9e37301caa55f8f13673 100644 (file)
 #include "vtkPointData.h"
 #include "vtkRenderWindow.h"
 #include "vtkProperty.h"
+#include "vtkPolyDataWriter.h"
+
 
 creaVtkStreamLine::creaVtkStreamLine()
 {
-       _source                 = vtkPointSource::New();
-       _vPointWidget           = vtkPointWidget::New();
-       _streamMapper2          = vtkPolyDataMapper::New();
-       _streamer               = vtkStreamTracer::New();
-
+//     _source                 = vtkPointSource::New();
+//     _vPointWidget   = vtkPointWidget::New();
+       _streamMapper2 = vtkPolyDataMapper::New();
        _tubefilter             = vtkTubeFilter::New();
-       _ribbonfilter           = vtkRibbonFilter::New();
+       _ribbonfilter   = vtkRibbonFilter::New();
 }
 
 
@@ -48,21 +48,23 @@ creaVtkStreamLine::~creaVtkStreamLine()
 {
 }
 
+
 //---------------------------------------------
-void creaVtkStreamLine::SetSourcePoints( vtkDataSet* sourcepoints)
+void creaVtkStreamLine::SetPolyData( vtkPolyData* polydata)
 {
-       _sourcePoints = sourcepoints;
+       _polydata = polydata;
 }
 
 //---------------------------------------------
 void creaVtkStreamLine::Process()
 {
-       
-printf("creaVtkStreamLine::Process Start \n");
-               if (_active==false)
-               { //bbGetInputPlaneFieldShow
-                       _vPointWidget->Off();
-               } else {
+       printf("EED creaVtkStreamLine::Process Start \n");
+
+       if (_polydata!=NULL)
+       {
+               if (_active==true)
+               {
+/*
                        //---------------------------Stream Lines-----------------------
                        _vPointWidget->SetInput( (vtkDataSet*) GetDataObject() );
                        if (_firsttime==true)
@@ -76,66 +78,107 @@ printf("creaVtkStreamLine::Process Start \n");
                        }
 //EED1                 _vPointWidget->On();
                                
-                       
                        double c[3];
                        _vPointWidget->GetPosition(c);
                        _source->SetCenter( c );
                        _source->Update();
                        
                        _streamer->SetInput( GetDataObject() );
-
-//EED1                 _streamer->SetSource( _source->GetOutput() );
+//EED1 _streamer->SetSource( _source->GetOutput() );
                        _streamer->SetSource( _sourcePoints );
-
                        _streamer->SetIntegratorTypeToRungeKutta45();
-
 //EED                  _streamer->SetMaximumPropagation(500000);
                        _streamer->SetMaximumPropagation(500);
-//EED                  _streamer->SetMaximumPropagationUnitToTimeUnit();
-
+//EED          _streamer->SetMaximumPropagationUnitToTimeUnit();
                        _streamer->SetInitialIntegrationStep (0.001);
 //EED                  _streamer->SetInitialIntegrationStepUnitToCellLengthUnit();
-
                        _streamer->SetIntegrationDirectionToBoth();
                        //EED   streamer->ComputeVorticityOn ();
                        _streamer->Update();
-printf("EED creaVtkStreamLine::Process StreamLine PrintSelf\n");
-                       _streamer->Print(std::cout);
-
-printf("EED creaVtkStreamLine::Process StreamLine->GetOutput() PrintSelf\n");
-                       _streamer->GetOutput()->Print(std::cout);
+//                     _streamer->Print(std::cout);
+//                     _streamer->GetOutput()->Print(std::cout);
 
 
 //EED 3aout2011
-                       _tubefilter->SetInput(_streamer->GetOutput());
-                       _tubefilter->SetRadius( GetScaleFactor() );
-                       _tubefilter->SetNumberOfSides(12);
-                       _tubefilter->SetVaryRadiusToVaryRadiusOff();
-                       
+                       _tubefilter->SetInput( _streamer->GetOutput() );
                        _ribbonfilter->SetInput(_streamer->GetOutput());
-                       _ribbonfilter->SetWidth( GetScaleFactor() );
-                       _ribbonfilter->SetWidthFactor( GetScaleFactor()*10 );
-                       _ribbonfilter->GlobalWarningDisplayOff ();  //EED this is to avoid the "BEVEL WARNING"
+*/
 
-//BORRAME                      _streamer->GetOutput()->GetScalarRange( range );
-                       if (GetTypeForm()==0) {
+                       _polydata->Modified();
+
+       printf("EED creaVtkStreamLine::Process 0 %p \n", _polydata);
+
+                       if (GetTypeForm()==0) 
+                       {
+       printf("EED creaVtkStreamLine::Process 1 \n");
+                               _tubefilter->SetInput( _polydata );
+                               _tubefilter->SetRadius( GetScaleFactor() );     
+                               _tubefilter->SetNumberOfSides(12);
+                               _tubefilter->SetVaryRadiusToVaryRadiusOff();            
+                               _tubefilter->Modified();
+                               _tubefilter->Update();
                                _streamMapper2->SetInput( _tubefilter->GetOutput() );
-                       } else {
+                       } 
+                       if (GetTypeForm()==1) 
+                       {
+       printf("EED creaVtkStreamLine::Process 2 \n");
+                               _ribbonfilter->SetInput( _polydata );
+                               _ribbonfilter->SetWidth( GetScaleFactor() );    
+                               _ribbonfilter->SetWidthFactor( GetScaleFactor()*10 );
+                               _ribbonfilter->GlobalWarningDisplayOff ();  //EED this is to avoid the "BEVEL WARNING"
+                               _ribbonfilter->Modified();
+                               _ribbonfilter->Update();
                                _streamMapper2->SetInput( _ribbonfilter->GetOutput() );
                        }                       
+                       if (GetTypeForm()==2) 
+                       {
+       printf("EED creaVtkStreamLine::Process 3 \n");
+                               _streamMapper2->SetInput( _polydata );
+                       }                       
+       printf("EED creaVtkStreamLine::Process 4 \n");
 //EED                  _streamMapper2->SetLookupTable(vGreenToRedLut);
-                       
-                       
-                       vtkPolyData     *pd             = _streamer->GetOutput();
-                       vtkPointData    *pointdata      = pd->GetPointData();
+
+/*                     
+vtkDoubleArray* _velocity = vtkDoubleArray::New();
+_velocity->SetName("velocity");  // ... fill the colors array                  
+for (int ivelocity=0; ivelocity<=4000; ivelocity++ )
+{
+       _velocity->InsertTuple3 (ivelocity, 1, 0, 0);
+}
+_polydata->GetPointData()->AddArray(_velocity);
+*/
+                       printf("EED creaVtkStreamLine::Process A \n" );
+
+                       vtkPointData    *data   = _polydata->GetPointData();
+
+printf("EED -------------------------------------------\n");
+                       _polydata->Print(std::cout);
+printf("EED -------------------------------------------\n");
+                       data->Print(std::cout);
+printf("EED -------------------------------------------\n");
+
+//                     vtkFieldData    *data   = _polydata->GetFieldData();
 //                     vtkDataArray    *da             = pointdata->GetArray("Normals");
                        
-                       int i,sizeDa = pointdata->GetNumberOfArrays();
+                       int i,sizeDa = data->GetNumberOfArrays();
                        printf("EED creaVtkStreamLine::Process  sizeDa %d \n", sizeDa );
                        for (i=0;i<sizeDa;i++)
                        {
-                               printf("EED creaVtkStreamLine::Process-name %d, %s \n", i, pointdata->GetArrayName(i) );
+                               printf("EED creaVtkStreamLine::Process-name %d, %s \n", i, data->GetArrayName(i) );
+                               data->GetArray(i)->Print(std::cout);
+printf("EED -------------------------------------------\n");
                        }
+
+
+
+/*
+//EED
+ vtkPolyDataWriter *writer3 = vtkPolyDataWriter::New();
+ writer3->SetFileName( "/home/davila/Borrame/streamline-eed-c.vtk" );
+ writer3->SetInput( _polydata );
+ writer3->Write();
+*/
+
                        
 //                     vtkDataArray *nda = vtkDoubleArray::New();
 //                     nda->DeepCopy(da);
@@ -152,29 +195,66 @@ printf("EED creaVtkStreamLine::Process StreamLine->GetOutput() PrintSelf\n");
 //Config 1   (Normals)
 //                     _streamMapper2->ScalarVisibilityOn();
 //                     _streamMapper2->SetScalarModeToUsePointFieldData();
-//                     _streamMapper2->SetLookupTable( vLutEED );
+//                     _streamMapper2->SetLookupTable( _LutEED );
 //                     _streamMapper2->SelectColorArray( "Normals" );
 
 
+
 //Config 2   Orientation vectors
                        _streamMapper2->ScalarVisibilityOn();
                        _streamMapper2->SetScalarModeToUsePointFieldData();
                        _streamMapper2->SetLookupTable( _LutEED );
-                       _streamMapper2->SelectColorArray( "velocity" );
+
+                       if (_colorlaw==0)
+                       {
+                               _LutEED->SetVectorModeToRGBColors();
+                               _streamMapper2->SelectColorArray( "creaColorDirection" );
+                       }
+                       if (_colorlaw==1)
+                       {
+//                             _LutEED->SetVectorModeToMagnitude();
+                               vtkLookupTable *lookuptable = vtkLookupTable::New();
+                               _streamMapper2->SetLookupTable( lookuptable );
+                               _streamMapper2->SelectColorArray( "creaMagnitud" );
+                       }
+                       if (_colorlaw==2)
+                       {
+
+                               _streamMapper2->SelectColorArray( "xx" );
+                               _actor->GetProperty()->SetColor(_colorR,_colorG,_colorB);
+                       }
+
+/*
+         _vtkglyph->SetInput( GetDataObject() );  
+         _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
+         _vtkglyph->SetScaleModeToScaleByVector();
+         _vtkglyph->SetColorModeToColorByVector();
+         _vtkglyph->SetScaleFactor( GetScaleFactor() );
+         _vtkglyph->Update();
+         _pdm->SetInput( _vtkglyph->GetOutput());
+         _pdm->SetScalarModeToUsePointFieldData();
+         _pdm->SetLookupTable( _LutEED );
+         _pdm->SelectColorArray( "GlyphVector" );
+*/
+
+
+
 
 
 
 //Config 3   Position
 //   ???????
-
                        
                        _actor->SetMapper( _streamMapper2 );
-
-printf("EED lib creaVTK creaVtkStreamLine::Process  opacity %f\n", GetOpacity() );
                        _actor->GetProperty()->SetOpacity( GetOpacity() );
                }// _active
        
        VisibilityActor(); 
+   } // polydata
+
+       printf("EED creaVtkStreamLine::Process End \n");
 
-       
 } 
+
+
+
index c8b40dbf5cfa3a4712a2a8eb4b338352fa6f697a..be264e790f15fd8e96255bd222998f9dc7b19b18 100644 (file)
 #include "vtkDataSet.h"
 #include "vtkPointSource.h"
 #include "vtkPointWidget.h"
+
+#include "vtkPolyData.h"
 #include "vtkPolyDataMapper.h"
 #include "vtkRibbonFilter.h"
-#include "vtkStreamTracer.h"
 #include "vtkTubeFilter.h"
 
 //---------------------------------------------
@@ -55,8 +56,8 @@ public :
   ~creaVtkStreamLine();
 
   void Process();
-
-       void SetSourcePoints( vtkDataSet* sourcepoints);
+  void SetSourcePoints( vtkDataSet* sourcepoints);
+  void SetPolyData( vtkPolyData* polydata);
 
 
 //---------------------------------------------
@@ -70,19 +71,10 @@ protected:
 //---------------------------------------------
 private:
 
-       vtkPointWidget                          *_vPointWidget;
-
-       vtkDataSet                              *_sourcePoints;
-
-       vtkPointSource                          *_source;
-       vtkStreamTracer                         *_streamer;
-
-       vtkTubeFilter                           *_tubefilter;
-       vtkRibbonFilter                         *_ribbonfilter;
-
-       vtkPolyDataMapper                       *_streamMapper2;
-
-
+       vtkPolyData                             *_polydata;
+       vtkTubeFilter                   *_tubefilter;
+       vtkRibbonFilter         *_ribbonfilter;
+       vtkPolyDataMapper               *_streamMapper2;
 
 };
 
diff --git a/lib/creaVtk/creaVtkStreamTracer.cpp b/lib/creaVtk/creaVtkStreamTracer.cpp
new file mode 100644 (file)
index 0000000..5c44dc0
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sante)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+*/
+
+#include "creaVtkStreamTracer.h"
+
+//-----------------------------------------------------------------------------
+creaVtkStreamTracer::creaVtkStreamTracer()
+{
+       _source                 = vtkPointSource::New();
+       _streamer               = vtkStreamTracer::New();
+}
+
+//-----------------------------------------------------------------------------
+creaVtkStreamTracer::~creaVtkStreamTracer()
+{
+}
+
+
+//------------------------------------------------------------------------
+void creaVtkStreamTracer::SetActive(bool active)
+{
+   _active = active;
+}
+
+//------------------------------------------------------------------------
+void creaVtkStreamTracer::SetDataObject(vtkDataObject* dataobject)
+{
+       _dataobject = dataobject;
+}
+
+//---------------------------------------------
+vtkPolyData* creaVtkStreamTracer::GetPolyData()
+{
+       return _streamer->GetOutput();
+}
+
+//---------------------------------------------
+void creaVtkStreamTracer::SetSourcePoints( vtkDataSet* sourcepoints)
+{
+       _sourcePoints = sourcepoints;
+}
+
+//-----------------------------------------------------------------------------
+void creaVtkStreamTracer::Process()
+{
+printf("EED creaVtkStreamTracer::Process() Start \n");
+               if (_active==true)
+               {
+printf("EED creaVtkStreamTracer::Process() A\n");
+
+//                     if (_firsttime==true)
+//                     {
+//                             _firsttime=false;
+//                             _vPointWidget->AllOff();
+//                             _vPointWidget->PlaceWidget();
+//                             _vPointWidget->SetInteractor( GetRenderer()->GetRenderWindow()->GetInteractor() );
+//                             _source->SetNumberOfPoints(1000);
+//                             _source->SetRadius(5.0);
+//                     }
+//EED1                 _vPointWidget->On();                    
+//                     double c[3];
+//                     _vPointWidget->GetPosition(c);
+//                     _source->SetCenter( c );
+//                     _source->Update();
+                       
+                       _streamer->SetInput( _dataobject );
+//EED1 _streamer->SetSource( _source->GetOutput() );
+                       _streamer->SetSource( _sourcePoints );
+                       _streamer->SetIntegratorTypeToRungeKutta45();
+                       _streamer->SetMaximumPropagation(500);
+//EED          _streamer->SetMaximumPropagationUnitToTimeUnit();
+                       _streamer->SetInitialIntegrationStep (0.001);
+//EED          _streamer->SetInitialIntegrationStepUnitToCellLengthUnit();
+                       _streamer->SetIntegrationDirectionToBoth();
+//EED    streamer->ComputeVorticityOn ();
+                       _streamer->Update();
+
+//                     _streamer->Print(std::cout);
+//                     _streamer->GetOutput()->Print(std::cout);
+printf("EED creaVtkStreamTracer::Process() B\n");
+
+       } // active
+printf("EED creaVtkStreamTracer::Process() End \n");
+} 
+
+
+
+//---------------------------------------------
+//Method template
+//---------------------------------------------
+/*
+void creaVtkStreamTracer::FunctionName(int& parameterA)
+{
+  parameterA = 2 * parameterA;
+  return;
+}
+*/
diff --git a/lib/creaVtk/creaVtkStreamTracer.h b/lib/creaVtk/creaVtkStreamTracer.h
new file mode 100644 (file)
index 0000000..918337a
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sante)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+*/
+
+#ifndef _CREAVTKSTREAMTRACER_H_
+#define _CREAVTKSTREAMTRACER_H_
+
+//---------------------------------------------
+// Class Name: creaVtkStreamTracer
+// [classdescription]
+//---------------------------------------------
+
+#include "vtkDataSet.h"
+#include "vtkPointSource.h"
+#include "vtkPointWidget.h"
+#include "vtkStreamTracer.h"
+
+class creaVtkStreamTracer
+{
+
+//---------------------------------------------
+//Methods and attributes exposed to other classes
+//---------------------------------------------
+public :
+       creaVtkStreamTracer();
+       ~creaVtkStreamTracer();
+
+       void SetActive(bool active);
+       void SetDataObject(vtkDataObject* dataobject);
+       void SetSourcePoints(vtkDataSet* sourcepoints);
+       void Process();
+
+       vtkPolyData* GetPolyData();
+
+//--Method template----------------------------
+//  void FunctionName(int& parameterA);
+
+
+//---------------------------------------------
+//Methods and attributes exposed only to classes
+//that are derived from this class
+//---------------------------------------------
+protected:
+
+//---------------------------------------------
+//Methods and attributes only visible by this class
+//---------------------------------------------
+private:
+
+       bool                                    _active;
+   vtkDataObject               *_dataobject;
+       vtkDataSet                      *_sourcePoints;
+       vtkPointSource          *_source;
+       vtkStreamTracer *_streamer;
+
+
+};
+
+//-end of _CREAVTKSTREAMTRACER_H_------------------------------------------------------
+#endif
diff --git a/lib/creaVtk/vtkStreamLineCreateColorInfo.cpp b/lib/creaVtk/vtkStreamLineCreateColorInfo.cpp
new file mode 100644 (file)
index 0000000..c088d5e
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sante)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+*/
+
+#include "vtkStreamLineCreateColorInfo.h"
+#include "vtkIdList.h"
+#include "vtkCellArray.h"
+#include "vtkCharArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkPointData.h"
+
+
+vtkStreamLineCreateColorInfo::vtkStreamLineCreateColorInfo()
+{
+       _StreamLinesIn = NULL;
+       _vtkidlist              = vtkIdList::New();
+
+}
+
+vtkStreamLineCreateColorInfo::~vtkStreamLineCreateColorInfo()
+{
+}
+
+//---------------------------------------------
+void vtkStreamLineCreateColorInfo::SetStreamLinesIn(vtkPolyData* streamlinein)
+{
+       _StreamLinesIn = streamlinein;
+}
+
+//---------------------------------------------
+vtkPolyData *vtkStreamLineCreateColorInfo::GetStreamLinesOut()
+{
+       return _StreamLinesIn;
+}
+
+//---------------------------------------------
+void vtkStreamLineCreateColorInfo::Run()
+{
+       vtkCellArray    *vtkcellarray           = _StreamLinesIn->GetLines();
+       long int                nLinesCell                      = vtkcellarray->GetNumberOfCells(); 
+       long int                numberofids; 
+       long int                ii,jj,iLine;
+       double                  point1[3];
+       double                  point2[3];
+       long int                id,id1,id2;
+       double                  vx,vy,vz,mag;
+       double                  colorDirX,colorDirY,colorDirZ;
+
+       _StreamLinesIn->Update();
+       vtkCharArray    *mask                           = vtkCharArray::New();
+       vtkDoubleArray  *magnitud                       = vtkDoubleArray::New();
+       vtkDoubleArray  *velocity                       = vtkDoubleArray::New();
+       vtkDoubleArray  *colorDirection = vtkDoubleArray::New();
+
+       mask->SetName("creaMask");  // ... fill the colors array                        
+       mask->SetNumberOfComponents(1); //3d normals (ie x,y,z)
+       mask->SetNumberOfTuples(_StreamLinesIn->GetNumberOfPoints());
+
+       magnitud->SetName("creaMagnitud");  // ... fill the colors array                        
+       magnitud->SetNumberOfComponents(1); //3d normals (ie x,y,z)
+       magnitud->SetNumberOfTuples(_StreamLinesIn->GetNumberOfPoints());
+
+       velocity->SetName("creaVelocity");  // ... fill the colors array                        
+       velocity->SetNumberOfComponents(3); //3d normals (ie x,y,z)
+       velocity->SetNumberOfTuples(_StreamLinesIn->GetNumberOfPoints());
+
+       colorDirection->SetName("creaColorDirection");  // ... fill the colors array                    
+       colorDirection->SetNumberOfComponents(3); //3d normals (ie x,y,z)
+       colorDirection->SetNumberOfTuples(_StreamLinesIn->GetNumberOfPoints());
+
+
+       for (ii=0;ii<_StreamLinesIn->GetNumberOfPoints();ii++)
+       {
+               mask->SetTuple1 (ii, 0);
+               magnitud->SetTuple1 (ii, 0);
+               velocity->SetTuple3 (ii, 0, 0, 0);
+               colorDirection->SetTuple3 (ii, 0, 0, 0);
+       }
+
+       // FOR EACH LINE
+   ii=0;
+   for ( iLine=0 ; iLine<nLinesCell ; iLine++ )
+   {
+               vtkcellarray->GetCell(ii, _vtkidlist );
+               numberofids = _vtkidlist->GetNumberOfIds();
+       
+               for (jj=0;jj<numberofids;jj++)
+               {
+                       id = _vtkidlist->GetId(jj);
+                       if (jj-1>=0) {  id1 = _vtkidlist->GetId(jj-1); } else {id1=id;}
+                       if (jj+1<numberofids) {id2 = _vtkidlist->GetId(jj+1);} else {id2=id;}
+                       _StreamLinesIn->GetPoint( id1 ,point1);
+                       _StreamLinesIn->GetPoint( id2 ,point2);
+                       vx= point1[0]-point2[0];                
+                       vy= point1[1]-point2[1];
+                       vz= point1[2]-point2[2];
+                       mag= sqrt( vx*vx +vy*vy + vz*vz );
+                       colorDirX=fabs(vx/mag);
+                       colorDirY=fabs(vy/mag);
+                       colorDirZ=fabs(vz/mag);
+
+               mask->SetTuple1 (id, 1);
+               magnitud->SetTuple1 (id, mag);
+               velocity->SetTuple3 (id, vx,vy,vz);
+               colorDirection->SetTuple3 (id, colorDirX,colorDirY,colorDirZ);
+}
+
+               ii=ii+numberofids+1;
+       } // for iLine
+
+               _StreamLinesIn->GetPointData()->AddArray( mask );
+               _StreamLinesIn->GetPointData()->AddArray( magnitud );
+               _StreamLinesIn->GetPointData()->AddArray( velocity );
+               _StreamLinesIn->GetPointData()->AddArray( colorDirection );
+
+}
+
+//---------------------------------------------
+void vtkStreamLineCreateColorInfo::Process()
+{
+       if (_StreamLinesIn!=NULL)
+       {
+               Run();
+       }
+}
+
+
diff --git a/lib/creaVtk/vtkStreamLineCreateColorInfo.h b/lib/creaVtk/vtkStreamLineCreateColorInfo.h
new file mode 100644 (file)
index 0000000..c6ae0c4
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sante)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+*/
+
+#ifndef _VTKSTREAMLINECREATECOLORINFO_H_
+#define _VTKSTREAMLINECREATECOLORINFO_H_
+
+#include "vtkPolyData.h"
+
+//---------------------------------------------
+// Class Name: vtkStreamLineCreateColorInfo
+// [classdescription]
+//---------------------------------------------
+
+class vtkStreamLineCreateColorInfo
+{
+
+//---------------------------------------------
+//Methods and attributes exposed to other classes
+//---------------------------------------------
+public :
+  vtkStreamLineCreateColorInfo();
+  ~vtkStreamLineCreateColorInfo();
+
+//--Method template----------------------------
+  void SetStreamLinesIn(vtkPolyData*   streamlinein);
+  void                                                                                         Process();
+  vtkPolyData*                                                                 GetStreamLinesOut();
+
+//---------------------------------------------
+//Methods and attributes exposed only to classes
+//that are derived from this class
+//---------------------------------------------
+protected:
+//---------------------------------------------
+//Methods and attributes only visible by this class
+//---------------------------------------------
+private:
+       vtkIdList*              _vtkidlist;
+       vtkPolyData*    _StreamLinesIn;
+       void    Run();
+
+};
+
+//-end of _VTKSTREAMLINECREATECOLORINFO_H_------------------------------------------------------
+#endif
index 5ed091f1ca8d4a29b8208d1451a8a59adbdd4f09..c834ada83a2a76b01e51875f310a8e590a016ac5 100644 (file)
@@ -112,21 +112,21 @@ printf("EED vtkTensorsVisu::Process Start\n");
        _pdm->SetInput( pdn->GetOutput() );
        _pdm->ImmediateModeRenderingOn();
 
-         _pdm->ScalarVisibilityOn();
-         _pdm->SetScalarModeToUsePointFieldData();
+   _pdm->ScalarVisibilityOn();
+   _pdm->SetScalarModeToUsePointFieldData();
 
 
 //EED  _pdm->Update();
 
        _actor->SetMapper( _pdm );
-        _actor->GetProperty()->SetOpacity( GetOpacity() );
+   _actor->GetProperty()->SetOpacity( GetOpacity() );
 
        tg->ColorGlyphsOn();
 //     tg->ExtractEigenvaluesOn();
        tg->SetColorModeToEigenvalues();
 
-        _pdm->SetLookupTable( _LutEED );
-         _pdm->SelectColorArray( "Normals" );
+       _pdm->SetLookupTable( _LutEED );
+   _pdm->SelectColorArray( "Normals" );
 
 
        //int tcg = tg->GetColorGlyphs();
index 405d741b32294ff3a936cb7bcc29967d591e31ed..4c2872458255da38e8d196e569e65d89774f4ebb 100644 (file)
@@ -118,6 +118,7 @@ void vtkLookupTableMapDirVectorEED(vtkLookupTableDirectionVector *self, T *input
        double dirx,diry,dirz;
        
        
+inIncr=3;
        printf("EED length %d  %p\n", length,input);
 //     mag = new double[length];
        for (i = 0; i < length; ++i)
@@ -125,7 +126,7 @@ void vtkLookupTableMapDirVectorEED(vtkLookupTableDirectionVector *self, T *input
                dirx    = 0;
                diry    = 0;
                dirz    = 0;
-               sum             = 0;
+               sum     = 0;
                for (j = 0; j < inIncr; ++j)
                {
                        if (j==0) dirx= static_cast<double>(*input);  
@@ -141,6 +142,7 @@ void vtkLookupTableMapDirVectorEED(vtkLookupTableDirectionVector *self, T *input
                *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);
@@ -192,22 +194,15 @@ void vtkLookupTableDirectionVector::PrintSelf(ostream& os, vtkIndent indent)
 //----------------------------------
 //----------------------------------
 
-
-
-
-
-
-
-
 vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
 {
-        _firsttime     = true;
+      _firsttime       = true;
        _active         = false;
-       _scalefactor    = 1;
-       _opacity        = 1;
+       _scalefactor= 1;
+       _opacity                = 1;
        _dataobject     = NULL;
        _renderer       = NULL;
-       _typeForm       = 0;
+               _typeForm       = 0;
 
        _LutEED         = vtkLookupTableDirectionVector::New();
 //     _LutEED->SetVectorMode(0);
@@ -215,8 +210,6 @@ vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
 //_LutEED->SetVectorModeToComponent();
 _LutEED->SetVectorModeToRGBColors();
 
-
-
        _pdm            = vtkPolyDataMapper::New();
        _actor          = vtkActor::New();
        _actorAdded     = false;
@@ -321,20 +314,40 @@ void vtkVectorsTensorsVisuBase::VisibilityActor()
        if ( (_active==true) && (_actorAdded==false) ){
                if (GetRenderer()!=NULL)
                {
-                  GetRenderer()->AddActor(_actor);
+             GetRenderer()->AddActor(_actor);
                   _actorAdded=true;
-                        } // if Renderer
+       } // if Renderer
        } // if _active==true 
 
        if ( (_active==false) && (_actorAdded==true) ){
                if (GetRenderer()!=NULL)
                {
-                  GetRenderer()->RemoveActor(_actor);
+             GetRenderer()->RemoveActor(_actor);
                   _actorAdded=false;
-                        } // if Renderer
+      } // if Renderer
        } // if _active==false  
 }
 
 
+//------------------------------------------------------------------------------
+void vtkVectorsTensorsVisuBase::SetColorLaw(int colorlaw)
+{
+       _colorlaw = colorlaw;
+}
+
+//------------------------------------------------------------------------------
+void vtkVectorsTensorsVisuBase::SetColor(std::vector<double> rgb)
+{
+       if (rgb.size()==3)
+       {
+               _colorR=rgb[0];
+               _colorG=rgb[1];
+               _colorB=rgb[2];
+       } else {
+               _colorR=1;
+               _colorG=1;
+               _colorB=1;
+       }
+}
 
 
index 0d86225e4408a38fa23a407773d65aafb073cab9..2ca0d493fc650c4f09821d6868d4f6cf6133e8c0 100644 (file)
@@ -108,24 +108,25 @@ public :
   vtkVectorsTensorsVisuBase();
   ~vtkVectorsTensorsVisuBase();
 
-   void SetActive(bool);
-   void SetDataObject(vtkDataObject*);
-   void SetRenderer(vtkRenderer *);
-   void SetScaleFactor(double);
-   void SetOpacity(double);
-   void SetTypeForm(int);
+   void                                        SetActive(bool);
+   void                                        SetDataObject(vtkDataObject*);
+   void                                        SetRenderer(vtkRenderer *);
+   void                                        SetScaleFactor(double);
+   void                                        SetOpacity(double);
+   void                                        SetTypeForm(int);
+   void                                        SetColorLaw(int);
+   void                                        SetColor(std::vector<double>);
 
-   bool                GetActive();
-   vtkDataObject*      GetDataObject();
-   vtkRenderer*        GetRenderer();
-   double              GetScaleFactor();
-   double              GetOpacity();
-   vtkProp3D*          GetProp3D();
-   int                         GetTypeForm();
+   bool                                        GetActive();
+   vtkDataObject*              GetDataObject();
+   vtkRenderer*                GetRenderer();
+   double                              GetScaleFactor();
+   double                              GetOpacity();
+   vtkProp3D*                  GetProp3D();
+   int                                 GetTypeForm();
 
-   virtual void Process();
-//   void Refresh();
-   void VisibilityActor();
+   virtual void                Process();
+   void                                        VisibilityActor();
 
 
 
@@ -141,20 +142,22 @@ protected:
 private:
    bool                                _actorAdded;
 
-   double                              _scalefactor;
-   double                              _opacity;
-   vtkDataObject                       *_dataobject;
-   vtkRenderer                         *_renderer;
-   int                                 _typeForm;
+   double                      _scalefactor;
+   double                      _opacity;
+   vtkDataObject       *_dataobject;
+   vtkRenderer         *_renderer;
+   int                         _typeForm;
 
 
 protected:
-   bool                                _firsttime;
-   bool                                        _active;
+   bool                                                                                        _firsttime;
+   bool                                                                                        _active;
 
    vtkSmartPointer<vtkPolyDataMapper>  _pdm;
-   vtkSmartPointer<vtkActor>            _actor;
-   vtkLookupTableDirectionVector       *_LutEED;
+   vtkSmartPointer<vtkActor>           _actor;
+   vtkLookupTableDirectionVector                       *_LutEED;
+       int                                                                                     _colorlaw;
+       double                                                                          _colorR,_colorG,_colorB;
 
 };
 
index 43df474428cfa2e3e5c0701424a4b178ad4da08d..c8045e55f601799252ba875a691b48bda8573bb6 100644 (file)
 
 #include "vtkProperty.h"
 
+//Borrame
+#include "vtkPointData.h"
+
+
 //------------------------------------------------------------------------------
 vtkVectorsVisu::vtkVectorsVisu()
   :vtkVectorsTensorsVisuBase()
 {
        _vtkarrowsource = vtkArrowSource::New();
-       _vtkglyph       = vtkGlyph3D::New();
+       _vtkglyph                       = vtkGlyph3D::New();
 }
 
 
@@ -49,20 +53,30 @@ void vtkVectorsVisu::Process()
 printf("EED vtkVectorsVisu::Process()  start\n");
      if(_active==true)
      {
-printf("EED vtkVectorsVisu::Process()  1\n");
          _vtkglyph->SetInput( GetDataObject() );  
-printf("EED vtkVectorsVisu::Process()  2\n");
          _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
-printf("EED vtkVectorsVisu::Process()  3\n");
          _vtkglyph->SetScaleModeToScaleByVector();
          _vtkglyph->SetColorModeToColorByVector();
          _vtkglyph->SetScaleFactor( GetScaleFactor() );
-printf("EED vtkVectorsVisu::Process()  4\n");
          _vtkglyph->Update();
-printf("EED vtkVectorsVisu::Process()  5\n");
 
          _pdm->SetInput( _vtkglyph->GetOutput());
-printf("EED vtkVectorsVisu::Process()  5.1\n");
+
+vtkPointData   *data   = _vtkglyph->GetOutput()->GetPointData();
+printf("EED -------------------------------------------\n");
+_vtkglyph->GetOutput()->Print(std::cout);
+printf("EED -------------------------------------------\n");
+data->Print(std::cout);
+printf("EED -------------------------------------------\n");                   
+int i,sizeDa = data->GetNumberOfArrays();
+printf("EED vtkVectorsVisu::Process  sizeDa %d \n", sizeDa );
+for (i=0;i<sizeDa;i++)
+{
+       printf("EED vtkVectorsVisu::Process-name %d, %s \n", i, data->GetArrayName(i) );
+       data->GetArray(i)->Print(std::cout);
+       printf("EED -------------------------------------------\n");
+}
+
 //EED         _pdm->SetScalarRange( range );
 //EED         vtkPolyData      *pd                     = vGlyphFlowPlane->GetOutput();
 //EED         vtkPointData     *pointdata              = pd->GetPointData();
@@ -74,23 +88,17 @@ printf("EED vtkVectorsVisu::Process()  5.1\n");
 //EED         pointdata->AddArray( nda );
 //EED         bbGetInputIn()->GetPointData()->AddArray( nda );
 //EED2         _pdm->ScalarVisibilityOn();
-printf("EED vtkVectorsVisu::Process()  6\n");
          _pdm->SetScalarModeToUsePointFieldData();
-
          _pdm->SetLookupTable( _LutEED );
-printf("EED vtkVectorsVisu::Process()  7\n");
          _pdm->SelectColorArray( "GlyphVector" );
 
 //       vSliceMapperVec->SetLookupTable( vGreenToRedLut );
 //       vSliceMapperVec->SetColorModeToMapScalars();
 
          _actor->SetMapper( _pdm );
-printf("EED vtkVectorsVisu::Process()  8\n");
          _actor->GetProperty()->SetOpacity( GetOpacity() );
-printf ("EED vtkVectorsVisu::Process opacity:%f\n",GetOpacity()  ); 
     }// if _active
 
-printf("EED vtkVectorsVisu::Process()  9\n");
     VisibilityActor(); 
 printf("EED vtkVectorsVisu::Process()  end\n");
 }