]> Creatis software - creaMaracasVisu.git/commitdiff
#3490 MeshManager
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 25 Aug 2022 08:50:12 +0000 (10:50 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 25 Aug 2022 08:50:12 +0000 (10:50 +0200)
15 files changed:
bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg [new file with mode: 0644]
bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs [new file with mode: 0644]
bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg [new file with mode: 0644]
bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs [new file with mode: 0644]
bbtk/bbs/boxes/PolyDataToActor_Widget.bbg [new file with mode: 0644]
bbtk/bbs/boxes/PolyDataToActor_Widget.bbs [new file with mode: 0644]
bbtk/bbs/boxes/SetPositionPointPicker.bbg [new file with mode: 0644]
bbtk/bbs/boxes/SetPositionPointPicker.bbs [new file with mode: 0644]
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.h
bbtk/src/bbcreaMaracasVisuwxPopupMenu.cxx
bbtk/src/bbcreaMaracasVisuwxPopupMenu.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx

diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
new file mode 100644 (file)
index 0000000..0072cdd
--- /dev/null
@@ -0,0 +1,669 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:demo
+DESCRIPTION:Show N Points
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:Mesh_tool_ApplyPatch
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:0
+COMPLEXINPUTS:0
+BOXES:42
+BOX
+creaMaracasVisu:ViewerNV:viewer
+ISEXEC:FALSE
+-51.927252:127.201185:-900.000000
+-13.327252:124.701185:-900.000000
+PORT
+nTypeView:"6 1 2 0"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints:showNpoints
+ISEXEC:FALSE
+-6.717198:104.115466:-900.000000
+30.122802:101.615466:-900.000000
+PORT
+Radio:"1"
+PORT
+Type:"4"
+FIN_BOX
+BOX
+creaVtk:CreateMeshFromPoints:Box04
+ISEXEC:FALSE
+14.941523:23.144302:-900.000000
+37.796523:20.644302:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ManualContourModel_Box:Box06
+ISEXEC:FALSE
+19.252527:28.454709:-900.000000
+42.462527:25.954709:-900.000000
+PORT
+DoubleContour:"1"
+PORT
+NbPoints:"35"
+PORT
+OpenClose:"false"
+PORT
+OpenClose2:"false"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box07
+ISEXEC:FALSE
+-12.145985:-25.968604:-900.000000
+14.134015:-28.468604:-900.000000
+PORT
+Representation:"2"
+FIN_BOX
+BOX
+wx:LayoutLine:Box08
+ISEXEC:FALSE
+-188.455064:-60.870548:-900.000000
+-155.135064:-63.370548:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box11
+ISEXEC:FALSE
+50.176358:-56.928782:-900.000000
+72.201358:-59.428782:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MultipleInputs:Box12
+ISEXEC:FALSE
+-37.317574:-28.102008:-900.000000
+-15.347574:-30.602008:-900.000000
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box24
+ISEXEC:FALSE
+69.921631:96.534291:-900.000000
+92.456631:94.034291:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:DrawAxisTree3D:Box30
+ISEXEC:FALSE
+16.764574:-27.952113:-900.000000
+38.944574:-30.452113:-900.000000
+PORT
+LineWidth:"2"
+FIN_BOX
+BOX
+std:MultipleInputs:Box31
+ISEXEC:FALSE
+-2.201770:-42.067380:-900.000000
+19.768230:-44.567380:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box33
+ISEXEC:FALSE
+-105.299156:41.777774:-900.000000
+-75.499156:39.277774:-900.000000
+PORT
+In:"20"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Transparence"
+FIN_BOX
+BOX
+std:Div:Box34
+ISEXEC:FALSE
+-98.507819:36.469875:-900.000000
+-77.582819:33.969875:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+creaMaracasVisu:ManualContourModel_Box:Box29
+ISEXEC:FALSE
+53.431094:26.008698:-900.000000
+77.951094:23.508698:-900.000000
+PORT
+NbPoints:"40"
+PORT
+OpenClose:"false"
+PORT
+OpenClose2:"false"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box44
+ISEXEC:FALSE
+-2.734854:-2.467921:-900.000000
+26.280000:-4.967921:-900.000000
+PORT
+Opacity:"1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+creaVtk:PolyDataNormals:Box54
+ISEXEC:FALSE
+6.372876:14.024026:-900.000000
+28.667876:11.524026:-900.000000
+PORT
+Type:"1"
+FIN_BOX
+BOX
+creaVtk:LinearExtrusionFilter:Box46
+ISEXEC:FALSE
+-4.214533:6.833499:-900.000000
+18.295467:4.333499:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box52
+ISEXEC:FALSE
+-104.391715:18.113210:-900.000000
+-71.071715:15.613210:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:SpinCtrl:Box53
+ISEXEC:FALSE
+-93.127181:29.387590:-900.000000
+-68.607181:26.887590:-900.000000
+PORT
+Max:"50"
+PORT
+Min:"-50"
+PORT
+Selected:"0"
+PORT
+Title:"Scalar Factor"
+FIN_BOX
+BOX
+wx:Slider:Box55
+ISEXEC:FALSE
+-130.647634:50.601616:-900.000000
+-100.847634:48.101616:-900.000000
+PORT
+In:"100"
+PORT
+Max:"200"
+PORT
+Min:"-200"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Angle Correction"
+FIN_BOX
+BOX
+std:Div:Box56
+ISEXEC:FALSE
+-135.591575:39.350118:-900.000000
+-114.666575:36.850118:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+creaMaracasVisu:wxPopupMenu:Box57
+ISEXEC:FALSE
+-145.164439:72.322879:-900.000000
+-123.099439:69.822879:-900.000000
+FIN_BOX
+BOX
+std:AddStringToVector:Box58
+ISEXEC:FALSE
+-148.505973:79.782632:-900.000000
+-123.985973:77.282632:-900.000000
+PORT
+In0:"Insert point"
+PORT
+In1:"Track point"
+PORT
+In2:"Set nearest point"
+PORT
+In3:"Erase point"
+PORT
+In4:"Delete all points"
+PORT
+In5:"----------------------"
+PORT
+In6:"Insert group after"
+PORT
+In7:"Delete group"
+PORT
+In8:"----------------------"
+PORT
+In9:"Tools_1 - Create Mesh"
+FIN_BOX
+BOX
+std:MultipleInputs:Box59
+ISEXEC:TRUE
+-170.041455:41.083203:-900.000000
+-148.071455:38.583203:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box60
+ISEXEC:FALSE
+-150.080943:58.090407:-900.000000
+-127.645943:55.590407:-900.000000
+FIN_BOX
+BOX
+std:StringSelect:Box61
+ISEXEC:FALSE
+-146.978300:65.015550:-900.000000
+-122.458300:62.515550:-900.000000
+PORT
+In0:"10"
+PORT
+In1:"20"
+PORT
+In2:"30"
+PORT
+In3:"40"
+PORT
+In4:"50"
+PORT
+In5:"0"
+PORT
+In6:"100"
+PORT
+In7:"110"
+PORT
+In8:"0"
+PORT
+In9:"200"
+FIN_BOX
+BOX
+vtk:MarchingCubes:Box62
+ISEXEC:FALSE
+-84.596119:131.437277:-900.000000
+-62.421119:128.937277:-900.000000
+PORT
+ComputeNormalsOn:"true"
+PORT
+Value:"128"
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box68
+ISEXEC:FALSE
+-176.216684:65.628179:-900.000000
+-153.681684:63.128179:-900.000000
+FIN_BOX
+BOX
+std:VectorFilterDouble:Box70
+ISEXEC:FALSE
+49.750242:60.953814:-900.000000
+72.180242:58.453814:-900.000000
+PORT
+Type:"11"
+FIN_BOX
+BOX
+wx:CheckBox:Box75
+ISEXEC:FALSE
+-172.755005:81.034010:-900.000000
+-151.125005:78.534010:-900.000000
+PORT
+In:"false"
+PORT
+Title:"Open Contour"
+FIN_BOX
+BOX
+wx:LayoutLine:Box76
+ISEXEC:FALSE
+-183.086203:9.129439:-900.000000
+-149.766203:6.629439:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+creaVtk:BooleanOperationPolyDataFilter:Box77
+ISEXEC:FALSE
+-54.733805:-49.459889:-900.000000
+12.200000:-51.959889:-900.000000
+PORT
+ReorientDifferenceCells:"false"
+FIN_BOX
+BOX
+wx:ComboBox:Box78
+ISEXEC:FALSE
+-135.889322:-2.796967:-900.000000
+-109.609322:-5.296967:-900.000000
+PORT
+In:"Union Intersection Difference"
+PORT
+Title:"Mesh Operation"
+FIN_BOX
+BOX
+wx:LayoutLine:Box79
+ISEXEC:FALSE
+-134.770074:-30.418324:-900.000000
+-101.450074:-32.918324:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CommandButton:Box80
+ISEXEC:FALSE
+-145.308344:-14.036797:-900.000000
+-123.033344:-16.536797:-900.000000
+PORT
+Label:"Run"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box81
+ISEXEC:FALSE
+-58.957040:-57.864779:-900.000000
+26.280000:-60.364779:-900.000000
+PORT
+Colour:"0 1 1"
+PORT
+Opacity:"1"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box82
+ISEXEC:FALSE
+-49.304721:-69.858094:-900.000000
+8.680000:-72.358094:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:Slider:Box83
+ISEXEC:FALSE
+-123.116389:-8.832696:-900.000000
+-93.316389:-11.332696:-900.000000
+PORT
+In:"50"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity Mesh"
+FIN_BOX
+BOX
+std:Div:Box84
+ISEXEC:FALSE
+-122.177246:-17.910716:-900.000000
+-101.252246:-20.410716:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+creaVtk:MeshReduction_DecimatePro:Box87
+ISEXEC:FALSE
+-65.417333:-18.820284:-900.000000
+-41.922333:-21.320284:-900.000000
+PORT
+TargetReduction:"0.5"
+FIN_BOX
+BOX
+creaVtk:PolyDataNormals:Box92
+ISEXEC:FALSE
+-65.860710:-27.289395:-900.000000
+-43.565710:-29.789395:-900.000000
+FIN_BOX
+BOX
+creaVtk:MeshReduction_QuadricDecimation:Box95
+ISEXEC:FALSE
+-76.233428:-13.081710:-900.000000
+-52.078428:-15.581710:-900.000000
+PORT
+TargetReduction:"0.5"
+FIN_BOX
+CONNECTIONS:82
+CONNECTION
+viewer:Renderer1:showNpoints:Renderer
+NumberOfControlPoints:0
+CONNECTION
+viewer:Point:showNpoints:In
+NumberOfControlPoints:0
+CONNECTION
+viewer:BoxChange:showNpoints:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsX:Box04:LstX
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box06:LstIndexsIn
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:Widget:Box08:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+viewer:Renderer1:Box07:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsY:Box04:LstY
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsZ:Box04:LstZ
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstIndexsOut:Box04:LstIndexs
+NumberOfControlPoints:0
+CONNECTION
+viewer:Renderer1:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:BoxChange:Box12:In2
+NumberOfControlPoints:0
+CONNECTION
+viewer:Renderer1:Box30:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box12:BoxChange:Box31:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box07:BoxChange:Box31:In2
+NumberOfControlPoints:0
+CONNECTION
+Box30:BoxChange:Box31:In4
+NumberOfControlPoints:0
+CONNECTION
+Box33:Out:Box34:In1
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box30:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box33:BoxChange:Box12:In3
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box29:LstIndexsIn
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsX:Box30:lstPointX
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsY:Box30:lstPointY
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsZ:Box30:lstPointZ
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstIndexsOut:Box30:lstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box44:BoxChange:Box31:In3
+NumberOfControlPoints:0
+CONNECTION
+viewer:Renderer1:Box44:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box44:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box54:In
+NumberOfControlPoints:0
+CONNECTION
+Box33:BoxChange:Box46:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box31:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box54:Out:Box46:In
+NumberOfControlPoints:0
+CONNECTION
+Box46:Out:Box44:In
+NumberOfControlPoints:0
+CONNECTION
+Box54:MeanNormal:Box46:Direction
+NumberOfControlPoints:0
+CONNECTION
+Box33:Widget:Box52:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box52:Widget:Box08:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box53:Widget:Box52:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box53:BoxChange:Box12:In5
+NumberOfControlPoints:0
+CONNECTION
+Box53:Out:Box46:ScalarFactor
+NumberOfControlPoints:0
+CONNECTION
+Box55:Out:Box56:In1
+NumberOfControlPoints:0
+CONNECTION
+Box55:Widget:Box52:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box56:Out:Box54:Param
+NumberOfControlPoints:0
+CONNECTION
+Box55:BoxChange:Box12:In7
+NumberOfControlPoints:0
+CONNECTION
+viewer:wxVtkBaseView1:Box57:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box58:Out:Box57:In
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box59:In2
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box61:In
+NumberOfControlPoints:0
+CONNECTION
+Box61:Out:Box60:Type
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box60:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box60:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box62:Out:Box60:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box60:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box24:Spacing:Box70:k1
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsX:Box70:In0
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsY:Box70:In1
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsZ:Box70:In2
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box06:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box06:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box06:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box29:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box29:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box29:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box75:Out:Box06:OpenClose
+NumberOfControlPoints:0
+CONNECTION
+Box75:Widget:Box76:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box76:Widget:Box08:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box78:Widget:Box79:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box80:Widget:Box79:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box79:Widget:Box08:Widget9
+NumberOfControlPoints:0
+CONNECTION
+Box80:BoxChange:Box77:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box77:Out:Box81:In
+NumberOfControlPoints:0
+CONNECTION
+viewer:Renderer1:Box81:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box81:BoxChange:Box82:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Renderer1:Box82:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box83:Out:Box84:In1
+NumberOfControlPoints:0
+CONNECTION
+Box84:Out:Box81:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box83:Widget:Box79:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box62:Out:Box87:In
+NumberOfControlPoints:0
+CONNECTION
+Box92:Out:Box77:In1
+NumberOfControlPoints:0
+CONNECTION
+Box62:Out:Box95:In
+NumberOfControlPoints:0
+CONNECTION
+Box95:Out:Box92:In
+NumberOfControlPoints:0
+CONNECTION
+Box78:Out:Box77:Operation
+NumberOfControlPoints:0
+CONNECTION
+Box46:Out:Box77:In2
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
new file mode 100644 (file)
index 0000000..ba0585d
--- /dev/null
@@ -0,0 +1,272 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include creaVtk
+include vtk
+include wx
+include std
+
+define Mesh_tool_ApplyPatch creaMaracasVisu
+
+author "info-dev@creatis.insa-lyon.fr"
+description "Show N Points"
+
+category "demo"
+
+new creaMaracasVisu:ViewerNV viewer
+  set viewer.nTypeView "6 1 2 0"
+
+new creaMaracasVisu:ShowNPoints showNpoints
+  set showNpoints.Radio "1"
+  set showNpoints.Type "4"
+
+new creaVtk:CreateMeshFromPoints Box04
+
+new creaMaracasVisu:ManualContourModel_Box Box06
+  set Box06.DoubleContour "1"
+  set Box06.NbPoints "35"
+  set Box06.OpenClose "false"
+  set Box06.OpenClose2 "false"
+
+new vtk:PolyDataToActor Box07
+  set Box07.Representation "2"
+
+new wx:LayoutLine Box08
+
+new vtk:UpdateRender Box11
+  set Box11.Active "true"
+
+new std:MultipleInputs Box12
+
+new vtk:ImageVtkProperties Box24
+
+new creaMaracasVisu:DrawAxisTree3D Box30
+  set Box30.LineWidth "2"
+
+new std:MultipleInputs Box31
+
+new wx:Slider Box33
+  set Box33.In "20"
+  set Box33.Label "true"
+  set Box33.Max "100"
+  set Box33.Min "0"
+  set Box33.ReactiveOnTrack "true"
+  set Box33.Title "Transparence"
+
+new std:Div Box34
+  set Box34.In2 "100"
+
+new creaMaracasVisu:ManualContourModel_Box Box29
+  set Box29.NbPoints "40"
+  set Box29.OpenClose "false"
+  set Box29.OpenClose2 "false"
+
+new vtk:PolyDataToActor Box44
+  set Box44.Opacity "1"
+  set Box44.Representation "1"
+
+new creaVtk:PolyDataNormals Box54
+  set Box54.Type "1"
+
+new creaVtk:LinearExtrusionFilter Box46
+
+new wx:LayoutLine Box52
+  set Box52.Orientation "H"
+
+new wx:SpinCtrl Box53
+  set Box53.Max "50"
+  set Box53.Min "-50"
+  set Box53.Selected "0"
+  set Box53.Title "Scalar Factor"
+
+new wx:Slider Box55
+  set Box55.In "100"
+  set Box55.Max "200"
+  set Box55.Min "-200"
+  set Box55.ReactiveOnTrack "true"
+  set Box55.Title "Angle Correction"
+
+new std:Div Box56
+  set Box56.In2 "100"
+
+new creaMaracasVisu:wxPopupMenu Box57
+
+new std:AddStringToVector Box58
+  set Box58.In0 "Insert point"
+  set Box58.In1 "Track point"
+  set Box58.In2 "Set nearest point"
+  set Box58.In3 "Erase point"
+  set Box58.In4 "Delete all points"
+  set Box58.In5 "----------------------"
+  set Box58.In6 "Insert group after"
+  set Box58.In7 "Delete group"
+  set Box58.In8 "----------------------"
+  set Box58.In9 "Tools_1 - Create Mesh"
+
+new std:MultipleInputs Box59
+
+new creaMaracasVisu:ShowNPoints_Tools Box60
+
+new std:StringSelect Box61
+  set Box61.In0 "10"
+  set Box61.In1 "20"
+  set Box61.In2 "30"
+  set Box61.In3 "40"
+  set Box61.In4 "50"
+  set Box61.In5 "0"
+  set Box61.In6 "100"
+  set Box61.In7 "110"
+  set Box61.In8 "0"
+  set Box61.In9 "200"
+
+new vtk:MarchingCubes Box62
+  set Box62.ComputeNormalsOn "true"
+  set Box62.Value "128"
+
+new vtk:ImageVtkProperties Box68
+
+new std:VectorFilterDouble Box70
+  set Box70.Type "11"
+
+new wx:CheckBox Box75
+  set Box75.In "false"
+  set Box75.Title "Open Contour"
+
+new wx:LayoutLine Box76
+  set Box76.Orientation "H"
+
+new creaVtk:BooleanOperationPolyDataFilter Box77
+  set Box77.ReorientDifferenceCells "false"
+
+new wx:ComboBox Box78
+  set Box78.In "Union Intersection Difference"
+  set Box78.Title "Mesh Operation"
+
+new wx:LayoutLine Box79
+  set Box79.Orientation "H"
+
+new wx:CommandButton Box80
+  set Box80.Label "Run"
+
+new vtk:PolyDataToActor Box81
+  set Box81.Colour "0 1 1"
+  set Box81.Opacity "1"
+
+new vtk:UpdateRender Box82
+  set Box82.Active "true"
+
+new wx:Slider Box83
+  set Box83.In "50"
+  set Box83.Label "true"
+  set Box83.Max "100"
+  set Box83.Min "0"
+  set Box83.ReactiveOnTrack "true"
+  set Box83.Title "Opacity Mesh"
+
+new std:Div Box84
+  set Box84.In2 "100"
+
+new creaVtk:MeshReduction_DecimatePro Box87
+  set Box87.TargetReduction "0.5"
+
+new creaVtk:PolyDataNormals Box92
+
+new creaVtk:MeshReduction_QuadricDecimation Box95
+  set Box95.TargetReduction "0.5"
+
+
+connect viewer.Renderer1 showNpoints.Renderer
+connect viewer.Point showNpoints.In
+connect viewer.BoxChange showNpoints.BoxExecute
+connect Box06.LstContourPointsX Box04.LstX
+connect showNpoints.lstIndexs Box06.LstIndexsIn
+connect showNpoints.Widget Box08.Widget1
+connect Box04.Out Box07.In
+connect viewer.Renderer1 Box07.Renderer
+connect Box06.LstContourPointsY Box04.LstY
+connect Box06.LstContourPointsZ Box04.LstZ
+connect Box06.LstIndexsOut Box04.LstIndexs
+connect viewer.Renderer1 Box11.Renderer
+connect showNpoints.BoxChange Box12.In2
+connect viewer.Renderer1 Box30.Renderer
+connect Box12.BoxChange Box31.BoxExecute
+connect Box07.BoxChange Box31.In2
+connect Box30.BoxChange Box31.In4
+connect Box33.Out Box34.In1
+connect Box34.Out Box30.Opacity
+connect Box33.BoxChange Box12.In3
+connect showNpoints.lstIndexs Box29.LstIndexsIn
+connect Box29.LstContourPointsX Box30.lstPointX
+connect Box29.LstContourPointsY Box30.lstPointY
+connect Box29.LstContourPointsZ Box30.lstPointZ
+connect Box29.LstIndexsOut Box30.lstIndexs
+connect Box44.BoxChange Box31.In3
+connect viewer.Renderer1 Box44.Renderer
+connect Box34.Out Box44.Opacity
+connect Box04.Out Box54.In
+connect Box33.BoxChange Box46.BoxExecute
+connect Box31.BoxChange Box11.BoxExecute
+connect Box54.Out Box46.In
+connect Box46.Out Box44.In
+connect Box54.MeanNormal Box46.Direction
+connect Box33.Widget Box52.Widget2
+connect Box52.Widget Box08.Widget5
+connect Box53.Widget Box52.Widget3
+connect Box53.BoxChange Box12.In5
+connect Box53.Out Box46.ScalarFactor
+connect Box55.Out Box56.In1
+connect Box55.Widget Box52.Widget4
+connect Box56.Out Box54.Param
+connect Box55.BoxChange Box12.In7
+connect viewer.wxVtkBaseView1 Box57.wxVtkBaseView
+connect Box58.Out Box57.In
+connect Box57.BoxChange Box59.In2
+connect Box57.Out Box61.In
+connect Box61.Out Box60.Type
+connect showNpoints.WidgetShowNPoints Box60.WidgetShowNPoints
+connect Box57.BoxChange Box60.BoxExecute
+connect Box62.Out Box60.Mesh
+connect Box68.Spacing Box60.Spacing
+connect Box24.Spacing Box70.k1
+connect showNpoints.lstPointsX Box70.In0
+connect showNpoints.lstPointsY Box70.In1
+connect showNpoints.lstPointsZ Box70.In2
+connect Box70.Out0 Box06.LstControlPointsX
+connect Box70.Out1 Box06.LstControlPointsY
+connect Box70.Out2 Box06.LstControlPointsZ
+connect Box70.Out0 Box29.LstControlPointsX
+connect Box70.Out1 Box29.LstControlPointsY
+connect Box70.Out2 Box29.LstControlPointsZ
+connect Box75.Out Box06.OpenClose
+connect Box75.Widget Box76.Widget3
+connect Box76.Widget Box08.Widget3
+connect Box78.Widget Box79.Widget1
+connect Box80.Widget Box79.Widget3
+connect Box79.Widget Box08.Widget9
+connect Box80.BoxChange Box77.BoxExecute
+connect Box77.Out Box81.In
+connect viewer.Renderer1 Box81.Renderer
+connect Box81.BoxChange Box82.BoxExecute
+connect viewer.Renderer1 Box82.Renderer
+connect Box83.Out Box84.In1
+connect Box84.Out Box81.Opacity
+connect Box83.Widget Box79.Widget4
+connect Box62.Out Box87.In
+connect Box92.Out Box77.In1
+connect Box62.Out Box95.In
+connect Box95.Out Box92.In
+connect Box78.Out Box77.Operation
+connect Box46.Out Box77.In2
+
+# Complex input ports
+
+# Complex output ports
+
+exec Box59
+
+endefine
diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
new file mode 100644 (file)
index 0000000..3307d1d
--- /dev/null
@@ -0,0 +1,532 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:demo
+DESCRIPTION:Show N Points
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:Mesh_tool_ApplySurface
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widget
+-175.519751:-90.728005:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:9
+COMPLEX_PORT
+render
+-32.390937:141.689813:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxChange
+-13.776500:138.843910:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+point
+8.392837:138.613226:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview1
+-256.052318:132.277254:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+mesh
+-59.814076:140.655693:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+image
+-96.062149:138.883434:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview2
+-231.668448:132.854505:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview3
+-216.690458:133.262996:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview4
+-194.359638:132.854505:-900.000000
+FIN_COMPLEX_PORT
+BOXES:28
+BOX
+creaMaracasVisu:ShowNPoints:showNpoints
+ISEXEC:FALSE
+-1.656419:115.283823:-900.000000
+36.840000:112.783823:-900.000000
+PORT
+Radio:"1"
+PORT
+Type:"4"
+FIN_BOX
+BOX
+creaVtk:CreateMeshFromPoints:Box04
+ISEXEC:FALSE
+31.252553:-1.141010:-900.000000
+54.107553:-3.641010:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ManualContourModel_Box:Box06
+ISEXEC:FALSE
+19.252527:28.454709:-900.000000
+42.462527:25.954709:-900.000000
+PORT
+DoubleContour:"1"
+PORT
+NbPoints:"35"
+PORT
+OpenClose:"true"
+PORT
+OpenClose2:"false"
+FIN_BOX
+BOX
+wx:LayoutLine:Box08
+ISEXEC:FALSE
+-177.086770:-62.188611:-900.000000
+33.320000:-64.688611:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box11
+ISEXEC:FALSE
+50.398091:-54.711454:-900.000000
+72.423091:-57.211454:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaMaracasVisu:DrawAxisTree3D:Box30
+ISEXEC:FALSE
+66.830537:-0.099472:-900.000000
+89.010537:-2.599472:-900.000000
+PORT
+LineWidth:"2"
+FIN_BOX
+BOX
+std:MultipleInputs:Box31
+ISEXEC:FALSE
+5.423388:-28.995680:-900.000000
+27.393388:-31.495680:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ManualContourModel_Box:Box29
+ISEXEC:FALSE
+59.049338:28.545969:-900.000000
+82.259338:26.045969:-900.000000
+PORT
+NbPoints:"40"
+PORT
+OpenClose:"true"
+PORT
+OpenClose2:"false"
+FIN_BOX
+BOX
+creaMaracasVisu:wxPopupMenu:Box57
+ISEXEC:FALSE
+-264.745710:81.346668:-900.000000
+-242.680710:78.846668:-900.000000
+PORT
+WithCtrlKey:"true"
+FIN_BOX
+BOX
+std:AddStringToVector:Box58
+ISEXEC:FALSE
+-291.352727:106.869911:-900.000000
+-266.832727:104.369911:-900.000000
+PORT
+In0:"Add point"
+PORT
+In1:"Insert point"
+PORT
+In2:"Track point"
+PORT
+In3:"Set nearest point"
+PORT
+In4:"Erase point"
+PORT
+In5:"Delete all points"
+PORT
+In6:"----------------------"
+PORT
+In7:"Insert group after"
+PORT
+In8:"Delete group"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box60
+ISEXEC:FALSE
+-255.324608:69.131932:-900.000000
+-232.889608:66.631932:-900.000000
+FIN_BOX
+BOX
+std:StringSelect:Box61
+ISEXEC:FALSE
+-255.993648:76.032910:-900.000000
+-231.473648:73.532910:-900.000000
+PORT
+In0:"5"
+PORT
+In1:"10"
+PORT
+In2:"20"
+PORT
+In3:"30"
+PORT
+In4:"40"
+PORT
+In5:"50"
+PORT
+In6:"0"
+PORT
+In7:"100"
+PORT
+In8:"110"
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box68
+ISEXEC:FALSE
+-111.766259:110.196821:-900.000000
+16.720000:107.696821:-900.000000
+FIN_BOX
+BOX
+std:VectorFilterDouble:Box70
+ISEXEC:FALSE
+49.750242:60.953814:-900.000000
+72.180242:58.453814:-900.000000
+PORT
+Type:"11"
+FIN_BOX
+BOX
+creaVtk:BooleanOperationPolyDataFilter:Box77
+ISEXEC:FALSE
+-26.895621:-56.012997:-900.000000
+12.200000:-58.512997:-900.000000
+PORT
+ReorientDifferenceCells:"false"
+FIN_BOX
+BOX
+wx:ComboBox:Box78
+ISEXEC:FALSE
+-150.967153:-5.901226:-900.000000
+26.280000:-8.401226:-900.000000
+PORT
+In:"Union Intersection Difference"
+PORT
+Title:"Mesh Operation"
+FIN_BOX
+BOX
+wx:LayoutLine:Box79
+ISEXEC:FALSE
+-134.770074:-30.418324:-900.000000
+33.320000:-32.918324:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:CommandButton:Box80
+ISEXEC:FALSE
+-159.720977:-13.371599:-900.000000
+21.000000:-15.871599:-900.000000
+PORT
+Label:"Run"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box81
+ISEXEC:FALSE
+-41.883613:-69.616618:-900.000000
+26.280000:-72.116618:-900.000000
+PORT
+Colour:"0 1 1"
+PORT
+Opacity:"1"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box82
+ISEXEC:FALSE
+-46.422194:-85.379391:-900.000000
+8.680000:-87.879391:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:Slider:Box83
+ISEXEC:FALSE
+-120.899061:-7.502299:-900.000000
+29.800000:-10.002299:-900.000000
+PORT
+In:"50"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity Mesh"
+FIN_BOX
+BOX
+std:Div:Box84
+ISEXEC:FALSE
+-122.177246:-17.910716:-900.000000
+8.680000:-20.410716:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+std:MagicBox:Box66
+ISEXEC:FALSE
+-39.496513:124.163432:-900.000000
+8.680000:121.663432:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box67
+ISEXEC:FALSE
+-67.526006:124.007723:-900.000000
+8.680000:121.507723:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:PolyDataToActor_Widget:Box48
+ISEXEC:FALSE
+12.686357:-16.854731:-900.000000
+35.706357:-19.354731:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box35
+ISEXEC:FALSE
+-107.091396:123.633118:-900.000000
+6.920000:121.133118:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box34
+ISEXEC:FALSE
+102.343450:11.678332:-900.000000
+123.498450:9.178332:-900.000000
+PORT
+In:"50"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity Splines"
+FIN_BOX
+BOX
+std:Div:Box36
+ISEXEC:FALSE
+100.900507:6.542167:-900.000000
+121.825507:4.042167:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+CONNECTIONS:67
+CONNECTION
+Box06:LstContourPointsX:Box04:LstX
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box06:LstIndexsIn
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:Widget:Box08:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsY:Box04:LstY
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsZ:Box04:LstZ
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstIndexsOut:Box04:LstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box30:BoxChange:Box31:In4
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box29:LstIndexsIn
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsX:Box30:lstPointX
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsY:Box30:lstPointY
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsZ:Box30:lstPointZ
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstIndexsOut:Box30:lstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box31:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box58:Out:Box57:In
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box61:In
+NumberOfControlPoints:0
+CONNECTION
+Box61:Out:Box60:Type
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box60:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box60:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box60:Spacing
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsX:Box70:In0
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsY:Box70:In1
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsZ:Box70:In2
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box06:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box06:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box06:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box29:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box29:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box29:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box78:Widget:Box79:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box80:Widget:Box79:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box79:Widget:Box08:Widget9
+NumberOfControlPoints:0
+CONNECTION
+Box80:BoxChange:Box77:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box77:Out:Box81:In
+NumberOfControlPoints:0
+CONNECTION
+Box81:BoxChange:Box82:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box83:Out:Box84:In1
+NumberOfControlPoints:0
+CONNECTION
+Box84:Out:Box81:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box83:Widget:Box79:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box78:Out:Box77:Operation
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+render:render:Box66:In
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box81:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box82:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box30:Renderer
+NumberOfControlPoints:0
+CONNECTION
+boxChange:boxChange:showNpoints:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+point:point:showNpoints:In
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:showNpoints:Renderer
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview1:wxvtkbaseview1:Box57:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+mesh:mesh:Box67:In
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box77:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box48:polydata
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box48:render
+NumberOfControlPoints:0
+CONNECTION
+Box48:widget:Box08:Widget7
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:BoxChange:Box31:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box48:boxchange:Box31:In1
+NumberOfControlPoints:0
+CONNECTION
+image:image:Box35:In
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box68:In
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box70:k1
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:showNpoints:Image
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box36:In1
+NumberOfControlPoints:0
+CONNECTION
+Box36:Out:Box30:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box34:Widget:Box08:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box34:BoxChange:Box31:In2
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview2:wxvtkbaseview2:Box57:wxVtkBaseView2
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview3:wxvtkbaseview3:Box57:wxVtkBaseView3
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview4:wxvtkbaseview4:Box57:wxVtkBaseView4
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box08:BoxExecute
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
new file mode 100644 (file)
index 0000000..c82b10f
--- /dev/null
@@ -0,0 +1,204 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include creaVtk
+include wx
+include vtk
+include std
+
+define Mesh_tool_ApplySurface creaMaracasVisu
+
+author "info-dev@creatis.insa-lyon.fr"
+description "Show N Points"
+
+category "demo"
+
+new creaMaracasVisu:ShowNPoints showNpoints
+  set showNpoints.Radio "1"
+  set showNpoints.Type "4"
+
+new creaVtk:CreateMeshFromPoints Box04
+
+new creaMaracasVisu:ManualContourModel_Box Box06
+  set Box06.DoubleContour "1"
+  set Box06.NbPoints "35"
+  set Box06.OpenClose "true"
+  set Box06.OpenClose2 "false"
+
+new wx:LayoutLine Box08
+
+new vtk:UpdateRender Box11
+  set Box11.Active "true"
+
+new creaMaracasVisu:DrawAxisTree3D Box30
+  set Box30.LineWidth "2"
+
+new std:MultipleInputs Box31
+
+new creaMaracasVisu:ManualContourModel_Box Box29
+  set Box29.NbPoints "40"
+  set Box29.OpenClose "true"
+  set Box29.OpenClose2 "false"
+
+new creaMaracasVisu:wxPopupMenu Box57
+  set Box57.WithCtrlKey "true"
+
+new std:AddStringToVector Box58
+  set Box58.In0 "Add point"
+  set Box58.In1 "Insert point"
+  set Box58.In2 "Track point"
+  set Box58.In3 "Set nearest point"
+  set Box58.In4 "Erase point"
+  set Box58.In5 "Delete all points"
+  set Box58.In6 "----------------------"
+  set Box58.In7 "Insert group after"
+  set Box58.In8 "Delete group"
+
+new creaMaracasVisu:ShowNPoints_Tools Box60
+
+new std:StringSelect Box61
+  set Box61.In0 "5"
+  set Box61.In1 "10"
+  set Box61.In2 "20"
+  set Box61.In3 "30"
+  set Box61.In4 "40"
+  set Box61.In5 "50"
+  set Box61.In6 "0"
+  set Box61.In7 "100"
+  set Box61.In8 "110"
+
+new vtk:ImageVtkProperties Box68
+
+new std:VectorFilterDouble Box70
+  set Box70.Type "11"
+
+new creaVtk:BooleanOperationPolyDataFilter Box77
+  set Box77.ReorientDifferenceCells "false"
+
+new wx:ComboBox Box78
+  set Box78.In "Union Intersection Difference"
+  set Box78.Title "Mesh Operation"
+
+new wx:LayoutLine Box79
+  set Box79.Orientation "H"
+
+new wx:CommandButton Box80
+  set Box80.Label "Run"
+
+new vtk:PolyDataToActor Box81
+  set Box81.Colour "0 1 1"
+  set Box81.Opacity "1"
+
+new vtk:UpdateRender Box82
+  set Box82.Active "true"
+
+new wx:Slider Box83
+  set Box83.In "50"
+  set Box83.Label "true"
+  set Box83.Max "100"
+  set Box83.Min "0"
+  set Box83.ReactiveOnTrack "true"
+  set Box83.Title "Opacity Mesh"
+
+new std:Div Box84
+  set Box84.In2 "100"
+
+new std:MagicBox Box66
+
+new std:MagicBox Box67
+
+new creaMaracasVisu:PolyDataToActor_Widget Box48
+
+new vtk:vtkImageDataPointerRelay Box35
+
+new wx:Slider Box34
+  set Box34.In "50"
+  set Box34.Label "true"
+  set Box34.Max "100"
+  set Box34.Min "0"
+  set Box34.ReactiveOnTrack "true"
+  set Box34.Title "Opacity Splines"
+
+new std:Div Box36
+  set Box36.In2 "100"
+
+
+connect Box06.LstContourPointsX Box04.LstX
+connect showNpoints.lstIndexs Box06.LstIndexsIn
+connect showNpoints.Widget Box08.Widget1
+connect Box06.LstContourPointsY Box04.LstY
+connect Box06.LstContourPointsZ Box04.LstZ
+connect Box06.LstIndexsOut Box04.LstIndexs
+connect Box30.BoxChange Box31.In4
+connect showNpoints.lstIndexs Box29.LstIndexsIn
+connect Box29.LstContourPointsX Box30.lstPointX
+connect Box29.LstContourPointsY Box30.lstPointY
+connect Box29.LstContourPointsZ Box30.lstPointZ
+connect Box29.LstIndexsOut Box30.lstIndexs
+connect Box31.BoxChange Box11.BoxExecute
+connect Box58.Out Box57.In
+connect Box57.Out Box61.In
+connect Box61.Out Box60.Type
+connect showNpoints.WidgetShowNPoints Box60.WidgetShowNPoints
+connect Box57.BoxChange Box60.BoxExecute
+connect Box68.Spacing Box60.Spacing
+connect showNpoints.lstPointsX Box70.In0
+connect showNpoints.lstPointsY Box70.In1
+connect showNpoints.lstPointsZ Box70.In2
+connect Box70.Out0 Box06.LstControlPointsX
+connect Box70.Out1 Box06.LstControlPointsY
+connect Box70.Out2 Box06.LstControlPointsZ
+connect Box70.Out0 Box29.LstControlPointsX
+connect Box70.Out1 Box29.LstControlPointsY
+connect Box70.Out2 Box29.LstControlPointsZ
+connect Box78.Widget Box79.Widget1
+connect Box80.Widget Box79.Widget3
+connect Box79.Widget Box08.Widget9
+connect Box80.BoxChange Box77.BoxExecute
+connect Box77.Out Box81.In
+connect Box81.BoxChange Box82.BoxExecute
+connect Box83.Out Box84.In1
+connect Box84.Out Box81.Opacity
+connect Box83.Widget Box79.Widget4
+connect Box78.Out Box77.Operation
+connect Box66.Out Box81.Renderer
+connect Box66.Out Box82.Renderer
+connect Box66.Out Box11.Renderer
+connect Box66.Out Box30.Renderer
+connect Box66.Out showNpoints.Renderer
+connect Box67.Out Box77.In1
+connect Box04.Out Box48.polydata
+connect Box66.Out Box48.render
+connect Box48.widget Box08.Widget7
+connect showNpoints.BoxChange Box31.BoxExecute
+connect Box48.boxchange Box31.In1
+connect Box35.Out Box68.In
+connect Box68.Spacing Box70.k1
+connect Box35.Out showNpoints.Image
+connect Box34.Out Box36.In1
+connect Box36.Out Box30.Opacity
+connect Box34.Widget Box08.Widget8
+connect Box34.BoxChange Box31.In2
+connect Box57.BoxChange Box08.BoxExecute
+
+# Complex input ports
+input render Box66.In " "
+input boxChange showNpoints.BoxExecute " "
+input point showNpoints.In " "
+input wxvtkbaseview1 Box57.wxVtkBaseView " "
+input mesh Box67.In " "
+input image Box35.In " "
+input wxvtkbaseview2 Box57.wxVtkBaseView2 " "
+input wxvtkbaseview3 Box57.wxVtkBaseView3 " "
+input wxvtkbaseview4 Box57.wxVtkBaseView4 " "
+
+# Complex output ports
+output widget Box08.Widget " "
+
+
+endefine
diff --git a/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg b/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg
new file mode 100644 (file)
index 0000000..da8d794
--- /dev/null
@@ -0,0 +1,138 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:PolyDataToActor_Widget
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:2
+COMPLEX_PORT
+widget
+33.855535:-84.982371:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxchange
+48.028303:-85.261950:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:2
+COMPLEX_PORT
+render
+96.763935:28.050903:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+polydata
+47.816490:30.237559:-900.000000
+FIN_COMPLEX_PORT
+BOXES:7
+BOX
+wx:LayoutLine:Box04
+ISEXEC:FALSE
+4.432957:-33.559334:-900.000000
+37.752957:-36.059334:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box09
+ISEXEC:FALSE
+45.132224:-46.323772:-900.000000
+71.412224:-48.823772:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box10
+ISEXEC:FALSE
+86.244886:-34.223182:-900.000000
+107.844886:-36.723182:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box11
+ISEXEC:FALSE
+64.486244:-64.455280:-900.000000
+86.511244:-66.955280:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:Slider:Box13
+ISEXEC:FALSE
+33.485995:-13.417044:-900.000000
+63.285995:-15.917044:-900.000000
+PORT
+In:"50"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity base mesh"
+FIN_BOX
+BOX
+std:Div:Box14
+ISEXEC:FALSE
+57.129761:-23.008929:-900.000000
+78.054761:-25.508929:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:ComboBox:Box15
+ISEXEC:FALSE
+99.621034:-14.381564:-900.000000
+125.901034:-16.881564:-900.000000
+PORT
+In:"Points WireFrame Surface"
+PORT
+Selection:"2"
+PORT
+Title:"Representation"
+FIN_BOX
+CONNECTIONS:13
+CONNECTION
+Box10:Out:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box14:In1
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box09:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box13:Widget:Box04:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box13:BoxChange:Box09:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box09:Renderer
+NumberOfControlPoints:0
+CONNECTION
+render:render:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+polydata:polydata:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box15:Widget:Box04:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:Box09:Representation
+NumberOfControlPoints:0
+CONNECTION
+Box09:BoxChange:boxchange:boxchange
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs b/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs
new file mode 100644 (file)
index 0000000..2417744
--- /dev/null
@@ -0,0 +1,65 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include wx
+include vtk
+include std
+
+define PolyDataToActor_Widget creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new wx:LayoutLine Box04
+  set Box04.Orientation "H"
+
+new vtk:PolyDataToActor Box09
+
+new std:MagicBox Box10
+
+new vtk:UpdateRender Box11
+  set Box11.Active "true"
+
+new wx:Slider Box13
+  set Box13.In "50"
+  set Box13.Label "true"
+  set Box13.Max "100"
+  set Box13.Min "0"
+  set Box13.ReactiveOnTrack "true"
+  set Box13.Title "Opacity base mesh"
+
+new std:Div Box14
+  set Box14.In2 "100"
+
+new wx:ComboBox Box15
+  set Box15.In "Points WireFrame Surface"
+  set Box15.Selection "2"
+  set Box15.Title "Representation"
+
+
+connect Box10.Out Box11.Renderer
+connect Box09.BoxChange Box11.BoxExecute
+connect Box13.Out Box14.In1
+connect Box14.Out Box09.Opacity
+connect Box13.Widget Box04.Widget2
+connect Box13.BoxChange Box09.BoxExecute
+connect Box10.Out Box09.Renderer
+connect Box15.Widget Box04.Widget4
+connect Box15.Out Box09.Representation
+
+# Complex input ports
+input render Box10.In " "
+input polydata Box09.In " "
+
+# Complex output ports
+output widget Box04.Widget " "
+output boxchange Box09.BoxChange " "
+
+
+endefine
diff --git a/bbtk/bbs/boxes/SetPositionPointPicker.bbg b/bbtk/bbs/boxes/SetPositionPointPicker.bbg
new file mode 100644 (file)
index 0000000..d4ea8ab
--- /dev/null
@@ -0,0 +1,124 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/SetPositionPointPicker.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:demo
+DESCRIPTION:Show N Points
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SetPositionPointPicker
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+boxchange
+-9.213239:14.240089:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:3
+COMPLEX_PORT
+render
+69.901565:137.945660:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+image
+43.932766:136.718787:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview
+90.962875:134.060564:-900.000000
+FIN_COMPLEX_PORT
+BOXES:7
+BOX
+vtk:ImageVtkProperties:Box24
+ISEXEC:FALSE
+-12.953599:80.216888:-900.000000
+9.581401:77.716888:-900.000000
+FIN_BOX
+BOX
+creaVtk:PointPicker:Box47
+ISEXEC:FALSE
+17.881052:80.436334:-900.000000
+39.576052:77.936334:-900.000000
+PORT
+TypeEvent:"2"
+FIN_BOX
+BOX
+std:MathOperationVector:Box48
+ISEXEC:FALSE
+22.756536:71.258420:-900.000000
+47.276536:68.758420:-900.000000
+PORT
+Type:"3"
+FIN_BOX
+BOX
+std:MathOperationVector:Box49
+ISEXEC:FALSE
+26.833970:63.962803:-900.000000
+51.353970:61.462803:-900.000000
+PORT
+Type:"23"
+FIN_BOX
+BOX
+creaMaracasVisu:SetPosition:Box50
+ISEXEC:FALSE
+16.273915:54.364595:-900.000000
+37.933915:51.864595:-900.000000
+PORT
+FixAxis2D:"true"
+FIN_BOX
+BOX
+creaMaracasVisu:SetPosition:Box32
+ISEXEC:FALSE
+22.025494:44.019147:-900.000000
+43.685494:41.519147:-900.000000
+PORT
+FixAxis2D:"false"
+FIN_BOX
+BOX
+std:MagicBox:Box100
+ISEXEC:FALSE
+48.710471:81.272436:-900.000000
+70.420471:78.772436:-900.000000
+FIN_BOX
+CONNECTIONS:13
+CONNECTION
+Box47:Point:Box48:In0
+NumberOfControlPoints:0
+CONNECTION
+Box24:Spacing:Box48:In1
+NumberOfControlPoints:0
+CONNECTION
+Box48:Out:Box49:In0
+NumberOfControlPoints:0
+CONNECTION
+Box49:Out:Box50:Point
+NumberOfControlPoints:0
+CONNECTION
+Box47:BoxChange:Box50:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box50:BoxChange:Box32:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box49:Out:Box32:Point
+NumberOfControlPoints:0
+CONNECTION
+render:render:Box47:Renderer
+NumberOfControlPoints:0
+CONNECTION
+image:image:Box24:In
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview:wxvtkbaseview:Box100:In
+NumberOfControlPoints:0
+CONNECTION
+Box100:Out:Box50:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box100:Out:Box32:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box47:BoxChange:boxchange:boxchange
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/SetPositionPointPicker.bbs b/bbtk/bbs/boxes/SetPositionPointPicker.bbs
new file mode 100644 (file)
index 0000000..77db91d
--- /dev/null
@@ -0,0 +1,59 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
+# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/SetPositionPointPicker.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include vtk
+include creaVtk
+include std
+include creaMaracasVisu
+
+define SetPositionPointPicker creaMaracasVisu
+
+author "info-dev@creatis.insa-lyon.fr"
+description "Show N Points"
+
+category "demo"
+
+new vtk:ImageVtkProperties Box24
+
+new creaVtk:PointPicker Box47
+  set Box47.TypeEvent "2"
+
+new std:MathOperationVector Box48
+  set Box48.Type "3"
+
+new std:MathOperationVector Box49
+  set Box49.Type "23"
+
+new creaMaracasVisu:SetPosition Box50
+  set Box50.FixAxis2D "true"
+
+new creaMaracasVisu:SetPosition Box32
+  set Box32.FixAxis2D "false"
+
+new std:MagicBox Box100
+
+
+connect Box47.Point Box48.In0
+connect Box24.Spacing Box48.In1
+connect Box48.Out Box49.In0
+connect Box49.Out Box50.Point
+connect Box47.BoxChange Box50.BoxExecute
+connect Box50.BoxChange Box32.BoxExecute
+connect Box49.Out Box32.Point
+connect Box100.Out Box50.wxVtkBaseView
+connect Box100.Out Box32.wxVtkBaseView
+
+# Complex input ports
+input render Box47.Renderer " "
+input image Box24.In " "
+input wxvtkbaseview Box100.In " "
+
+# Complex output ports
+output boxchange Box47.BoxChange " "
+
+
+endefine
index 01ab191170908674bbabc1b465400e7a4dded003..d7c1013dc29224864a06ceb95eb9dbe5b891614b 100644 (file)
@@ -139,6 +139,10 @@ void ShowNPoints_Tools::Process()
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
     if (bbGetInputWidgetShowNPoints()!=NULL)
     {
+        if (bbGetInputType()==5)
+        {
+            bbGetInputWidgetShowNPoints()->OnAddPoint_();
+        } // if Type
         if (bbGetInputType()==10)
         {
             bbGetInputWidgetShowNPoints()->OnInsertPoint_();
index d83ba3ef1b6bbad2de1511c4bdef550f53a35e49..2d8a34abb5c7636debf7627a4762ebd361adae38 100644 (file)
@@ -49,7 +49,7 @@ BBTK_CATEGORY("empty");
   BBTK_INPUT(ShowNPoints_Tools,WidgetShowNPoints,"WidgetShowNPoints",WidgetShowNPoints*,"");
   BBTK_INPUT(ShowNPoints_Tools,Spacing,"(default [1,1,1] )Spacing",std::vector<double>,"");
   BBTK_INPUT(ShowNPoints_Tools,Mesh,"Mesh en format vtkPolyData ",vtkPolyData*,"");
-  BBTK_INPUT(ShowNPoints_Tools,Type,"(default 0) 0:Nothing 10:Insert Point  20:TrackPoint  30:Set nearest point  40:Erase point  50:Deleta all points  100:Insert  group after   110:Delete group  200:Tool_1 - Create Mesh (based with one group and 4 points)",int,"");
+  BBTK_INPUT(ShowNPoints_Tools,Type,"(default 0) 0:Nothing 5:Add Point  10:Insert Point  20:TrackPoint  30:Set nearest point  40:Erase point  50:Deleta all points  100:Insert  group after   110:Delete group  200:Tool_1 - Create Mesh (based with one group and 4 points)",int,"");
 //  BBTK_OUTPUT(ShowNPoints_Tools,Out,"First output",double,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints_Tools);
 //===== 
index 6a0792c6b76f0cf55f6f2b3feedbd4b9e4fee049..535d2622068beceee2cd20583dd0902ba9f5c35a 100644 (file)
@@ -5,6 +5,7 @@
 #include "bbcreaMaracasVisuPackage.h"
 
 #include <wx/menu.h>
+#include <wx/kbdstate.h>
 #include "InteractorStyleMaracas.h"
 #include <vtkInteractorStyleBaseView.h>
 #include "wxVtk2DBaseView.h"
@@ -26,10 +27,12 @@ class PopupMenuInteractor : public InteractorStyleMaracas , wxEvtHandler
 //      virtual bool    OnLeftDClick();
 //      virtual bool    OnRightDClick();
                 void    OnPopupClick(wxCommandEvent &evt);
+                void    SetWithCtrlKey(bool flag);
     private:
         wxVtkBaseView       *_wxvtkbaseview;
         wxPopupMenu         *_box;
-        std::vector<double> lstPoint;
+        std::vector<double> _lstPoint;
+        bool                _withCtrlKey;
 };
 
 /*
@@ -68,7 +71,7 @@ void PopupMenuInteractor::OnPopupClick(wxCommandEvent &evt)
     } else {
         _box->bbSetOutputSimpleText( "void" );
     }
-    _box->bbSetOutputPoint( lstPoint );
+    _box->bbSetOutputPoint( _lstPoint );
     _box->bbSignalOutputModification();
 }
 
@@ -101,21 +104,45 @@ bool PopupMenuInteractor::OnRightButtonUp()
         */
         int x,y,z;
         ((wxVtk2DBaseView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()))->GetVtkBaseData()->GetPointMouse(x,y,z);
-        lstPoint.clear();
-        lstPoint.push_back(x);
-        lstPoint.push_back(y);
-        lstPoint.push_back(z);
+        _lstPoint.clear();
+        _lstPoint.push_back(x);
+        _lstPoint.push_back(y);
+        _lstPoint.push_back(z);
 
-        for (i=0;i<size;i++)
+        int systelCtrlKey = _wxvtkbaseview->GetInteractorStyleBaseView()->GetInteractor()->GetControlKey();
+        
+        bool ok=false;
+
+        if  ((_withCtrlKey==true) && (systelCtrlKey==1))
+        {
+            ok=true;
+        }
+        if  ((_withCtrlKey==false) && (systelCtrlKey==0))
+        {
+            ok=true;
+        }
+
+        if  (ok==true)
         {
-            wxString itemString( lstItems[i].c_str() , wxConvUTF8 );
-            wxMenuItem *item = menu.Append(i+1000, itemString  );
-        } // for
-        menu.Connect( wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) (wxCommandEventFunction) &PopupMenuInteractor::OnPopupClick,NULL,this );
-        window->PopupMenu(&menu,xWindow,yWindow);
-    } // if _vtkbaseview
+            
+            for (i=0;i<size;i++)
+            {
+                wxString itemString( lstItems[i].c_str() , wxConvUTF8 );
+                wxMenuItem *item = menu.Append(i+1000, itemString  );
+            } // for
+            menu.Connect( wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) (wxCommandEventFunction) &PopupMenuInteractor::OnPopupClick,NULL,this );
+            window->PopupMenu(&menu,xWindow,yWindow);
+       } // if ControlKey
+        
+     } // if _vtkbaseview
 }
 
+void    PopupMenuInteractor::SetWithCtrlKey(bool flag)
+{
+    _withCtrlKey=flag;
+}
+
+
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,wxPopupMenu)
 BBTK_BLACK_BOX_IMPLEMENTATION(wxPopupMenu,bbtk::AtomicBlackBox);
 //===== 
@@ -142,9 +169,35 @@ void wxPopupMenu::Process()
         if (bbGetInputwxVtkBaseView()!=NULL)
         {
             PopupMenuInteractor* popupmenuinteractor                = new PopupMenuInteractor( this, bbGetInputwxVtkBaseView()  );
+            popupmenuinteractor->SetWithCtrlKey( bbGetInputWithCtrlKey() );
             vtkInteractorStyleBaseView *vtkinteractorstylebaseview  = (vtkInteractorStyleBaseView*) (bbGetInputwxVtkBaseView()->GetInteractorStyleBaseView() );
             vtkinteractorstylebaseview->AddInteractorStyleMaracas( popupmenuinteractor );
         } // if wxVtkBaseView
+        
+        if (bbGetInputwxVtkBaseView2()!=NULL)
+        {
+            PopupMenuInteractor* popupmenuinteractor                = new PopupMenuInteractor( this, bbGetInputwxVtkBaseView2()  );
+            popupmenuinteractor->SetWithCtrlKey( bbGetInputWithCtrlKey() );
+            vtkInteractorStyleBaseView *vtkinteractorstylebaseview  = (vtkInteractorStyleBaseView*) (bbGetInputwxVtkBaseView2()->GetInteractorStyleBaseView() );
+            vtkinteractorstylebaseview->AddInteractorStyleMaracas( popupmenuinteractor );
+        } // if wxVtkBaseView2
+
+        if (bbGetInputwxVtkBaseView3()!=NULL)
+        {
+            PopupMenuInteractor* popupmenuinteractor                = new PopupMenuInteractor( this, bbGetInputwxVtkBaseView3()  );
+            popupmenuinteractor->SetWithCtrlKey( bbGetInputWithCtrlKey() );
+            vtkInteractorStyleBaseView *vtkinteractorstylebaseview  = (vtkInteractorStyleBaseView*) (bbGetInputwxVtkBaseView3()->GetInteractorStyleBaseView() );
+            vtkinteractorstylebaseview->AddInteractorStyleMaracas( popupmenuinteractor );
+        } // if wxVtkBaseView3
+
+        if (bbGetInputwxVtkBaseView4()!=NULL)
+        {
+            PopupMenuInteractor* popupmenuinteractor                = new PopupMenuInteractor( this, bbGetInputwxVtkBaseView4()  );
+            popupmenuinteractor->SetWithCtrlKey( bbGetInputWithCtrlKey() );
+            vtkInteractorStyleBaseView *vtkinteractorstylebaseview  = (vtkInteractorStyleBaseView*) (bbGetInputwxVtkBaseView4()->GetInteractorStyleBaseView() );
+            vtkinteractorstylebaseview->AddInteractorStyleMaracas( popupmenuinteractor );
+        } // if wxVtkBaseView4
+        
     } // if firsttime
 }
 
@@ -155,8 +208,12 @@ void wxPopupMenu::bbUserSetDefaultValues()
 {
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
-    firsttime=true;
+    firsttime = true;
     bbSetInputwxVtkBaseView(NULL);
+    bbSetInputwxVtkBaseView2(NULL);
+    bbSetInputwxVtkBaseView3(NULL);
+    bbSetInputwxVtkBaseView4(NULL);
+    bbSetInputWithCtrlKey(false);
     bbSetOutputOut(-1);
 }
 
index aad15dd2b1e832d0f79fcd809ed7b0face4c91fa..2a9b2234e93015f1fba73a948c881d53a66a7ce4 100644 (file)
@@ -41,6 +41,10 @@ class bbcreaMaracasVisu_EXPORT wxPopupMenu
 //===== 
     BBTK_DECLARE_INPUT(In,std::vector< std::string >);
     BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*);
+    BBTK_DECLARE_INPUT(wxVtkBaseView2,wxVtkBaseView*);
+    BBTK_DECLARE_INPUT(wxVtkBaseView3,wxVtkBaseView*);
+    BBTK_DECLARE_INPUT(wxVtkBaseView4,wxVtkBaseView*);
+    BBTK_DECLARE_INPUT(WithCtrlKey,bool);
 //    BBTK_DECLARE_INPUT(Position,std::vector< int >);
     BBTK_DECLARE_OUTPUT(Out,int);
     BBTK_DECLARE_OUTPUT(Point,std::vector<double>);
@@ -61,6 +65,10 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(wxPopupMenu,bbtk::AtomicBlackBox);
     BBTK_INPUT(wxPopupMenu,In,"Vector of items",std::vector< std::string >,"");
 //    BBTK_INPUT(wxPopupMenu,Position,"Window position",std::vector< int >,"");
     BBTK_INPUT(wxPopupMenu,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,"");
+    BBTK_INPUT(wxPopupMenu,wxVtkBaseView2,"wxVtkBaseView2",wxVtkBaseView*,"");
+    BBTK_INPUT(wxPopupMenu,wxVtkBaseView3,"wxVtkBaseView3",wxVtkBaseView*,"");
+    BBTK_INPUT(wxPopupMenu,wxVtkBaseView4,"wxVtkBaseView4",wxVtkBaseView*,"");
+    BBTK_INPUT(wxPopupMenu,WithCtrlKey,"(default false) With Ctrol key",bool,"");
     BBTK_OUTPUT(wxPopupMenu,Point,"click point in the image",std::vector<double>,"");
     BBTK_OUTPUT(wxPopupMenu,Out,"Sected item",int,"");
     BBTK_OUTPUT(wxPopupMenu,SimpleText,"Text selected item",std::string,"");
index 091c02ee38f15a828f940cdc0e70265e70a6d11e..56ac7412ba078a32378a51b79294043619deef76 100644 (file)
@@ -23,7 +23,6 @@
   WidgetShowNPoints::WidgetShowNPoints(wxWindow *parent, int type)
     : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
   {
-    printf("EED WidgetShowNPoints::WidgetShowNPoints Start \n");
        // EED 2022-05-19
     //  mmodelShowNPoints                               = new ModelShowNPoints();
                         mActualCollection= 0;
@@ -479,7 +478,7 @@ void WidgetShowNPoints::OnInsertPoint_()
 
 
 //------------------------------------------------------------------------
-void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event)
+void WidgetShowNPoints::OnAddPoint_()
 {      
     // EED 2022-05-19
        //if (this->renderer==NULL)
@@ -501,6 +500,12 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event)
        }
 }
 
+//------------------------------------------------------------------------
+void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event)
+{
+    OnAddPoint_();
+}
+
 //------------------------------------------------------------------------
 void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
 {
index 4edd315d9cf7330dc5798467c383e3c393dd8a2e..2bcbd563dda4aecfe5389e58802ee877600c2e60 100644 (file)
@@ -18,6 +18,7 @@ class WidgetShowNPoints : public wxPanel
          WidgetShowNPoints( wxWindow *parent , int type );
          ~WidgetShowNPoints(); 
          void OnAddPoint(wxCommandEvent &event);   
+      void OnAddPoint_();
          void OnInsertPoint(wxCommandEvent& event);//CFT
       void OnSetPoint_();
          void OnSetPoint(wxCommandEvent& event);
index 280f791f489aa7b284c70771d2380a3a52a7583c..f1e2e3c8791fc97f7ac444a51956abd88c650bbe 100644 (file)
@@ -218,9 +218,13 @@ void wxVtk3DBaseView::Configure()
                                
                //https://stackoverflow.com/questions/47528086/problems-with-rendering-transparent-objects-in-vtk
                //https://itk.org/Wiki/VTK/Depth_Peeling
-               _aRenderer->SetUseDepthPeeling(1);
-               _aRenderer->SetOcclusionRatio(0.1);
-               _aRenderer->SetMaximumNumberOfPeels(100);
+
+// EED 2022-08-24
+//             _aRenderer->SetUseDepthPeeling(1);
+//             _aRenderer->SetOcclusionRatio(0.1);
+// //        _aRenderer->SetMaximumNumberOfPeels(100);
+//             _aRenderer->SetMaximumNumberOfPeels(4);
+        
                _renWin->SetMultiSamples(0);
                _renWin->SetAlphaBitPlanes(1);