]> Creatis software - creaVtk.git/commitdiff
#2446 creaVtk Feature New Normal - Stream Tracer, Stream Line (interface, widget)
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Wed, 15 Oct 2014 14:28:13 +0000 (16:28 +0200)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Wed, 15 Oct 2014 14:28:13 +0000 (16:28 +0200)
29 files changed:
bbtk_creaVtk_PKG/bbs/boxes/PlaneTensorVisu_Widget.bbg
bbtk_creaVtk_PKG/bbs/boxes/PlaneTensorVisu_Widget.bbs
bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Interface.bbg
bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Interface.bbs
bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbg
bbtk_creaVtk_PKG/bbs/boxes/StreamlineExploration_Wideget.bbs
bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbg
bbtk_creaVtk_PKG/bbs/boxes/TensorsExploration_Wideget.bbs
bbtk_creaVtk_PKG/bbs/boxes/TensorsVisu_Wideget.bbg
bbtk_creaVtk_PKG/bbs/boxes/TensorsVisu_Wideget.bbs
bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbg
bbtk_creaVtk_PKG/bbs/boxes/VectorsExploration_Wideget.bbs
bbtk_creaVtk_PKG/src/bbcreaVtkLineProfile.cxx [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkLineProfile.h [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkPointRotation.cxx [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkPointRotation.h [new file with mode: 0644]
bbtk_creaVtk_PKG/src/bbcreaVtkTensorsVisu.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkTensorsVisu.h
bbtk_creaVtk_PKG/src/bbcreaVtkVectorsVisu.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkVectorsVisu.h
lib/creaVtk/vtkImageDataStrucPoints.cpp
lib/creaVtk/vtkTensorsVisu.cpp
lib/creaVtk/vtkTensorsVisu.h
lib/creaVtk/vtkVectorsTensorsVisuBase.cpp
lib/creaVtk/vtkVectorsTensorsVisuBase.h
lib/creaVtk/vtkVectorsVisu.cpp
lib/creaVtk/vtkVectorsVisu.h

index 8fcb0a6c9ebc51b469718107ffec578e2e63dffc..bb9fd4ba67c87979327bdeafb14525986e117e7b 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneTensorVisu_Widget.bbg
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneTensorVisu_Widget.bbg
 # ----------------------------------
 
 APP_START
@@ -40,8 +40,6 @@ std:MultipleInputs:Box02
 ISEXEC:FALSE
 -67.511455:-19.324707:-900.000000
 -21.936455:-29.324707:-900.000000
-PORT
-BoxProcessMode:"Reactive"
 FIN_BOX
 BOX
 vtk:ProbeFilter:Box03
@@ -66,6 +64,8 @@ creaVtk:PlaneVectorViso_Interface:Box06
 ISEXEC:FALSE
 54.274543:36.839315:-900.000000
 125.449543:26.839315:-900.000000
+PORT
+typeFormsStr:"Cube Sphere Superquadric"
 FIN_BOX
 BOX
 creaVtk:TensorsVisu:Box07
@@ -73,7 +73,7 @@ ISEXEC:FALSE
 6.511770:-45.519777:-900.000000
 52.086770:-55.519777:-900.000000
 FIN_BOX
-CONNECTIONS:19
+CONNECTIONS:20
 CONNECTION
 Box01:BoxChange:Box02:In1
 NumberOfControlPoints:0
@@ -131,4 +131,7 @@ NumberOfControlPoints:0
 CONNECTION
 Box06:ScaleFactor:Box07:ScaleFactor
 NumberOfControlPoints:0
+CONNECTION
+Box06:typeForm:Box07:TypeForm
+NumberOfControlPoints:0
 APP_END
index cd9f3019dcc9b5e6849022364b22dd52145f97cc..f42f02427a7bb66345436f08a48664f519403680 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneTensorVisu_Widget.bbs
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneTensorVisu_Widget.bbs
 # ----------------------------------
 
 include std
@@ -19,7 +19,6 @@ category "<VOID>"
 new PlaneWidget Box01
 
 new MultipleInputs Box02
-  set Box02.BoxProcessMode "Reactive"
 
 new ProbeFilter Box03
 
@@ -28,6 +27,7 @@ new vtkImageDataPointerRelay Box04
 new MagicBox Box05
 
 new PlaneVectorViso_Interface Box06
+  set Box06.typeFormsStr "Cube Sphere Superquadric"
 
 new TensorsVisu Box07
 
@@ -47,6 +47,7 @@ connect Box02.BoxChange Box07.BoxExecute
 connect Box03.Out Box07.In
 connect Box06.Opacity Box07.Opacity
 connect Box06.ScaleFactor Box07.ScaleFactor
+connect Box06.typeForm Box07.TypeForm
 
 # Complex input ports
 input vtkImageData Box04.In " "
@@ -56,5 +57,6 @@ input renderer Box05.In " "
 output Widget Box06.widget " "
 output boxchange Box02.BoxChange " "
 
+message    
 
 endefine
index cfd7c64d770386ddbd4d2840e22e39a89d4d258c..bec1430c6a80bb4b27a74b4ae26c43302f9d1c8d 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Interface.bbg
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Interface.bbg
 # ----------------------------------
 
 APP_START
@@ -10,7 +10,7 @@ AUTHOR:Author ??
 COMPLEXBOX:TRUE
 COMPLEXBOXNAME:PlaneVectorViso_Interface
 PACKAGENAME:creaVtk
-COMPLEXOUTPUTS:7
+COMPLEXOUTPUTS:8
 COMPLEX_PORT
 boxChange
 -55.620936:-52.838253:-900.000000
@@ -39,13 +39,21 @@ COMPLEX_PORT
 Ratio
 -91.228359:-50.583288:-900.000000
 FIN_COMPLEX_PORT
-COMPLEXINPUTS:0
-BOXES:10
+COMPLEX_PORT
+typeForm
+102.276330:-54.205701:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:1
+COMPLEX_PORT
+typeFormsStr
+107.913964:117.907952:-900.000000
+FIN_COMPLEX_PORT
+BOXES:14
 BOX
 wx:Slider:Box00
 ISEXEC:FALSE
--50.906743:62.037478:-900.000000
-0.493257:52.037478:-900.000000
+31.999641:48.109206:-900.000000
+83.399641:38.109206:-900.000000
 PORT
 In:"30"
 PORT
@@ -55,15 +63,15 @@ Max:"100"
 PORT
 Min:"1"
 PORT
-ReactiveOnTrack:"true"
+ReactiveOnTrack:"True"
 PORT
 Title:"Plane Resolution"
 FIN_BOX
 BOX
 wx:CheckBox:Box01
 ISEXEC:FALSE
-6.711178:62.037478:-900.000000
-52.286178:52.037478:-900.000000
+-29.436005:97.853036:-900.000000
+16.138995:87.853036:-900.000000
 PORT
 In:"false"
 PORT
@@ -74,30 +82,28 @@ FIN_BOX
 BOX
 std:MultipleInputs:Box02
 ISEXEC:FALSE
--57.320437:18.206815:-900.000000
--11.745437:8.206815:-900.000000
-PORT
-BoxProcessMode:"Reactive"
+-69.982503:10.428689:-900.000000
+-24.407503:0.428689:-900.000000
 FIN_BOX
 BOX
 wx:LayoutLine:Box03
 ISEXEC:FALSE
-21.964932:17.280930:-900.000000
-79.524932:7.280930:-900.000000
+10.915772:-15.519850:-900.000000
+68.475772:-25.519850:-900.000000
 PORT
 WinTitle:"Plane flield"
 FIN_BOX
 BOX
 wx:LayoutTab:Box04
 ISEXEC:FALSE
-1.964247:-8.020677:-900.000000
-59.524247:-18.020677:-900.000000
+1.361291:-37.866975:-900.000000
+58.921291:-47.866975:-900.000000
 FIN_BOX
 BOX
 wx:CheckBox:Box05
 ISEXEC:FALSE
-76.189077:62.984731:-900.000000
-121.764077:52.984731:-900.000000
+27.771749:97.805412:-900.000000
+73.346749:87.805412:-900.000000
 PORT
 ReactiveOnKeystroke:"true"
 PORT
@@ -106,8 +112,8 @@ FIN_BOX
 BOX
 wx:Slider:Box06
 ISEXEC:FALSE
-133.231853:60.872036:-900.000000
-184.631853:50.872036:-900.000000
+96.421419:49.928393:-900.000000
+147.821419:39.928393:-900.000000
 PORT
 In:"100"
 PORT
@@ -117,15 +123,15 @@ Max:"100"
 PORT
 Min:"0"
 PORT
-ReactiveOnTrack:"true"
+ReactiveOnTrack:"True"
 PORT
 Title:"Opacity"
 FIN_BOX
 BOX
 std:Div:Box07
 ISEXEC:FALSE
-117.650724:22.843519:-900.000000
-150.425724:12.843519:-900.000000
+124.614860:-26.900311:-900.000000
+157.389860:-36.900311:-900.000000
 PORT
 In2:"100.0"
 FIN_BOX
@@ -145,19 +151,53 @@ Max:"500000"
 PORT
 Min:"1"
 PORT
-ReactiveOnTrack:"true"
+ReactiveOnTrack:"True"
 PORT
 Title:"Scale Factor"
 FIN_BOX
 BOX
 std:Div:Box09
 ISEXEC:FALSE
-173.149288:17.893679:-900.000000
-205.924288:7.893679:-900.000000
+170.827909:-26.212517:-900.000000
+203.602909:-36.212517:-900.000000
 PORT
 In2:"100.0"
 FIN_BOX
-CONNECTIONS:20
+BOX
+wx:LayoutLine:Box10
+ISEXEC:FALSE
+8.365236:62.514618:-900.000000
+65.925236:52.514618:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box11
+ISEXEC:FALSE
+25.048980:15.194635:-900.000000
+82.608980:5.194635:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:ComboBox:Box12
+ISEXEC:FALSE
+113.883224:81.760768:-900.000000
+159.458224:71.760768:-900.000000
+PORT
+In:"A B C"
+PORT
+Title:"Form"
+FIN_BOX
+BOX
+wx:LayoutLine:Box13
+ISEXEC:FALSE
+94.792811:8.332966:-900.000000
+152.352811:-1.667034:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:27
 CONNECTION
 Box00:BoxChange:Box02:In1
 NumberOfControlPoints:0
@@ -165,12 +205,6 @@ CONNECTION
 Box01:BoxChange:Box02:In2
 NumberOfControlPoints:0
 CONNECTION
-Box01:Widget:Box03:Widget1
-NumberOfControlPoints:0
-CONNECTION
-Box00:Widget:Box03:Widget2
-NumberOfControlPoints:0
-CONNECTION
 Box02:BoxChange:boxChange:boxChange
 NumberOfControlPoints:0
 CONNECTION
@@ -180,15 +214,9 @@ CONNECTION
 Box04:Widget:widget:widget
 NumberOfControlPoints:0
 CONNECTION
-Box05:Widget:Box03:Widget3
-NumberOfControlPoints:0
-CONNECTION
 Box05:BoxChange:Box02:In3
 NumberOfControlPoints:0
 CONNECTION
-Box06:Widget:Box03:Widget4
-NumberOfControlPoints:0
-CONNECTION
 Box06:Out:Box07:In1
 NumberOfControlPoints:0
 CONNECTION
@@ -201,9 +229,6 @@ CONNECTION
 Box08:BoxChange:Box02:In5
 NumberOfControlPoints:0
 CONNECTION
-Box08:Widget:Box03:Widget5
-NumberOfControlPoints:0
-CONNECTION
 Box01:Out:ActivePlaneControl:ActivePlaneControl
 NumberOfControlPoints:0
 CONNECTION
@@ -218,4 +243,40 @@ NumberOfControlPoints:0
 CONNECTION
 Box00:Out:Ratio:Ratio
 NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box10:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box10:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box00:Widget:Box11:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box11:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box10:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box11:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box13:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box12:Widget:Box13:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box13:Widget:Box03:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:typeForm:typeForm
+NumberOfControlPoints:0
+CONNECTION
+typeFormsStr:typeFormsStr:Box12:In
+NumberOfControlPoints:0
+CONNECTION
+Box12:BoxChange:Box02:In6
+NumberOfControlPoints:0
 APP_END
index 935067b6417bc0b65f7d334e8db8d6130a56aaa4..2a016acab7cf112193103f69e3e1afa0fd913a5a 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Interface.bbs
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Interface.bbs
 # ----------------------------------
 
 include std
@@ -20,7 +20,7 @@ new Slider Box00
   set Box00.Label "true"
   set Box00.Max "100"
   set Box00.Min "1"
-  set Box00.ReactiveOnTrack "true"
+  set Box00.ReactiveOnTrack "True"
   set Box00.Title "Plane Resolution"
 
 new CheckBox Box01
@@ -29,7 +29,6 @@ new CheckBox Box01
   set Box01.Title "Plane control"
 
 new MultipleInputs Box02
-  set Box02.BoxProcessMode "Reactive"
 
 new LayoutLine Box03
   set Box03.WinTitle "Plane flield"
@@ -45,7 +44,7 @@ new Slider Box06
   set Box06.Label "true"
   set Box06.Max "100"
   set Box06.Min "0"
-  set Box06.ReactiveOnTrack "true"
+  set Box06.ReactiveOnTrack "True"
   set Box06.Title "Opacity"
 
 new Div Box07
@@ -57,28 +56,47 @@ new Slider Box08
   set Box08.Label "true"
   set Box08.Max "500000"
   set Box08.Min "1"
-  set Box08.ReactiveOnTrack "true"
+  set Box08.ReactiveOnTrack "True"
   set Box08.Title "Scale Factor"
 
 new Div Box09
   set Box09.In2 "100.0"
 
+new LayoutLine Box10
+  set Box10.Orientation "H"
+
+new LayoutLine Box11
+  set Box11.Orientation "H"
+
+new ComboBox Box12
+  set Box12.In "A B C"
+  set Box12.Title "Form"
+
+new LayoutLine Box13
+  set Box13.Orientation "H"
+
 
 connect Box00.BoxChange Box02.In1
 connect Box01.BoxChange Box02.In2
-connect Box01.Widget Box03.Widget1
-connect Box00.Widget Box03.Widget2
 connect Box03.Widget Box04.Widget1
-connect Box05.Widget Box03.Widget3
 connect Box05.BoxChange Box02.In3
-connect Box06.Widget Box03.Widget4
 connect Box06.Out Box07.In1
 connect Box08.Out Box09.In1
 connect Box06.BoxChange Box02.In4
 connect Box08.BoxChange Box02.In5
-connect Box08.Widget Box03.Widget5
+connect Box01.Widget Box10.Widget1
+connect Box05.Widget Box10.Widget2
+connect Box00.Widget Box11.Widget1
+connect Box06.Widget Box11.Widget2
+connect Box10.Widget Box03.Widget1
+connect Box11.Widget Box03.Widget2
+connect Box08.Widget Box13.Widget1
+connect Box12.Widget Box13.Widget2
+connect Box13.Widget Box03.Widget3
+connect Box12.BoxChange Box02.In6
 
 # Complex input ports
+input typeFormsStr Box12.In " "
 
 # Complex output ports
 output boxChange Box02.BoxChange " "
@@ -88,6 +106,8 @@ output AcitiveVector Box05.Out " "
 output Opacity Box07.Out " "
 output ScaleFactor Box09.Out " "
 output Ratio Box00.Out " "
+output typeForm Box12.Out " "
 
+message    
 
 endefine
index 7c038a07406e0de69ba2ea31939d7046b56757c4..1cdd5fcf643e34bd1a08898f089aec2bb897ee15 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
 # ----------------------------------
 
 APP_START
@@ -72,8 +72,10 @@ creaVtk:PlaneVectorViso_Interface:Box06
 ISEXEC:FALSE
 54.274543:36.839315:-900.000000
 125.449543:26.839315:-900.000000
+PORT
+typeFormsStr:"Line Arrow"
 FIN_BOX
-CONNECTIONS:19
+CONNECTIONS:20
 CONNECTION
 Box01:BoxChange:Box02:In1
 NumberOfControlPoints:0
@@ -131,4 +133,7 @@ NumberOfControlPoints:0
 CONNECTION
 Box06:boxChange:Box01:BoxExecute
 NumberOfControlPoints:0
+CONNECTION
+Box06:typeForm:Box00:TypeForm
+NumberOfControlPoints:0
 APP_END
index efc73d1e2fb4244394f926b3da0096a408a8bd33..bbeaa56d4248b7a9e8eaf3b7628fb25900208d91 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
 # ----------------------------------
 
 include std
@@ -30,6 +30,7 @@ new vtkImageDataPointerRelay Box04
 new MagicBox Box05
 
 new PlaneVectorViso_Interface Box06
+  set Box06.typeFormsStr "Line Arrow"
 
 
 connect Box01.BoxChange Box02.In1
@@ -47,6 +48,7 @@ connect Box06.ScaleFactor Box00.ScaleFactor
 connect Box06.boxChange Box02.In2
 connect Box06.Ratio Box01.Resolution
 connect Box06.boxChange Box01.BoxExecute
+connect Box06.typeForm Box00.TypeForm
 
 # Complex input ports
 input vtkImageData Box04.In " "
@@ -56,5 +58,6 @@ input renderer Box05.In " "
 output Widget Box06.widget " "
 output boxchange Box02.BoxChange " "
 
+message    
 
 endefine
index ad2d054ccd2865790a0230c48662ca8091243127..b9f6695d8e0865e97c00cfa1a73ffbea2eb55043 100644 (file)
@@ -13,69 +13,75 @@ PACKAGENAME:creaVtk
 COMPLEXOUTPUTS:1
 COMPLEX_PORT
 widget
--87.086702:-131.675720:-900.000000
+-93.495737:-25.392558:-900.000000
 FIN_COMPLEX_PORT
 COMPLEXINPUTS:3
 COMPLEX_PORT
 vtkImageData_vectors
--202.201495:171.786415:-900.000000
+-162.145027:117.309618:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 vtkRenderer
-128.828216:174.474869:-900.000000
+24.147313:122.668504:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Title
--83.966322:173.231649:-900.000000
+-49.784803:117.152594:-900.000000
 FIN_COMPLEX_PORT
-BOXES:7
+BOXES:8
 BOX
 vtk:UpdateRender:Box22
 ISEXEC:FALSE
-168.162416:-18.581651:-900.000000
-213.737416:-28.581651:-900.000000
+6.334285:28.952024:-900.000000
+51.909285:18.952024:-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
+-107.033271:7.331640:-900.000000
+-49.473271:-2.668360:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:Box23
 ISEXEC:FALSE
-76.506639:18.351379:-900.000000
-122.081639:8.351379:-900.000000
+-34.049213:48.794295:-900.000000
+11.525787:38.794295:-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
+-123.664308:72.163231:-900.000000
+-52.489308:62.163231:-900.000000
 FIN_BOX
 BOX
 vtk:vtkImageDataPointerRelay:Box26
 ISEXEC:FALSE
--208.540015:141.393307:-900.000000
--137.365015:131.393307:-900.000000
+-172.222151:92.257373:-900.000000
+-101.047151:82.257373:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box28
 ISEXEC:FALSE
-123.517825:137.982960:-900.000000
-169.092825:127.982960:-900.000000
+6.018852:102.199182:-900.000000
+51.593852:92.199182:-900.000000
 FIN_BOX
 BOX
 wx:LayoutLine:Box14
 ISEXEC:FALSE
--114.309291:-7.256705:-900.000000
--56.749291:-17.256705:-900.000000
+-122.299506:43.713393:-900.000000
+-64.739506:33.713393:-900.000000
 FIN_BOX
-CONNECTIONS:11
+BOX
+std:MagicBox:Box07
+ISEXEC:FALSE
+-64.010236:96.562792:-900.000000
+-18.435236:86.562792:-900.000000
+FIN_BOX
+CONNECTIONS:12
 CONNECTION
 Box23:BoxChange:Box22:BoxExecute
 NumberOfControlPoints:0
@@ -101,12 +107,15 @@ 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
+CONNECTION
+Title:Title:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box14:WinTitle
+NumberOfControlPoints:0
 APP_END
index 7759d214ee3e8fcc095b679f1d8cc74822103ca6..0bfb099c6a666d8f59c7dea5288624c4cfcb4e0b 100644 (file)
@@ -33,6 +33,8 @@ new MagicBox Box28
 
 new LayoutLine Box14
 
+new MagicBox Box07
+
 
 connect Box23.BoxChange Box22.BoxExecute
 connect Box30.boxchange Box23.In5
@@ -41,11 +43,12 @@ connect Box28.Out Box22.Renderer
 connect Box28.Out Box30.Renderer
 connect Box30.Widget Box14.Widget1
 connect Box14.Widget Box17.Widget1
+connect Box07.Out Box14.WinTitle
 
 # Complex input ports
 input vtkImageData_vectors Box26.In " "
 input vtkRenderer Box28.In " "
-input Title Box14.WinTitle " "
+input Title Box07.In " "
 
 # Complex output ports
 output widget Box17.Widget " "
index 1f823c28a9b86552ecd52e2963b4dbdfc5950103..31a6dab09480a4f1baae1ff5644ef4d01dd24741 100644 (file)
@@ -50,8 +50,6 @@ 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
@@ -85,7 +83,7 @@ ISEXEC:FALSE
 21.602067:137.982960:-900.000000
 67.177067:127.982960:-900.000000
 FIN_BOX
-CONNECTIONS:15
+CONNECTIONS:16
 CONNECTION
 Box23:BoxChange:Box22:BoxExecute
 NumberOfControlPoints:0
@@ -131,4 +129,7 @@ NumberOfControlPoints:0
 CONNECTION
 Title:Title:Box17:WinTitle
 NumberOfControlPoints:0
+CONNECTION
+Box23:BoxChange:Box17:BoxExecute
+NumberOfControlPoints:0
 APP_END
index 6d962b5becea4142fe65d1893b2b9feeee3fb8ed..319a70aca12f235cccc396f4b19c4cdc32d680b6 100644 (file)
@@ -24,7 +24,6 @@ new LayoutTab Box17
   set Box17.WinTitle "VectorsTensors Analysis"
 
 new MultipleInputs Box23
-  set Box23.BoxProcessMode "Reactive"
 
 new LayoutLine Box16
   set Box16.WinTitle "Tensors"
@@ -49,6 +48,7 @@ connect Box28.Out Box22.Renderer
 connect Box28.Out Box21.renderer
 connect Box28.Out Box19.renderer
 connect Box16.Widget Box17.Widget1
+connect Box23.BoxChange Box17.BoxExecute
 
 # Complex input ports
 input vtkImageData_tensors Box27.In " "
index 50bde04a03c2632c2dbffbeded17fc807b1d807d..9c781d7dbb27d85f51bb48a4d2aa9dd8063811b9 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/TensorsVisu_Wideget.bbg
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/TensorsVisu_Wideget.bbg
 # ----------------------------------
 
 APP_START
index 85f97804b539d19e50405b23506f2885eebc0e9a..1c1ad05c8223ee26f0b373c9cb80ea1cae57b7c5 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/TensorsVisu_Wideget.bbs
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/TensorsVisu_Wideget.bbs
 # ----------------------------------
 
 include std
@@ -38,5 +38,6 @@ input renderer Box04.Renderer " "
 output Widget Box05.widget " "
 output BoxChange Box04.BoxChange " "
 
+message    
 
 endefine
index 1efcce9c7b913f554f42ac6f5e19bc8df3de7168..bb9a83582fb8d4eb8fadc87696b518102c7a2449 100644 (file)
@@ -13,79 +13,79 @@ PACKAGENAME:creaVtk
 COMPLEXOUTPUTS:1
 COMPLEX_PORT
 widget
--153.237662:-116.543147:-900.000000
+-179.941974:-67.018786:-900.000000
 FIN_COMPLEX_PORT
 COMPLEXINPUTS:3
 COMPLEX_PORT
 vtkImageData_vectors
--202.201495:171.786415:-900.000000
+-219.680681:113.036929:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 vtkRenderer
--59.902043:169.419594:-900.000000
+-81.265493:115.039904:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Title
--96.827992:172.211702:-900.000000
+-130.329765:114.918814:-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
+-109.905905:-14.897333:-900.000000
+-64.330905:-24.897333:-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
+-184.622210:-20.410541:-900.000000
+-127.062210:-30.410541:-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
+-151.066256:11.353972:-900.000000
+-105.491256:1.353972:-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
+-268.440972:51.457315:-900.000000
+-197.265972:41.457315:-900.000000
 FIN_BOX
 BOX
 wx:LayoutLine:Box14
 ISEXEC:FALSE
--221.145840:-2.517243:-900.000000
--163.585840:-12.517243:-900.000000
+-232.798631:5.736817:-900.000000
+-175.238631:-4.263183:-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
+-187.068807:50.505798:-900.000000
+-115.893807:40.505798:-900.000000
 FIN_BOX
 BOX
 vtk:vtkImageDataPointerRelay:Box26
 ISEXEC:FALSE
--208.540015:141.393307:-900.000000
--137.365015:131.393307:-900.000000
+-226.504734:87.499150:-900.000000
+-155.329734:77.499150:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box28
 ISEXEC:FALSE
--65.212434:132.927685:-900.000000
--19.637434:122.927685:-900.000000
+-94.829944:83.888857:-900.000000
+-49.254944:73.888857:-900.000000
 FIN_BOX
-CONNECTIONS:15
+CONNECTIONS:16
 CONNECTION
 Box23:BoxChange:Box22:BoxExecute
 NumberOfControlPoints:0
@@ -131,4 +131,7 @@ NumberOfControlPoints:0
 CONNECTION
 Title:Title:Box14:WinTitle
 NumberOfControlPoints:0
+CONNECTION
+Box23:BoxChange:Box17:BoxExecute
+NumberOfControlPoints:0
 APP_END
index bec8a33ec8d8bca58064e1190a7699ac2d639043..b713d5e86732c343022894be6e8e16f6dfc6cfa3 100644 (file)
@@ -49,6 +49,7 @@ connect Box28.Out Box41.renderer
 connect Box28.Out Box18.renderer
 connect Box26.Out Box41.vtkImageData
 connect Box14.Widget Box17.Widget1
+connect Box23.BoxChange Box17.BoxExecute
 
 # Complex input ports
 input vtkImageData_vectors Box26.In " "
diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkLineProfile.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkLineProfile.cxx
new file mode 100644 (file)
index 0000000..b35cfba
--- /dev/null
@@ -0,0 +1,105 @@
+//===== 
+// Before editing this file, make 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 "bbcreaVtkLineProfile.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,LineProfile)
+BBTK_BLACK_BOX_IMPLEMENTATION(LineProfile,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 LineProfile::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+//   Here we simply set the input 'In' value to the output 'Out'
+//   And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+//    void bbSet{Input|Output}NAME(const TYPE&)
+//    const TYPE& bbGet{Input|Output}NAME() const 
+//    Where :
+//    * NAME is the name of the input/output
+//      (the one provided in the attribute 'name' of the tag 'input')
+//    * TYPE is the C++ type of the input/output
+//      (the one provided in the attribute 'type' of the tag 'input')
+
+
+printf("EED LineProfile::Process Start\n");
+
+       std::vector<double> profileLst;
+       if ( (bbGetInputPoint1().size()==3) && (bbGetInputPoint2().size()==3) && (bbGetInputIn()!=NULL) ) 
+       {
+               double x1 = bbGetInputPoint1()[0];
+               double y1 = bbGetInputPoint1()[1];
+               double z1 = bbGetInputPoint1()[2];
+               double x2 = bbGetInputPoint2()[0];
+               double y2 = bbGetInputPoint2()[1];
+               double z2 = bbGetInputPoint2()[2];
+               double dx = x1-x2;
+               double dy = y1-y2;
+               double dz = z1-z2;
+               double dist = (int) sqrt( dx*dx + dy*dy  + dz*dz );
+
+printf("EED LineProfile::Process point %f %f %f - %f %f %f\n", x1,y1,z1, x2,y2,z2);
+
+       
+               int i;
+               double ii,nx,ny,nz;
+               for (i=0; i<dist;i++)
+               {
+                       ii = i/dist;
+                       nx = x1 + dx*ii;                
+                       ny = y1 + dy*ii;                
+                       nz = z1 + dz*ii;
+                       profileLst.push_back( bbGetInputIn()->GetScalarComponentAsDouble(nx,ny,nz,0) );
+printf("%f ", bbGetInputIn()->GetScalarComponentAsDouble(nx,ny,nz,0) );
+               } // for i
+       } // if
+       bbSetOutputOut( profileLst );
+printf("\n");
+printf("EED LineProfile::Process End\n");
+
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void LineProfile::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 LineProfile::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 LineProfile::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/bbcreaVtkLineProfile.h b/bbtk_creaVtk_PKG/src/bbcreaVtkLineProfile.h
new file mode 100644 (file)
index 0000000..e0a6ac4
--- /dev/null
@@ -0,0 +1,51 @@
+//===== 
+// Before editing this file, make 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 __bbcreaVtkLineProfile_h_INCLUDED__
+#define __bbcreaVtkLineProfile_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT LineProfile
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(LineProfile,bbtk::AtomicBlackBox);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+  BBTK_DECLARE_INPUT(In,vtkImageData*);
+  BBTK_DECLARE_INPUT(Point1,std::vector<double>);
+  BBTK_DECLARE_INPUT(Point2,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(Out,std::vector<double>);
+  BBTK_PROCESS(Process);
+  void Process();
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(LineProfile,bbtk::AtomicBlackBox);
+       BBTK_NAME("LineProfile");
+       BBTK_AUTHOR("Info-Dev Creatis");
+       BBTK_DESCRIPTION("Line Profile");
+       BBTK_CATEGORY("filter");
+       BBTK_INPUT(LineProfile,In,"Input image",vtkImageData*,"");
+       BBTK_INPUT(LineProfile,Point1,"Vector [x y z]",std::vector<double>,"");
+       BBTK_INPUT(LineProfile,Point2,"Vector [x y z]",std::vector<double>,"");
+       BBTK_OUTPUT(LineProfile,Out,"Profile in gray level of the points of the segment",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(LineProfile);
+//===== 
+// Before editing this file, make 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 // __bbcreaVtkLineProfile_h_INCLUDED__
+
diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkPointRotation.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkPointRotation.cxx
new file mode 100644 (file)
index 0000000..0ca30a2
--- /dev/null
@@ -0,0 +1,105 @@
+//===== 
+// Before editing this file, make 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 "bbcreaVtkPointRotation.h"
+#include "bbcreaVtkPackage.h"
+
+#include<math.h>
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PointRotation)
+BBTK_BLACK_BOX_IMPLEMENTATION(PointRotation,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 PointRotation::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+//   Here we simply set the input 'In' value to the output 'Out'
+//   And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+//    void bbSet{Input|Output}NAME(const TYPE&)
+//    const TYPE& bbGet{Input|Output}NAME() const 
+//    Where :
+//    * NAME is the name of the input/output
+//      (the one provided in the attribute 'name' of the tag 'input')
+//    * TYPE is the C++ type of the input/output
+//      (the one provided in the attribute 'type' of the tag 'input')
+
+
+printf("EED PointRotation::Process Start\n");
+
+       if   (bbGetInputCenter().size()==3) 
+       {
+               std::vector<double> newpoint;
+               double nx,cx = bbGetInputCenter()[0];
+               double ny,cy = bbGetInputCenter()[1];
+               double nz,cz = bbGetInputCenter()[2];
+               double angRad = bbGetInputAngle()*M_PI/180;
+               nx = bbGetInputSize() * cos( angRad ) + cx;
+               ny = bbGetInputSize() * sin( angRad ) + cy;
+               nz = cz;
+               newpoint.push_back(nx);
+               newpoint.push_back(ny);
+               newpoint.push_back(nz);
+       bbSetOutputOut( newpoint );
+       } // if
+printf("EED PointRotation::Process End\n");
+  
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void PointRotation::bbUserSetDefaultValues()
+{
+
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+
+       std::vector<double> point;
+       point.push_back(1);
+       point.push_back(0);
+       point.push_back(0);
+
+       std::vector<double> center;
+       center.push_back(0);
+       center.push_back(0);
+       center.push_back(0);
+
+   bbSetInputSize(1);
+   bbSetInputCenter(center);
+   bbSetInputAngle(0);
+   bbSetOutputOut(point);
+}
+//===== 
+// Before editing this file, make 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 PointRotation::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 PointRotation::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/bbcreaVtkPointRotation.h b/bbtk_creaVtk_PKG/src/bbcreaVtkPointRotation.h
new file mode 100644 (file)
index 0000000..ca7c046
--- /dev/null
@@ -0,0 +1,49 @@
+//===== 
+// Before editing this file, make 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 __bbcreaVtkPointRotation_h_INCLUDED__
+#define __bbcreaVtkPointRotation_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT PointRotation
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(PointRotation,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(Center,std::vector<double>);
+  BBTK_DECLARE_INPUT(Size,double);
+  BBTK_DECLARE_INPUT(Angle,double);
+  BBTK_DECLARE_OUTPUT(Out,std::vector<double>);
+  BBTK_PROCESS(Process);
+  void Process();
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(PointRotation,bbtk::AtomicBlackBox);
+       BBTK_NAME("PointRotation");
+       BBTK_AUTHOR("Info-Dev");
+       BBTK_DESCRIPTION("Point Rotation with a center reference");
+       BBTK_CATEGORY("empty");
+       BBTK_INPUT(PointRotation,Center,"Center of rotation [x y z]",std::vector<double>,"");
+       BBTK_INPUT(PointRotation,Size,"Size of the segment (default 1)",double,"");
+       BBTK_INPUT(PointRotation,Angle,"Angle in degrees (default 0)",double,"");
+       BBTK_OUTPUT(PointRotation,Out,"End point of the rotated segment",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(PointRotation);
+//===== 
+// Before editing this file, make 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 // __bbcreaVtkPointRotation_h_INCLUDED__
+
index 40202e2311e7f95a5e06a7bfe5ecaab2a521249c..3f61eca110f4d0a60bef06124f17410a59fdea40 100644 (file)
@@ -31,6 +31,7 @@ void TensorsVisu::Process()
      tensorsvisu.SetScaleFactor( bbGetInputScaleFactor() );
      tensorsvisu.SetOpacity( bbGetInputOpacity() );
      tensorsvisu.SetRenderer( bbGetInputRenderer() );
+     tensorsvisu.SetTypeForm( bbGetInputTypeForm() );
      tensorsvisu.Process();
      bbSetOutputOut( tensorsvisu.GetProp3D() );
 }
@@ -47,6 +48,7 @@ void TensorsVisu::bbUserSetDefaultValues()
    bbSetInputRenderer(NULL);
    bbSetInputScaleFactor(500);
    bbSetInputOpacity(1);
+   bbSetInputTypeForm(0);
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 903f50f3b9a004b93a3f4460425c8ab1a51d79de..81d1b201a1b8e1f84eca009a3ceba713a547f27f 100644 (file)
@@ -27,6 +27,7 @@ class bbcreaVtk_EXPORT TensorsVisu
   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
   BBTK_DECLARE_INPUT(ScaleFactor,double);
   BBTK_DECLARE_INPUT(Opacity,double);
+  BBTK_DECLARE_INPUT(TypeForm,int);
   BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
   BBTK_PROCESS(Process);
   void Process();
@@ -49,6 +50,7 @@ BBTK_CATEGORY("empty");
  BBTK_INPUT(TensorsVisu,ScaleFactor,"Scale factor (500 default)",double,"");
  BBTK_INPUT(TensorsVisu,Opacity,"Opacity (1 default)",double,"");
  BBTK_INPUT(TensorsVisu,Renderer,"vtkRenderer",vtkRenderer*,"");
+ BBTK_INPUT(TensorsVisu,TypeForm,"0 Cube, 1 Sphere, 2 Superquadric  (default 0)",int,"");
  BBTK_OUTPUT(TensorsVisu,Out,"vtkProp3D of an vtkActor",vtkProp3D*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(TensorsVisu);
 //===== 
index 6fd718c4a8294ed904cbdb43b3f2b723180eb3a7..080382faada66f2b0baa53a5c479ca5b7e232c0a 100644 (file)
@@ -45,6 +45,7 @@ if ( bbGetInputActive()==true)
      vectorsvisu.SetScaleFactor( bbGetInputScaleFactor() );
      vectorsvisu.SetOpacity( bbGetInputOpacity() );
      vectorsvisu.SetRenderer( bbGetInputRenderer() );
+     vectorsvisu.SetTypeForm( bbGetInputTypeForm() );
      vectorsvisu.Process();
      bbSetOutputOut( vectorsvisu.GetProp3D() );
 printf("EED VectorsVisu::Process End\n");
@@ -64,7 +65,7 @@ void VectorsVisu::bbUserSetDefaultValues()
    bbSetInputRenderer(NULL);
    bbSetInputScaleFactor(500);
    bbSetInputOpacity(1);
-  
+   bbSetInputTypeForm(0);  
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 89beba9c27eba667211c5778e85d18bb35a4f376..27ad79c6ba950f244120585a08448b6928b10237 100644 (file)
@@ -28,6 +28,7 @@ class bbcreaVtk_EXPORT VectorsVisu
   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
   BBTK_DECLARE_INPUT(ScaleFactor,double);
   BBTK_DECLARE_INPUT(Opacity,double);
+  BBTK_DECLARE_INPUT(TypeForm,int);
   BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
   BBTK_PROCESS(Process);
   void Process();
@@ -50,6 +51,7 @@ BBTK_CATEGORY("empty");
  BBTK_INPUT(VectorsVisu,ScaleFactor,"Scale factor (500 default)",double,"");
  BBTK_INPUT(VectorsVisu,Opacity,"Opacity (1 default)",double,"");
  BBTK_INPUT(VectorsVisu,Renderer,"vtkRenderer",vtkRenderer*,"");
+ BBTK_INPUT(VectorsVisu,TypeForm,"0 Line, 1 Arrow   (default 0)",int,"");
  BBTK_OUTPUT(VectorsVisu,Out,"vtkProp3D of an vtkActor",vtkProp3D*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(VectorsVisu);
 //===== 
index 3678f7fd3eb60d57eb4cd0e87dc91582c73cc33f..44c33a31788ffdb90d39b6a6402cf3ebce1cebcc 100644 (file)
@@ -92,9 +92,10 @@ printf("EED  vtkImageDataStrucPoints::joinComponents  sizeimage%d\n", sizeimage
        _structuredPoints->Modified();
        _structuredPoints->Update();
 
+/*
        _structuredPoints->Print(cout);
 
-        vtkStructuredPointsWriter *writer2 = vtkStructuredPointsWriter::New();
+   vtkStructuredPointsWriter *writer2 = vtkStructuredPointsWriter::New();
        writer2->SetFileName("/home/davila/tmp/VectorfromCal_EED_ups.vtk");
        //writer->SetFileTypeToBinary();
        writer2->SetFileTypeToASCII();
@@ -103,7 +104,7 @@ printf("EED  vtkImageDataStrucPoints::joinComponents  sizeimage%d\n", sizeimage
        writer2->SetScalarsName("Scalar");
        writer2->SetInput(_structuredPoints);  
        writer2->Write();  
-
+*/
 
 
 
index c834ada83a2a76b01e51875f310a8e590a016ac5..046b0a5bbd5c35bf1bf1342175c7b54da34b7d7b 100644 (file)
 //------------------------------------------------------------------------
 vtkTensorsVisu::vtkTensorsVisu() : vtkVectorsTensorsVisuBase()
 {
-       ss              = vtkSphereSource::New();
+       ss                                      = vtkSphereSource::New();
        superquadratic  = vtkSuperquadricSource::New();
-       cs              = vtkCubeSource::New(); 
-       tg              = vtkTensorGlyph::New();
-       pdn             = vtkPolyDataNormals::New();
-       pd              = vtkPolyData::New();
-       pod             = vtkPointData::New();
+       cs                                      = vtkCubeSource::New(); 
+       tg                                      = vtkTensorGlyph::New();
+       pdn                                     = vtkPolyDataNormals::New();
+       pd                                      = vtkPolyData::New();
+       pod                                     = vtkPointData::New();
 }
 
 //------------------------------------------------------------------------
@@ -53,19 +53,18 @@ void vtkTensorsVisu::Process()
 printf("EED vtkTensorsVisu::Process Start\n");
 
 
-  if (_active==true){
-//        std::string source="sphere";
-        std::string source="superquadratic";
-       if(source=="sphere")
+  if (_active==true)
+  {
+
+       if(GetTypeForm()==2)                                                            // source superquadratic
        {
-               tg->SetSource(ss->GetOutput());
-       } else if(source=="cube") {
-               tg->SetSource(cs->GetOutput());
-       }else if(source=="superquadratic") {
                superquadratic->SetThetaResolution(20);
                superquadratic->SetPhiResolution(20);
                tg->SetSource(superquadratic->GetOutput());
-       } else {
+       } else if(GetTypeForm()==1) {                                   // source sphere
+               tg->SetSource(ss->GetOutput());
+       } else {                                                                                                // source cube
+               tg->SetSource(cs->GetOutput());         
        }
 
 
index cdfdb93fc44b370508817e6cdf266e4139b7a53b..8f1f135c30644217c058905c90d74d30eccf2583 100644 (file)
@@ -69,13 +69,13 @@ protected:
 //---------------------------------------------
 private:
 
-   vtkSmartPointer<vtkSphereSource>            ss;
+   vtkSmartPointer<vtkSphereSource>                    ss;
    vtkSmartPointer<vtkSuperquadricSource>      superquadratic;
-   vtkSmartPointer<vtkCubeSource>              cs; 
-   vtkSmartPointer<vtkTensorGlyph>             tg;
+   vtkSmartPointer<vtkCubeSource>                              cs; 
+   vtkSmartPointer<vtkTensorGlyph>                             tg;
    vtkSmartPointer<vtkPolyDataNormals>                 pdn;
-   vtkSmartPointer<vtkPolyData>                pd;
-   vtkSmartPointer<vtkPointData>               pod;
+   vtkSmartPointer<vtkPolyData>                                        pd;
+   vtkSmartPointer<vtkPointData>                               pod;
 };
 
 //-end of _VTKTENSORSVISU_H_------------------------------------------------------
index 4c2872458255da38e8d196e569e65d89774f4ebb..962eeec5ee4e582cb2db6c23b9081227cacd09ae 100644 (file)
@@ -210,9 +210,9 @@ vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
 //_LutEED->SetVectorModeToComponent();
 _LutEED->SetVectorModeToRGBColors();
 
-       _pdm            = vtkPolyDataMapper::New();
-       _actor          = vtkActor::New();
-       _actorAdded     = false;
+       _pdm                            = vtkPolyDataMapper::New();
+       _actor                  = vtkActor::New();
+       _actorAdded             = false;
 }
 
 vtkVectorsTensorsVisuBase::~vtkVectorsTensorsVisuBase()
index 2ca0d493fc650c4f09821d6868d4f6cf6133e8c0..c1e7b7531bd000fb71f9d63ba98feaec7264fe90 100644 (file)
@@ -140,13 +140,13 @@ protected:
 //Methods and attributes only visible by this class
 //---------------------------------------------
 private:
-   bool                                _actorAdded;
+   bool                                                                                        _actorAdded;
 
-   double                      _scalefactor;
-   double                      _opacity;
-   vtkDataObject       *_dataobject;
-   vtkRenderer         *_renderer;
-   int                         _typeForm;
+   double                                                                              _scalefactor;
+   double                                                                              _opacity;
+   vtkDataObject                                                               *_dataobject;
+   vtkRenderer                                                                 *_renderer;
+   int                                                                                 _typeForm;
 
 
 protected:
index c8045e55f601799252ba875a691b48bda8573bb6..ef8e1162b74557f091d38dfc7c894dfd19f9abf7 100644 (file)
@@ -38,6 +38,7 @@ vtkVectorsVisu::vtkVectorsVisu()
   :vtkVectorsTensorsVisuBase()
 {
        _vtkarrowsource = vtkArrowSource::New();
+       _vtklinesource          = vtkLineSource::New();
        _vtkglyph                       = vtkGlyph3D::New();
 }
 
@@ -54,7 +55,15 @@ printf("EED vtkVectorsVisu::Process()  start\n");
      if(_active==true)
      {
          _vtkglyph->SetInput( GetDataObject() );  
-         _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
+
+                       if(GetTypeForm()==1)                                                            // source Arrow
+                       {
+                _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
+                       } else {                                                                                                // source Line
+                               _vtkglyph->SetSource( _vtklinesource->GetOutput() );    
+                       }
+
+
          _vtkglyph->SetScaleModeToScaleByVector();
          _vtkglyph->SetColorModeToColorByVector();
          _vtkglyph->SetScaleFactor( GetScaleFactor() );
index 56b41c4821b9913096016ce49927e76a1122864b..55981f0047622307aa14806a641cd9edaaf92e2a 100644 (file)
@@ -32,6 +32,7 @@
 
 
 #include "vtkArrowSource.h"
+#include "vtkLineSource.h"
 #include "vtkGlyph3D.h"
 
 
@@ -69,7 +70,8 @@ protected:
 //---------------------------------------------
 private:
        vtkArrowSource  *_vtkarrowsource;
-       vtkGlyph3D      *_vtkglyph;
+       vtkLineSource   *_vtklinesource;
+       vtkGlyph3D              *_vtkglyph;
 };
 
 //-end of _vtkVectorsVISU_H_------------------------------------------------------