From 0e3fa4b237bfd72c3e7ff41ecc1fcc23f1d8b73c Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Tue, 22 Aug 2023 14:04:58 +0200 Subject: [PATCH] #3537 Mesh_tool_ApplyDeformation optimization --- bbtk/bbs/boxes/MeshContours_Widget.bbg | 34 +++-- bbtk/bbs/boxes/MeshContours_Widget.bbs | 7 +- bbtk/bbs/boxes/Mesh_Application.bbg | 108 +++++++++------ bbtk/bbs/boxes/Mesh_Application.bbs | 19 ++- bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg | 128 +++++++++++------- bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs | 12 +- bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbg | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbs | 2 +- .../boxes/Mesh_tool_ApplyRegionGrowing.bbg | 2 +- .../boxes/Mesh_tool_ApplyRegionGrowing.bbs | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg | 2 +- bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs | 2 +- bbtk/bbs/boxes/PolyDataToActor_Widget.bbg | 54 +++++--- bbtk/bbs/boxes/PolyDataToActor_Widget.bbs | 4 + .../bbcreaMaracasVisuwxVtkBaseView_Info.cxx | 6 +- bbtk/src/bbmaracasvisuShowNPoints.cxx | 2 - .../wxWindows/widgets/ViewShowNPoints.cxx | 5 +- .../wxWindows/widgets/WidgetShowNPoints.cxx | 6 +- 22 files changed, 261 insertions(+), 144 deletions(-) diff --git a/bbtk/bbs/boxes/MeshContours_Widget.bbg b/bbtk/bbs/boxes/MeshContours_Widget.bbg index e5d9cb0..89b1917 100644 --- a/bbtk/bbs/boxes/MeshContours_Widget.bbg +++ b/bbtk/bbs/boxes/MeshContours_Widget.bbg @@ -27,7 +27,7 @@ COMPLEX_PORT _widgetB -87.656081:-38.746528:-900.000000 FIN_COMPLEX_PORT -COMPLEXINPUTS:7 +COMPLEXINPUTS:8 COMPLEX_PORT _polydata -141.489226:31.493286:-900.000000 @@ -56,7 +56,11 @@ COMPLEX_PORT colorMesh -194.499798:33.358808:-900.000000 FIN_COMPLEX_PORT -BOXES:10 +COMPLEX_PORT +active_widget +-105.058713:31.048561:-900.000000 +FIN_COMPLEX_PORT +BOXES:11 BOX std:MagicBox:Box36 ISEXEC:FALSE @@ -96,8 +100,8 @@ FIN_BOX BOX creaMaracasVisu:MeshContours_Interface:Box52 ISEXEC:FALSE --101.622755:13.669751:-900.000000 --78.632755:11.169751:-900.000000 +-103.389784:18.691834:-900.000000 +-80.399784:16.191834:-900.000000 FIN_BOX BOX creaMaracasVisu:MeshContours:Box53 @@ -119,7 +123,15 @@ ISEXEC:FALSE PORT In1:"0.99999" FIN_BOX -CONNECTIONS:23 +BOX +std:Mul:Box10 +ISEXEC:FALSE +-84.877846:4.278070:-900.000000 +-63.902846:1.778070:-900.000000 +PORT +In2:"1" +FIN_BOX +CONNECTIONS:25 CONNECTION _polydata:_polydata:Box38:In NumberOfControlPoints:0 @@ -160,9 +172,6 @@ CONNECTION Box36:BoxChange:Box53:execute NumberOfControlPoints:0 CONNECTION -Box52:active:Box53:activeContour -NumberOfControlPoints:0 -CONNECTION Box08:Out:Box53:colorForMesh NumberOfControlPoints:0 CONNECTION @@ -189,4 +198,13 @@ NumberOfControlPoints:0 CONNECTION Box52:widgetB:_widgetB:_widgetB NumberOfControlPoints:0 +CONNECTION +Box10:Out:Box53:activeContour +NumberOfControlPoints:0 +CONNECTION +Box52:active:Box10:In1 +NumberOfControlPoints:0 +CONNECTION +active_widget:active_widget:Box10:In2 +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/MeshContours_Widget.bbs b/bbtk/bbs/boxes/MeshContours_Widget.bbs index abd2f33..6447a7a 100644 --- a/bbtk/bbs/boxes/MeshContours_Widget.bbs +++ b/bbtk/bbs/boxes/MeshContours_Widget.bbs @@ -36,6 +36,9 @@ new std:MagicBox Box08 new std:ConcatStrings Box09 set Box09.In1 "0.99999" +new std:Mul Box10 + set Box10.In2 "1" + connect Box38.Out Box53.polydata connect Box45.Out Box53.wxvtkbaseview2D1 @@ -43,12 +46,13 @@ connect Box46.Out Box53.wxvtkbaseview2D2 connect Box47.Out Box53.wxvtkbaseview2D3 connect Box51.Out Box53.wxvtkbaseview3D1 connect Box36.BoxChange Box53.execute -connect Box52.active Box53.activeContour connect Box08.Out Box53.colorForMesh connect Box09.Out Box53.opacity1 connect Box09.Out Box53.opacity2 connect Box09.Out Box53.opacity3 connect Box52.LineWidth Box53.lineWidth +connect Box10.Out Box53.activeContour +connect Box52.active Box10.In1 # Complex input ports input _polydata Box38.In " " @@ -58,6 +62,7 @@ input _wxvtkbaseview2D3 Box47.In " " input _wxvtkbaseview3D1 Box51.In " " input _execute Box36.In " " input colorMesh Box08.In " " +input active_widget Box10.In2 " " # Complex output ports output _widget Box52.widget " " diff --git a/bbtk/bbs/boxes/Mesh_Application.bbg b/bbtk/bbs/boxes/Mesh_Application.bbg index 221e5df..6dc3659 100644 --- a/bbtk/bbs/boxes/Mesh_Application.bbg +++ b/bbtk/bbs/boxes/Mesh_Application.bbg @@ -64,7 +64,7 @@ COMPLEX_PORT OutDir_ExMa 334.933146:91.638847:-900.000000 FIN_COMPLEX_PORT -BOXES:99 +BOXES:101 BOX creaMaracasVisu:ImageChangeInformation:Box07 ISEXEC:FALSE @@ -120,8 +120,8 @@ FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box17 ISEXEC:FALSE --77.251703:-46.232365:-900.000000 --54.456703:-48.732365:-900.000000 +-74.651823:-57.192059:-900.000000 +-51.856823:-59.692059:-900.000000 PORT colorMesh:"1 0 0" FIN_BOX @@ -155,7 +155,7 @@ In3:"0 0 0 1 0 0 0 0" PORT In4:"0 0 0 0 0 0 0 0" PORT -In5:"0 0 0 0 0 0 0 0" +In5:"0 0 0 0 0 1 0 0" PORT In6:"0 0 0 0 0 0 1 0" PORT @@ -246,16 +246,16 @@ FIN_BOX BOX creaMaracasVisu:Mesh_tool_ApplySmooth:Box46 ISEXEC:FALSE -248.418242:6.158641:-900.000000 -271.443242:3.658641:-900.000000 +247.620814:6.158641:-900.000000 +270.645814:3.658641:-900.000000 PORT title:"Smooth" FIN_BOX BOX creaMaracasVisu:Mesh_tool_ApplyDeformation:Box47 ISEXEC:FALSE -285.400337:5.887543:-900.000000 -308.890337:3.387543:-900.000000 +282.409981:5.887543:-900.000000 +305.899981:3.387543:-900.000000 PORT title:"Deformation" FIN_BOX @@ -340,8 +340,8 @@ FIN_BOX BOX std:ConcatStrings_tool:Box57 ISEXEC:FALSE -145.873719:-48.017083:-900.000000 -168.313719:-50.517083:-900.000000 +146.272433:-49.611939:-900.000000 +168.712433:-52.111939:-900.000000 PORT Type:"1" FIN_BOX @@ -351,7 +351,7 @@ ISEXEC:FALSE 148.982049:-37.179653:-900.000000 171.937049:-39.679653:-900.000000 PORT -I:"4" +I:"5" FIN_BOX BOX creaMaracasVisu:SetPosition:Box59 @@ -376,8 +376,8 @@ FIN_BOX BOX std:MagicBox:Box63 ISEXEC:FALSE -55.371671:76.427350:-900.000000 -76.971671:73.927350:-900.000000 +264.357654:70.945031:-900.000000 +285.957654:68.445031:-900.000000 FIN_BOX BOX std:MagicBox:Box65 @@ -428,8 +428,8 @@ FIN_BOX BOX creaMaracasVisu:Mesh_tool_ApplyCut:Box74 ISEXEC:FALSE -130.954266:-0.010995:-900.000000 -153.579266:-2.510995:-900.000000 +134.143979:8.362001:-900.000000 +156.768979:5.862001:-900.000000 PORT title:"Cut" FIN_BOX @@ -602,16 +602,16 @@ FIN_BOX BOX wx:LayoutTab:Box102 ISEXEC:FALSE -210.769139:-3.595922:-900.000000 -244.089139:-6.095922:-900.000000 +177.675871:-5.788849:-900.000000 +210.995871:-8.288849:-900.000000 PORT WinTitle:"Patch" FIN_BOX BOX creaMaracasVisu:Mesh_tool_ApplyPatchSimple:Box103 ISEXEC:FALSE -164.265319:0.476077:-900.000000 -187.870319:-2.023923:-900.000000 +168.252460:1.672219:-900.000000 +191.857460:-0.827781:-900.000000 PORT title:"Simple (Yelow)" FIN_BOX @@ -742,30 +742,30 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box122 ISEXEC:FALSE --70.422868:-23.611036:-900.000000 --41.382868:-26.111036:-900.000000 +-73.014509:-19.623895:-900.000000 +-43.974509:-22.123895:-900.000000 PORT InteractionType:"6" FIN_BOX BOX std:MultipleInputs:Box123 ISEXEC:FALSE -90.934516:43.523384:-900.000000 -113.014516:41.023384:-900.000000 +77.577594:17.008898:-900.000000 +99.657594:14.508898:-900.000000 FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box124 ISEXEC:FALSE --82.577985:-33.727937:-900.000000 --53.537985:-36.227937:-900.000000 +-77.992773:-29.142725:-900.000000 +-48.952773:-31.642725:-900.000000 PORT InteractionType:"2" FIN_BOX BOX std:MagicBox:Box125 ISEXEC:FALSE -92.903424:82.992047:-900.000000 -114.613424:80.492047:-900.000000 +90.710497:79.004906:-900.000000 +112.420497:76.504906:-900.000000 FIN_BOX BOX std:MagicBox:Box126 @@ -776,8 +776,8 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box127 ISEXEC:FALSE --73.212447:-15.768557:-900.000000 --44.172447:-18.268557:-900.000000 +-69.624020:-11.582059:-900.000000 +-40.584020:-14.082059:-900.000000 PORT InteractionType:"5" FIN_BOX @@ -844,10 +844,24 @@ FIN_BOX BOX std:MultipleInputs:Box137 ISEXEC:FALSE --71.845121:6.928998:-900.000000 --49.765121:4.428998:-900.000000 +-69.253480:7.527069:-900.000000 +-47.173480:5.027069:-900.000000 FIN_BOX -CONNECTIONS:247 +BOX +creaMaracasVisu:wxVtkBaseView_Info:Box140 +ISEXEC:FALSE +-82.532978:-38.891931:-900.000000 +-53.492978:-41.391931:-900.000000 +PORT +InteractionType:"8" +FIN_BOX +BOX +std:MultipleInputs:Box139 +ISEXEC:FALSE +-80.144058:-47.284744:-900.000000 +-58.064058:-49.784744:-900.000000 +FIN_BOX +CONNECTIONS:253 CONNECTION Box08:MeshBase:Box15:polydata NumberOfControlPoints:0 @@ -1020,9 +1034,6 @@ CONNECTION Box63:BoxChange:Box46:boxChange NumberOfControlPoints:0 CONNECTION -Box63:BoxChange:Box47:boxChange -NumberOfControlPoints:0 -CONNECTION Render3D:Render3D:Box65:In NumberOfControlPoints:0 CONNECTION @@ -1452,9 +1463,6 @@ CONNECTION Box122:BoxChange:Box123:In1 NumberOfControlPoints:0 CONNECTION -Box123:BoxChange:Box17:_execute -NumberOfControlPoints:0 -CONNECTION Box67:Out:Box124:wxVtkBaseView1 NumberOfControlPoints:0 CONNECTION @@ -1589,4 +1597,28 @@ NumberOfControlPoints:0 CONNECTION Box123:BoxChange:Box112:BoxExecute NumberOfControlPoints:0 +CONNECTION +Box137:BoxChange:Box140:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box67:Out:Box140:wxVtkBaseView1 +NumberOfControlPoints:0 +CONNECTION +Box68:Out:Box140:wxVtkBaseView2 +NumberOfControlPoints:0 +CONNECTION +Box69:Out:Box140:wxVtkBaseView3 +NumberOfControlPoints:0 +CONNECTION +Box140:BoxChange:Box139:In1 +NumberOfControlPoints:0 +CONNECTION +Box139:BoxChange:Box17:_execute +NumberOfControlPoints:0 +CONNECTION +Box47:ChangePosition:Box139:In2 +NumberOfControlPoints:0 +CONNECTION +Box140:BoxChange:Box47:boxChange +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_Application.bbs b/bbtk/bbs/boxes/Mesh_Application.bbs index cfdd2fa..c8d790a 100644 --- a/bbtk/bbs/boxes/Mesh_Application.bbs +++ b/bbtk/bbs/boxes/Mesh_Application.bbs @@ -51,7 +51,7 @@ new std:StringSelect Box23 set Box23.In2 "0 0 1 0 0 0 0 0" set Box23.In3 "0 0 0 1 0 0 0 0" set Box23.In4 "0 0 0 0 0 0 0 0" - set Box23.In5 "0 0 0 0 0 0 0 0" + set Box23.In5 "0 0 0 0 0 1 0 0" set Box23.In6 "0 0 0 0 0 0 1 0" set Box23.In7 "0 0 0 0 0 0 0 0" set Box23.In8 "0 0 0 0 0 0 0 0" @@ -126,7 +126,7 @@ new std:ConcatStrings_tool Box57 set Box57.Type "1" new std:GetVectorStringElement Box58 - set Box58.I "4" + set Box58.I "5" new creaMaracasVisu:SetPosition Box59 @@ -310,6 +310,11 @@ new std:ConcatStrings_tool Box136 new std:MultipleInputs Box137 +new creaMaracasVisu:wxVtkBaseView_Info Box140 + set Box140.InteractionType "8" + +new std:MultipleInputs Box139 + connect Box08.MeshBase Box15.polydata connect Box08.MeshTemp Box10.mesh @@ -366,7 +371,6 @@ connect Box61.Spacing Box60.In1 connect Box54.Out Box59.Active connect Box63.BoxChange Box28.In4 connect Box63.BoxChange Box46.boxChange -connect Box63.BoxChange Box47.boxChange connect Box65.Out Box13.render connect Box65.Out Box48.Renderer connect Box65.Out Box15.render @@ -501,7 +505,6 @@ connect Box67.Out Box122.wxVtkBaseView1 connect Box68.Out Box122.wxVtkBaseView2 connect Box69.Out Box122.wxVtkBaseView3 connect Box122.BoxChange Box123.In1 -connect Box123.BoxChange Box17._execute connect Box67.Out Box124.wxVtkBaseView1 connect Box68.Out Box124.wxVtkBaseView2 connect Box69.Out Box124.wxVtkBaseView3 @@ -545,6 +548,14 @@ connect Box137.BoxChange Box122.BoxExecute connect Box137.BoxChange Box124.BoxExecute connect Box08.BoxChange Box137.In1 connect Box123.BoxChange Box112.BoxExecute +connect Box137.BoxChange Box140.BoxExecute +connect Box67.Out Box140.wxVtkBaseView1 +connect Box68.Out Box140.wxVtkBaseView2 +connect Box69.Out Box140.wxVtkBaseView3 +connect Box140.BoxChange Box139.In1 +connect Box139.BoxChange Box17._execute +connect Box47.ChangePosition Box139.In2 +connect Box140.BoxChange Box47.boxChange # Complex input ports input MeshIn Box56.In " " diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg index f118b97..9ae9e39 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg @@ -67,7 +67,7 @@ ISEXEC:FALSE 65.325513:91.657411:-900.000000 102.165513:89.157411:-900.000000 PORT -Radio:"2" +Radio:"6" PORT Type:"4" PORT diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs index ba9e5e3..01d5be2 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs @@ -19,7 +19,7 @@ description "Show N Points" category "demo" new creaMaracasVisu:ShowNPoints showNpoints - set showNpoints.Radio "2" + set showNpoints.Radio "6" set showNpoints.Type "4" set showNpoints.WinTitle "1.1 Splines" diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg index 2947703..0a9076b 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBG BlackBox Diagram file -# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg # ---------------------------------- APP_START @@ -10,7 +10,7 @@ AUTHOR:info-dev@creatis.insa-lyon.fr COMPLEXBOX:TRUE COMPLEXBOXNAME:Mesh_tool_ApplyDeformation PACKAGENAME:creaMaracasVisu -COMPLEXOUTPUTS:2 +COMPLEXOUTPUTS:3 COMPLEX_PORT widget -190.515959:-183.832070:-900.000000 @@ -19,6 +19,10 @@ COMPLEX_PORT ExportIsActive_concatstring_tool -490.632709:-167.862172:-900.000000 FIN_COMPLEX_PORT +COMPLEX_PORT +ChangePosition +-388.206672:-167.057588:-900.000000 +FIN_COMPLEX_PORT COMPLEXINPUTS:9 COMPLEX_PORT boxChange @@ -56,7 +60,7 @@ COMPLEX_PORT meshmanagermodel -131.800179:136.578564:-900.000000 FIN_COMPLEX_PORT -BOXES:104 +BOXES:105 BOX wx:LayoutLine:Box08 ISEXEC:FALSE @@ -162,8 +166,8 @@ FIN_BOX BOX std:MagicBox:Box63 ISEXEC:FALSE --23.567293:123.061021:-900.000000 --1.967293:120.561021:-900.000000 +-25.423307:114.983074:-900.000000 +-3.823307:112.483074:-900.000000 FIN_BOX BOX std:MagicBox:Box64 @@ -192,8 +196,8 @@ FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box72 ISEXEC:FALSE --116.529090:-80.670211:-900.000000 --93.734090:-83.170211:-900.000000 +-116.287868:-80.428989:-900.000000 +-93.492868:-82.928989:-900.000000 PORT colorMesh:"0 1 1" FIN_BOX @@ -214,8 +218,8 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box96 ISEXEC:FALSE --282.583529:75.895087:-900.000000 --255.303529:73.395087:-900.000000 +-282.883089:75.595527:-900.000000 +-253.843089:73.095527:-900.000000 FIN_BOX BOX creaVtk:MeshManager_tool:Box48 @@ -228,8 +232,8 @@ FIN_BOX BOX creaVtk:MeshDeformation:Box39 ISEXEC:FALSE --378.393017:-93.884922:-900.000000 --356.048017:-96.384922:-900.000000 +-378.574251:-84.823238:-900.000000 +-356.229251:-87.323238:-900.000000 PORT TypeIn:"1" FIN_BOX @@ -314,8 +318,8 @@ FIN_BOX BOX creaVtk:PlaneWidget_Base:Box60 ISEXEC:FALSE --334.046533:-52.736853:-900.000000 --311.636533:-55.236853:-900.000000 +-333.502832:-52.193152:-900.000000 +-311.092832:-54.693152:-900.000000 PORT Param:"1" PORT @@ -324,8 +328,8 @@ FIN_BOX BOX std:MultipleInputs:Box61 ISEXEC:FALSE --385.749451:-39.723715:-900.000000 --363.779451:-42.223715:-900.000000 +-386.655619:-40.992351:-900.000000 +-364.685619:-43.492351:-900.000000 FIN_BOX BOX creaVtk:MeshManager:Box62 @@ -338,8 +342,8 @@ FIN_BOX BOX std:MultipleInputs:Box73 ISEXEC:FALSE --354.803800:-75.117455:-900.000000 --332.833800:-77.617455:-900.000000 +-320.374839:-81.257652:-900.000000 +-298.404839:-83.757652:-900.000000 FIN_BOX BOX creaVtk:PointPickerNearest:Box75 @@ -352,8 +356,8 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box76 ISEXEC:FALSE --259.552459:91.687133:-900.000000 --232.272459:89.187133:-900.000000 +-261.926904:95.387566:-900.000000 +-232.886904:92.887566:-900.000000 PORT InteractionType:"6" FIN_BOX @@ -374,20 +378,20 @@ FIN_BOX BOX std:SharedMemory:Box85 ISEXEC:FALSE --315.585606:42.539199:-900.000000 --292.825606:40.039199:-900.000000 +-315.585606:43.264134:-900.000000 +-292.825606:40.764134:-900.000000 FIN_BOX BOX std:SharedMemory:Box86 ISEXEC:FALSE --303.246870:36.722338:-900.000000 --280.486870:34.222338:-900.000000 +-303.790571:37.084805:-900.000000 +-281.030571:34.584805:-900.000000 FIN_BOX BOX std:SharedMemory:Box87 ISEXEC:FALSE --297.141632:30.701141:-900.000000 --274.381632:28.201141:-900.000000 +-295.510529:30.882375:-900.000000 +-272.750529:28.382375:-900.000000 FIN_BOX BOX std:MathOperationVector:Box88 @@ -408,16 +412,16 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_info_tool:Box90 ISEXEC:FALSE --253.040214:81.680557:-900.000000 --229.960214:79.180557:-900.000000 +-255.522067:81.467870:-900.000000 +-232.442067:78.967870:-900.000000 PORT Type:"1" FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_info_tool:Box91 ISEXEC:FALSE --301.387197:67.588060:-900.000000 --278.307197:65.088060:-900.000000 +-300.090852:68.135506:-900.000000 +-277.010852:65.635506:-900.000000 PORT Type:"0" FIN_BOX @@ -440,14 +444,14 @@ FIN_BOX BOX std:ConcatStrings:Box95 ISEXEC:FALSE --214.864715:12.373023:-900.000000 --192.104715:9.873023:-900.000000 +-215.763394:14.469942:-900.000000 +-193.003394:11.969942:-900.000000 FIN_BOX BOX std:ConcatStrings_tool:Box97 ISEXEC:FALSE --194.573055:-24.190016:-900.000000 --172.133055:-26.690016:-900.000000 +-195.471734:-22.392657:-900.000000 +-173.031734:-24.892657:-900.000000 PORT Type:"1" FIN_BOX @@ -476,8 +480,8 @@ FIN_BOX BOX std:ConcatStrings_tool:Box101 ISEXEC:FALSE --256.586932:20.709911:-900.000000 --234.036932:18.209911:-900.000000 +-255.789504:21.307982:-900.000000 +-233.239504:18.807982:-900.000000 PORT Type:"1" FIN_BOX @@ -551,7 +555,7 @@ BOX creaMaracasVisu:wxVtkBaseView_Info:Box110 ISEXEC:FALSE -503.984856:55.718337:-900.000000 --476.704856:53.218337:-900.000000 +-474.944856:53.218337:-900.000000 FIN_BOX BOX std:GetVectorDoubleElement:Box111 @@ -572,24 +576,24 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box113 ISEXEC:FALSE --320.718977:101.018811:-900.000000 --293.438977:98.518811:-900.000000 +-320.269637:99.261893:-900.000000 +-291.229637:96.761893:-900.000000 PORT InteractionType:"8" FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_info_tool:Box114 ISEXEC:FALSE --319.417530:85.078645:-900.000000 --296.227530:82.578645:-900.000000 +-316.137201:82.722607:-900.000000 +-292.947201:80.222607:-900.000000 PORT Type:"1" FIN_BOX BOX std:MathOperationVector:Box115 ISEXEC:FALSE --310.696546:59.792865:-900.000000 --286.176546:57.292865:-900.000000 +-309.609144:61.242734:-900.000000 +-285.089144:58.742734:-900.000000 PORT Type:"2" FIN_BOX @@ -618,8 +622,8 @@ FIN_BOX BOX std:ReplaceCleanString:Box119 ISEXEC:FALSE --469.644099:116.669178:-900.000000 --446.979099:114.169178:-900.000000 +-470.301977:115.572714:-900.000000 +-447.636977:113.072714:-900.000000 PORT Replace:"1" PORT @@ -636,8 +640,8 @@ FIN_BOX BOX itkvtk:GeodesicMeshDeformation:Box122 ISEXEC:FALSE --403.918349:-56.277211:-900.000000 --380.503349:-58.777211:-900.000000 +-402.383300:-54.742162:-900.000000 +-378.968300:-57.242162:-900.000000 PORT TypeIn:"1" FIN_BOX @@ -883,7 +887,13 @@ ISEXEC:FALSE -518.170784:-36.309478:-900.000000 -496.090784:-38.809478:-900.000000 FIN_BOX -CONNECTIONS:202 +BOX +std:MultipleInputs:Box162 +ISEXEC:FALSE +-386.515882:-130.316341:-900.000000 +-364.435882:-132.816341:-900.000000 +FIN_BOX +CONNECTIONS:208 CONNECTION Box08:Widget:widget:widget NumberOfControlPoints:0 @@ -1011,9 +1021,6 @@ CONNECTION Box63:BoxChange:Box73:In3 NumberOfControlPoints:0 CONNECTION -Box73:BoxChange:Box72:_execute -NumberOfControlPoints:0 -CONNECTION Box76:Point:Box78:In0 NumberOfControlPoints:0 CONNECTION @@ -1490,4 +1497,25 @@ NumberOfControlPoints:0 CONNECTION Box132:BoxChange:Box160:In2 NumberOfControlPoints:0 +CONNECTION +Box73:BoxChange:Box72:_execute +NumberOfControlPoints:0 +CONNECTION +Box53:BoxChange:Box162:In1 +NumberOfControlPoints:0 +CONNECTION +Box54:BoxChange:Box162:In3 +NumberOfControlPoints:0 +CONNECTION +Box58:BoxChange:Box162:In5 +NumberOfControlPoints:0 +CONNECTION +Box162:BoxChange:ChangePosition:ChangePosition +NumberOfControlPoints:0 +CONNECTION +Box117:Out:Box72:active_widget +NumberOfControlPoints:0 +CONNECTION +Box113:BoxChange:Box73:In5 +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs index 9456a36..c3da0b7 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box) -# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs # ---------------------------------- include std @@ -328,6 +328,8 @@ new std:ConcatStrings_tool Box159 new std:MultipleInputs Box160 +new std:MultipleInputs Box162 + connect Box66.Out Box11.Renderer connect Box66.Out Box37.render @@ -361,7 +363,6 @@ connect Box42.BoxChange Box51.BoxExecute connect Box43.BoxChange Box48.BoxExecute connect Box67.Out Box48.Mesh connect Box63.BoxChange Box73.In3 -connect Box73.BoxChange Box72._execute connect Box76.Point Box78.In0 connect Box35.Out Box83.In connect Box83.Spacing Box78.In1 @@ -520,6 +521,12 @@ connect Box102.Box_ConcatStrings Box159.Box_ConcatString connect Box160.BoxChange Box159.BoxExecute connect Box131.BoxChange Box160.In1 connect Box132.BoxChange Box160.In2 +connect Box73.BoxChange Box72._execute +connect Box53.BoxChange Box162.In1 +connect Box54.BoxChange Box162.In3 +connect Box58.BoxChange Box162.In5 +connect Box117.Out Box72.active_widget +connect Box113.BoxChange Box73.In5 # Complex input ports input mesh Box67.In " " @@ -535,6 +542,7 @@ input wxvtkbaseview1 Box71.In " " # Complex output ports output widget Box08.Widget " " output ExportIsActive_concatstring_tool Box117.Box_ConcatStrings " " +output ChangePosition Box162.BoxChange " " endefine diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg index d600031..bc91a59 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg @@ -67,7 +67,7 @@ ISEXEC:FALSE -20.157943:99.596730:-900.000000 16.682057:97.096730:-900.000000 PORT -Radio:"2" +Radio:"6" PORT Type:"4" PORT diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs index 88f6e63..b9804d9 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs @@ -19,7 +19,7 @@ description "Show N Points" category "demo" new creaMaracasVisu:ShowNPoints showNpoints - set showNpoints.Radio "2" + set showNpoints.Radio "6" set showNpoints.Type "4" set showNpoints.WinTitle "1.1 Splines" diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbg index b2ad48c..142832a 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbg @@ -67,7 +67,7 @@ ISEXEC:FALSE -20.157943:99.596730:-900.000000 16.682057:97.096730:-900.000000 PORT -Radio:"2" +Radio:"6" PORT Type:"4" PORT diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbs index 5527a97..fa61fbc 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbs @@ -19,7 +19,7 @@ description "Show N Points" category "demo" new creaMaracasVisu:ShowNPoints showNpoints - set showNpoints.Radio "2" + set showNpoints.Radio "6" set showNpoints.Type "4" set showNpoints.WinTitle "1.1 Splines" diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbg index 136de75..f3047ac 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbg @@ -67,7 +67,7 @@ ISEXEC:FALSE 5.070857:104.891899:-900.000000 41.910857:102.391899:-900.000000 PORT -Radio:"2" +Radio:"6" PORT Type:"3" PORT diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbs index 77d22cb..4c5f332 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyRegionGrowing.bbs @@ -21,7 +21,7 @@ description "Show N Points" category "demo" new creaMaracasVisu:ShowNPoints showNpoints - set showNpoints.Radio "2" + set showNpoints.Radio "6" set showNpoints.Type "3" set showNpoints.WinTitle "1.1 Points" diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg index e1d147c..c1ab214 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg @@ -75,7 +75,7 @@ ISEXEC:FALSE 26.647528:81.320946:-900.000000 63.487528:78.820946:-900.000000 PORT -Radio:"2" +Radio:"6" PORT Type:"4" FIN_BOX diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs index 46fa7a1..4fcbd59 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs @@ -19,7 +19,7 @@ description "Show N Points" category "demo" new creaMaracasVisu:ShowNPoints showNpoints - set showNpoints.Radio "2" + set showNpoints.Radio "6" set showNpoints.Type "4" new creaVtk:CreateMeshFromPoints Box04 diff --git a/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg b/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg index a92f170..c2e012a 100644 --- a/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg +++ b/bbtk/bbs/boxes/PolyDataToActor_Widget.bbg @@ -31,18 +31,18 @@ COMPLEX_PORT widgetB -2.559335:-81.468916:-900.000000 FIN_COMPLEX_PORT -COMPLEXINPUTS:7 +COMPLEXINPUTS:8 COMPLEX_PORT render -67.189452:16.701611:-900.000000 +76.597115:16.454041:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT polydata -51.945608:16.212789:-900.000000 +59.372710:16.212789:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT color -34.055765:15.520056:-900.000000 +47.300764:15.643841:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT boxexecute @@ -50,7 +50,7 @@ boxexecute FIN_COMPLEX_PORT COMPLEX_PORT scalarvisibility -90.567600:16.358272:-900.000000 +115.077037:16.977197:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT active @@ -60,7 +60,11 @@ COMPLEX_PORT meshOpacity -5.910539:15.975956:-900.000000 FIN_COMPLEX_PORT -BOXES:9 +COMPLEX_PORT +backfacecolour +28.526393:14.772115:-900.000000 +FIN_COMPLEX_PORT +BOXES:10 BOX wx:LayoutLine:Box04 ISEXEC:FALSE @@ -72,28 +76,28 @@ FIN_BOX BOX vtk:PolyDataToActor:Box09 ISEXEC:FALSE -31.500969:-43.366153:-900.000000 -59.540969:-45.866153:-900.000000 +70.617040:-39.528817:-900.000000 +98.657040:-42.028817:-900.000000 FIN_BOX BOX std:MagicBox:Box10 ISEXEC:FALSE -60.960177:-0.673020:-900.000000 -82.560177:-3.173020:-900.000000 +72.472185:-3.767646:-900.000000 +94.072185:-6.267646:-900.000000 FIN_BOX BOX vtk:UpdateRender:Box11 ISEXEC:FALSE -65.482218:-60.658169:-900.000000 -87.507218:-63.158169:-900.000000 +82.812123:-61.772234:-900.000000 +104.837123:-64.272234:-900.000000 PORT Active:"true" FIN_BOX BOX wx:Slider:Box13 ISEXEC:FALSE --9.533584:-1.577897:-900.000000 -29.800000:-4.077897:-900.000000 +-23.026153:-0.092477:-900.000000 +6.773847:-2.592477:-900.000000 PORT In:"50" PORT @@ -118,8 +122,8 @@ FIN_BOX BOX wx:ComboBox:Box15 ISEXEC:FALSE -26.142549:-16.835070:-900.000000 -47.857549:-19.335070:-900.000000 +12.773765:-12.626379:-900.000000 +39.053765:-15.126379:-900.000000 PORT In:"Points WireFrame Surface" PORT @@ -136,10 +140,16 @@ FIN_BOX BOX std:MagicBox:Box12 ISEXEC:FALSE -22.416296:1.762056:-900.000000 -44.016296:-0.737944:-900.000000 +10.037792:-0.094720:-900.000000 +31.637792:-2.594720:-900.000000 +FIN_BOX +BOX +std:MagicBox:Box16 +ISEXEC:FALSE +33.569240:-0.283971:-900.000000 +55.169240:-2.783971:-900.000000 FIN_BOX -CONNECTIONS:23 +CONNECTIONS:25 CONNECTION Box10:Out:Box11:Renderer NumberOfControlPoints:0 @@ -209,4 +219,10 @@ NumberOfControlPoints:0 CONNECTION Box12:Out:Box09:Active NumberOfControlPoints:0 +CONNECTION +backfacecolour:backfacecolour:Box16:In +NumberOfControlPoints:0 +CONNECTION +Box16:Out:Box09:BackFaceColour +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs b/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs index 16a1c4a..4ee9453 100644 --- a/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs +++ b/bbtk/bbs/boxes/PolyDataToActor_Widget.bbs @@ -46,6 +46,8 @@ new std:MultipleInputs Box08 new std:MagicBox Box12 +new std:MagicBox Box16 + connect Box10.Out Box11.Renderer connect Box09.BoxChange Box11.BoxExecute @@ -58,6 +60,7 @@ connect Box13.Widget Box04.Widget3 connect Box13.BoxChange Box08.In1 connect Box08.BoxChange Box09.BoxExecute connect Box12.Out Box09.Active +connect Box16.Out Box09.BackFaceColour # Complex input ports input render Box10.In " " @@ -67,6 +70,7 @@ input boxexecute Box08.In3 " " input scalarvisibility Box09.ScalarVisibility " " input meshOpacity Box13.In " " input active Box12.In " " +input backfacecolour Box16.In " " # Complex output ports output widget Box04.Widget " " diff --git a/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx b/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx index 92a82d1..1cff46a 100644 --- a/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx +++ b/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx @@ -164,10 +164,7 @@ bool InteractorwxVtkBaseView::OnMouseMove() { //EED 2023-08-05 _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview ); - - _box->bbSignalOutputModification(); -// _box->bbSignalOutputModification(std::string("BoxChange"),false); - + _box->bbSignalOutputModification(); return false; } // if ok } // if _box @@ -217,7 +214,6 @@ bool InteractorwxVtkBaseView::OnLeftDClick() { if ( (_box->bbGetInputInteractionType()==6 ) && (_wxvtkbaseview!=NULL) ) { - printf("EED InteractorwxVtkBaseView::OnLeftDClick type=6 \n"); _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview ); _box->bbSignalOutputModification(); return false; diff --git a/bbtk/src/bbmaracasvisuShowNPoints.cxx b/bbtk/src/bbmaracasvisuShowNPoints.cxx index f50817f..0163609 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.cxx +++ b/bbtk/src/bbmaracasvisuShowNPoints.cxx @@ -103,8 +103,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox); //----------------------------------------------------------------- void ShowNPoints::Process() { - printf ("EED ShowNPoints::Process OJO ----------------- aqui \n"); - if (mwxwidget!=NULL) { mwxwidget->SetRenderer( bbGetInputRenderer() ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ViewShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ViewShowNPoints.cxx index b5ed682..0bd5f74 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ViewShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ViewShowNPoints.cxx @@ -26,10 +26,11 @@ void ViewShowNPoints::RefreshPoint(int id) GetModelShowNPoints()->GetIdPoint(id,&x,&y,&z); GetModelShowNPoints()->GetImage()->GetSpacing(spc); std::string label = GetModelShowNPoints()->GetIdLabel(id); - double radio = GetModelShowNPoints()->GetRadio() * ratioRadio; + double radio = GetModelShowNPoints()->GetRadio() * ratioRadio ; + radio = radio /3; lstActorsSphere[id]->SetPosition( spc[0]*x , spc[1]*y , spc[2]*z ); lstActorsSphere[id]->GetProperty()->SetOpacity( mopacity ); - lstSourceSphere[id]->SetRadius( radio ); + lstSourceSphere[id]->SetRadius( radio ); lstActorsSphere[id]->GetProperty()->SetColor( mcolour[0] , mcolour[1] , mcolour[2] ); //EED 2017-01-01 Migration VTK7 #if VTK_MAJOR_VERSION <= 5 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx index 0581364..910fc0a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx @@ -119,7 +119,7 @@ sCtrlRadio = new wxSpinCtrl( panel2, -1 , wxEmptyString, wxDefaultPosition, sizeButton ); sCtrlRadio->SetRange(1,10); - sCtrlRadio->SetValue( 2 ); + sCtrlRadio->SetValue( 6 ); sCtrlOpacity= new wxSpinCtrl( panel2, -1 , wxEmptyString, wxDefaultPosition, sizeButton ); sCtrlOpacity->SetRange(0,10); sCtrlOpacity->SetValue( 10 ); @@ -266,7 +266,7 @@ sCtrlRadio = new wxSpinCtrl( panel, -1 , wxEmptyString, wxDefaultPosition, sizeButton ); sCtrlRadio->SetRange(1,10); - sCtrlRadio->SetValue( 2 ); + sCtrlRadio->SetValue( 6 ); sCtrlOpacity= new wxSpinCtrl( panel, -1 , wxEmptyString, wxDefaultPosition, sizeButton ); sCtrlOpacity->SetRange(0,10); sCtrlOpacity->SetValue( 10 ); @@ -365,7 +365,7 @@ sCtrlRadio = new wxSpinCtrl( panel, -1 , wxEmptyString, wxDefaultPosition, sizeButton ); sCtrlRadio->SetRange(1,10); - sCtrlRadio->SetValue( 2 ); + sCtrlRadio->SetValue( 6 ); sCtrlOpacity= new wxSpinCtrl( panel, -1 , wxEmptyString, wxDefaultPosition, sizeButton ); sCtrlOpacity->SetRange(0,10); sCtrlOpacity->SetValue( 10 ); -- 2.47.1