]> Creatis software - creaMaracasVisu.git/commitdiff
#3219 creaMaracasVisu Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 14:41:26 +0000 (16:41 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 14:41:26 +0000 (16:41 +0200)
47 files changed:
bbtk/bbs/appli/exampleManualPaint2.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleManualPaint2.bbs [new file with mode: 0644]
bbtk/bbs/appli/exampleSetPosition.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleSetPosition.bbs [new file with mode: 0644]
bbtk/bbs/boxes/ManualPaint2.bbg [new file with mode: 0644]
bbtk/bbs/boxes/ManualPaint2.bbs [new file with mode: 0644]
bbtk/bbs/boxes/ViewerByPlane.bbg [new file with mode: 0644]
bbtk/bbs/boxes/ViewerByPlane.bbs [new file with mode: 0644]
bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx
bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx
bbtk/src/bbcreaMaracasVisuSetPosition.cxx [new file with mode: 0644]
bbtk/src/bbcreaMaracasVisuSetPosition.h [new file with mode: 0644]
bbtk/src/bbcreaMaracasVisuShowNPoints_Reset.cxx
bbtk/src/bbmaracasvisuImageActor.cxx
bbtk/src/bbmaracasvisuImageActor.h
bbtk/src/bbmaracasvisuImageChangeInformation.cxx
bbtk/src/bbmaracasvisuImageChangeInformation.h
bbtk/src/bbmaracasvisuShowNPoints.cxx
bbtk/src/bbmaracasvisuShowNPoints.h
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ThresholdImageViewPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ThresholdImageViewPanel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/baseFilterManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/baseFilterManualPaint.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.h

diff --git a/bbtk/bbs/appli/exampleManualPaint2.bbg b/bbtk/bbs/appli/exampleManualPaint2.bbg
new file mode 100644 (file)
index 0000000..330234d
--- /dev/null
@@ -0,0 +1,86 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualPaint2.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+creaMaracasVisu:ManualPaint2:Box00
+ISEXEC:FALSE
+15.445002:-8.542770:-900.000000
+63.765002:-18.542770:-900.000000
+PORT
+Active_ManualPaint_Model:"false         true       true      true"
+PORT
+GrayLevel_ManualPaint_Model:"-1             4000     4000       0"
+PORT
+MaxRange_ManualPaint_Model:"-1             1500    1500     4001"
+PORT
+MinRange_ManualPaint_Model:"-1              1200   1200    3999"
+PORT
+SizeDistance_ManualPaint_Model:"-1                10          3         10"
+PORT
+TitleOptions:"Desactivate Big    Small    Clean"
+PORT
+Tolerance_Fill_ManualPaint_Model:"-1                1000   1000    10000"
+PORT
+colorBarPosition:"-10 -10"
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+19.168205:55.438996:-900.000000
+64.743205:45.438996:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+41.958379:23.496853:-900.000000
+87.533379:13.496853:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box03
+ISEXEC:TRUE
+40.001254:-38.539013:-900.000000
+85.576254:-48.539013:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:Box00:BoxExecute_ManualPaint_Model
+NumberOfControlPoints:0
+CONNECTION
+Box02:Point:Box00:Point_ManualPaint_Model
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView2:Box00:wxvtkbaseview1
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView3:Box00:wxvtkbaseview2
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView4:Box00:wxvtkbaseview3
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box00:Image2_ManualPaint_Model
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box00:Image_ManualPaint_Model
+NumberOfControlPoints:0
+CONNECTION
+Box00:widgetOut:Box03:Widget1
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/appli/exampleManualPaint2.bbs b/bbtk/bbs/appli/exampleManualPaint2.bbs
new file mode 100644 (file)
index 0000000..d223bec
--- /dev/null
@@ -0,0 +1,60 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleManualPaint2.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include vtk
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:ManualPaint2 Box00
+  set Box00.Active_ManualPaint_Model "false         true       true      true"
+  set Box00.GrayLevel_ManualPaint_Model "-1             4000     4000       0"
+  set Box00.MaxRange_ManualPaint_Model "-1             1500    1500     4001"
+  set Box00.MinRange_ManualPaint_Model "-1              1200   1200    3999"
+  set Box00.SizeDistance_ManualPaint_Model "-1                10          3         10"
+  set Box00.TitleOptions "Desactivate Big    Small    Clean"
+  set Box00.Tolerance_Fill_ManualPaint_Model "-1                1000   1000    10000"
+  set Box00.colorBarPosition "-10 -10"
+
+new vtk:LoadHola Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new wx:LayoutSplit Box03
+  set Box03.Orientation "H"
+
+
+connect Box01.Out Box02.In
+
+connect Box02.Widget Box03.Widget2
+
+connect Box02.BoxChange Box00.BoxExecute_ManualPaint_Model
+
+connect Box02.Point Box00.Point_ManualPaint_Model
+
+connect Box02.wxVtkBaseView2 Box00.wxvtkbaseview1
+
+connect Box02.wxVtkBaseView3 Box00.wxvtkbaseview2
+
+connect Box02.wxVtkBaseView4 Box00.wxvtkbaseview3
+
+connect Box01.Out Box00.Image2_ManualPaint_Model
+
+connect Box01.Out Box00.Image_ManualPaint_Model
+
+connect Box00.widgetOut Box03.Widget1
+
+
+
+# Complex input ports
+exec Box03
diff --git a/bbtk/bbs/appli/exampleSetPosition.bbg b/bbtk/bbs/appli/exampleSetPosition.bbg
new file mode 100644 (file)
index 0000000..6f13124
--- /dev/null
@@ -0,0 +1,131 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleSetPosition.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:10
+BOX
+creaMaracasVisu:SetPosition:Box00
+ISEXEC:FALSE
+20.289184:-10.820898:-900.000000
+65.864184:-20.820898:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+4.658998:70.936999:-900.000000
+68.378998:60.936999:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box02
+ISEXEC:TRUE
+-49.746073:-53.202749:-900.000000
+-4.171073:-63.202749:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box03
+ISEXEC:FALSE
+-87.619217:-5.410449:-900.000000
+-30.059217:-15.410449:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box04
+ISEXEC:FALSE
+-111.966238:58.613198:-900.000000
+-60.566238:48.613198:-900.000000
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+wx:Slider:Box05
+ISEXEC:FALSE
+-91.966238:78.613198:-900.000000
+-40.566238:68.613198:-900.000000
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+wx:Slider:Box06
+ISEXEC:FALSE
+-71.966238:98.613198:-900.000000
+-20.566238:88.613198:-900.000000
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+vtk:LoadHola:Box07
+ISEXEC:FALSE
+12.023220:112.597457:-900.000000
+57.598220:102.597457:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box08
+ISEXEC:FALSE
+-39.526336:44.185334:-900.000000
+6.048664:34.185334:-900.000000
+PORT
+In2:" "
+PORT
+In4:" "
+FIN_BOX
+BOX
+std:MultipleInputs:Box09
+ISEXEC:FALSE
+-50.647815:22.543538:-900.000000
+-5.072815:12.543538:-900.000000
+FIN_BOX
+CONNECTIONS:15
+CONNECTION
+Box01:wxVtkBaseView1:Box00:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box02:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box03:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box02:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box08:In1
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box08:In3
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box08:In5
+NumberOfControlPoints:0
+CONNECTION
+Box08:Out:Box00:Point
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box09:In1
+NumberOfControlPoints:0
+CONNECTION
+Box05:BoxChange:Box09:In2
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box09:In3
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/appli/exampleSetPosition.bbs b/bbtk/bbs/appli/exampleSetPosition.bbs
new file mode 100644 (file)
index 0000000..1bf56a8
--- /dev/null
@@ -0,0 +1,80 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleSetPosition.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include wx
+include vtk
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:SetPosition Box00
+
+new creaMaracasVisu:ViewerNV Box01
+
+new wx:LayoutSplit Box02
+  set Box02.Orientation "H"
+
+new wx:LayoutLine Box03
+
+new wx:Slider Box04
+  set Box04.ReactiveOnTrack "true"
+
+new wx:Slider Box05
+  set Box05.ReactiveOnTrack "true"
+
+new wx:Slider Box06
+  set Box06.ReactiveOnTrack "true"
+
+new vtk:LoadHola Box07
+
+new std:ConcatStrings Box08
+  set Box08.In2 " "
+  set Box08.In4 " "
+
+new std:MultipleInputs Box09
+
+
+connect Box01.wxVtkBaseView1 Box00.wxVtkBaseView
+
+connect Box01.Widget Box02.Widget2
+
+connect Box04.Widget Box03.Widget1
+
+connect Box05.Widget Box03.Widget2
+
+connect Box06.Widget Box03.Widget3
+
+connect Box03.Widget Box02.Widget1
+
+connect Box07.Out Box01.In
+
+connect Box04.Out Box08.In1
+
+connect Box05.Out Box08.In3
+
+connect Box06.Out Box08.In5
+
+connect Box08.Out Box00.Point
+
+connect Box04.BoxChange Box09.In1
+
+connect Box05.BoxChange Box09.In2
+
+connect Box06.BoxChange Box09.In3
+
+connect Box09.BoxChange Box00.BoxExecute
+
+
+
+# Complex input ports
+exec Box02
diff --git a/bbtk/bbs/boxes/ManualPaint2.bbg b/bbtk/bbs/boxes/ManualPaint2.bbg
new file mode 100644 (file)
index 0000000..503acad
--- /dev/null
@@ -0,0 +1,426 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:ManualPaint2
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widgetOut
+-94.963421:-185.755112:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:15
+COMPLEX_PORT
+TitleOptions
+-73.069454:181.258523:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Active_ManualPaint_Model
+-20.792521:183.001745:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SizeDistance_ManualPaint_Model
+-6.908988:183.290985:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+GrayLevel_ManualPaint_Model
+6.974544:183.580225:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+MinRange_ManualPaint_Model
+20.858077:183.580225:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+MaxRange_ManualPaint_Model
+32.427687:184.158706:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Point_ManualPaint_Model
+103.762209:183.383830:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Image_ManualPaint_Model
+73.334197:183.855234:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Image2_ManualPaint_Model
+90.081231:183.956721:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxExecute_ManualPaint_Model
+-167.528461:180.349965:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview1
+159.923711:180.378598:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview2
+169.240197:179.955122:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview3
+180.250591:180.378598:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Tolerance_Fill_ManualPaint_Model
+46.490178:184.420162:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+colorBarPosition
+-192.926981:179.217332:-900.000000
+FIN_COMPLEX_PORT
+BOXES:17
+BOX
+creaMaracasVisu:ManualPaint_Model:Box00
+ISEXEC:FALSE
+-75.289692:-71.460987:-900.000000
+-14.649692:-81.460987:-900.000000
+PORT
+2D3D:"1"
+PORT
+Active:"true"
+PORT
+BrushForm:"1"
+PORT
+BrushSize:"3"
+PORT
+DistanceFill:"25"
+PORT
+GrayLevel:"1000"
+PORT
+Range:"-10000 10000"
+PORT
+Tool:"1"
+FIN_BOX
+BOX
+wx:RadioButton:Box01
+ISEXEC:FALSE
+-123.860487:103.376983:-900.000000
+-60.140487:93.376983:-900.000000
+PORT
+In0:"Deselect"
+PORT
+In1:"BigBlue"
+PORT
+In2:"SmallBlue"
+PORT
+In3:"BigClean"
+PORT
+In4:"SmallClean"
+FIN_BOX
+BOX
+std:StringSelect:Box02
+ISEXEC:FALSE
+-37.673227:82.948986:-900.000000
+7.901773:72.948986:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ColorLayerImageView:Box03
+ISEXEC:FALSE
+-110.108419:-104.278922:-900.000000
+-38.933419:-114.278922:-900.000000
+PORT
+TypeControlsInterface:"2"
+PORT
+lstTransparenceBoundaries:"0"
+FIN_BOX
+BOX
+std:TransposeVectorVectorString:Box04
+ISEXEC:FALSE
+-31.305556:125.161505:-900.000000
+39.869444:115.161505:-900.000000
+PORT
+In0:"Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
+PORT
+In1:"false           true        true             true           true"
+PORT
+In2:"-1               10            3                10              3"
+PORT
+In3:"-1               4000        4000           0               0"
+PORT
+In4:"-1               1200        1200           3999        3999"
+PORT
+In5:"-1               1500        1500           4001        4001"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box05
+ISEXEC:FALSE
+-86.200317:53.438683:-900.000000
+-15.025317:43.438683:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+wx:LayoutLine:Box09
+ISEXEC:FALSE
+-96.465052:-132.072726:-900.000000
+-38.905052:-142.072726:-900.000000
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box11
+ISEXEC:FALSE
+-71.696483:40.964713:-900.000000
+-0.521483:30.964713:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box12
+ISEXEC:FALSE
+-58.354926:28.065688:-900.000000
+12.820074:18.065688:-900.000000
+PORT
+I:"3"
+FIN_BOX
+BOX
+std:ConcatStrings:Box13
+ISEXEC:FALSE
+-37.058068:-18.986769:-900.000000
+8.516932:-28.986769:-900.000000
+PORT
+In2:" "
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box14
+ISEXEC:FALSE
+-22.770985:-0.972910:-900.000000
+48.404015:-10.972910:-900.000000
+PORT
+I:"5"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box15
+ISEXEC:FALSE
+-40.934702:12.586010:-900.000000
+30.240298:2.586010:-900.000000
+PORT
+I:"4"
+FIN_BOX
+BOX
+std:TransposeVectorVectorString:Box17
+ISEXEC:FALSE
+-117.618980:121.580114:-900.000000
+-46.443980:111.580114:-900.000000
+PORT
+In0:"Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
+FIN_BOX
+BOX
+wx:RadioButton:Box18
+ISEXEC:FALSE
+-223.537738:36.072184:-900.000000
+-159.817738:26.072184:-900.000000
+PORT
+In:"1"
+PORT
+In0:"Brush"
+PORT
+In1:"Fill"
+FIN_BOX
+BOX
+wx:LayoutLine:Box19
+ISEXEC:FALSE
+-172.905988:-105.174791:-900.000000
+-115.345988:-115.174791:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:MagicBox:Box20
+ISEXEC:FALSE
+-82.351641:163.241009:-900.000000
+-36.776641:153.241009:-900.000000
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box21
+ISEXEC:FALSE
+-1.581707:-33.301126:-900.000000
+69.593293:-43.301126:-900.000000
+PORT
+I:"6"
+FIN_BOX
+CONNECTIONS:59
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out0:Box02:In0
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out1:Box02:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out2:Box02:In2
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out3:Box02:In3
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out4:Box02:In4
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out5:Box02:In5
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out6:Box02:In6
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out7:Box02:In7
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out8:Box02:In8
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out9:Box02:In9
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box05:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box09:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box00:Active
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box11:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box00:DistanceFill
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box12:In
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box00:GrayLevel
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:Box13:In1
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box13:In3
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box00:Range
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out0:Box01:In0
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out1:Box01:In1
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out2:Box01:In2
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out3:Box01:In3
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out4:Box01:In4
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out5:Box01:In5
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out6:Box01:In6
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out7:Box01:In7
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out8:Box01:In8
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out9:Box01:In9
+NumberOfControlPoints:0
+CONNECTION
+Box18:Widget:Box19:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box19:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box19:Widget:Box09:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out:Box00:Tool
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box00:BrushSize
+NumberOfControlPoints:0
+CONNECTION
+TitleOptions:TitleOptions:Box20:In
+NumberOfControlPoints:0
+CONNECTION
+Active_ManualPaint_Model:Active_ManualPaint_Model:Box04:In1
+NumberOfControlPoints:0
+CONNECTION
+SizeDistance_ManualPaint_Model:SizeDistance_ManualPaint_Model:Box04:In2
+NumberOfControlPoints:0
+CONNECTION
+GrayLevel_ManualPaint_Model:GrayLevel_ManualPaint_Model:Box04:In3
+NumberOfControlPoints:0
+CONNECTION
+MinRange_ManualPaint_Model:MinRange_ManualPaint_Model:Box04:In4
+NumberOfControlPoints:0
+CONNECTION
+MaxRange_ManualPaint_Model:MaxRange_ManualPaint_Model:Box04:In5
+NumberOfControlPoints:0
+CONNECTION
+Point_ManualPaint_Model:Point_ManualPaint_Model:Box00:Point
+NumberOfControlPoints:0
+CONNECTION
+Image_ManualPaint_Model:Image_ManualPaint_Model:Box00:Image
+NumberOfControlPoints:0
+CONNECTION
+Image2_ManualPaint_Model:Image2_ManualPaint_Model:Box00:Image2
+NumberOfControlPoints:0
+CONNECTION
+BoxExecute_ManualPaint_Model:BoxExecute_ManualPaint_Model:Box00:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview1:wxvtkbaseview1:Box03:WxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview2:wxvtkbaseview2:Box03:WxVtkBaseView1
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview3:wxvtkbaseview3:Box03:WxVtkBaseView2
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:widgetOut:widgetOut
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box17:In0
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box04:In0
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box21:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box00:ToleranceFill
+NumberOfControlPoints:0
+CONNECTION
+Tolerance_Fill_ManualPaint_Model:Tolerance_Fill_ManualPaint_Model:Box04:In6
+NumberOfControlPoints:0
+CONNECTION
+colorBarPosition:colorBarPosition:Box03:ColorBarPosition
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/ManualPaint2.bbs b/bbtk/bbs/boxes/ManualPaint2.bbs
new file mode 100644 (file)
index 0000000..cae9275
--- /dev/null
@@ -0,0 +1,152 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include wx
+include std
+
+define ManualPaint2 creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new creaMaracasVisu:ManualPaint_Model Box00
+  set Box00.2D3D "1"
+  set Box00.Active "true"
+  set Box00.BrushForm "1"
+  set Box00.BrushSize "3"
+  set Box00.DistanceFill "25"
+  set Box00.GrayLevel "1000"
+  set Box00.Range "-10000 10000"
+  set Box00.Tool "1"
+
+new wx:RadioButton Box01
+  set Box01.In0 "Deselect"
+  set Box01.In1 "BigBlue"
+  set Box01.In2 "SmallBlue"
+  set Box01.In3 "BigClean"
+  set Box01.In4 "SmallClean"
+
+new std:StringSelect Box02
+
+new creaMaracasVisu:ColorLayerImageView Box03
+  set Box03.TypeControlsInterface "2"
+  set Box03.lstTransparenceBoundaries "0"
+
+new std:TransposeVectorVectorString Box04
+  set Box04.In0 "Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
+  set Box04.In1 "false           true        true             true           true"
+  set Box04.In2 "-1               10            3                10              3"
+  set Box04.In3 "-1               4000        4000           0               0"
+  set Box04.In4 "-1               1200        1200           3999        3999"
+  set Box04.In5 "-1               1500        1500           4001        4001"
+
+new std:GetVectorStringElement Box05
+  set Box05.I "1"
+
+new wx:LayoutLine Box09
+
+new std:GetVectorStringElement Box11
+  set Box11.I "2"
+
+new std:GetVectorStringElement Box12
+  set Box12.I "3"
+
+new std:ConcatStrings Box13
+  set Box13.In2 " "
+
+new std:GetVectorStringElement Box14
+  set Box14.I "5"
+
+new std:GetVectorStringElement Box15
+  set Box15.I "4"
+
+new std:TransposeVectorVectorString Box17
+  set Box17.In0 "Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
+
+new wx:RadioButton Box18
+  set Box18.In "1"
+  set Box18.In0 "Brush"
+  set Box18.In1 "Fill"
+
+new wx:LayoutLine Box19
+  set Box19.Orientation "H"
+
+new std:MagicBox Box20
+
+new std:GetVectorStringElement Box21
+  set Box21.I "6"
+
+
+connect Box01.Out Box02.In
+connect Box04.Out0 Box02.In0
+connect Box04.Out1 Box02.In1
+connect Box04.Out2 Box02.In2
+connect Box04.Out3 Box02.In3
+connect Box04.Out4 Box02.In4
+connect Box04.Out5 Box02.In5
+connect Box04.Out6 Box02.In6
+connect Box04.Out7 Box02.In7
+connect Box04.Out8 Box02.In8
+connect Box04.Out9 Box02.In9
+connect Box02.Out Box05.In
+connect Box03.Widget Box09.Widget2
+connect Box00.Out Box03.In
+connect Box05.Out Box00.Active
+connect Box02.Out Box11.In
+connect Box11.Out Box00.DistanceFill
+connect Box02.Out Box12.In
+connect Box12.Out Box00.GrayLevel
+connect Box02.Out Box15.In
+connect Box02.Out Box14.In
+connect Box15.Out Box13.In1
+connect Box14.Out Box13.In3
+connect Box13.Out Box00.Range
+connect Box17.Out0 Box01.In0
+connect Box17.Out1 Box01.In1
+connect Box17.Out2 Box01.In2
+connect Box17.Out3 Box01.In3
+connect Box17.Out4 Box01.In4
+connect Box17.Out5 Box01.In5
+connect Box17.Out6 Box01.In6
+connect Box17.Out7 Box01.In7
+connect Box17.Out8 Box01.In8
+connect Box17.Out9 Box01.In9
+connect Box18.Widget Box19.Widget1
+connect Box01.Widget Box19.Widget2
+connect Box19.Widget Box09.Widget1
+connect Box18.Out Box00.Tool
+connect Box11.Out Box00.BrushSize
+connect Box20.Out Box17.In0
+connect Box20.Out Box04.In0
+connect Box02.Out Box21.In
+connect Box21.Out Box00.ToleranceFill
+
+# Complex input ports
+input TitleOptions Box20.In " "
+input Active_ManualPaint_Model Box04.In1 " "
+input SizeDistance_ManualPaint_Model Box04.In2 " "
+input GrayLevel_ManualPaint_Model Box04.In3 " "
+input MinRange_ManualPaint_Model Box04.In4 " "
+input MaxRange_ManualPaint_Model Box04.In5 " "
+input Point_ManualPaint_Model Box00.Point " "
+input Image_ManualPaint_Model Box00.Image " "
+input Image2_ManualPaint_Model Box00.Image2 " "
+input BoxExecute_ManualPaint_Model Box00.BoxExecute " "
+input wxvtkbaseview1 Box03.WxVtkBaseView " "
+input wxvtkbaseview2 Box03.WxVtkBaseView1 " "
+input wxvtkbaseview3 Box03.WxVtkBaseView2 " "
+input Tolerance_Fill_ManualPaint_Model Box04.In6 " "
+input colorBarPosition Box03.ColorBarPosition " "
+
+# Complex output ports
+output widgetOut Box09.Widget " "
+
+
+endefine
diff --git a/bbtk/bbs/boxes/ViewerByPlane.bbg b/bbtk/bbs/boxes/ViewerByPlane.bbg
new file mode 100644 (file)
index 0000000..5511b1d
--- /dev/null
@@ -0,0 +1,843 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ViewerByPlane.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:ViewerByPlane
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:12
+COMPLEX_PORT
+widget
+268.900118:-337.558426:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview1
+293.320445:-337.876674:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+render1
+201.774592:-339.383392:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+render2
+220.636906:-339.341035:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+render3
+231.063415:-338.089854:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+render4
+240.655803:-336.838673:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Image
+179.904670:-338.577176:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+point
+189.952033:-338.198030:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxchange
+161.895245:-338.198030:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview2
+302.859434:-337.469661:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview3
+312.830164:-338.079868:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview4
+322.717792:-337.766525:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:2
+COMPLEX_PORT
+FileNale
+128.173378:108.865073:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+typeMHDorSeek
+313.453396:106.307278:-900.000000
+FIN_COMPLEX_PORT
+BOXES:52
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+211.855534:-40.516873:-900.000000
+275.575534:-50.516873:-900.000000
+PORT
+ColorLevel:"900"
+PORT
+WindowLevel:"2000"
+PORT
+nTypeView:"6 1 2 0"
+FIN_BOX
+BOX
+vtk:CreateImage:Box02
+ISEXEC:FALSE
+174.082801:33.300140:-900.000000
+219.657801:23.300140:-900.000000
+PORT
+InitialValue:"500"
+FIN_BOX
+BOX
+creaVtk:MHDFileInfo:Box03
+ISEXEC:FALSE
+180.117126:68.190785:-900.000000
+225.692126:58.190785:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box04
+ISEXEC:FALSE
+117.779237:88.449986:-900.000000
+163.354237:78.449986:-900.000000
+FIN_BOX
+BOX
+creaVtk:ReadMHDPlane:Box05
+ISEXEC:FALSE
+-119.481412:-151.432628:-900.000000
+-73.906412:-161.432628:-900.000000
+PORT
+DirectionPlane:"XY"
+PORT
+Type:"1"
+PORT
+Width:"10"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box06
+ISEXEC:FALSE
+-166.080203:-58.913810:-900.000000
+-94.905203:-68.913810:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:ConcatStrings:Box07
+ISEXEC:FALSE
+-181.496858:-153.259339:-900.000000
+-135.921858:-163.259339:-900.000000
+PORT
+In1:"0 0 "
+FIN_BOX
+BOX
+vtk:InversCrop:Box08
+ISEXEC:FALSE
+-157.964973:-189.296113:-900.000000
+-112.389973:-199.296113:-900.000000
+PORT
+Active:"false"
+PORT
+Type:"1"
+FIN_BOX
+BOX
+creaVtk:ReadMHDPlane:Box12
+ISEXEC:FALSE
+199.206515:-232.573203:-900.000000
+244.781515:-242.573203:-900.000000
+PORT
+DirectionPlane:"ZX"
+PORT
+Type:"1"
+PORT
+Width:"10"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box13
+ISEXEC:FALSE
+178.302090:-146.764363:-900.000000
+249.477090:-156.764363:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+vtk:InversCrop:Box14
+ISEXEC:FALSE
+132.269209:-266.078164:-900.000000
+177.844209:-276.078164:-900.000000
+PORT
+Active:"false"
+PORT
+Type:"1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box15
+ISEXEC:FALSE
+143.293749:-234.065468:-900.000000
+188.868749:-244.065468:-900.000000
+PORT
+In1:"0 "
+PORT
+In3:" 0"
+FIN_BOX
+BOX
+creaVtk:ReadMHDPlane:Box18
+ISEXEC:FALSE
+557.636900:-248.888075:-900.000000
+603.211900:-258.888075:-900.000000
+PORT
+DirectionPlane:"YZ"
+PORT
+Type:"1"
+PORT
+Width:"10"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box19
+ISEXEC:FALSE
+484.087763:-153.495430:-900.000000
+555.262763:-163.495430:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+vtk:InversCrop:Box20
+ISEXEC:FALSE
+488.622102:-290.583946:-900.000000
+534.197102:-300.583946:-900.000000
+PORT
+Active:"false"
+PORT
+Type:"1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box21
+ISEXEC:FALSE
+476.692928:-250.911144:-900.000000
+522.267928:-260.911144:-900.000000
+PORT
+In3:" 0 0"
+FIN_BOX
+BOX
+std:MagicBox:Box22
+ISEXEC:FALSE
+302.259593:36.536162:-900.000000
+347.834593:26.536162:-900.000000
+FIN_BOX
+BOX
+std:CreateArithmeticSuiteVector:Box25
+ISEXEC:FALSE
+-293.894172:-33.421666:-900.000000
+-222.719172:-43.421666:-900.000000
+PORT
+Delta:"0"
+PORT
+FirstValue:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box28
+ISEXEC:FALSE
+-284.597642:-2.473740:-900.000000
+-213.422642:-12.473740:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:GetVectorIntPointer:Box29
+ISEXEC:FALSE
+-300.879747:-52.905942:-900.000000
+-255.304747:-62.905942:-900.000000
+FIN_BOX
+BOX
+std:SetElementVectorVectorInt:Box30
+ISEXEC:FALSE
+-276.757602:-207.728892:-900.000000
+-205.582602:-217.728892:-900.000000
+PORT
+Value:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box31
+ISEXEC:FALSE
+-261.829321:-110.984570:-900.000000
+-190.654321:-120.984570:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:SetElementVectorVectorInt:Box32
+ISEXEC:FALSE
+-286.437534:-72.057179:-900.000000
+-215.262534:-82.057179:-900.000000
+PORT
+I:"-1"
+PORT
+Value:"0"
+FIN_BOX
+BOX
+std:CreateArithmeticSuiteVector:Box33
+ISEXEC:FALSE
+6.511113:-140.436711:-900.000000
+77.686113:-150.436711:-900.000000
+PORT
+Delta:"0"
+PORT
+FirstValue:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box34
+ISEXEC:FALSE
+33.729239:-96.227285:-900.000000
+104.904239:-106.227285:-900.000000
+PORT
+I:"1"
+FIN_BOX
+BOX
+std:GetVectorIntPointer:Box35
+ISEXEC:FALSE
+15.882466:-151.478702:-900.000000
+61.457466:-161.478702:-900.000000
+FIN_BOX
+BOX
+std:SetElementVectorVectorInt:Box36
+ISEXEC:FALSE
+10.168341:-290.887328:-900.000000
+81.343341:-300.887328:-900.000000
+PORT
+Value:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box37
+ISEXEC:FALSE
+93.568160:-197.425236:-900.000000
+164.743160:-207.425236:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:SetElementVectorVectorInt:Box38
+ISEXEC:FALSE
+30.324678:-170.629940:-900.000000
+101.499678:-180.629940:-900.000000
+PORT
+I:"-1"
+PORT
+Value:"0"
+FIN_BOX
+BOX
+std:CreateArithmeticSuiteVector:Box39
+ISEXEC:FALSE
+335.330997:-126.674951:-900.000000
+406.505997:-136.674951:-900.000000
+PORT
+Delta:"0"
+PORT
+FirstValue:"1"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box40
+ISEXEC:FALSE
+346.372632:-90.516177:-900.000000
+417.547632:-100.516177:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:GetVectorIntPointer:Box41
+ISEXEC:FALSE
+333.621850:-146.159227:-900.000000
+379.196850:-156.159227:-900.000000
+FIN_BOX
+BOX
+std:SetElementVectorVectorInt:Box42
+ISEXEC:FALSE
+363.744192:-321.568099:-900.000000
+434.919192:-331.568099:-900.000000
+PORT
+Value:"0"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box43
+ISEXEC:FALSE
+376.252415:-203.353981:-900.000000
+447.427415:-213.353981:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:SetElementVectorVectorInt:Box44
+ISEXEC:FALSE
+355.404325:-167.145530:-900.000000
+426.579325:-177.145530:-900.000000
+PORT
+I:"-1"
+PORT
+Value:"0"
+FIN_BOX
+BOX
+std:Div:Box49
+ISEXEC:FALSE
+-275.966276:-16.777053:-900.000000
+-243.191276:-26.777053:-900.000000
+PORT
+In2:"10"
+FIN_BOX
+BOX
+std:Div:Box50
+ISEXEC:FALSE
+-207.785042:-78.441508:-900.000000
+-175.010042:-88.441508:-900.000000
+PORT
+In2:"10"
+FIN_BOX
+BOX
+std:ConcatStrings:Box51
+ISEXEC:FALSE
+-154.792316:47.329778:-900.000000
+-109.217316:37.329778:-900.000000
+PORT
+In1:"10"
+FIN_BOX
+BOX
+std:Div:Box53
+ISEXEC:FALSE
+17.363359:-115.346277:-900.000000
+50.138359:-125.346277:-900.000000
+PORT
+In2:"10"
+FIN_BOX
+BOX
+std:Div:Box54
+ISEXEC:FALSE
+133.171773:-165.568210:-900.000000
+165.946773:-175.568210:-900.000000
+PORT
+In2:"10"
+FIN_BOX
+BOX
+std:Div:Box55
+ISEXEC:FALSE
+432.982443:-185.759365:-900.000000
+465.757443:-195.759365:-900.000000
+PORT
+In2:"10"
+FIN_BOX
+BOX
+std:Div:Box56
+ISEXEC:FALSE
+341.378011:-106.711972:-900.000000
+374.153011:-116.711972:-900.000000
+PORT
+In2:"10"
+FIN_BOX
+BOX
+std:ConcatStrings:Box57
+ISEXEC:FALSE
+430.268991:17.041475:-900.000000
+475.843991:7.041475:-900.000000
+PORT
+In1:"10"
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box63
+ISEXEC:FALSE
+-159.815354:-107.735296:-900.000000
+-88.640354:-117.735296:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:MathOperation:Box64
+ISEXEC:FALSE
+-176.701442:-125.216736:-900.000000
+-131.126442:-135.216736:-900.000000
+PORT
+Type:"2"
+FIN_BOX
+BOX
+std:ConcatStrings:Box65
+ISEXEC:FALSE
+-154.917793:-90.369793:-900.000000
+-109.342793:-100.369793:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box66
+ISEXEC:FALSE
+176.217814:-197.615533:-900.000000
+247.392814:-207.615533:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:MathOperation:Box67
+ISEXEC:FALSE
+168.290941:-209.637274:-900.000000
+213.865941:-219.637274:-900.000000
+PORT
+Type:"2"
+FIN_BOX
+BOX
+std:ConcatStrings:Box68
+ISEXEC:FALSE
+180.436704:-178.255723:-900.000000
+226.011704:-188.255723:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:Box69
+ISEXEC:FALSE
+608.807976:-193.668625:-900.000000
+679.982976:-203.668625:-900.000000
+PORT
+I:"0"
+FIN_BOX
+BOX
+std:MathOperation:Box70
+ISEXEC:FALSE
+587.334225:-211.984186:-900.000000
+632.909225:-221.984186:-900.000000
+PORT
+Type:"2"
+FIN_BOX
+BOX
+std:ConcatStrings:Box71
+ISEXEC:FALSE
+613.705537:-176.303122:-900.000000
+659.280537:-186.303122:-900.000000
+FIN_BOX
+CONNECTIONS:112
+CONNECTION
+Box02:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:DimSize:Box02:Dimensions
+NumberOfControlPoints:0
+CONNECTION
+Box03:ElementSpacing:Box02:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box03:ElementType:Box02:OutputFormat
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box03:FileName
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box05:FileName
+NumberOfControlPoints:0
+CONNECTION
+Box01:Point:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box08:Origin
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box08:ImageFix
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box08:ImageMove
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box08:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+FileNale:FileNale:Box04:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box12:FileName
+NumberOfControlPoints:0
+CONNECTION
+Box01:Point:Box13:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box14:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box14:ImageFix
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:Box14:Origin
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out2:Box14:ImageMove
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box20:Origin
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box18:FileName
+NumberOfControlPoints:0
+CONNECTION
+Box01:Point:Box19:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box20:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box20:ImageFix
+NumberOfControlPoints:0
+CONNECTION
+Box18:Out2:Box20:ImageMove
+NumberOfControlPoints:0
+CONNECTION
+Box01:wxVtkBaseView1:wxvtkbaseview1:wxvtkbaseview1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:render1:render1
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box05:Type
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box12:Type
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box18:Type
+NumberOfControlPoints:0
+CONNECTION
+typeMHDorSeek:typeMHDorSeek:Box22:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:DimSize:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box29:PVec:Box30:PVec
+NumberOfControlPoints:0
+CONNECTION
+Box25:ArithmeticSuiteVector:Box29:In
+NumberOfControlPoints:0
+CONNECTION
+Box29:PVec:Box32:PVec
+NumberOfControlPoints:0
+CONNECTION
+Box32:Vec:Box31:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box30:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box35:PVec:Box36:PVec
+NumberOfControlPoints:0
+CONNECTION
+Box33:ArithmeticSuiteVector:Box35:In
+NumberOfControlPoints:0
+CONNECTION
+Box35:PVec:Box38:PVec
+NumberOfControlPoints:0
+CONNECTION
+Box38:Vec:Box37:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:DimSize:Box34:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:BoxChange:Box36:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box41:PVec:Box42:PVec
+NumberOfControlPoints:0
+CONNECTION
+Box39:ArithmeticSuiteVector:Box41:In
+NumberOfControlPoints:0
+CONNECTION
+Box41:PVec:Box44:PVec
+NumberOfControlPoints:0
+CONNECTION
+Box44:Vec:Box43:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:DimSize:Box40:In
+NumberOfControlPoints:0
+CONNECTION
+Box20:BoxChange:Box42:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box43:Out:Box18:Active
+NumberOfControlPoints:0
+CONNECTION
+Box37:Out:Box12:Active
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box05:Active
+NumberOfControlPoints:0
+CONNECTION
+Box19:BoxChange:Box43:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box13:BoxChange:Box37:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box31:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box32:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box13:BoxChange:Box38:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box19:BoxChange:Box44:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box49:In1
+NumberOfControlPoints:0
+CONNECTION
+Box49:Out:Box25:Size
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box50:In1
+NumberOfControlPoints:0
+CONNECTION
+Box50:Out:Box31:I
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box49:In2
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box50:In2
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box05:Width
+NumberOfControlPoints:0
+CONNECTION
+Box50:Out:Box30:I
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box12:Width
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box53:In1
+NumberOfControlPoints:0
+CONNECTION
+Box53:Out:Box33:Size
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box53:In2
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box54:In2
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box54:In1
+NumberOfControlPoints:0
+CONNECTION
+Box54:Out:Box37:I
+NumberOfControlPoints:0
+CONNECTION
+Box54:Out:Box36:I
+NumberOfControlPoints:0
+CONNECTION
+Box40:Out:Box56:In1
+NumberOfControlPoints:0
+CONNECTION
+Box56:Out:Box39:Size
+NumberOfControlPoints:0
+CONNECTION
+Box55:Out:Box43:I
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box55:In1
+NumberOfControlPoints:0
+CONNECTION
+Box55:Out:Box42:I
+NumberOfControlPoints:0
+CONNECTION
+Box43:Out:Box20:Active
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box08:Active
+NumberOfControlPoints:0
+CONNECTION
+Box37:Out:Box14:Active
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box56:In2
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box55:In2
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box18:Width
+NumberOfControlPoints:0
+CONNECTION
+Box63:Out:Box64:In1
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box64:In2
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box07:In2
+NumberOfControlPoints:0
+CONNECTION
+Box50:Out:Box65:In1
+NumberOfControlPoints:0
+CONNECTION
+Box65:Out:Box63:In
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box05:Slice
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box67:In1
+NumberOfControlPoints:0
+CONNECTION
+Box68:Out:Box66:In
+NumberOfControlPoints:0
+CONNECTION
+Box54:Out:Box68:In1
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box67:In2
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box15:In2
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box12:Slice
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box70:In1
+NumberOfControlPoints:0
+CONNECTION
+Box71:Out:Box69:In
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out:Box21:In1
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out:Box18:Slice
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box70:In2
+NumberOfControlPoints:0
+CONNECTION
+Box55:Out:Box71:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer2:render2:render2
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer3:render3:render3
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer4:render4:render4
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Image:Image
+NumberOfControlPoints:0
+CONNECTION
+Box01:Point:point:point
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:boxchange:boxchange
+NumberOfControlPoints:0
+CONNECTION
+Box01:wxVtkBaseView2:wxvtkbaseview2:wxvtkbaseview2
+NumberOfControlPoints:0
+CONNECTION
+Box01:wxVtkBaseView3:wxvtkbaseview3:wxvtkbaseview3
+NumberOfControlPoints:0
+CONNECTION
+Box01:wxVtkBaseView4:wxvtkbaseview4:wxvtkbaseview4
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/ViewerByPlane.bbs b/bbtk/bbs/boxes/ViewerByPlane.bbs
new file mode 100644 (file)
index 0000000..9e64860
--- /dev/null
@@ -0,0 +1,304 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ViewerByPlane.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include vtk
+include creaVtk
+include std
+
+define ViewerByPlane creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new creaMaracasVisu:ViewerNV Box01
+  set Box01.ColorLevel "900"
+  set Box01.WindowLevel "2000"
+  set Box01.nTypeView "6 1 2 0"
+
+new vtk:CreateImage Box02
+  set Box02.InitialValue "500"
+
+new creaVtk:MHDFileInfo Box03
+
+new std:ConcatStrings Box04
+
+new creaVtk:ReadMHDPlane Box05
+  set Box05.DirectionPlane "XY"
+  set Box05.Type "1"
+  set Box05.Width "10"
+
+new std:GetVectorIntElement Box06
+  set Box06.I "2"
+
+new std:ConcatStrings Box07
+  set Box07.In1 "0 0 "
+
+new vtk:InversCrop Box08
+  set Box08.Active "false"
+  set Box08.Type "1"
+
+new creaVtk:ReadMHDPlane Box12
+  set Box12.DirectionPlane "ZX"
+  set Box12.Type "1"
+  set Box12.Width "10"
+
+new std:GetVectorIntElement Box13
+  set Box13.I "1"
+
+new vtk:InversCrop Box14
+  set Box14.Active "false"
+  set Box14.Type "1"
+
+new std:ConcatStrings Box15
+  set Box15.In1 "0 "
+  set Box15.In3 " 0"
+
+new creaVtk:ReadMHDPlane Box18
+  set Box18.DirectionPlane "YZ"
+  set Box18.Type "1"
+  set Box18.Width "10"
+
+new std:GetVectorIntElement Box19
+  set Box19.I "0"
+
+new vtk:InversCrop Box20
+  set Box20.Active "false"
+  set Box20.Type "1"
+
+new std:ConcatStrings Box21
+  set Box21.In3 " 0 0"
+
+new std:MagicBox Box22
+
+new std:CreateArithmeticSuiteVector Box25
+  set Box25.Delta "0"
+  set Box25.FirstValue "1"
+
+new std:GetVectorIntElement Box28
+  set Box28.I "2"
+
+new std:GetVectorIntPointer Box29
+
+new std:SetElementVectorVectorInt Box30
+  set Box30.Value "0"
+
+new std:GetVectorIntElement Box31
+  set Box31.I "2"
+
+new std:SetElementVectorVectorInt Box32
+  set Box32.I "-1"
+  set Box32.Value "0"
+
+new std:CreateArithmeticSuiteVector Box33
+  set Box33.Delta "0"
+  set Box33.FirstValue "1"
+
+new std:GetVectorIntElement Box34
+  set Box34.I "1"
+
+new std:GetVectorIntPointer Box35
+
+new std:SetElementVectorVectorInt Box36
+  set Box36.Value "0"
+
+new std:GetVectorIntElement Box37
+  set Box37.I "2"
+
+new std:SetElementVectorVectorInt Box38
+  set Box38.I "-1"
+  set Box38.Value "0"
+
+new std:CreateArithmeticSuiteVector Box39
+  set Box39.Delta "0"
+  set Box39.FirstValue "1"
+
+new std:GetVectorIntElement Box40
+  set Box40.I "0"
+
+new std:GetVectorIntPointer Box41
+
+new std:SetElementVectorVectorInt Box42
+  set Box42.Value "0"
+
+new std:GetVectorIntElement Box43
+  set Box43.I "2"
+
+new std:SetElementVectorVectorInt Box44
+  set Box44.I "-1"
+  set Box44.Value "0"
+
+new std:Div Box49
+  set Box49.In2 "10"
+
+new std:Div Box50
+  set Box50.In2 "10"
+
+new std:ConcatStrings Box51
+  set Box51.In1 "10"
+
+new std:Div Box53
+  set Box53.In2 "10"
+
+new std:Div Box54
+  set Box54.In2 "10"
+
+new std:Div Box55
+  set Box55.In2 "10"
+
+new std:Div Box56
+  set Box56.In2 "10"
+
+new std:ConcatStrings Box57
+  set Box57.In1 "10"
+
+new std:GetVectorIntElement Box63
+  set Box63.I "0"
+
+new std:MathOperation Box64
+  set Box64.Type "2"
+
+new std:ConcatStrings Box65
+
+new std:GetVectorIntElement Box66
+  set Box66.I "0"
+
+new std:MathOperation Box67
+  set Box67.Type "2"
+
+new std:ConcatStrings Box68
+
+new std:GetVectorIntElement Box69
+  set Box69.I "0"
+
+new std:MathOperation Box70
+  set Box70.Type "2"
+
+new std:ConcatStrings Box71
+
+
+connect Box02.Out Box01.In
+connect Box03.DimSize Box02.Dimensions
+connect Box03.ElementSpacing Box02.Spacing
+connect Box03.ElementType Box02.OutputFormat
+connect Box04.Out Box03.FileName
+connect Box04.Out Box05.FileName
+connect Box01.Point Box06.In
+connect Box07.Out Box08.Origin
+connect Box02.Out Box08.ImageFix
+connect Box05.Out Box08.ImageMove
+connect Box01.BoxChange Box08.BoxExecute
+connect Box04.Out Box12.FileName
+connect Box01.Point Box13.In
+connect Box01.BoxChange Box14.BoxExecute
+connect Box02.Out Box14.ImageFix
+connect Box15.Out Box14.Origin
+connect Box12.Out2 Box14.ImageMove
+connect Box21.Out Box20.Origin
+connect Box04.Out Box18.FileName
+connect Box01.Point Box19.In
+connect Box01.BoxChange Box20.BoxExecute
+connect Box02.Out Box20.ImageFix
+connect Box18.Out2 Box20.ImageMove
+connect Box22.Out Box05.Type
+connect Box22.Out Box12.Type
+connect Box22.Out Box18.Type
+connect Box03.DimSize Box28.In
+connect Box29.PVec Box30.PVec
+connect Box25.ArithmeticSuiteVector Box29.In
+connect Box29.PVec Box32.PVec
+connect Box32.Vec Box31.In
+connect Box08.BoxChange Box30.BoxExecute
+connect Box35.PVec Box36.PVec
+connect Box33.ArithmeticSuiteVector Box35.In
+connect Box35.PVec Box38.PVec
+connect Box38.Vec Box37.In
+connect Box03.DimSize Box34.In
+connect Box14.BoxChange Box36.BoxExecute
+connect Box41.PVec Box42.PVec
+connect Box39.ArithmeticSuiteVector Box41.In
+connect Box41.PVec Box44.PVec
+connect Box44.Vec Box43.In
+connect Box03.DimSize Box40.In
+connect Box20.BoxChange Box42.BoxExecute
+connect Box43.Out Box18.Active
+connect Box37.Out Box12.Active
+connect Box31.Out Box05.Active
+connect Box19.BoxChange Box43.BoxExecute
+connect Box13.BoxChange Box37.BoxExecute
+connect Box06.BoxChange Box31.BoxExecute
+connect Box06.BoxChange Box32.BoxExecute
+connect Box13.BoxChange Box38.BoxExecute
+connect Box19.BoxChange Box44.BoxExecute
+connect Box28.Out Box49.In1
+connect Box49.Out Box25.Size
+connect Box06.Out Box50.In1
+connect Box50.Out Box31.I
+connect Box51.Out Box49.In2
+connect Box51.Out Box50.In2
+connect Box51.Out Box05.Width
+connect Box50.Out Box30.I
+connect Box51.Out Box12.Width
+connect Box34.Out Box53.In1
+connect Box53.Out Box33.Size
+connect Box51.Out Box53.In2
+connect Box51.Out Box54.In2
+connect Box13.Out Box54.In1
+connect Box54.Out Box37.I
+connect Box54.Out Box36.I
+connect Box40.Out Box56.In1
+connect Box56.Out Box39.Size
+connect Box55.Out Box43.I
+connect Box19.Out Box55.In1
+connect Box55.Out Box42.I
+connect Box43.Out Box20.Active
+connect Box31.Out Box08.Active
+connect Box37.Out Box14.Active
+connect Box57.Out Box56.In2
+connect Box57.Out Box55.In2
+connect Box57.Out Box18.Width
+connect Box63.Out Box64.In1
+connect Box51.Out Box64.In2
+connect Box64.Out Box07.In2
+connect Box50.Out Box65.In1
+connect Box65.Out Box63.In
+connect Box64.Out Box05.Slice
+connect Box66.Out Box67.In1
+connect Box68.Out Box66.In
+connect Box54.Out Box68.In1
+connect Box51.Out Box67.In2
+connect Box67.Out Box15.In2
+connect Box67.Out Box12.Slice
+connect Box69.Out Box70.In1
+connect Box71.Out Box69.In
+connect Box70.Out Box21.In1
+connect Box70.Out Box18.Slice
+connect Box57.Out Box70.In2
+connect Box55.Out Box71.In1
+
+# Complex input ports
+input FileNale Box04.In1 " "
+input typeMHDorSeek Box22.In " "
+
+# Complex output ports
+output widget Box01.Widget " "
+output wxvtkbaseview1 Box01.wxVtkBaseView1 " "
+output render1 Box01.Renderer1 " "
+output render2 Box01.Renderer2 " "
+output render3 Box01.Renderer3 " "
+output render4 Box01.Renderer4 " "
+output Image Box02.Out " "
+output point Box01.Point " "
+output boxchange Box01.BoxChange " "
+output wxvtkbaseview2 Box01.wxVtkBaseView2 " "
+output wxvtkbaseview3 Box01.wxVtkBaseView3 " "
+output wxvtkbaseview4 Box01.wxVtkBaseView4 " "
+
+
+endefine
index 483943e2993b19b715ca3df8e54ecbe29aeb4672..e63f5da2d4a14ca66c3ab32be1463cd1541dbc7b 100644 (file)
@@ -53,7 +53,6 @@ void ColorLayerImageView::Process()
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() );
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() );
 
-
     std::vector<double> range = bbGetInputlstRangeForColorBar();
     clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range );
 
@@ -69,11 +68,9 @@ void ColorLayerImageView::Process()
     std::vector<double> transparence_level_boundaries = bbGetInputlstTransparenceBoundaries();
     clivp->GetColorLayerImageViewManager()->SetBaseTransparence( transparence_level_boundaries );
 
     clivp->GetColorLayerImageViewManager()->SetPlainOrGradientColor( bbGetInputPlainOrGradientColor() );
     clivp->SetFittingMode( bbGetInputFittingMode() );
 
-
     clivp->SetImage( bbGetInputIn() );
 
     bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
index 5c513422088d8bcc769e309305fc8a33ead7763f..a7c224d243ffd1bed0165e110559490f5fa8dcde 100644 (file)
@@ -1,8 +1,12 @@
 //===== 
 // Before editing this file, make 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 "creaVtk_MACROS.h"
 #include "bbcreaMaracasVisuManualPaint_Model.h"
 #include "bbcreaMaracasVisuPackage.h"
+
+
 namespace bbcreaMaracasVisu
 {
 
@@ -11,6 +15,8 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ManualPaint_Model,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 ManualPaint_Model::Process()
 {
 
@@ -58,7 +64,6 @@ void ManualPaint_Model::Process()
                
                if (bbGetInputByImagePoints()!=NULL)
                {
-                       int i,j,k;
 //                     int ia,ja,ka;
 //                     int ii,jj,kk;
                        int ext[6];
@@ -72,26 +77,38 @@ void ManualPaint_Model::Process()
                        int dimX=ext[1]-ext[0]+1;
                        int dimY=ext[3]-ext[2]+1;
                        int dimZ=ext[5]-ext[4]+1;
-                       for (i=0;i<dimX;i++) 
+
+                       DEF_POINTER_IMAGE_VTK_CREA(vBIP,sSBIP,pBIP,sTBIP,bbGetInputByImagePoints());
+                       DEF_POINTER_IMAGE_VTK_CREA(vI2,sSI2,pI2,sTI2,bbGetInputImage2());
+
+//#pragma omp parallel for
+
+                       int i,j,k;
+                       for (k=0;k<dimZ;k++) 
                        {
-                               if (i%20==0)
+                               if (k%50==0)
                                {
-                                       printf("ManualPaint_Model %d%\n", (int)(i*100.0/dimX) );
+                                       printf("ManualPaint_Model %d%\n", (int)(k*100.0/dimZ) );
                                }
                                for (j=0;j<dimY;j++) 
                                {
-                                       for (k=0;k<dimZ;k++) 
+                                       for (i=0;i<dimX;i++) 
                                        {
-                                               if ( bbGetInputByImagePoints()->GetScalarComponentAsDouble(i,j,k, 0)>0)
+                                               GETVALUE_VTK_CREA(vBIP,pBIP,sTBIP)
+                                               if (vBIP>0)
                                                {
-                                                       if (bbGetInputImage2()->GetScalarComponentAsDouble(i,j,k, 0)==0)
+                                                       GETVALUE_VTK_CREA(vI2,pI2,sTI2)
+                                                       if (vI2==0)
                                                        {
                                                                manualpaintmodel->PaintImage(i,j,k);
-                                                       } // bbGetInputImage2           
-                                               } // GetScalarComponentAsDouble                                         
-                                       }// for k
+                                                       } // vI2                
+                                               } // vBIP 
+                                               pBIP = pBIP + sSBIP;                            
+                                               pI2  = pI2  + sSI2;                             
+                                       }// for i
                                }// for j
-                       }// for i
+                       }// for k
+
                        printf("ManualPaint_Model %d%\n", 100 );
                } // if ByImagePoints
         } else {
diff --git a/bbtk/src/bbcreaMaracasVisuSetPosition.cxx b/bbtk/src/bbcreaMaracasVisuSetPosition.cxx
new file mode 100644 (file)
index 0000000..8b23084
--- /dev/null
@@ -0,0 +1,86 @@
+//===== 
+// Before editing this file, make 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 "bbcreaMaracasVisuSetPosition.h"
+#include "bbcreaMaracasVisuPackage.h"
+
+#include <wxMPRBaseData.h>
+
+namespace bbcreaMaracasVisu
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,SetPosition)
+BBTK_BLACK_BOX_IMPLEMENTATION(SetPosition,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 SetPosition::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+//   Here we simply set the input 'In' value to the output 'Out'
+//   And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+//    void bbSet{Input|Output}NAME(const TYPE&)
+//    const TYPE& bbGet{Input|Output}NAME() const 
+//    Where :
+//    * NAME is the name of the input/output
+//      (the one provided in the attribute 'name' of the tag 'input')
+//    * TYPE is the C++ type of the input/output
+//      (the one provided in the attribute 'type' of the tag 'input')
+
+//    bbSetOutputOut( bbGetInputIn() );
+//    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+       if (bbGetInputwxVtkBaseView()!=NULL)
+       {
+               vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
+               if (bbGetInputPoint().size()==3)
+               {
+                       vtkmprbasedata->SetX( bbGetInputPoint()[0] );
+                       vtkmprbasedata->SetY( bbGetInputPoint()[1] );
+                       vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
+                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refres
+                       bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+               } // if bbGetInputPosition
+       } // bbGetInputwxVtkBaseView
+}
+//===== 
+// Before editing this file, make 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 SetPosition::bbUserSetDefaultValues()
+{
+
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+   bbSetInputwxVtkBaseView( 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 SetPosition::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 SetPosition::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+  
+}
+}
+// EO namespace bbcreaMaracasVisu
+
+
diff --git a/bbtk/src/bbcreaMaracasVisuSetPosition.h b/bbtk/src/bbcreaMaracasVisuSetPosition.h
new file mode 100644 (file)
index 0000000..40badd9
--- /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 __bbcreaMaracasVisuSetPosition_h_INCLUDED__
+#define __bbcreaMaracasVisuSetPosition_h_INCLUDED__
+#include "bbcreaMaracasVisu_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "wxVtkBaseView.h"
+
+namespace bbcreaMaracasVisu
+{
+
+class bbcreaMaracasVisu_EXPORT SetPosition
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(SetPosition,bbtk::AtomicBlackBox);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+  BBTK_DECLARE_INPUT(Point,std::vector<int>);
+  BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*);
+//  BBTK_DECLARE_OUTPUT(Out,double);
+  BBTK_PROCESS(Process);
+  void Process();
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(SetPosition,bbtk::AtomicBlackBox);
+  BBTK_NAME("SetPosition");
+  BBTK_AUTHOR("Info-Dev");
+  BBTK_DESCRIPTION("No Description.");
+  BBTK_CATEGORY("empty");
+  BBTK_INPUT(SetPosition,Point,"vector with point to be set [X Y Z]",std::vector<int>,"");
+  BBTK_INPUT(SetPosition,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,"");
+//  BBTK_OUTPUT(SetPosition,Out,"First output",double,"");
+BBTK_END_DESCRIBE_BLACK_BOX(SetPosition);
+//===== 
+// Before editing this file, make 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 bbcreaMaracasVisu
+
+#endif // __bbcreaMaracasVisuSetPosition_h_INCLUDED__
+
index 044b3099cd27279e488f62cd1a6b73fcef232682..20ad1cb9abe8669e9a6db9f24886886f1cb0357e 100644 (file)
@@ -29,9 +29,9 @@ void ShowNPoints_Reset::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
+
        bbGetInputWidgetShowNPoints()->DeleteAllPoints();
        bbGetInputWidgetShowNPoints()->GetModelShowNPoints()->SetFirstTime(true);
-       
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index d640d8d2a30877d44af57e4d128ffc9a55c6e0ea..34c0fd7754dc182e1b025dd1fdf521540ec9812f 100644 (file)
 #include "bbcreaMaracasVisuPackage.h"
 
 #include "vtkImageShiftScale.h" 
+#include <vtkLookupTable.h>
+#include <vtkColorTransferFunction.h>
+#include <vtkImageMapToColors.h>
+#include <vtkImageMapper3D.h>
+#include <vtkImageProperty.h>
 
 namespace bbcreaMaracasVisu
 {
@@ -36,33 +41,94 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageActor,bbtk::AtomicBlackBox);
 void ImageActor::Process()
 {
 
+printf("EED ImageActor::Process Start\n");
+
                //JCP 04/04/09
                vtkRenderer *render                             = bbGetInputRenderer();
                vtkImageData *img                               = bbGetInputIn();
                vtkLinearTransform* transform   = bbGetInputTransform();
+                               
+                               
+       if(img != NULL)
+               {
+                       if (bbGetInputLookupTable()==NULL)
+                       {
+                               imageactor->SetInput( img );    
+                       } else {
+/*
+                               vtkLookupTable *table = vtkLookupTable::New();
+                               table->SetRange(0, 1000); // image intensity range
+                               table->SetValueRange(0.0, 1.0); // from black to white
+                               table->SetSaturationRange(0.0, 0.0); // no color saturation
+                               table->SetRampToLinear();
+                               table->Build();
+  double rgba[4];
+  table->GetTableValue(0,rgba);
+  rgba[3]=0;
+  table->SetTableValue(0,rgba);
+*/
 
-               if(img != NULL){
-                       
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
-                       imageshiftscale->SetInput( img );       
-#else
-                       imageshiftscale->SetInputData( img );   
-#endif
-                       imageshiftscale->SetOutputScalarTypeToUnsignedChar();   
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
-                       imageactor->SetInput( imageshiftscale->GetOutput() );   
-#else
-                       imageshiftscale->Update();
-                       imageactor->SetInputData( imageshiftscale->GetOutput() );       
-#endif
-                       if (transform!=NULL){
+
+/*
+       vtkLookupTable *table = vtkLookupTable::New();
+          table->SetTableRange (0, 2000);
+          table->SetHueRange (1, 0);
+          table->SetSaturationRange (1, 1);
+          table->SetValueRange (1, 1);
+          table->Build(); //effective built
+*/
+
+/*
+vtkColorTransferFunction *table = vtkColorTransferFunction::New();
+table->SetColorSpaceToHSV();
+    table->HSVWrapOff();
+    table->AddHSVSegment(0.0, 0.6, 1.0, 1.0,
+                       1.0, 0.0, 1.0, 1.0);
+    table->SetNanColor(1.0, 0.0, 1.0);
+*/
+
+/* 
+printf("EED ImageActor::Process  Warnning ***************************Not here this code *");
+vtkLookupTable *table = vtkLookupTable::New();
+  table->SetNumberOfTableValues(1000);
+  table->SetRange(0, 1000);
+  table->Build();
+  double rgba1[4];
+       double rgba2[4];
+       for (int iLookTable = 0; iLookTable<500; iLookTable++)
+                       {
+                               table->GetTableValue(      iLookTable, rgba1);
+                               table->GetTableValue(1000-1-iLookTable, rgba2);
+                               table->SetTableValue(1000-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
+                               table->SetTableValue(      iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+                       } // for iLookTable     
+  double rgba[4];
+  table->GetTableValue(0,rgba);
+  rgba[3]=0;
+  table->SetTableValue(0,rgba);
+*/
+                               vtkImageMapToColors *color = vtkImageMapToColors::New();
+                               color->SetLookupTable( bbGetInputLookupTable() );
+//                             color->SetLookupTable( table );
+                               color->PassAlphaToOutputOn();
+
+//                             imageshiftscale->SetInput( img );
+//                             imageshiftscale->SetOutputScalarTypeToUnsignedChar();
+
+//                             color->SetInput( imageshiftscale->GetOutput() );
+                               color->SetInput( img );
+                               color->Update();
+                               imageactor->GetMapper()->SetInput( color->GetOutput() );
+                               imageactor->GetProperty()->SetInterpolationTypeToNearest();
+                       }
+
+                       if (transform!=NULL)
+                       {
                          imageactor->SetUserTransform( transform );    
                        } // transform
-                       if(render != NULL ){
-                               render->AddActor( imageactor );
+                       if(render != NULL )
+                       {
+//                             render->AddActor( imageactor );
                        } // render
                        bbSetOutputOut(imageactor);
                } // img
@@ -75,25 +141,31 @@ void ImageActor::Process()
                                bbGetInputRenderer()->AddActor( imageactor );
                }
                
+               imageactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
                bbSetOutputOut(imageactor);
+
+
+printf("EED ImageActor::Process End\n");
+
        
 }
 void ImageActor::bbUserSetDefaultValues()
 {
-    firsttime = true;
-    imageactor = NULL;
-
+    firsttime  = true;
+    imageactor         = NULL;
     bbSetInputIn(NULL);
+//    bbSetInputType(0);
+    bbSetInputOpacity(1);
     bbSetInputTransform(NULL);
     bbSetInputRenderer(NULL);
-  
+    bbSetInputLookupTable(NULL);
 }
 
        
        //-----------------------------------------------------------------     
        void ImageActor::bbUserInitializeProcessing()
        {
-               imageactor = vtkImageActor::New();
+               imageactor              = vtkImageActor::New();
                imageshiftscale = vtkImageShiftScale::New();
        }
        
index 26c34d3b20c1d973f987c903d211f6b379f27ec2..a37515a99ed070383b94f74e552d4388fcf49cc8 100644 (file)
@@ -36,6 +36,7 @@
 #include <vtkTransform.h>
 #include <vtkLinearTransform.h>
 #include <vtkImageShiftScale.h>
+#include <vtkScalarsToColors.h>
 
 
 namespace bbcreaMaracasVisu
@@ -49,6 +50,9 @@ class bbcreaMaracasVisu_EXPORT ImageActor
   BBTK_DECLARE_INPUT(In,vtkImageData*);
   BBTK_DECLARE_INPUT(Transform,vtkLinearTransform*);
   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
+  BBTK_DECLARE_INPUT(Opacity,double);
+  BBTK_DECLARE_INPUT(LookupTable,vtkScalarsToColors*);
+//  BBTK_DECLARE_INPUT(Type,int);
   BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
   BBTK_PROCESS(Process);
   void Process();
@@ -58,14 +62,17 @@ class bbcreaMaracasVisu_EXPORT ImageActor
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageActor,bbtk::AtomicBlackBox);
-BBTK_NAME("ImageActor");
-BBTK_AUTHOR("InfoDev CREATIS-LRMN");
-BBTK_DESCRIPTION("put image in a 3D univers");
-BBTK_CATEGORY("");
-BBTK_INPUT(ImageActor,In,"Image input",vtkImageData*,"");
-BBTK_INPUT(ImageActor,Transform,"Transform",vtkLinearTransform*,"");
-BBTK_INPUT(ImageActor,Renderer,"Renderer",vtkRenderer*,"");
-BBTK_OUTPUT(ImageActor,Out,"Output vtk actor",vtkProp3D*,"");
+       BBTK_NAME("ImageActor");
+       BBTK_AUTHOR("InfoDev CREATIS");
+       BBTK_DESCRIPTION("put image in a 3D univers");
+       BBTK_CATEGORY("");
+       BBTK_INPUT(ImageActor,In,"Image input",vtkImageData*,"");
+//     BBTK_INPUT(ImageActor,Type,"0 (default) vtkImageShiftScale Unsigned Char, 1 ColorTable",int,"");
+       BBTK_INPUT(ImageActor,Transform,"Transform",vtkLinearTransform*,"");
+       BBTK_INPUT(ImageActor,Renderer,"Renderer",vtkRenderer*,"");
+       BBTK_INPUT(ImageActor,Opacity,"Opacity [0-1]",double,"");
+       BBTK_INPUT(ImageActor,LookupTable,"LookupTable [vtkScalarsToColors]",vtkScalarsToColors*,"");
+       BBTK_OUTPUT(ImageActor,Out,"Output vtk actor",vtkProp3D*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ImageActor);
 }
 // EO namespace bbcreaMaracasVisu
index 4a9c2d3967aad942d70d73f6d01df40ab862d8b4..f32c600b64234a71e479fa267a9e330576a63b1b 100644 (file)
@@ -32,9 +32,10 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ImageChangeInformation)
 BBTK_BLACK_BOX_IMPLEMENTATION(ImageChangeInformation,bbtk::AtomicBlackBox);
 void ImageChangeInformation::Process()
 {
-       int ext[6];
-       double spc[3];
-       vtkImageData* img = bbGetInputIn();
+       int                     ext[6];
+       double                  spc[3];
+       double                  origin[3];
+       vtkImageData    *img = bbGetInputIn();
        if(img!=NULL)
        {
                if(mchange != NULL)
@@ -43,11 +44,6 @@ void ImageChangeInformation::Process()
                }
                mchange = vtkImageChangeInformation::New();
                img->GetExtent( ext );  
-               double origin[3];
-               origin[0]=0.0;
-               origin[1]=0.0;
-               origin[2]=0.0;
-               img->SetOrigin(origin);         
 
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
@@ -56,9 +52,6 @@ void ImageChangeInformation::Process()
                mchange->SetInputData( img );
 #endif
 
-//EED 2016 15 06
-//             mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
-               mchange->SetOutputOrigin (0, 0, 0);
                mchange->SetOutputExtentStart(0,0,0);
                if (bbGetInputNewSpacing().size()==3)
                {
@@ -67,16 +60,35 @@ void ImageChangeInformation::Process()
                        spc[2] = bbGetInputNewSpacing()[2];
                        mchange->SetOutputSpacing( spc[0] , spc[1] , spc [2] );    //spacing
                }
+               if (bbGetInputNewOrigin().size()==3)
+               {
+                       if ( (bbGetInputNewOrigin()[0]==-1) && (bbGetInputNewOrigin()[1]==-1) && (bbGetInputNewOrigin()[2]==-1) )
+                       {
+                               img->GetOrigin( origin );       
+                       } else {
+                               origin[0] = bbGetInputNewOrigin()[0];
+                               origin[1] = bbGetInputNewOrigin()[1];
+                               origin[2] = bbGetInputNewOrigin()[2];
+                       }
+               } else {
+                       origin[0] = 0;
+                       origin[1] = 0;
+                       origin[2] = 0;
+               }
+               mchange->SetOutputOrigin( origin );
+               mchange->Modified();    //important
                mchange->Update();    //important
                bbSetOutputOut( mchange->GetOutput() );
-       } // img
+       }  // if img
+
 }
 
+
 void ImageChangeInformation::bbUserSetDefaultValues()
 {
-  mchange = NULL;
-   bbSetOutputOut( NULL);
-   bbSetInputIn(NULL);
+       mchange = NULL;
+       bbSetOutputOut( NULL);
+       bbSetInputIn(NULL);
 }
 
 void ImageChangeInformation::bbUserInitializeProcessing()
index 7bfb67853efc48e6c14341fa12062336f14d25a2..9e0d0bfeb42af8ff063ba636d2e323dcf21e0896 100644 (file)
@@ -41,13 +41,13 @@ class /*BBTK_EXPORT*/ ImageChangeInformation
   BBTK_BLACK_BOX_INTERFACE(ImageChangeInformation,bbtk::AtomicBlackBox);
        BBTK_DECLARE_INPUT(In,vtkImageData*);
        BBTK_DECLARE_INPUT(NewSpacing,std::vector<double>);
-       
+       BBTK_DECLARE_INPUT(NewOrigin,std::vector<double>);
        BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
   BBTK_PROCESS(Process);
   void Process();
 
 private:
-           vtkImageChangeInformation   *mchange;
+       vtkImageChangeInformation       *mchange;
 
 };
 
@@ -57,7 +57,8 @@ BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
 BBTK_DESCRIPTION("vtkImageData change information. Translate extern to 0,0,0");
        BBTK_CATEGORY("filter");
        BBTK_INPUT(ImageChangeInformation,In,"Input image",vtkImageData*,"");
-       BBTK_INPUT(ImageChangeInformation,NewSpacing,"New spacing of the image (default: the same spacing of the original image)",std::vector<double>,"");
+       BBTK_INPUT(ImageChangeInformation,NewSpacing,"New spacing of the image. 3 elements (default: the same spacing of the original image)", std::vector<double> ,"");
+       BBTK_INPUT(ImageChangeInformation,NewOrigin,"New origin of the image. 3 elements (default: 0,0,0). (-1,-1,-1) get the same origin of the original image", std::vector<double> ,"");
        BBTK_OUTPUT(ImageChangeInformation,Out,"Output image",vtkImageData*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ImageChangeInformation);
 }
index 440f361de35ba84b59ce86dfe3cac5b8ba35b140..e57135756ccf3dd2da59a388773d3f8ff9d004e1 100644 (file)
@@ -50,7 +50,6 @@ WidgetShowNPointsBox::~WidgetShowNPointsBox()
 //------------------------------------------------------------------------
 void WidgetShowNPointsBox::UpdatePoints(wxCommandEvent &event)
 {
-printf("EED WidgetShowNPointsBox::UpdatePoints start\n");
        WidgetShowNPoints::UpdatePoints(event);
        //Difference in Radio for text placement
 //     double radio=GetModelShowNPoints()->GetRadio();
@@ -62,8 +61,6 @@ printf("EED WidgetShowNPointsBox::UpdatePoints start\n");
        mbbShowNPoints->bbSetInputRadio( GetRadio() );
        // EED 
 //     RefreshPoints();
-printf("EED WidgetShowNPointsBox::UpdatePoints end\n");
-
 }
 
 
index 46ff3ec2424b6be3a5742cd281ed47155804a875..cfeee438b6ccb5a8ab7d1dcbb35ac57c6f8f7411 100644 (file)
@@ -106,7 +106,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
   BBTK_INPUT(ShowNPoints,InitLstPointsY,"Initial lst of points Y",std::vector<int>,"");
   BBTK_INPUT(ShowNPoints,InitLstPointsZ,"Initial lst of points Z",std::vector<int>,"");
   BBTK_INPUT(ShowNPoints,InitLstLabels,"Initial lst of labels",std::vector<std::string>,"");
-  BBTK_INPUT(ShowNPoints,Type,"Type of the widget. 0(default): N-points, 1:Just one point",int,"");
+  BBTK_INPUT(ShowNPoints,Type,"Type of the widget. 0(default): N-points, 1:Just one point, 2:Add/DeleteAll points, 3:As 0 with out save/load option",int,"");
 
   BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector<int> ,"");
   BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector<int> ,"");
index 2947bdc03f6586de3c99d7f84d4e5ec81bb47340..801078958158d57a1b217ec054d5fc78c39355d3 100644 (file)
@@ -394,10 +394,13 @@ void ContourExtractData::PutVtkImageDataResultValue( int x, int y, int z, double
 {
        unsigned short *pValue;
        unsigned short *pMask;
-       pValue  = (unsigned short *)imagedataValueResult->GetScalarPointer(x,y,z);
-       pMask   = (unsigned short *)imagedataMaskResult->GetScalarPointer(x,y,z);
-       *pMask  = 255;
-       *pValue = (unsigned short)value;
+//EED 2017-12-18
+       imagedataValueResult->SetScalarComponentFromDouble(x,y,z,0,value);
+       imagedataMaskResult->SetScalarComponentFromDouble(x,y,z,0,255);
+//     pValue  = (unsigned short *)imagedataValueResult->GetScalarPointer(x,y,z);
+//     *pValue = (unsigned short)value;
+//     pMask   = (unsigned char *)imagedataMaskResult->GetScalarPointer(x,y,z);
+//     *pMask  = 255;
 }
 
 //------------------------------------------------------------------------
@@ -414,8 +417,8 @@ void ContourExtractData::ResetImageResult(int z)
                imagedataValueResult->GetExtent(ext);
 
                int size = (ext[1]-ext[0]+1) * (ext[3]-ext[2]+1); 
-               memset(pValue,0,size*2);
-               memset(pMask,0,size*2);
+               memset(pValue,0, size*imagedataValueResult->GetScalarSize() );
+               memset(pMask,0, size*imagedataMaskResult->GetScalarSize() );
        } // if
 }
 
@@ -572,7 +575,15 @@ void ContourExtractData::InitVtkImagesResult()
                imagedataValueResult->Delete();
        }
        imagedataValueResult = vtkImageData::New();
+<<<<<<< HEAD
        //        imagedataValueResult->SetScalarType(scalartype);
+=======
+
+//EED 2017-12-18
+       imagedataValueResult->SetScalarType(scalartype);
+       //imagedataValueResult->SetScalarTypeToUnsignedShort();
+
+>>>>>>> master
        imagedataValueResult->SetSpacing(spc);
        imagedataValueResult->SetDimensions( newDim );
 
@@ -590,7 +601,16 @@ void ContourExtractData::InitVtkImagesResult()
                imagedataMaskResult->Delete();
        }
        imagedataMaskResult  = vtkImageData::New();
+<<<<<<< HEAD
        //        imagedataMaskResult->SetScalarType(scalartype);
+=======
+
+//EED 2017-12-18
+//     imagedataMaskResult->SetScalarType(scalartype);
+//     imagedataMaskResult->SetScalarTypeToUnsignedShort();
+       imagedataMaskResult->SetScalarTypeToUnsignedChar();
+
+>>>>>>> master
        imagedataMaskResult->SetSpacing(spc);
        imagedataMaskResult->SetDimensions( newDim );
 
index d94117402b086b1f0f1d43fbf4d414cf9d673641..d4f87f0c98a824efecec9ceee0859d85c719fcbe 100644 (file)
@@ -168,6 +168,10 @@ double ColorLayerImageView::GetBaseColors(unsigned int index)
 //----------------------------------------------------------------------------
 void ColorLayerImageView::SetGreyLevelBoundaries(std::vector<double> & grey_level_boundary)
 {
+ _grey_level_boundary = grey_level_boundary;
+
+//EED 2017 / 11 / 27
+/*
   // The size must be greater than or equal to 2 (at least min and max must exist).
   if ( grey_level_boundary.size() >= 2)
     {
@@ -177,6 +181,8 @@ void ColorLayerImageView::SetGreyLevelBoundaries(std::vector<double> & grey_leve
   // Otherwise, an exception should be thrown.
   else if (grey_level_boundary.size() != 0)
     std::cout << "CM ColorLayerImageView::SetGreyLevelBoundaries : ERROR!!! The grey level boundaries vector has an inconsistent size. It must be of a size greater than or equal to 2 (at least min and max must exist), but its size is: " << grey_level_boundary.size() << ". Therefore, the histogram will be equally split." << std::endl;
+*/
+
 }
 
 //----------------------------------------------------------------------------
@@ -302,6 +308,7 @@ void ColorLayerImageView::SetDefaultBaseColorAndGreyLevelBoundary()
 //----------------------------------------------------------------------------
 void ColorLayerImageView::ConfigLookupTable()  // virtual
 {
+
   // CM 2014
   // EED        28/01/2015     
   // Grey level extrema retrieved from the image grey level extrema.
@@ -422,7 +429,7 @@ void ColorLayerImageView::ConfigLookupTable()  // virtual
                                end     = GrayLevel_TO_colorTableIndex( GetGreyLevelBoundaries(iColor+1) );  
                        t1              = _transparence_level_boundary[iColor];
                                t2              = _transparence_level_boundary[iColor+1];
-printf("EED ColorLayerImageView::ConfigLookupTable   Make something with transparence \n");
+//printf("EED ColorLayerImageView::ConfigLookupTable   Make something with transparence \n");
                                FillColorTable( start,end, r1,g1,b1, r2,g2,b2, t1,t2 );
                        }// for 
                } //if                          
@@ -438,7 +445,6 @@ printf("EED ColorLayerImageView::ConfigLookupTable   Make something with transpa
 //  thresholdTable->SetBelowRangeColor(0,0,0,0);       
 
   thresholdTable->Build( );
-
   //EO CM EED
 }
 
index 316f7851eb5561ed15c7bd9fed4fd6abb2378a97..9078a7e5203fac78717151d040a81f8ef8928ad2 100644 (file)
@@ -97,6 +97,7 @@ LayerImageBase::LayerImageBase()
        _X                                              =       -1;
        _Y                                              =       -1;
        _Z                                              =       -1;
+       _opacity                                =       1;
        _thresholdTable                 =       NULL;
        _thresholdMapper                =       NULL;
        _scalarbarActor                 =       NULL;
@@ -469,6 +470,8 @@ void LayerImageBase::onThreshold()
                                } else {
                                        _scalarbarActor->SetDisplayPosition(0,0);
                                }
+                               _scalarbarActor->SetHeight(0.4);        //default  0.8
+                               _scalarbarActor->SetWidth(0.08);    //default  0.17
 
                                _thresholdActor->SetOpacity( 1 );
                                _thresholdActor->InterpolateOn(  );
@@ -556,6 +559,7 @@ void LayerImageBase::onThreshold()
                _thresholdActor->SetInputData( _thresholdMapper->GetOutput() );
 #endif
                
+               _thresholdActor->SetOpacity(_opacity);
                _scalarbarActor->SetLookupTable( _thresholdTable );
 //             _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
                _scalarbarActor->SetTitle("Value");
@@ -600,6 +604,8 @@ void LayerImageBase::onThresholdChangeOpacity (int opacity)
        {
                _thresholdActor->SetOpacity(opacity/100.0);
        }
+// EED 2017-12-17
+       _opacity = (double)opacity/100.0;
 }
 
 //----------------------------------------------------------------------------
index 3d27d31b71145cda4a3316a17861719214340247..e9eec4326fb1accd52bf854fb4da8b5fe686ee7f 100644 (file)
@@ -130,6 +130,7 @@ class LayerImageBase
                double                                          _newSpcLayer[3];
                int                                             _dimBase[3];
                double                                          _spcBase[3];
+               double                                          _opacity;
 
                vtkImageData                            *_image;
                vtkImageChangeInformation       *_imageChangeInformation;
index c3e7bcf772573022a2c8152be00c513167522a25..8bb4a574e726a3014d6a543b168ce85e5b133709 100644 (file)
@@ -38,7 +38,7 @@
 /**
  ** Begin of the threshold panel
  **/
-ThresholdImageViewPanel::ThresholdImageViewPanel(wxWindow* parent, int min, int max, int type)
+ThresholdImageViewPanel::ThresholdImageViewPanel(wxWindow* parent, int min, int max, int start, int end, int type)
 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
 {
        _thresholdImageView = new ThresholdImageView();
@@ -51,7 +51,7 @@ ThresholdImageViewPanel::ThresholdImageViewPanel(wxWindow* parent, int min, int
        
        _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image interpolation") );
        _interpolationCheckBox->SetValue(true); 
-       _opacity = new wxSlider(this, wxID_ANY, 6, 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+       _opacity = new wxSlider(this, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
        
 //     double range[2];
 //     interfMainPanel::getInstance()->getImageRange(range);
@@ -75,8 +75,8 @@ ThresholdImageViewPanel::ThresholdImageViewPanel(wxWindow* parent, int min, int
                _mBarThreshold-> setRepresentedValues( min , max );
                _mBarThreshold-> setDeviceBlitStart(10,10); 
                _mBarThreshold-> setIfWithActualDrawed( false );
-               _mBarThreshold-> SetStart( min );
-               _mBarThreshold-> SetEnd( max );  
+               _mBarThreshold-> SetStart( start );
+               _mBarThreshold-> SetEnd( end );  
        }
        
        
index 96fd710167a3e3ca8ee9136aada29621bc594d07..9153d9d14a7e9db5630644c28cdd93ce0e25fea2 100644 (file)
@@ -48,7 +48,7 @@
                : public wxPanel
                {
                public:
-                       ThresholdImageViewPanel(wxWindow * parent, int min, int max, int type);         
+                       ThresholdImageViewPanel(wxWindow * parent, int min, int max, int start, int end, int type);             
                        ~ThresholdImageViewPanel();
                        void onThresholdStop();
                        void SetThresholdImageView(ThresholdImageView* thresholdImageView);
index 2953844359ef8ae225d078ba9985b0fb0083e5c4..3cdf1e0b73b9c7108ad9da1b5a4df5cd1e74fc8d 100644 (file)
@@ -34,7 +34,7 @@
     wxPanel    *panel                                  = this;
     wxSizer *sizer                                     = NULL;
 
-       if (mtype==0)
+       if ((mtype==0) || (mtype==3))
        {
                // Widget interface
                askPointLabel                                   = new wxStaticText(panel, -1, _T("Point label :")); // JPR
                wxButton *btnEraseLastPoint             = new wxButton( panel, -1, _T("Erase Last point"));
                wxButton *btnErasePoint                 = new wxButton( panel, -1, _T("Erase point"));
                wxButton *btnDeleteAllPoints    = new wxButton( panel, -1, _T("Delete all points"));
-               wxButton *btnSavePoints                 = new wxButton( panel, -1, _T("Save points"));
-               wxButton *btnLoadPoints                 = new wxButton( panel, -1, _T("Load points"));
+               wxButton *btnSavePoints                 = NULL;
+               wxButton *btnLoadPoints                 = NULL;
+               if (mtype==0)
+               {
+                       btnSavePoints                           = new wxButton( panel, -1, _T("Save points"));
+                       btnLoadPoints                           = new wxButton( panel, -1, _T("Load points"));
+               }
                txtNrPoints                                             = new wxStaticText(panel,-1, _T(" "));
 
                //NTU: Sliders for opacity and radio change
                Connect(btnEraseLastPoint->GetId()      , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnEraseLastPoint);
                Connect(btnErasePoint->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnErasePoint);
                Connect(btnDeleteAllPoints->GetId()     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnDeleteAllPoints);
-               Connect(btnSavePoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnSavePoints);
-               Connect(btnLoadPoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnLoadPoints);
-
+               if (mtype==0)
+               {
+                       Connect(btnSavePoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnSavePoints);
+                       Connect(btnLoadPoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnLoadPoints);
+               }
                //NTU: Slider events
                Connect(sdrOpacity->GetId()                     , wxEVT_COMMAND_SLIDER_UPDATED  , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
                Connect(sdrRadio->GetId()                       , wxEVT_COMMAND_SLIDER_UPDATED  , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
                sizer1->Add(sdrOpacity,1,wxGROW );
                sizer1->Add(txRadio);
                sizer1->Add(sdrRadio,1,wxGROW );
-               sizer1->Add(btnSavePoints);
-               sizer1->Add(btnLoadPoints);
+               if (mtype==0)
+               {
+                       sizer1->Add(btnSavePoints);
+                       sizer1->Add(btnLoadPoints);
+               }
                sizer = sizer1;
        }
 
index 9e0945604c29068e0e5a131b2d70cace9c7f3aa4..8ecfd9e6e32c385c490dec4096200e2682867a84 100644 (file)
@@ -55,31 +55,33 @@ bool manualInteractorWindowLevel::OnMouseMove()                     // virtual
                crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( tmpPx , tmpPy );
-
                double colorWin;
                double colorLev;
-               
                vtkImageData* imgrange = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData();
-
-               if(imgrange != NULL){
+               if(imgrange != NULL)
+               {
                        double* scalarrange = imgrange->GetScalarRange();
-                       double scalarr = scalarrange[1] - scalarrange[0];
+                       double scalarr;
+                       if (scalarrange[1] == scalarrange[0])
+                       {
+                               scalarr=scalarrange[1];
+                               if (scalarrange[1]==0) {scalarr=100;}
+                       } else {
+                               scalarr = scalarrange[1] - scalarrange[0];
+                       }
                        //std::cout<<"scalar r="<<scalarr<<std::endl;
                        int w, h;
                        ((wxWindow*)wxVTKiren)->GetSize(&w, &h);                        
-
                        double dw=w,dh=h;
                        double dx = (scalarr*( _backPx - tmpPx ))/dw;
                        double dy = (scalarr*( _backPy - tmpPy ))/dh;
-
                        //colorWin=_backWindow - (scalarr)*( _backPx - tmpPx );
                        colorWin=_backWindow - dx;
                        colorLev=_backLevel  + dy;
-               }else{
+               } else {
                        colorWin=_backWindow - 2*( _backPx - tmpPx );
                        colorLev=_backLevel  + 2*( _backPy - tmpPy );
                }
-
                if (colorWin<0)
                { 
                        colorWin=0;
@@ -88,35 +90,26 @@ bool manualInteractorWindowLevel::OnMouseMove()                     // virtual
                { 
                        colorWin=100000;
                }       
-               
 //EED 2 Nov 2012  This lets see negative values with the interaction of Window-Level Color
 //             if (colorLev<0)
 //             { 
 //                     colorLev=0;
-//             }
-               
+//             }       
                if (colorLev>100000)
                { 
                        colorLev=100000;
                }
-               
                wxVtk2DBaseView *wxvtk2Dbaseview        = (wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
                vtkBaseData *vtkbasedata                        = wxvtk2Dbaseview->GetVtkBaseData();
-               
 //EED Borrame
 //             vtkImageViewer2 *vtkimageviewer2        = wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();              
 //             vtkimageviewer2->SetColorWindow(colorWin);
 //             vtkimageviewer2->SetColorLevel(colorLev);
-               
                vtkbasedata->SetColorWindow(colorWin);
-               vtkbasedata->SetColorLevel(colorLev);
-               
+               vtkbasedata->SetColorLevel(colorLev);           
                this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-               
 //             vtkimageviewer2->Render();
        }
-
-
        return true;
 }
 
index 4156a3d54492d2c5cb7394dd916002e6892a752f..c1ac0be4a34e87cf4ff9be9940b921a9a507cada 100644 (file)
@@ -24,6 +24,7 @@
 # ------------------------------------------------------------------------ */
 
 #include "FillFilter.h"
+#include "creaVtk_MACROS.h"
 
 FillFilter::FillFilter() 
 {
@@ -31,6 +32,9 @@ FillFilter::FillFilter()
        _distancefill           = 500;
        _limitRecursionFill = 50000;
        _auxImageFill           = NULL;
+       _maxXback                       = 0;
+       _maxYback                       = 0;
+       _maxZback                       = 0;
 }
 
 //---------------------------------------------------------------------------
@@ -46,10 +50,24 @@ FillFilter::~FillFilter()
 void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
 {
        baseFilterManualPaint::SetImages(image,image2);
-       if (_auxImageFill != NULL)
+       
+       if ((_maxX!=_maxXback) || (_maxY!=_maxYback) || (_maxZ!=_maxZback)) 
        {
-               _auxImageFill->Delete();
+               if (_auxImageFill != NULL)
+               {
+                       _auxImageFill->Delete();
+               }
+               _auxImageFill = vtkImageData::New();
+               _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
+               _auxImageFill->SetOrigin(0, 0, 0);
+               _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+               _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+               _auxImageFill->SetScalarTypeToUnsignedChar();
+               _auxImageFill->AllocateScalars();
+               _ptrAuxImageFill = (unsigned char       *)_auxImageFill->GetScalarPointer();
+               memset(_ptrAuxImageFill, 0, (_maxX+1) * (_maxY+1) * (_maxZ+1) );
        }
+
        _auxImageFill = vtkImageData::New();
        _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
        _auxImageFill->SetOrigin(0, 0, 0);
@@ -65,58 +83,69 @@ void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
        _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
 #endif
 
-
+       _maxXback=_maxX;
+       _maxYback=_maxY;
+       _maxYback=_maxZ;
 }
 
+
 //---------------------------------------------------------------------------
 void FillFilter::Run() // virtual
 {
+       long int ivi;
        if ((_px >= _minX) && (_px <= _maxX) && (_py >= _minY) && (_py <= _maxY)
-                       && (_pz >= _minZ) && (_pz <= _maxZ)) {
-               _graylevelbasefill = _image->GetScalarComponentAsDouble(_px, _py, _pz,
-                               0);
-               _pxfill = _px;
-               _pyfill = _py;
-               _pzfill = _pz;
-               _distbasefill = _distancefill * _distancefill;
-               _countRecursiveFill = 0;
-               _countRecursiveFillProblem = 0;
-               _countProgressingFill = 0;
-               unsigned char *pImage =
-                               (unsigned char *) _auxImageFill->GetScalarPointer();
-               _usingAuxImageFill = false;
-               memset(pImage, 0, _maxX * _maxY * _maxZ);
-
-               FillToolRecursive(_px, _py, _pz);
-//             printf("--\n");
-
+                       && (_pz >= _minZ) && (_pz <= _maxZ)) 
+       {
+               _graylevelbasefill                      = _image->GetScalarComponentAsDouble(_px, _py, _pz,0);
+               _pxfill                                         = _px;
+               _pyfill                                         = _py;
+               _pzfill                                         = _pz;
+               _distbasefill                           = _distancefill * _distancefill;
+               _countRecursiveFill             = 0;
+               _countRecursiveFillProblem      = 0;
+               _countProgressingFill           = 0;
+               _usingAuxImageFill                      = false;
+               ivi                                             = _px + _py*(_maxX+1) + _pz*(_maxX+1)*(_maxY+1);  // index vector image
+//EED01
+//             FillToolRecursive(_px, _py, _pz);
+               FillToolRecursive(_px, _py, _pz, ivi);
+
+               unsigned char *pImage;
+               pImage                                          = (unsigned char *) _auxImageFill->GetScalarPointer();
                int ii, jj, kk;
-               while (_countRecursiveFillProblem != 0) {
-                       _countRecursiveFillProblem = 0;
-                       _usingAuxImageFill = true;
-                       for (ii = 0; ii <= _maxX; ii++) {
-                               for (jj = 0; jj <= _maxY; jj++) {
-                                       for (kk = 0; kk <= _maxZ; kk++) {
-                                               pImage =
-                                                               (unsigned char *) _auxImageFill->GetScalarPointer(
-                                                                               ii, jj, kk);
-                                               if ((*pImage) == 1) {
-                                                       FillToolRecursive(ii, jj, kk);
-                                               }
-                                       } // for kk
+               ivi                                                     = 0;
+               while (_countRecursiveFillProblem != 0) 
+               {
+                       _countRecursiveFillProblem  = 0;
+                       _usingAuxImageFill                      = true;
+                       for (kk = 0; kk <= _maxZ; kk++) 
+                       {
+                               for (jj = 0; jj <= _maxY; jj++) 
+                               {
+                                       for (ii = 0; ii <= _maxX; ii++) 
+                                       {
+                                               if (pImage[ivi] == 1) 
+                                               {
+//EED01
+//                                                     FillToolRecursive(ii, jj, kk);
+                                                       FillToolRecursive(ii, jj, kk, ivi);
+                                               }  // if
+                                               ivi++;
+                                       } // for ii
                                } // for jj
-                       } //for ii
+                       } //for kk
 //                     printf("-\n");
                } // while
-
        } //if _minX _maxX _minY _maxY _minZ _maxZ
 }
 
 //---------------------------------------------------------------------------
-void FillFilter::FillToolRecursive(int px, int py, int pz) 
+void FillFilter::FillToolRecursive(int px, int py, int pz,long int ivi
 {
-       _countRecursiveFill++;
+DEF_POINTER_IMAGE_VTK_CREA(v_image,ss_image,p_image,st_image,_image)           
+DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2)              
 
+       _countRecursiveFill++;
        _countProgressingFill++;
        if (_countProgressingFill > 200000) 
        {
@@ -130,41 +159,53 @@ void FillFilter::FillToolRecursive(int px, int py, int pz)
                if (_usingAuxImageFill == true) 
                {
                        this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
-                       _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 0);
+//EED01
+//                     _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 0);
+                       _ptrAuxImageFill[ ivi ]=0;
                }
-               _tmpDistfill = (px - _pxfill) * (px - _pxfill)
-                               + (py - _pyfill) * (py - _pyfill)
-                               + (pz - _pzfill) * (pz - _pzfill);
-               _tmpiglfill     = _image->GetScalarComponentAsDouble(px, py, pz, 0);
+               _tmpDistfill = (px-_pxfill)*(px-_pxfill)
+                                       +  (py-_pyfill)*(py-_pyfill)
+                                       +  (pz-_pzfill)*(pz-_pzfill);
+
+//if (_countRecursiveFill >1 )
+//{
+//     printf("   -> %d %d %d   cr=%ld  r=%f\n", px,py,pz,_countRecursiveFill , _tmpDistfill);
+//}
+
+//EED01 
+//             _tmpiglfill     = _image->GetScalarComponentAsDouble(px, py, pz, 0);
+GETVALUE2_VTK_CREA(_tmpiglfill,p_image,st_image,ivi)   
 
                if (_image2!=NULL)
                {
-                       _tmpiglfill2    =       _image2->GetScalarComponentAsDouble(px, py, pz, 0);
+//EED01
+//                     _tmpiglfill2    =       _image2->GetScalarComponentAsDouble(px, py, pz, 0);
+GETVALUE2_VTK_CREA(_tmpiglfill2,p_image2,st_image2,ivi)        
                } else {
                        _tmpiglfill2    =       _tmpiglfill;
                }
 
-               float grayLBFMTOL = _graylevelbasefill - _tolerancefill;
-               float grayLBFPTOL = _graylevelbasefill + _tolerancefill;
-               bool isInRange = false;
+               float grayLBFMTOL       = _graylevelbasefill - _tolerancefill;
+               float grayLBFPTOL       = _graylevelbasefill + _tolerancefill;
+               bool isInRange          = false;
                //DFCH
                if (_RangeMin <= grayLBFMTOL && _RangeMax >= grayLBFPTOL) {
-                       isInRange = true;
+                       isInRange               = true;
                } //fi esle
                else if (_RangeMin > grayLBFMTOL && _RangeMax >= grayLBFPTOL) {
-                       grayLBFMTOL = _RangeMin;
-                       isInRange = true;
+                       grayLBFMTOL     = _RangeMin;
+                       isInRange               = true;
                } //fi esle
                else if (_RangeMin <= grayLBFMTOL && _RangeMax < grayLBFPTOL) {
-                       grayLBFPTOL = _RangeMax;
-                       isInRange = true;
-               } //fi esle
-               else if ((_RangeMin <= _graylevelbasefill)
-                               && (_graylevelbasefill <= _RangeMax)) {
-                       grayLBFMTOL = _RangeMin;
-                       grayLBFPTOL = _RangeMax;
-                       isInRange = true;
+                       grayLBFPTOL     = _RangeMax;
+                       isInRange               = true;
                } //fi esle
+               else if ((_RangeMin <= _graylevelbasefill) && (_graylevelbasefill <= _RangeMax)) {
+                       grayLBFMTOL     = _RangeMin;
+                       grayLBFPTOL     = _RangeMax;
+                       isInRange               = true;
+               } //fi Range
 
                if (isInRange) 
                {
@@ -188,9 +229,13 @@ void FillFilter::FillToolRecursive(int px, int py, int pz)
                        this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
                        if (_image2!=NULL)
                        {
-                               _image2->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+//EED01
+//                             _image2->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+SETVALUE2_VTK_CREA(_graylevel,p_image2,st_image2,ivi)
                        } else {
-                               _image->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+//EED01
+//                             _image->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+SETVALUE2_VTK_CREA(_graylevel,p_image,st_image,ivi)
                        }
 
                        if (_countRecursiveFill < _limitRecursionFill) 
@@ -202,102 +247,99 @@ void FillFilter::FillToolRecursive(int px, int py, int pz)
                                        {
                                                //FillToolRecursive(px+1,py,pz);
                                                //FillToolRecursive(px-1,py,pz);
-                                               FillToolRecursive(px, py + 1, pz);
-                                               FillToolRecursive(px, py - 1, pz);
-                                               FillToolRecursive(px, py, pz - 1);
-                                               FillToolRecursive(px, py, pz + 1);
+                                               FillToolRecursive(px, py + 1, pz, ivi+_OneLine  );
+                                               FillToolRecursive(px, py - 1, pz, ivi-_OneLine  );
+                                               FillToolRecursive(px, py, pz - 1, ivi-_OnePlane );
+                                               FillToolRecursive(px, py, pz + 1, ivi+_OnePlane );
                                        }
                                        if (_direction == 1) // XZ
                                                        {
-                                               FillToolRecursive(px + 1, py, pz);
-                                               FillToolRecursive(px - 1, py, pz);
+                                               FillToolRecursive(px + 1, py, pz, ivi+_OneColumn);
+                                               FillToolRecursive(px - 1, py, pz, ivi-_OneColumn);
                                                //FillToolRecursive(px,py+1,pz);
                                                //FillToolRecursive(px,py-1,pz);
-                                               FillToolRecursive(px, py, pz - 1);
-                                               FillToolRecursive(px, py, pz + 1);
+                                               FillToolRecursive(px, py, pz - 1, ivi-_OnePlane );
+                                               FillToolRecursive(px, py, pz + 1, ivi+_OnePlane );
                                        }
                                        if (_direction == 2) // XY
                                                        {
-                                               FillToolRecursive(px + 1, py, pz);
-                                               FillToolRecursive(px, py + 1, pz);
-                                               FillToolRecursive(px - 1, py, pz);
-                                               FillToolRecursive(px, py - 1, pz);
+                                               FillToolRecursive(px + 1, py, pz, ivi+_OneColumn);
+                                               FillToolRecursive(px, py + 1, pz, ivi+_OneLine);
+                                               FillToolRecursive(px - 1, py, pz, ivi-_OneColumn);
+                                               FillToolRecursive(px, py - 1, pz, ivi-_OneLine);
                                                //FillToolRecursive(px,py,pz-1);
                                                //FillToolRecursive(px,py,pz+1);
                                        }
                                } else { // 3D
-
-                                       FillToolRecursive(px + 1, py, pz);
-                                       FillToolRecursive(px - 1, py, pz);
-                                       FillToolRecursive(px, py + 1, pz);
-                                       FillToolRecursive(px, py - 1, pz);
-                                       FillToolRecursive(px, py, pz - 1);
-                                       FillToolRecursive(px, py, pz + 1);
+                                       FillToolRecursive(px + 1, py, pz, ivi+_OneColumn );
+                                       FillToolRecursive(px - 1, py, pz, ivi-_OneColumn );
+                                       FillToolRecursive(px, py + 1, pz, ivi+_OneLine );
+                                       FillToolRecursive(px, py - 1, pz, ivi-_OneLine );
+                                       FillToolRecursive(px, py, pz - 1, ivi-_OnePlane );
+                                       FillToolRecursive(px, py, pz + 1, ivi+_OnePlane );
                                } // 2D 3D
 
                        } //_countRecursiveFill
                } // _graylevel
 
-               if ((_auxGrayLevelValidationFill == true)
-                               && (_countRecursiveFill >= _limitRecursionFill)) 
+               if ((_auxGrayLevelValidationFill == true) && (_countRecursiveFill >= _limitRecursionFill)) 
                {
                        _countRecursiveFillProblem++;
-
                        if (_2D3D == 0) //2D
-                                       {
+                       {
                                if (_direction == 0) // YZ
-                                               {
+                               {
                                        //SetAuxImageFill(px+1,py,pz);
                                        //SetAuxImageFill(px-1,py,pz);
-                                       SetAuxImageFill(px, py + 1, pz);
-                                       SetAuxImageFill(px, py - 1, pz);
-                                       SetAuxImageFill(px, py, pz - 1);
-                                       SetAuxImageFill(px, py, pz + 1);
+                                       SetAuxImageFill(px, py + 1, pz,ivi+_OneLine);
+                                       SetAuxImageFill(px, py - 1, pz,ivi-_OneLine);
+                                       SetAuxImageFill(px, py, pz - 1,ivi-_OnePlane);
+                                       SetAuxImageFill(px, py, pz + 1,ivi+_OnePlane);
                                }
                                if (_direction == 1) // XZ
-                                               {
-                                       SetAuxImageFill(px + 1, py, pz);
-                                       SetAuxImageFill(px - 1, py, pz);
+                               {
+                                       SetAuxImageFill(px + 1, py, pz,ivi+_OneColumn);
+                                       SetAuxImageFill(px - 1, py, pz,ivi-_OneColumn);
                                        //SetAuxImageFill(px,py+1,pz);
                                        //SetAuxImageFill(px,py-1,pz);
-                                       SetAuxImageFill(px, py, pz - 1);
-                                       SetAuxImageFill(px, py, pz + 1);
+                                       SetAuxImageFill(px, py, pz - 1,ivi-_OnePlane);
+                                       SetAuxImageFill(px, py, pz + 1,ivi+_OnePlane);
                                }
                                if (_direction == 2) // XY
-                                               {
-                                       SetAuxImageFill(px + 1, py, pz);
-                                       SetAuxImageFill(px - 1, py, pz);
-                                       SetAuxImageFill(px, py + 1, pz);
-                                       SetAuxImageFill(px, py - 1, pz);
+                               {
+                                       SetAuxImageFill(px + 1, py, pz,ivi+_OneColumn);
+                                       SetAuxImageFill(px - 1, py, pz,ivi-_OneColumn);
+                                       SetAuxImageFill(px, py + 1, pz,ivi+_OneLine);
+                                       SetAuxImageFill(px, py - 1, pz,ivi-_OneLine);
                                        //SetAuxImageFill(px,py,pz-1);
                                        //SetAuxImageFill(px,py,pz+1);
                                }
                        } else { // 3D
-
-                               SetAuxImageFill(px + 1, py, pz);
-                               SetAuxImageFill(px - 1, py, pz);
-                               SetAuxImageFill(px, py + 1, pz);
-                               SetAuxImageFill(px, py - 1, pz);
-                               SetAuxImageFill(px, py, pz - 1);
-                               SetAuxImageFill(px, py, pz + 1);
+                               SetAuxImageFill(px + 1, py, pz,ivi+_OneColumn);
+                               SetAuxImageFill(px - 1, py, pz,ivi-_OneColumn);
+                               SetAuxImageFill(px, py + 1, pz,ivi+_OneLine);
+                               SetAuxImageFill(px, py - 1, pz,ivi-_OneLine);
+                               SetAuxImageFill(px, py, pz - 1,ivi-_OnePlane);
+                               SetAuxImageFill(px, py, pz + 1,ivi+_OnePlane);
                        } // 2D 3D
 
                } // _graylevel   //_limitRecursionFill
 
        } //if _minX _maxX _minY _maxY _minZ _maxZ
-
        _countRecursiveFill--;
-
 }
 
 //---------------------------------------------------------------------------
-void FillFilter::SetAuxImageFill(int px, int py, int pz) 
+void FillFilter::SetAuxImageFill(int px, int py, int pz, long int ivi
 {
        if ((px >= _minX) && (px <= _maxX) && (py >= _minY) && (py <= _maxY)
-                       && (pz >= _minZ) && (pz <= _maxZ)) {
+                       && (pz >= _minZ) && (pz <= _maxZ)) 
+       {
                this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
-               _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 1);
-       }
+//EED01
+//             _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 1);
+                       _ptrAuxImageFill[ ivi ]=1;
+       } // if px py pz
 }
 
 //---------------------------------------------------------------------------
index dc118a8eab717ed996cdc219a01bd3fdbe86c00e..3482b2a66e47159810de0a040ad7ade78f730360 100644 (file)
@@ -34,7 +34,7 @@ public:
        virtual ~FillFilter();
 
     void                       Run();
-    void                       FillToolRecursive(int px,int py, int pz);
+    void                       FillToolRecursive(int px,int py, int pz, long int ivi);
 
     void                       SetToleranceFill(double tolerancefill);
     void                       SetDistanceFill(int distancefill);
@@ -55,13 +55,19 @@ private:
     long int        _countRecursiveFill;
     long int        _countRecursiveFillProblem;
     vtkImageData    *_auxImageFill;
+//EED01
+       unsigned char   *_ptrAuxImageFill;
+
     bool            _usingAuxImageFill;
     bool            _auxGrayLevelValidationFill;
     long int        _countProgressingFill;
     long int        _limitRecursionFill;
 
 
-    void               SetAuxImageFill(int px,int py, int pz);
+    void               SetAuxImageFill(int px,int py, int pz,long int ivi);
+       int                     _maxXback;
+       int                     _maxYback;
+       int                     _maxZback;
 
 protected:
 
index 0ca0de29abf6a7a94ab9f68fbfb2d25b696f9970..909db02c41aac42a13866dfa0ae4dc6c1570361c 100644 (file)
@@ -40,14 +40,12 @@ baseFilterManualPaint::baseFilterManualPaint()
        _maxX           = 0;
        _maxY           = 0;
        _maxZ           = 0;
-
        _pMinX          = 0;
        _pMinY          = 0;
        _pMinZ          = 0;
        _pMaxX          = 0;
        _pMaxY          = 0;
        _pMaxZ          = 0;
-
        _RangeMin       = 0;
        _RangeMax       = 6000;
 }
@@ -63,22 +61,26 @@ void baseFilterManualPaint::Run() // virtual
 }
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::SetGrayLevel(double graylevel) {
+void baseFilterManualPaint::SetGrayLevel(double graylevel) 
+{
        _graylevel = graylevel;
 }
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::Set2D3D(int dim2D3D) {
+void baseFilterManualPaint::Set2D3D(int dim2D3D) 
+{
        _2D3D = dim2D3D;
 }
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::SetDirection(int direction) {
+void baseFilterManualPaint::SetDirection(int direction) 
+{
        _direction = direction;
 }
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::SetPoint(int px, int py, int pz) {
+void baseFilterManualPaint::SetPoint(int px, int py, int pz) 
+{
        _px = px;
        _py = py;
        _pz = pz;
@@ -89,7 +91,6 @@ void baseFilterManualPaint::SetImages(vtkImageData *image, vtkImageData *image2)
 {
        _image  = image;
        _image2 = image2;
-
        int ext[6];
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
@@ -100,7 +101,6 @@ void baseFilterManualPaint::SetImages(vtkImageData *image, vtkImageData *image2)
        _minX = 0;
        _minY = 0;
        _minZ = 0;
-
        if (_image2!=NULL)
        {
                int extB[6];
@@ -120,11 +120,16 @@ void baseFilterManualPaint::SetImages(vtkImageData *image, vtkImageData *image2)
                _maxY = ext[3]-ext[2];
                _maxZ = ext[5]-ext[4];
        } // if
+
+       _OneColumn      = 1;
+       _OneLine        = _maxX+1;
+       _OnePlane       = (_maxX+1)*(_maxY+1);
 }
 
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::ResetGeneralMinMax() {
+void baseFilterManualPaint::ResetGeneralMinMax() 
+{
        _pMinX = 10000;
        _pMinY = 10000;
        _pMinZ = 10000;
@@ -135,51 +140,34 @@ void baseFilterManualPaint::ResetGeneralMinMax() {
 
 //---------------------------------------------------------------------------
 void baseFilterManualPaint::SetGeneralMinMax(int minX, int maxX, int minY,
-               int maxY, int minZ, int maxZ) {
-       if (_pMinX > minX) {
-               _pMinX = minX;
-       }
-
-       if (_pMinY > minY) {
-               _pMinY = minY;
-       }
-
-       if (_pMinZ > minZ) {
-               _pMinZ = minZ;
-       }
-
-       if (_pMaxX < maxX) {
-               _pMaxX = maxX;
-       }
-
-       if (_pMaxY < maxY) {
-               _pMaxY = maxY;
-       }
-
-       if (_pMaxZ < maxZ) {
-               _pMaxZ = maxZ;
-       }
-
+               int maxY, int minZ, int maxZ) 
+{
+       if (_pMinX > minX) { _pMinX = minX; }
+       if (_pMinY > minY) { _pMinY = minY; }
+       if (_pMinZ > minZ) { _pMinZ = minZ; }
+       if (_pMaxX < maxX) { _pMaxX = maxX; }
+       if (_pMaxY < maxY) { _pMaxY = maxY; }
+       if (_pMaxZ < maxZ) { _pMaxZ = maxZ; }
 }
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::GetScalarRange(double * range) {
+void baseFilterManualPaint::GetScalarRange(double * range) 
+{
        range = this->_image->GetScalarRange();
 }
 
 //---------------------------------------------------------------------------
-ImageMManager* baseFilterManualPaint::GetImageMManager() {
+ImageMManager* baseFilterManualPaint::GetImageMManager() 
+{
        return (this->_IMManager);
 } //DFCH
 
 //---------------------------------------------------------------------------
-void baseFilterManualPaint::CleanImageMManager() {
+void baseFilterManualPaint::CleanImageMManager() 
+{
        this->_IMManager->CleanModifiedRegion();
 } //DFCH
 
-
-
-
 //---------------------------------------------------------------------------
 void baseFilterManualPaint::SetRangeMin(int min) 
 {
@@ -204,6 +192,3 @@ int baseFilterManualPaint::GetRangeMax()
        return _RangeMax;
 }
 
-
-
-
index bdb76a4df51871292a97d724b5083440f48cbb68..f24066a9a84537871ad1a2add76bb5897749d22b 100644 (file)
@@ -79,6 +79,9 @@ protected:
        int                     _maxY;
        int                     _minZ;
        int                     _maxZ;
+       long int                _OneColumn;
+       long int                _OneLine;
+       long int                _OnePlane;
        bool                    _2D3D;
        double                  _graylevel;
     int                        _RangeMin;
index 8566966ce942924af8e121aaecdb4bf665fba60e..7aed68e42feff9947e6d1b42e3bd996e3cb198ef 100644 (file)
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------ */
 
-
 #include "vtkBaseData.h"
 
-
-
 //-------------------------------------------------------------------
 vtkBaseData::vtkBaseData()
 {
@@ -35,6 +32,8 @@ vtkBaseData::vtkBaseData()
        _t              = 0;
        _marImageData   = 0;
        _interpolate    = true;
+       _fixAxis2D              = false;
+       _opacityAxis    = 0.5;
        _observable     = vtkObject::New();
 }
 
@@ -210,3 +209,26 @@ void vtkBaseData::SetInterpolate(bool value)
        _interpolate = value;
 }
 
+//-------------------------------------------------------------------
+bool vtkBaseData::GetFixAxis2D()       
+{
+       return _fixAxis2D;
+}
+
+//-------------------------------------------------------------------
+void vtkBaseData::SetFixAxis2D(bool value)     
+{
+       _fixAxis2D = value;
+}
+
+//-------------------------------------------------------------------
+double vtkBaseData::GetOpacityAxis()   
+{
+       return _opacityAxis;
+}
+
+//-------------------------------------------------------------------
+void vtkBaseData::SetOpacityAxis(double value) 
+{
+       _opacityAxis = value;
+}
index 09e36bd479dc5501ced2fb3f0697a03fbb99d046..6870e0189568da85d478ea4509bc77b65219fa49 100644 (file)
@@ -42,10 +42,8 @@ public:
        virtual void    Configure();
        double                  GetZ();
        void                    SetZ(double z);
-
        int                             GetT();
        void                    SetT(double t);
-       
        void                    SetColorWindow(double colorWindow);
        void                    SetColorLevel(double colorLevel);       
        double                  GetColorWindow();
@@ -53,6 +51,10 @@ public:
        void                    AddObserver(int eventNumber, vtkCommand *observer);
        bool                    GetInterpolate();
        void                    SetInterpolate(bool value);
+       bool                    GetFixAxis2D();
+       void                    SetFixAxis2D(bool value);
+       double                  GetOpacityAxis();
+       void                    SetOpacityAxis(double value);
        
 protected:
        marImageData    *_marImageData;
@@ -61,6 +63,8 @@ protected:
        double                  _colorWindow;
        double                  _colorLevel;
        bool                    _interpolate;
+       bool                    _fixAxis2D;
+       double                  _opacityAxis;
        vtkObject*              _observable;
 private:
 
index bca71dd8c8e0231095c189490429b3ee9777c22e..aa398d488971528129d01e2c83955763b62c0f49 100644 (file)
@@ -31,7 +31,8 @@
 vtkClipping3DDataViewer::vtkClipping3DDataViewer()
 {
        int i;
-       for (i=0; i<VTKMPRDATA_MAXTISSUE; i++){
+       for (i=0; i<VTKMPRDATA_MAXTISSUE; i++)
+       {
                _visibleTissue[i]               = false;
                _representationType[i]  = true;
        }
index f39e637ccea649f44caa87fe5fc82683227b5e67..69a183fd49a728ad669b2f55543f9cd41d781911 100644 (file)
@@ -48,25 +48,28 @@ void vtkImageViewer2_XYZ::SetExtentDimension(int x1,int x2,
                                                                                         int y1,int y2,
                                                                                         int z1,int z2)
 {
-       _x1=x1;
-       _x2=x2;
-       _y1=y1;
-       _y2=y2;
-       _z1=z1;
-       _z2=z2;
+       _x1 = x1;
+       _x2 = x2;
+       _y1 = y1;
+       _y2 = y2;
+       _z1 = z1;
+       _z2 = z2;
 }
+
 //-------------------------------------------------------------------
 void vtkImageViewer2_XYZ::SetXSlice(int slice)
 {
        vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
        imageActor->SetDisplayExtent(slice, slice, _y1, _y2, _z1, _z2 );  
 }
+
 //-------------------------------------------------------------------
 void vtkImageViewer2_XYZ::SetYSlice(int slice)
 {
        vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
        imageActor->SetDisplayExtent(_x1, _x2, slice, slice, _z1, _z2 );  
 }
+
 //-------------------------------------------------------------------
 void vtkImageViewer2_XYZ::SetZSlice(int slice)
 {
@@ -77,8 +80,6 @@ void vtkImageViewer2_XYZ::SetZSlice(int slice)
 #else
                _vtkimageviewer2->SetZSlice( slice );
 #endif
-
-
 }
 //-------------------------------------------------------------------
 int vtkImageViewer2_XYZ::GetXSlice()
@@ -86,40 +87,38 @@ int vtkImageViewer2_XYZ::GetXSlice()
        vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
        return imageActor->GetDisplayExtent()[0];
 }
+
 //-------------------------------------------------------------------
 int vtkImageViewer2_XYZ::GetYSlice()
 {
        vtkImageActor *imageActor = _vtkimageviewer2->GetImageActor();
        return imageActor->GetDisplayExtent()[2];
 }
+
 //-------------------------------------------------------------------
 int vtkImageViewer2_XYZ::GetZSlice()
 {
-
         int result;
 #if (VTK_MAJOR_VERSION >= 5)
                result= _vtkimageviewer2->GetSlice( );
 #else
                result= _vtkimageviewer2->GetZSlice( );
-#endif
-
-       
+#endif 
        return result;
 }
+
 //-------------------------------------------------------------------
 vtkImageViewer2 *vtkImageViewer2_XYZ::GetVtkImageViewer2()
 {
        return _vtkimageviewer2;
 }
-
-void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable){
-
-       
+//-------------------------------------------------------------------
+void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable)
+{      
        vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _vtkimageviewer2->GetWindowLevel();
-
-       if(colortable!=NULL&&colortable->GetSize()>0 && _colortable != colortable){
+       if(colortable!=NULL&&colortable->GetSize()>0 && _colortable != colortable)
+       {
                _colortable = colortable;
                imagemaptowindowlevel->SetLookupTable(colortable);
        }
-
 }
index fe9123c805dca0bd991eac3665f883bb2596d755..82acd440963c67490c3aeace4edd17edd75e78d9 100644 (file)
@@ -39,7 +39,6 @@ class  creaMaracasVisu_EXPORT vtkImageViewer2_XYZ{
 public:
        vtkImageViewer2_XYZ();
        ~vtkImageViewer2_XYZ();
-
        void                    SetExtentDimension(int x1,int x2, int y1,int y2, int z1,int z2);
        void                    SetXSlice(int slice);
        void                    SetYSlice(int slice);
@@ -47,19 +46,13 @@ public:
        int                             GetXSlice();
        int                             GetYSlice();
        int                             GetZSlice();
-       
-
        void setColorTransferFunction(vtkColorTransferFunction* colortable);
-
        vtkImageViewer2 *GetVtkImageViewer2();
 private:
        int     _x1,_x2,_y1,_y2,_z1,_z2;
        vtkImageViewer2 *_vtkimageviewer2;
        vtkColorTransferFunction* _colortable;
-       
-       
-protected:     
-       
+protected:
 };
 
 
index f35206765b43494bb0fc6c36e5063b224b5656d7..5c4e0c7f98622ae20d7411600b68a06ce5e05848 100644 (file)
@@ -34,7 +34,6 @@ vtkMPR3DDataViewer::vtkMPR3DDataViewer()
        _visiblePosition[2]=false;
        _ctfun                  = NULL;
        _vtkmprbasedata = NULL;
-
        _ctfun                  = NULL;
        _saggitalColors = NULL;
        _saggital               = NULL;
@@ -152,6 +151,7 @@ void vtkMPR3DDataViewer::SetImage()
        _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
        _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
 #endif
+       _outlineData    -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
 }
 
 //-------------------------------------------------------------------
@@ -182,10 +182,8 @@ void vtkMPR3DDataViewer::Configure()
     _satLut->SetValueRange (1, 1);
 */
 
-
        double range[2];
        double delta;
-       
        if(_vtkmprbasedata->GetImageData())
        {
 //EED 2017-01-01 Migration VTK7
@@ -281,6 +279,7 @@ void vtkMPR3DDataViewer::Configure()
                        _saggitalColors = vtkImageMapToColors::New();
                }
                _saggitalColors->RemoveAllInputs();
+
        //    _saggitalColors->SetLookupTable(_bwLut);
                _saggitalColors->SetLookupTable(_ctfun);
 //EED 2017-01-01 Migration VTK7
@@ -292,7 +291,6 @@ void vtkMPR3DDataViewer::Configure()
 #endif
                
                
-
                if(_saggital==NULL)
                {
                        _saggital = vtkImageActor::New();
@@ -305,21 +303,18 @@ void vtkMPR3DDataViewer::Configure()
                }       
                //_saggitalColors->Update();
        
-
-
        // Create the second (axial) plane of the three planes. We use the
        // same approach as before except that the extent differs.
 
-               
                if(_axialColors==NULL)
                {
                        _axialColors = vtkImageMapToColors::New();
                }
-
                _axialColors->RemoveAllInputs();
        //    _axialColors->SetLookupTable(_hueLut);
                _axialColors->SetLookupTable(_ctfun);
 
+               
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
@@ -328,7 +323,6 @@ void vtkMPR3DDataViewer::Configure()
                _axialColors->Update();
 #endif
 
-
                if(_axial==NULL)
                {
                        _axial = vtkImageActor::New();
@@ -343,8 +337,6 @@ void vtkMPR3DDataViewer::Configure()
                }
                
                //_axialColors->Update();
-       
-
                // Create the third (coronal) plane of the three planes. We use 
        // the same approach as before except that the extent differs.
                if(_coronalColors==NULL)
@@ -355,6 +347,7 @@ void vtkMPR3DDataViewer::Configure()
        //    _coronalColors->SetLookupTable(_satLut);
                _coronalColors->SetLookupTable(_ctfun);
 
+               
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
@@ -377,8 +370,6 @@ void vtkMPR3DDataViewer::Configure()
 
                } // if _coronal
                
-       
-
        // An outline provides context around the data.
        //
                if(_outlineData==NULL)
@@ -419,7 +410,6 @@ void vtkMPR3DDataViewer::Configure()
                        _outline->GetProperty()->SetColor(0,0,0);
                }
        }
-       
        //int ext[6];
        //_vtkmprbasedata->GetImageData()->GetExtent(ext);
 }
index 8f47f97123b89c99066db0c3e3aab6f7b5b1094d..b90dbaff4c38b4ee7cfa6a8a1cedb1a6db836a6e 100644 (file)
@@ -376,25 +376,32 @@ void wxMaracas_ViewerWidget::Refresh(bool eraseBackground ,const wxRect* rect  )
        wxVtkBaseView *wxMaracas_ViewerWidget::GetwxVtkBaseView()
        {
                wxVtkBaseView *wxvtkbaseview=NULL;
-               if (mvtk2Dbaseview!=NULL){
+               if (mvtk2Dbaseview!=NULL)
+               {
                        wxvtkbaseview = mvtk2Dbaseview;
                }
-               if (mvtkmpr2Dview_X!=NULL){
+               if (mvtkmpr2Dview_X!=NULL)
+               {
                        wxvtkbaseview = mvtkmpr2Dview_X;
                }
-               if (mvtkmpr2Dview_Y!=NULL){
+               if (mvtkmpr2Dview_Y!=NULL)
+               {
                        wxvtkbaseview = mvtkmpr2Dview_Y;
                }
-               if (mvtkmpr2Dview_Z!=NULL){
+               if (mvtkmpr2Dview_Z!=NULL)
+               {
                        wxvtkbaseview = mvtkmpr2Dview_Z;
                }
-               if (mvtkplane2Dview!=NULL){
+               if (mvtkplane2Dview!=NULL)
+               {
                        wxvtkbaseview = mvtkplane2Dview;
                }
-               if (mwxsphereview!=NULL){
+               if (mwxsphereview!=NULL)
+               {
                        wxvtkbaseview = mwxsphereview;
                }
-               if (mwxvtk3Dbaseview_Clipping3D!=NULL){
+               if (mwxvtk3Dbaseview_Clipping3D!=NULL)
+               {
                        wxvtkbaseview = mwxvtk3Dbaseview_Clipping3D;
                }
                return wxvtkbaseview   ;
index 393b3f1160bf84c6ea866df1e7bba3c60459cc32..b705076c09f201f7006ae2b111b2d886b0dd6ad6 100644 (file)
@@ -46,7 +46,6 @@ wxVtk2DBaseView::~wxVtk2DBaseView()
        {
           delete _vtkIinfoTextImage;
        }
-
        if (_imageViewer2XYZ!=NULL)
        {
           delete _imageViewer2XYZ;
@@ -61,19 +60,17 @@ void wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel(double &X,double &
 //     GetVtkBaseData()->GetImageData()->GetSpacing(spc);
 //JCP 04/08/10 W/O Image this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
        vtkImageData* image = this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput();
-       if(image){
+       if(image)
+       {
                image->GetSpacing(spc);
        }else{
                spc[0] = 1;
                spc[1] = 1;
                spc[2] = 1;
        }
-
-
        X = X / spc[0];
        Y = Y / spc[1];
        Z = Z / spc[2];
-
 }
 
 //-------------------------------------------------------------------
@@ -104,10 +101,10 @@ void wxVtk2DBaseView::ResetView()
        double spx = 0,spy = 0,spz = 0;
        int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
        wxVtkBaseView::Configure();
-
        crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        vtkImageData *imageData = GetVtkBaseData()->GetImageData();
-       if(imageData){
+       if(imageData)
+       {
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
@@ -120,7 +117,7 @@ void wxVtk2DBaseView::ResetView()
                imageData->GetSpacing (spx,spy,spz);
                imageData->GetExtent (x1,x2,y1,y2,z1,z2);
        }
-
+printf("//EED wxVtk2DBaseView::ResetView %d %d    %d %d     %d %d \n",x1,x2,y1,y2,z1,z2);
        _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2);
        _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
 
@@ -154,15 +151,22 @@ void wxVtk2DBaseView::ResetView()
 //-------------------------------------------------------------------
 void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
 {
+       int ext[6];
+       imageData->Update();
+       imageData->GetWholeExtent(ext);
        if (_imageViewer2XYZ!=NULL)
        {
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
+               _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
 #else
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
 #endif
        } // if _imageViewer2XYZ
+
+       GetRenderer()->GetActiveCamera()->SetClippingRange(0.01, 1000000);
+
 }
 
 //-------------------------------------------------------------------
@@ -253,7 +257,7 @@ void wxVtk2DBaseView::Configure(bool okimage)
 //EED 21 mars 2012     FLIP problem  ..PLOP..
                        
                        // XY
-                       camera->SetViewUp               ( spx*0                 , -spy*1                        , spz*0         );
+                       camera->SetViewUp               ( spx*0                 , -spy*1                , spz*0         );
                        camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000    );
                        camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         );
 /*
@@ -394,6 +398,13 @@ void wxVtk2DBaseView::SetColorLevel(double level)
        this->Refresh();
 }
 
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::SetInterpolate(bool iterpolate)
+{
+       GetVtkBaseData()->SetInterpolate( iterpolate );
+       this->Refresh();
+}
+
 //-------------------------------------------------------------------
 int wxVtk2DBaseView::GetDirection() // virtual
 {
index 66d7518510ae35a13d763d6186920a16234fa476..380d5a7d228f054501ea83dbdec1a79d0c73716b 100644 (file)
@@ -59,6 +59,7 @@ public:
        void setColorTransferFunction(vtkColorTransferFunction* colortable);
        void SetColorWindow(double level);
        void SetColorLevel(double level);
+       void SetInterpolate(bool iterpolate);
        
    virtual int GetDirection();
        void SetImageToVtkViewer(vtkImageData *imageData);
index 82b4b22167f8673e4bd5373e0f82f2c2e6759ae6..77d384390a912d2156b3bf4e9566c626592a013e 100644 (file)
@@ -91,9 +91,7 @@ void wxVtkBaseView::Refresh()  // virtual
 //-------------------------------------------------------------------
 void wxVtkBaseView::RefreshView()  // virtual 
 {
-       printf("EED wxVtkBaseView::RefreshView() \n");
 // EED 10 Oct 2007
-
        #if defined(WIN32)
                GetRenWin()->Render();
        #else
index 87b4fa3d909c507d49fb273a68eb6e5db4f79b17..01c7e1400cc3f42652651dfc2c562649779e7fdf 100644 (file)
@@ -84,7 +84,8 @@ void wxVtkMPR2DView::Configure()
                ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
        }
 
-       if(img!=NULL){
+       if(img!=NULL)
+       {
                double* origin = img->GetOrigin();
                img->GetExtent(x1,x2,y1,y2,z1,z2);
                img->GetSpacing(spc);
@@ -138,7 +139,8 @@ void wxVtkMPR2DView::Configure()
 
 
 // Axe B
-       if(_lineBActor==NULL){
+       if(_lineBActor==NULL)
+       {
                _lineBActor                                             =       vtkActor::New();
                _lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
                _lineBActor->GetProperty()->SetLineWidth(0.5);
@@ -169,7 +171,8 @@ void wxVtkMPR2DView::Configure()
 #endif
 
        _lineBMapper->ImmediateModeRenderingOn();
-       if(_imageViewer2XYZ){
+       if(_imageViewer2XYZ)
+       {
                _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
                _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
                vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
@@ -177,21 +180,22 @@ void wxVtkMPR2DView::Configure()
        //EED 17Avril2009
     //EED 21 mars 2012  FLIP problem  ..PLOP..
 
-               if (_direction==0) {  // YZ
+               if (_direction==0) 
+               {  // YZ
                        camera->SetViewUp               (   0   ,    0          ,     1         );
                        camera->SetPosition             ( 10000,(y1+y2)/2       , (z1+z2)/2     );
                        camera->SetFocalPoint   (   0   , (y1+y2)/2     , (z1+z2)/2     );
                        camera->SetParallelScale( (z2-z1)/3.0 );
                }
-
-               if (_direction==1) { // XZ
+               if (_direction==1) 
+               { // XZ
                        camera->SetViewUp               (       0               ,       0       ,       1               );
                        camera->SetPosition             ((x1+x2)/2      , -10000        , (z1+z2)/2     );
                        camera->SetFocalPoint   ((x1+x2)/2      ,   0   , (z1+z2)/2     );
                        camera->SetParallelScale( (x2-x1)/3.0 );
                }
-
-               if (_direction==2) {  // XY
+               if (_direction==2) 
+               {  // XY
                        camera->SetViewUp               (       0               ,       -1              ,       0       );
                        camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     , -10000);
                        camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       );
@@ -240,9 +244,8 @@ void wxVtkMPR2DView::SetVisibleAxis(bool ok)
                {
                        _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor );
                        _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor );
-               }
-
-       }
+               } // if visible
+       } // ok
 }
 
 //-------------------------------------------------------------------
@@ -250,17 +253,15 @@ void wxVtkMPR2DView::Refresh()
 {
        //wxVtk2DBaseView::Refresh();
        int x1 = 0,x2 = 0,y1 = 0,y2 = 0,z1 = 0,z2 = 0;
-
 //EED 02/08/2013
 //     int x = 0, y = 0, z = 0;
-       double x = 0, y = 0, z = 0;
-
-       int xx = 0, yy = 0, zz = 0;
+       double  x  = 0, y  = 0, z  = 0;
+       int     xx = 0, yy = 0, zz = 0;
        double *spc     = 0;
        double *origin  = 0;
-       
        double xx1,yy1,zz1,xx2,yy2,zz2;
-       
+       bool   fixAxis2D;
+       double opacityAxis;
        vtkImageData* img = GetVtkmprbasedata()->GetImageData();
        if(img!=NULL)
        {
@@ -273,39 +274,36 @@ void wxVtkMPR2DView::Refresh()
                y2 += origin[1];
                z1 += origin[2];
                z2 += origin[2];
-               
                xx1 =           x1*spc[0];
                yy1 =           y1*spc[1];
                zz1 =           z1*spc[2];
-               
                xx2 =           x2*spc[0];
                yy2 =           y2*spc[1];
                zz2 =           z2*spc[2];
-               
-               x1 = (int)(x1*spc[0]);
-               y1 = (int)(y1*spc[1]);
-               z1 = (int)(z1*spc[2]);
-               
+               x1      = (int)(x1*spc[0]);
+               y1      = (int)(y1*spc[1]);
+               z1      = (int)(z1*spc[2]);
                x2      = (int)(x2*spc[0]);
                y2      = (int)(y2*spc[1]);
                z2      = (int)(z2*spc[2]);
-
-               xx = (int)(GetVtkmprbasedata()->GetX());
-               yy = (int)(GetVtkmprbasedata()->GetY());
-               zz = (int)(GetVtkmprbasedata()->GetZ());
-
+               xx      = (int)(GetVtkmprbasedata()->GetX());
+               yy      = (int)(GetVtkmprbasedata()->GetY());
+               zz      = (int)(GetVtkmprbasedata()->GetZ());
 //EED 02/08/2013
 //             x =  round(xx*spc[0]);
 //             y =  round(yy*spc[1]);
 //             z =  round(zz*spc[2]);
-
-               x =  xx*spc[0];
-               y =  yy*spc[1];
-               z =  zz*spc[2];
-
-               if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) 
+               x       =  xx*spc[0];
+               y       =  yy*spc[1];
+               z       =  zz*spc[2];
+               fixAxis2D               = GetVtkmprbasedata()->GetFixAxis2D();
+               opacityAxis             = GetVtkmprbasedata()->GetOpacityAxis();
+               if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)  || (fixAxis2D!=_backFixAxis2D) || (opacityAxis!=_backOpacityAxis)
                {
-
+                       double position[3];
+                       double focalpoint[3];
+                       GetRenderer()->GetActiveCamera()->GetPosition(position);
+                       GetRenderer()->GetActiveCamera()->GetFocalPoint(focalpoint);
                        if (_direction==0) {    // YZ
                                if(_imageViewer2XYZ)
                                {
@@ -320,6 +318,10 @@ void wxVtkMPR2DView::Refresh()
                                _ptsA->SetPoint(1, xx2, yy2  , z  );
                                _ptsB->SetPoint(0, xx2, y    , zz1);
                                _ptsB->SetPoint(1, xx2, y    , zz2);
+                               position[1]             = y;    
+                               position[2]             = z;    
+                               focalpoint[1]   = y;    
+                               focalpoint[2]   = z;    
                        }
                        if (_direction==1) {    // XZ
                                if(_imageViewer2XYZ)
@@ -335,6 +337,10 @@ void wxVtkMPR2DView::Refresh()
                                _ptsA->SetPoint(1, xx2 , y1 , z  );
                                _ptsB->SetPoint(0, x   , y1 , zz1);
                                _ptsB->SetPoint(1, x   , y1 , zz2);
+                               position[0]             = x;    
+                               position[2]             = z;    
+                               focalpoint[0]   = x;    
+                               focalpoint[2]   = z;    
                        }
                        if (_direction==2) {    // XY
                                if(_imageViewer2XYZ)
@@ -352,15 +358,16 @@ void wxVtkMPR2DView::Refresh()
                                //_ptsA->SetPoint(1, x2 , y , z2 );
                                //_ptsB->SetPoint(0, x  , y1, z2 );
                                //_ptsB->SetPoint(1, x  , y2, z2 );
-                               
                                _ptsA->SetPoint(0, xx1 , y  , z1 );
                                _ptsA->SetPoint(1, xx2 , y  , z1 );
                                _ptsB->SetPoint(0, x   , yy1, z1 );
                                _ptsB->SetPoint(1, x   , yy2, z1 );
-                               
-                               
+                               position[0]             = x;    
+                               position[1]             = y;    
+                               focalpoint[0]   = x;    
+                               focalpoint[1]   = y;                                    
                        } // if back
-
+                       
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                                // ..
@@ -369,9 +376,18 @@ void wxVtkMPR2DView::Refresh()
                                _ptsB->Modified();
 #endif
 
-                       _backX=xx;
-                       _backY=yy;
-                       _backZ=zz;
+                       if (fixAxis2D == true)
+                       {
+                               GetRenderer()->GetActiveCamera()->SetPosition(position);
+                               GetRenderer()->GetActiveCamera()->SetFocalPoint(focalpoint);
+                       } // if GetFixAxis2D
+                       _lineAActor->GetProperty()->SetOpacity( opacityAxis );
+                       _lineBActor->GetProperty()->SetOpacity( opacityAxis );
+                       _backX                  = xx;
+                       _backY                  = yy;
+                       _backZ                  = zz;
+                       _backFixAxis2D  = fixAxis2D;
+                       _backOpacityAxis= opacityAxis;
                } // if image
 
 //EED 2016/02/19
index 7a66d83d0a963ad797aed221182a3485923c2548..4f5e2267fb61360fa9314c8d4faa7cfb92668cf2 100644 (file)
@@ -62,6 +62,10 @@ private:
        int                                                     _backX;
        int                                                     _backY;
        int                                                     _backZ;
+
+       bool                                            _backFixAxis2D;
+       double                                          _backOpacityAxis;
+
        bool                                            _visibleAxis;
        int                                                     _direction;
        vtkPoints                                       *_ptsA;
index d6fb6a53eebbe33672756b43486172ed03026a83..3703011e6b5c35dbfc04b34c2d52cf076a99ff3c 100644 (file)
@@ -80,19 +80,15 @@ class vtkWindowLevelImagePlaneWidgetCallback : public vtkCommand
                                   _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xyzv[1]);
                                   _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xyzv[2]);
                           } else {
-                                  
-                                  
                                   vtkImageData *image = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
                                   double spc[3];
                                   if(image)
                                   {
                                           image->GetSpacing(spc);
                                   }
-                                  
                                   double normal[3];
                                   slicePosition = ipw->GetSlicePosition();
                                   ipw->GetNormal(normal);
-                                  
                                   // FreePlaneX
                                   if ((normal[0]==1)&&(normal[1]==0)&&(normal[2]==0))
                                   {
@@ -110,28 +106,20 @@ class vtkWindowLevelImagePlaneWidgetCallback : public vtkCommand
                                   }
                           }// ipw->GetCursorDataStatus
                   }// ev
-                       
                   if (needRefresh)     
                   {
                           vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
                           isbv->SetParent_refresh_waiting();
                           isbv->EvaluateToRefresh();
                   }
-                       
           } // Execute
-       
                vtkWindowLevelImagePlaneWidgetCallback(){}
                wxVtkMPR3DView *_wxvtkmpr3Dview;
 };
 
-
-
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
-
-
-
 wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview )
 {
        _wxvtk3Dbaseview                        =       wxvtk3Dbaseview;
@@ -143,7 +131,6 @@ wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview )
        _vtkplane                                       =       NULL;
        _probe                                          =       NULL;
        _contourMapper                          =       NULL;
-
        _planeWidgetX                           =       NULL;
        _planeWidgetY                           =       NULL;
        _planeWidgetZ                           =       NULL;
@@ -151,27 +138,23 @@ wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview )
        //Free Planes
 }
 
-
 //-------------------------------------------------------------------
 wxVtkMPR3DView::~wxVtkMPR3DView()
 {
        VisiblePointWidget( false );
        VisiblePlaneWidget( false );
-
        if(_pointWidget!=NULL){
                _pointWidget->Delete();
        }
        if(_planeWidget!=NULL){
                _planeWidget->Delete();
        }
-
        if(_vtkplane!=NULL){
                _vtkplane->Delete();
                _probe->Delete();
                _contourMapper->Delete();
                _contourPlaneActor->Delete();
        }
-
 }
 
 //-------------------------------------------------------------------
@@ -179,9 +162,6 @@ void wxVtkMPR3DView::RemoveActor(vtkActor* actor)
 {
        _wxvtk3Dbaseview->GetRenderer()->RemoveActor(actor);
 }
-
-
-
 //-------------------------------------------------------------------
 void wxVtkMPR3DView::Configure()
 {
@@ -191,6 +171,7 @@ void wxVtkMPR3DView::Configure()
        // Actors are added to the renderer.
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
        _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
+
        vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New();
        _myCallback->SetWxVtkMPR3DView(this);
        if(imageData){
@@ -208,9 +189,7 @@ void wxVtkMPR3DView::Configure()
                _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
                _pointWidget->AllOff();
                _pointWidget->PlaceWidget();
-
                _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
-
                if(_planeWidget==NULL)
                {
                        _planeWidget = vtkPlaneWidget::New();
@@ -223,21 +202,18 @@ void wxVtkMPR3DView::Configure()
 #endif
 
                _myCallback->SetVtkPlaneWidget(_planeWidget);
-
                _planeWidget->NormalToXAxisOn();
                _planeWidget->SetResolution(50);
                _planeWidget->SetRepresentationToOutline();
-
                int dim[3];
-
                imageData->GetDimensions(dim);
                int px=(dim[0]/2);
                int py=(dim[1]/2);
                int pz=(dim[2]/2);
                int dd=20;
                _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd );
-
-               if(_vtkplane==NULL){
+               if(_vtkplane==NULL)
+               {
                        _vtkplane               = vtkPolyData::New();
                        _probe                  = vtkProbeFilter::New();
                        _contourMapper  = vtkPolyDataMapper::New();
@@ -258,17 +234,12 @@ void wxVtkMPR3DView::Configure()
 
                        _contourPlaneActor = vtkActor::New();
                        _contourPlaneActor->SetMapper(_contourMapper);
-
                        _contourPlaneActor->VisibilityOff();
-
                        _planeWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
                        _planeWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
-
                        _planeWidget->Off();
                        _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor );
-
                }
-
                _planeWidget->GetPolyData(_vtkplane);
 
 //EED 2017-01-01 Migration VTK7
@@ -278,7 +249,6 @@ void wxVtkMPR3DView::Configure()
                _probe->SetSourceData( imageData );
 #endif
                _contourMapper->SetScalarRange( imageData->GetScalarRange() );
-
        ConfigureFreePlanes();
        }
 
@@ -313,26 +283,21 @@ void wxVtkMPR3DView::Configure()
        // render window (expressed in pixels).
        _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
 //EED 23oct2010        _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
-
 }
 
 //-------------------------------------------------------------------
 void wxVtkMPR3DView::ConfigureFreePlanes()
 {
-
        // The shared picker enables us to use 3 planes at one time
        // and gets the picking order right
        vtkCellPicker* picker = vtkCellPicker::New();
        picker->SetTolerance(0.005);
-
        // The 3 image plane widgets
        _planeWidgetX = GetPlaneWidget('x', 1, 0, 0, picker);
        _planeWidgetY = GetPlaneWidget('y', 1, 1, 0, picker);
        _planeWidgetZ = GetPlaneWidget('z', 0, 0, 1, picker);
-
        _planeWidgetY->SetLookupTable(_planeWidgetX->GetLookupTable());
        _planeWidgetZ->SetLookupTable(_planeWidgetX->GetLookupTable());
-
        picker->UnRegister(NULL);
 
        // ColorWindow ColorLevel Callback
@@ -718,7 +683,6 @@ void wxVtkMPR3DView::VisiblePlaneWidget( bool visible )
 //CPR: Method added 30 Nov 2009
 void wxVtkMPR3DView::showOutlineActor(bool value)
 {
-
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
        if(value == true)
        {
@@ -726,7 +690,6 @@ void wxVtkMPR3DView::showOutlineActor(bool value)
        } else {
                _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor );
        } // value
-
 }
 
 //-------------------------------------------------------------------
index 4d42b26342bcdebb9ca990a465bd4d7d10e3bfbc..5ab97aab8a567c76b03aa70a38567a5e3eb85f70 100644 (file)
@@ -47,33 +47,25 @@ public:
        void                            VisibleImageActor(int idPosition, bool visible);
        void                            VisiblePointWidget( bool visible );
        void                            VisiblePlaneWidget( bool visible );
-
        void                            SetVisibleTissue(int idTissue, bool visible);
        bool                            GetVisibleTissue(int idTissue);
        virtual void            Refresh();
        virtual void            RefreshView();
        virtual void            Configure();
        void                            SetImage();
-
        void                            SetBackGroundType(int type);
        void                            SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
        wxPanel*                        CreateControlPanel(wxWindow *parent, bool align);
-
        vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
        wxVtk3DBaseView*        GetWxvtk3Dbaseview() throw (char*);
-
        void                            InitOrientationPointWidget(); 
        void                            showOutlineActor(bool value);
-
        // EED 25 Janvier 2007 testLoic
        void                            TestLoic1();
        void                            TestLoic2();
-
-       void RemoveActor(vtkActor* actor);
-
+       void                            RemoveActor(vtkActor* actor);
 //EED 27/05/2013
 //     void ResetCamera(int *ext=NULL,double* spc=NULL);
-
        void setColorTransferFunction(vtkColorTransferFunction* colortable);
 
        //Free planes
@@ -83,7 +75,6 @@ public:
        void FreePlaneVisible(int plane, bool ok);
        void FreePlaneInteraction(bool ok);
        void SetFreePlanesOrtho();
-       
        void SetColorWindow(double colorWindow);
        void SetColorLevel(double colorLevel);
 
index 33294b4fd304add2ba24d1f761b99aba9e6d0e2c..253a6837fa1802b849ab19a624d45619a4ee70c6 100644 (file)
@@ -60,7 +60,10 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        _ckBoxZ                                         = new wxCheckBox(panel,-1,_T("Z   "));
        _positionZ                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
 
-       _ckBoxXYZ                                       = new wxCheckBox(panel,-1,_T("XYZ axis   "));
+       _ckBoxXYZ                                       = new wxCheckBox(panel,-1,_T("3D Axis  "));
+       _ckBoxFixAxis2D                         = new wxCheckBox(panel,-1,_T("2D Fix Axis"));
+       _opacityAxis                            = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS);
+
        _ckBoxPlane                                     = new wxCheckBox(panel,-1,_T("Plane"));
 ////EED 05Nov2012      _ckBox_BW_Color_Plane           = new wxCheckBox(panel,-1,_T("GL/Color"));
        wxButton *btnColorTable         = new wxButton (panel, -1, _T("Color table") );
@@ -108,32 +111,28 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        _cbStereo->Append(_T(" * STEREO ANAGLYPH"));
        _cbStereo->Append(_T("   STEREO CHECKERBOARD"));
        _cbStereo->Select(0);
+
+       Connect(_ckBoxX->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX     );
+       Connect(_positionX->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionX                );
+       Connect(_ckBoxY->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY     );
+       Connect(_positionY->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionY                );
+       Connect(_ckBoxZ->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ     );
+       Connect(_positionZ->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionZ                );
        
-       
-       
-       
-       Connect(_ckBoxX->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX                                     );
-       Connect(_positionX->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionX                                        );
-       Connect(_ckBoxY->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY                                     );
-       Connect(_positionY->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionY                                        );
-       Connect(_ckBoxZ->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ                                     );
-       Connect(_positionZ->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionZ                                        );
-       
-       Connect(btnColorTable->GetId()                  , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnEditColorTable                           );
-       Connect(_ckBoxXYZ->GetId()                              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ                           );
-       Connect(_ckBoxPlane->GetId()                    , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisiblePlane                                     );
-////EED 05Nov2012      Connect(_ckBox_BW_Color_Plane->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::On_BW_Color_Plane  );
-       
-       Connect(_ckFreePlaneX->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX                        );
-       Connect(_ckFreePlaneY->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY                        );
-       Connect(_ckFreePlaneZ->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ                        );
-       Connect(btnFreePlanesOrtho->GetId()             , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho                          );
-       Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction      );
-       Connect(_cbStereo->GetId()                              , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo                                       );
-       Connect(_ckBoxOutline->GetId()                  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline                                          );
-       Connect(_ckBoxBackGroundBlack->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack                          );
-       Connect(_ckBoxInterpolate->GetId()              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate                                      );
-       
+       Connect(btnColorTable->GetId()                  , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnEditColorTable   );
+       Connect(_ckBoxXYZ->GetId()                              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ   );
+       Connect(_ckBoxPlane->GetId()                    , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisiblePlane     );
+       Connect(_ckFreePlaneX->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX);
+       Connect(_ckFreePlaneY->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY);
+       Connect(_ckFreePlaneZ->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ);
+       Connect(btnFreePlanesOrtho->GetId()             , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho  );
+       Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction );
+       Connect(_cbStereo->GetId()                              , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo               );
+       Connect(_ckBoxOutline->GetId()                  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline                  );
+       Connect(_ckBoxBackGroundBlack->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack  );
+       Connect(_ckBoxInterpolate->GetId()              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate              );
+       Connect(_ckBoxFixAxis2D->GetId()                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFixAxis2D                );
+       Connect(_opacityAxis->GetId()                   , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOpacityAxis              );
        
        wxFlexGridSizer *sizer;
        
@@ -143,6 +142,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        //CPR: If-else statements added 30 Nov 2009
        wxFlexGridSizer *sizerV1;
        wxFlexGridSizer *sizerH4;
+       wxFlexGridSizer *sizerH4a;
        wxFlexGridSizer *sizerH5;
        wxFlexGridSizer *sizerH6;
 
@@ -150,43 +150,56 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        {
                sizer   = new wxFlexGridSizer(4);
                sizerH4 = new wxFlexGridSizer(3);
-                               
-               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T("GL"))      , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T("Color   "))        , 1, wxALL|wxEXPAND, 0);
-               
-               sizerH4->Add( _positionX ,1,wxGROW                          , 0 );
-               sizerH4->Add( _ckFreePlaneX,            1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( _ckBoxX     ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-               
-               sizerH4->Add( _positionY ,1,wxGROW, 0 );
-               sizerH4->Add( _ckFreePlaneY,            1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( _ckBoxY     ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
+
+               sizerH4a = new wxFlexGridSizer(3);
                
-               sizerH4->Add( _positionZ ,1,wxGROW, 0 );
-               sizerH4->Add( _ckFreePlaneZ,            1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( _ckBoxZ     ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T("GL"))              ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T("Color   ")),1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _positionX                                                                ,1,     wxGROW                                          , 0);
+               sizerH4->Add( _ckFreePlaneX                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _ckBoxX                                                                   ,0,     wxALIGN_CENTER_VERTICAL|wxSHAPED        , 0);
+               sizerH4->Add( _positionY                                                                ,1,     wxGROW                                                          , 0);
+               sizerH4->Add( _ckFreePlaneY                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _ckBoxY                                                                   ,0,     wxALIGN_CENTER_VERTICAL|wxSHAPED        , 0);
+               sizerH4->Add( _positionZ                                                                ,1,     wxGROW                                                          , 0);
+               sizerH4->Add( _ckFreePlaneZ                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _ckBoxZ                                                                   ,0,     wxALIGN_CENTER_VERTICAL|wxSHAPED        , 0);
 
 //EED 2016/02/19               
-               sizerH4->Add( _ckBoxInterpolate                         , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-                               
+               sizerH4->Add( _ckBoxInterpolate                                                 ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+//             sizerH4->Add( _ckBoxXYZ                                                                 ,1, wxALL|wxEXPAND                                              , 0);
+//             sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+//             sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+
+//             sizerH4a->Add( new wxStaticText(panel, -1,_T("Axis 2D:")),1, wxALL|wxEXPAND                                             , 0);
+               sizerH4a->Add( _ckBoxXYZ                                                                ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4a->Add( _ckBoxFixAxis2D                                                  ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4a->Add( _opacityAxis                                                             ,1, wxALL|wxEXPAND                                              , 0);
+
+               sizerH4->Add( sizerH4a                                                                  ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               
+                       
+               
                sizerH5 = new wxFlexGridSizer(1);
-               sizerH5->Add( _ckBoxXYZ                                 , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( _ckBoxPlane                               , 1, wxALL|wxEXPAND, 0);                
-               sizerH5->Add( new wxStaticText(panel, -1,_T("      "))  , 1, wxALL|wxEXPAND, 0);
-////EED 05Nov2012              sizerH5->Add( _ckBox_BW_Color_Plane                                     , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( btnFreePlanesOrtho       , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( btnColorTable                         , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( _cbStereo, 1, wxALL|wxEXPAND, 0);
+               sizerH5->Add( new wxStaticText(panel, -1,_T("      "))  , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( _ckBoxPlane                                                               , 1, wxALL|wxEXPAND                                             , 0);           
+               sizerH5->Add( new wxStaticText(panel, -1,_T("      "))  , 1, wxALL|wxEXPAND                                             , 0);
+////EED 05Nov2012              sizerH5->Add( _ckBox_BW_Color_Plane             , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( _ckFreePlaneInteraction                                   , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( btnFreePlanesOrtho                                        , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED   , 0);
+               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))               , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( btnColorTable                             , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED   , 0);
+               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))               , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( _cbStereo                                                                 , 1, wxALL|wxEXPAND                                             , 0);
                
                sizerH6 = new wxFlexGridSizer(1);
-               sizerH6->Add( _ckBoxOutline                                     , 1, wxALL|wxEXPAND, 0);
-               sizerH6->Add( _ckBoxBackGroundBlack                     , 1, wxALL|wxEXPAND, 0);
+               sizerH6->Add( _ckBoxOutline                                                             , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH6->Add( _ckBoxBackGroundBlack                                             , 1, wxALL|wxEXPAND                                             , 0);
 
                sizer->Add( sizerH4,  1, wxALL|wxGROW,  2);
                sizer->Add( sizerH5,  1, wxALL|wxEXPAND,2);
@@ -750,9 +763,16 @@ void wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack(wxCommandEvent& event)
 void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
 {
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetInterpolate(  _ckBoxInterpolate->GetValue() );
-
        _wxvtkmpr3Dview->Refresh();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+}
 
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnFixAxis2D(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetFixAxis2D(    _ckBoxFixAxis2D->GetValue() );
+       _wxvtkmpr3Dview->Refresh();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
 //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 #if wxMAJOR_VERSION <= 2
@@ -760,8 +780,15 @@ void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
 #else
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 #endif
+}
 
-
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnOpacityAxis(wxCommandEvent& event)
+{
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetOpacityAxis(  _opacityAxis->GetValue()/100.0 );
+       _wxvtkmpr3Dview->Refresh();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 }
 
 
index b3f971d53abf4a8136d221bb8977178020af8d08..c38439ea31dc6b434f962bd8643bc47e12580701 100644 (file)
@@ -45,9 +45,7 @@ public:
        void            OnPositionZ(wxScrollEvent& event);
        void            OnVisibleAxisXYZ(wxCommandEvent& event);
        void            OnVisiblePlane(wxCommandEvent& event);
-       void            OnEditColorTable(wxCommandEvent& event);
-////EED 05Nov2012      void            On_BW_Color_Plane(wxCommandEvent& event);
-       
+       void            OnEditColorTable(wxCommandEvent& event);        
        void            OnVisibleFreePlaneX(wxCommandEvent& event);
        void            OnVisibleFreePlaneY(wxCommandEvent& event);
        void            OnVisibleFreePlaneZ(wxCommandEvent& event);
@@ -57,6 +55,8 @@ public:
        void            OnOutline(wxCommandEvent& event);
        void            OnBackGroundBlack(wxCommandEvent& event);
        void            OnInterpolate(wxCommandEvent& event);
+       void            OnFixAxis2D(wxCommandEvent& event);
+       void            OnOpacityAxis(wxCommandEvent& event);
 
 
        virtual void Refresh();
@@ -100,6 +100,8 @@ private:
 ////EED 05Nov2012      wxCheckBox              *_ckBox_BW_Color_Plane;
        
        wxCheckBox              *_ckBoxXYZ;
+       wxCheckBox              *_ckBoxFixAxis2D;
+       wxSlider                *_opacityAxis;
        wxCheckBox              *_ckBoxPlane;
        
        wxCheckBox      *_ckFreePlaneX;