From bc7b4fa267c440c598b3e7c11792cf324c25a015 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 30 Dec 2022 16:24:57 +0100 Subject: [PATCH] #3497 Mesh_tool_ApplyThresholdConnectivity --- .../Mesh_tool_ApplyThresholdConnectivity.bbg | 359 +++++------------- .../Mesh_tool_ApplyThresholdConnectivity.bbs | 93 +---- .../bbcreaMaracasVisuShowNPoints_Tools.cxx | 8 - .../wxWindows/widgets/WidgetShowNPoints.cxx | 6 +- 4 files changed, 121 insertions(+), 345 deletions(-) diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg index 6b62c93..26e0a3f 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBG BlackBox Diagram file -# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg # ---------------------------------- APP_START @@ -13,7 +13,7 @@ PACKAGENAME:creaMaracasVisu COMPLEXOUTPUTS:5 COMPLEX_PORT widget --180.910574:-184.919472:-900.000000 +-176.524885:-207.578867:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT interactorStyleMaracas @@ -72,70 +72,38 @@ COMPLEX_PORT meshmanagermodel -150.374274:130.740991:-900.000000 FIN_COMPLEX_PORT -BOXES:68 +BOXES:59 BOX creaMaracasVisu:ShowNPoints:showNpoints ISEXEC:FALSE -24.787568:83.025910:-900.000000 -61.627568:80.525910:-900.000000 +5.070857:104.891899:-900.000000 +41.910857:102.391899:-900.000000 PORT Radio:"2" PORT Type:"3" PORT -WinTitle:"1.1 Splines" -FIN_BOX -BOX -creaVtk:CreateMeshFromPoints:Box04 -ISEXEC:FALSE -106.856888:30.436127:-900.000000 -129.711888:27.936127:-900.000000 -FIN_BOX -BOX -creaMaracasVisu:ManualContourModel_Box:Box06 -ISEXEC:FALSE -113.707856:40.916137:-900.000000 -138.227856:38.416137:-900.000000 -PORT -DoubleContour:"1" -PORT -NbPoints:"100" -PORT -OpenClose:"true" -PORT -OpenClose2:"false" +WinTitle:"1.1 Points" FIN_BOX BOX wx:LayoutLine:Box08 ISEXEC:FALSE --182.125107:-147.642582:-900.000000 --148.805107:-150.142582:-900.000000 +-177.739418:-170.301977:-900.000000 +-144.419418:-172.801977:-900.000000 FIN_BOX BOX vtk:UpdateRender:Box11 ISEXEC:FALSE -50.398091:-54.711454:-900.000000 -72.423091:-57.211454:-900.000000 +21.895599:32.339150:-900.000000 +43.920599:29.839150:-900.000000 PORT Active:"true" FIN_BOX BOX std:MultipleInputs:Box31 ISEXEC:FALSE -55.310626:-33.496784:-900.000000 -77.280626:-35.996784:-900.000000 -FIN_BOX -BOX -creaMaracasVisu:ManualContourModel_Box:Box29 -ISEXEC:FALSE -145.118292:37.000505:-900.000000 -169.638292:34.500505:-900.000000 -PORT -NbPoints:"40" -PORT -OpenClose:"true" -PORT -OpenClose2:"false" +26.808134:53.553820:-900.000000 +48.778134:51.053820:-900.000000 FIN_BOX BOX creaMaracasVisu:wxPopupMenu:Box57 @@ -184,14 +152,6 @@ ISEXEC:FALSE -89.231259:107.696821:-900.000000 FIN_BOX BOX -std:VectorFilterDouble:Box70 -ISEXEC:FALSE -139.445996:56.689018:-900.000000 -165.725996:54.189018:-900.000000 -PORT -Type:"11" -FIN_BOX -BOX creaVtk:BooleanOperationPolyDataFilter:Box77 ISEXEC:FALSE -85.849843:-22.221970:-900.000000 @@ -212,8 +172,8 @@ FIN_BOX BOX wx:LayoutLine:Box79 ISEXEC:FALSE --144.841026:-82.628158:-900.000000 --111.521026:-85.128158:-900.000000 +-132.780380:-132.698111:-900.000000 +-99.460380:-135.198111:-900.000000 PORT Orientation:"H" PORT @@ -230,8 +190,8 @@ FIN_BOX BOX std:MagicBox:Box66 ISEXEC:FALSE --148.055989:80.219744:-900.000000 --126.455989:77.719744:-900.000000 +-157.358966:97.496702:-900.000000 +-135.758966:94.996702:-900.000000 FIN_BOX BOX std:MagicBox:Box67 @@ -242,8 +202,8 @@ FIN_BOX BOX creaMaracasVisu:PolyDataToActor_Widget:Box48 ISEXEC:FALSE -59.760405:-21.730927:-900.000000 -82.780405:-24.230927:-900.000000 +31.257913:65.319677:-900.000000 +54.277913:62.819677:-900.000000 FIN_BOX BOX vtk:vtkImageDataPointerRelay:Box35 @@ -252,32 +212,6 @@ ISEXEC:FALSE -83.881396:121.133118:-900.000000 FIN_BOX BOX -wx:Slider:Box34 -ISEXEC:FALSE --198.941120:-3.426364:-900.000000 --169.141120:-5.926364:-900.000000 -PORT -In:"50" -PORT -Label:"true" -PORT -Max:"100" -PORT -Min:"0" -PORT -ReactiveOnTrack:"true" -PORT -Title:"Splines Opacity" -FIN_BOX -BOX -std:Div:Box36 -ISEXEC:FALSE --190.788172:-9.261990:-900.000000 --169.863172:-11.761990:-900.000000 -PORT -In2:"100" -FIN_BOX -BOX creaMaracasVisu:PolyDataToActor_Widget:Box37 ISEXEC:FALSE -67.388857:-39.476785:-900.000000 @@ -290,24 +224,24 @@ FIN_BOX BOX wx:LayoutLine:Box38 ISEXEC:FALSE --190.854929:-82.522396:-900.000000 --157.534929:-85.022396:-900.000000 +-178.794283:-132.592349:-900.000000 +-145.474283:-135.092349:-900.000000 PORT Orientation:"H" PORT -WinTitle:"Interpolated Surface (Yellow)" +WinTitle:"Threshold Surface (Yellow)" FIN_BOX BOX wx:LayoutTab:Box39 ISEXEC:FALSE --195.888488:-89.508403:-900.000000 --162.568488:-92.008403:-900.000000 +-183.827842:-139.578356:-900.000000 +-150.507842:-142.078356:-900.000000 FIN_BOX BOX wx:LayoutTab:Box40 ISEXEC:FALSE --148.825313:-89.038628:-900.000000 --115.505313:-91.538628:-900.000000 +-136.764667:-139.108581:-900.000000 +-103.444667:-141.608581:-900.000000 FIN_BOX BOX wx:CommandButton:Box42 @@ -338,8 +272,8 @@ FIN_BOX BOX creaVtk:MeshManager_tool:Box45 ISEXEC:FALSE --90.848443:-133.408000:-900.000000 --68.348443:-135.908000:-900.000000 +-86.462754:-156.067395:-900.000000 +-63.962754:-158.567395:-900.000000 PORT Tool:"30" FIN_BOX @@ -350,38 +284,16 @@ ISEXEC:FALSE -115.531256:111.421532:-900.000000 FIN_BOX BOX -wx:ComboBox:Box49 -ISEXEC:FALSE --182.639251:-13.479145:-900.000000 --156.359251:-15.979145:-900.000000 -PORT -In:"25 50 100 150" -PORT -Selection:"1" -PORT -Title:"Number of Points" -FIN_BOX -BOX -wx:LayoutLine:Box50 -ISEXEC:FALSE --57.295971:-56.374591:-900.000000 --23.975971:-58.874591:-900.000000 -PORT -Orientation:"V" -PORT -WinTitle:"Config" -FIN_BOX -BOX std:MultipleInputs:Box51 ISEXEC:FALSE --92.949669:-148.627142:-900.000000 --70.979669:-151.127142:-900.000000 +-88.563980:-171.286537:-900.000000 +-66.593980:-173.786537:-900.000000 FIN_BOX BOX creaMaracasVisu:ShowNPoints_Tools:Box52 ISEXEC:FALSE --48.321002:-133.648902:-900.000000 --25.886002:-136.148902:-900.000000 +-43.935313:-156.308297:-900.000000 +-21.500313:-158.808297:-900.000000 PORT Type:"120" FIN_BOX @@ -394,14 +306,14 @@ FIN_BOX BOX std:MultipleInputs:Box55 ISEXEC:FALSE --54.535637:-149.462814:-900.000000 --32.565637:-151.962814:-900.000000 +-50.149948:-172.122209:-900.000000 +-28.179948:-174.622209:-900.000000 FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box62 ISEXEC:FALSE --228.707140:-3.136982:-900.000000 --205.912140:-5.636982:-900.000000 +-236.876644:18.648362:-900.000000 +-214.081644:16.148362:-900.000000 PORT colorMesh:"1 1 0" FIN_BOX @@ -438,16 +350,16 @@ FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box72 ISEXEC:FALSE --180.819147:-56.018495:-900.000000 --158.024147:-58.518495:-900.000000 +-159.681275:-116.816080:-900.000000 +-136.886275:-119.316080:-900.000000 PORT colorMesh:"0 1 1" FIN_BOX BOX wx:LayoutLine:Box81 ISEXEC:FALSE --184.734921:-96.564525:-900.000000 --151.414921:-99.064525:-900.000000 +-172.674275:-146.634478:-900.000000 +-139.354275:-149.134478:-900.000000 PORT WinTitle:"Step 1. Surface" FIN_BOX @@ -466,32 +378,20 @@ FIN_BOX BOX wx:LayoutTab:Box86 ISEXEC:FALSE --57.013911:-62.286670:-900.000000 --23.693911:-64.786670:-900.000000 -FIN_BOX -BOX -wx:OutputText:Box87 -ISEXEC:FALSE --35.032220:-44.152050:-900.000000 --13.362220:-46.652050:-900.000000 -FIN_BOX -BOX -wx:OutputText:Box88 -ISEXEC:FALSE --31.367033:-49.235762:-900.000000 --9.697033:-51.735762:-900.000000 +6.177265:-64.532410:-900.000000 +39.497265:-67.032410:-900.000000 FIN_BOX BOX creaVtk:MeshManager:Box92 ISEXEC:FALSE --56.608588:-81.789032:-900.000000 --34.578588:-84.289032:-900.000000 +-52.953847:-93.118729:-900.000000 +-30.923847:-95.618729:-900.000000 FIN_BOX BOX creaVtk:MeshManager_tool:Box93 ISEXEC:FALSE --61.627153:-92.643884:-900.000000 --39.127153:-95.143884:-900.000000 +-57.972412:-103.973581:-900.000000 +-35.472412:-106.473581:-900.000000 PORT Tool:"35" FIN_BOX @@ -504,14 +404,14 @@ FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box96 ISEXEC:FALSE --157.021318:90.558496:-900.000000 --129.741318:88.058496:-900.000000 +-167.653292:103.516214:-900.000000 +-140.373292:101.016214:-900.000000 FIN_BOX BOX creaVtk:PolyDataNormals:Box97 ISEXEC:FALSE --88.026860:-72.332654:-900.000000 --65.731860:-74.832654:-900.000000 +-84.372119:-83.662351:-900.000000 +-62.077119:-86.162351:-900.000000 FIN_BOX BOX wx:LayoutLine:Box98 @@ -550,16 +450,16 @@ FIN_BOX BOX creaVtk:ImageThresholdConnectivity:Box102 ISEXEC:FALSE -31.204764:46.455184:-900.000000 -54.724764:43.955184:-900.000000 +19.177439:87.075774:-900.000000 +42.697439:84.575774:-900.000000 PORT Border:"50" FIN_BOX BOX vtk:ImageGaussianSmooth:Box103 ISEXEC:FALSE -31.504492:40.815310:-900.000000 -54.509492:38.315310:-900.000000 +19.477167:81.435900:-900.000000 +42.482167:78.935900:-900.000000 PORT StdDevX:"1.5" PORT @@ -570,8 +470,8 @@ FIN_BOX BOX vtk:MarchingCubes:Box104 ISEXEC:FALSE -27.716977:33.724598:-900.000000 -50.001977:31.224598:-900.000000 +15.689652:74.345188:-900.000000 +37.974652:71.845188:-900.000000 PORT BoxExecute:"Manual" PORT @@ -582,14 +482,16 @@ FIN_BOX BOX wx:LayoutLine:Box105 ISEXEC:FALSE --59.159812:50.914092:-900.000000 --25.839812:48.414092:-900.000000 +128.386195:58.791024:-900.000000 +161.706195:56.291024:-900.000000 +PORT +WinTitle:"1.2 Surface" FIN_BOX BOX creaMaracasVisu:SliderMinMax:Box106 ISEXEC:FALSE --94.715992:65.604586:-900.000000 --63.155992:63.104586:-900.000000 +92.830015:73.481518:-900.000000 +124.390015:70.981518:-900.000000 PORT InMax:"2000" PORT @@ -604,14 +506,14 @@ FIN_BOX BOX wx:Slider:Box107 ISEXEC:FALSE --57.454848:65.328785:-900.000000 --27.654848:62.828785:-900.000000 +130.091159:73.205717:-900.000000 +159.891159:70.705717:-900.000000 PORT In:"15" PORT Label:"true" PORT -Max:"20" +Max:"40" PORT Min:"0" PORT @@ -622,46 +524,32 @@ FIN_BOX BOX wx:CommandButton:Box108 ISEXEC:FALSE --21.958666:66.596984:-900.000000 -0.426334:64.096984:-900.000000 +165.587341:74.473916:-900.000000 +187.972341:71.973916:-900.000000 PORT Label:"Refresh" FIN_BOX BOX -wx:LayoutTab:Box109 +std:ConcatStrings:Box110 ISEXEC:FALSE --59.938192:45.177200:-900.000000 --26.618192:42.677200:-900.000000 +93.368742:67.099539:-900.000000 +116.128742:64.599539:-900.000000 PORT -WinTitle:"Threshold" +In2:" " FIN_BOX BOX -std:ConcatStrings:Box110 +std:MultipleInputs:Box111 ISEXEC:FALSE --94.177265:59.222607:-900.000000 --71.417265:56.722607:-900.000000 -PORT -In2:" " +-33.806521:38.765414:-900.000000 +-11.726521:36.265414:-900.000000 FIN_BOX -CONNECTIONS:134 -CONNECTION -Box06:LstContourPointsX:Box04:LstX -NumberOfControlPoints:0 -CONNECTION -showNpoints:lstIndexs:Box06:LstIndexsIn -NumberOfControlPoints:0 -CONNECTION -Box06:LstContourPointsY:Box04:LstY -NumberOfControlPoints:0 -CONNECTION -Box06:LstContourPointsZ:Box04:LstZ -NumberOfControlPoints:0 -CONNECTION -Box06:LstIndexsOut:Box04:LstIndexs -NumberOfControlPoints:0 -CONNECTION -showNpoints:lstIndexs:Box29:LstIndexsIn -NumberOfControlPoints:0 +BOX +std:MultipleInputs:Box112 +ISEXEC:FALSE +-124.029588:-67.860277:-900.000000 +-101.949588:-70.360277:-900.000000 +FIN_BOX +CONNECTIONS:113 CONNECTION Box31:BoxChange:Box11:BoxExecute NumberOfControlPoints:0 @@ -678,33 +566,6 @@ 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:Out:Box77:Operation NumberOfControlPoints:0 CONNECTION @@ -738,18 +599,9 @@ 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 -Box34:BoxChange:Box31:In2 -NumberOfControlPoints:0 -CONNECTION title:title:Box08:WinTitle NumberOfControlPoints:0 CONNECTION @@ -768,9 +620,6 @@ CONNECTION Box46:Out:Box45:MeshManagerModel NumberOfControlPoints:0 CONNECTION -Box49:OutString:Box06:NbPoints -NumberOfControlPoints:0 -CONNECTION Box42:BoxChange:Box51:BoxExecute NumberOfControlPoints:0 CONNECTION @@ -807,9 +656,6 @@ CONNECTION Box63:BoxChange:showNpoints:BoxExecute NumberOfControlPoints:0 CONNECTION -Box63:BoxChange:Box62:_execute -NumberOfControlPoints:0 -CONNECTION wxvtkbaseview2:wxvtkbaseview2:Box64:In NumberOfControlPoints:0 CONNECTION @@ -882,24 +728,9 @@ CONNECTION Box86:Widget:Box38:Widget2 NumberOfControlPoints:0 CONNECTION -Box50:Widget:Box86:Widget4 -NumberOfControlPoints:0 -CONNECTION showNpoints:Widget:Box86:Widget2 NumberOfControlPoints:0 CONNECTION -Box87:Widget:Box50:Widget8 -NumberOfControlPoints:0 -CONNECTION -Box88:Widget:Box50:Widget9 -NumberOfControlPoints:0 -CONNECTION -Box49:Widget:Box50:Widget2 -NumberOfControlPoints:0 -CONNECTION -Box34:Widget:Box50:Widget4 -NumberOfControlPoints:0 -CONNECTION Box57:BoxChange:Box08:BoxExecute NumberOfControlPoints:0 CONNECTION @@ -927,9 +758,6 @@ CONNECTION Box92:MeshBase:Box37:polydata NumberOfControlPoints:0 CONNECTION -Box37:boxchange:Box72:_execute -NumberOfControlPoints:0 -CONNECTION Box81:Widget:Box08:Widget2 NumberOfControlPoints:0 CONNECTION @@ -1026,12 +854,6 @@ CONNECTION Box108:Widget:Box105:Widget4 NumberOfControlPoints:0 CONNECTION -Box105:Widget:Box109:Widget1 -NumberOfControlPoints:0 -CONNECTION -Box109:Widget:Box81:Widget3 -NumberOfControlPoints:0 -CONNECTION Box106:OutStart:Box110:In1 NumberOfControlPoints:0 CONNECTION @@ -1046,4 +868,25 @@ NumberOfControlPoints:0 CONNECTION Box104:BoxChange:Box31:BoxExecute NumberOfControlPoints:0 +CONNECTION +Box105:Widget:Box86:Widget5 +NumberOfControlPoints:0 +CONNECTION +Box63:BoxChange:Box111:In1 +NumberOfControlPoints:0 +CONNECTION +Box31:BoxChange:Box111:In3 +NumberOfControlPoints:0 +CONNECTION +Box111:BoxChange:Box62:_execute +NumberOfControlPoints:0 +CONNECTION +Box63:BoxChange:Box112:In1 +NumberOfControlPoints:0 +CONNECTION +Box37:boxchange:Box112:In3 +NumberOfControlPoints:0 +CONNECTION +Box112:BoxChange:Box72:_execute +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs index 7513f99..40a033d 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs @@ -1,15 +1,15 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box) -# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs # ---------------------------------- include std include itkvtk include creaMaracasVisu -include creaVtk include wx include vtk include std +include creaVtk define Mesh_tool_ApplyThresholdConnectivity creaMaracasVisu @@ -21,15 +21,7 @@ category "demo" new creaMaracasVisu:ShowNPoints showNpoints set showNpoints.Radio "2" set showNpoints.Type "3" - set showNpoints.WinTitle "1.1 Splines" - -new creaVtk:CreateMeshFromPoints Box04 - -new creaMaracasVisu:ManualContourModel_Box Box06 - set Box06.DoubleContour "1" - set Box06.NbPoints "100" - set Box06.OpenClose "true" - set Box06.OpenClose2 "false" + set showNpoints.WinTitle "1.1 Points" new wx:LayoutLine Box08 @@ -38,11 +30,6 @@ new vtk:UpdateRender Box11 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" @@ -62,9 +49,6 @@ new creaMaracasVisu:ShowNPoints_Tools Box60 new vtk:ImageVtkProperties Box68 -new std:VectorFilterDouble Box70 - set Box70.Type "11" - new creaVtk:BooleanOperationPolyDataFilter Box77 set Box77.BoxProcessMode "Manual" set Box77.ReorientDifferenceCells "false" @@ -87,24 +71,13 @@ 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 "Splines Opacity" - -new std:Div Box36 - set Box36.In2 "100" - new creaMaracasVisu:PolyDataToActor_Widget Box37 set Box37.color "0 1 1" set Box37.meshOpacity "100" new wx:LayoutLine Box38 set Box38.Orientation "H" - set Box38.WinTitle "Interpolated Surface (Yellow)" + set Box38.WinTitle "Threshold Surface (Yellow)" new wx:LayoutTab Box39 @@ -125,15 +98,6 @@ new creaVtk:MeshManager_tool Box45 new std:MagicBox Box46 -new wx:ComboBox Box49 - set Box49.In "25 50 100 150" - set Box49.Selection "1" - set Box49.Title "Number of Points" - -new wx:LayoutLine Box50 - set Box50.Orientation "V" - set Box50.WinTitle "Config" - new std:MultipleInputs Box51 new creaMaracasVisu:ShowNPoints_Tools Box52 @@ -168,10 +132,6 @@ new wx:OutputText Box84 new wx:LayoutTab Box86 -new wx:OutputText Box87 - -new wx:OutputText Box88 - new creaVtk:MeshManager Box92 new creaVtk:MeshManager_tool Box93 @@ -210,6 +170,7 @@ new vtk:MarchingCubes Box104 set Box104.Value "128" new wx:LayoutLine Box105 + set Box105.WinTitle "1.2 Surface" new creaMaracasVisu:SliderMinMax Box106 set Box106.InMax "2000" @@ -221,7 +182,7 @@ new creaMaracasVisu:SliderMinMax Box106 new wx:Slider Box107 set Box107.In "15" set Box107.Label "true" - set Box107.Max "20" + set Box107.Max "40" set Box107.Min "0" set Box107.ReactiveOnTrack "true" set Box107.Title "Border" @@ -229,33 +190,19 @@ new wx:Slider Box107 new wx:CommandButton Box108 set Box108.Label "Refresh" -new wx:LayoutTab Box109 - set Box109.WinTitle "Threshold" - new std:ConcatStrings Box110 set Box110.In2 " " +new std:MultipleInputs Box111 + +new std:MultipleInputs Box112 + -connect Box06.LstContourPointsX Box04.LstX -connect showNpoints.lstIndexs Box06.LstIndexsIn -connect Box06.LstContourPointsY Box04.LstY -connect Box06.LstContourPointsZ Box04.LstZ -connect Box06.LstIndexsOut Box04.LstIndexs -connect showNpoints.lstIndexs Box29.LstIndexsIn connect Box31.BoxChange Box11.BoxExecute connect Box58.Out Box57.In 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.Out Box77.Operation connect Box66.Out Box11.Renderer connect Box66.Out showNpoints.Renderer @@ -263,15 +210,11 @@ connect Box67.Out Box77.In1 connect Box66.Out Box48.render 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 Box34.BoxChange Box31.In2 connect Box66.Out Box37.render connect Box38.Widget Box39.Widget2 connect Box79.Widget Box40.Widget2 connect Box46.Out Box45.MeshManagerModel -connect Box49.OutString Box06.NbPoints connect Box42.BoxChange Box51.BoxExecute connect Box45.BoxChange Box51.In2 connect Box52.BoxChange Box51.In4 @@ -283,7 +226,6 @@ connect Box43.BoxChange Box55.BoxExecute connect Box52.BoxChange Box55.In2 connect Box43.BoxChange Box53.In6 connect Box63.BoxChange showNpoints.BoxExecute -connect Box63.BoxChange Box62._execute connect Box64.Out Box57.wxVtkBaseView2 connect Box64.Out Box62._wxvtkbaseview2D1 connect Box65.Out Box57.wxVtkBaseView3 @@ -304,18 +246,12 @@ connect Box44.Widget Box82.Widget2 connect Box82.Widget Box79.Widget2 connect Box84.Widget Box44.Widget9 connect Box86.Widget Box38.Widget2 -connect Box50.Widget Box86.Widget4 connect showNpoints.Widget Box86.Widget2 -connect Box87.Widget Box50.Widget8 -connect Box88.Widget Box50.Widget9 -connect Box49.Widget Box50.Widget2 -connect Box34.Widget Box50.Widget4 connect Box57.BoxChange Box08.BoxExecute connect Box92.MeshManagerModel Box93.MeshManagerModel connect Box77.BoxChange Box93.BoxExecute connect Box92.MeshBase Box72._polydata connect Box92.MeshBase Box37.polydata -connect Box37.boxchange Box72._execute connect Box81.Widget Box08.Widget2 connect Box42.Widget Box44.Widget6 connect Box94.BoxChange Box37.boxexecute @@ -348,13 +284,18 @@ connect Box106.Widget Box105.Widget2 connect Box107.Out Box102.Border connect Box107.Widget Box105.Widget3 connect Box108.Widget Box105.Widget4 -connect Box105.Widget Box109.Widget1 -connect Box109.Widget Box81.Widget3 connect Box106.OutStart Box110.In1 connect Box106.OutEnd Box110.In3 connect Box110.Out Box102.Threshold connect Box108.BoxChange Box104.BoxExecute connect Box104.BoxChange Box31.BoxExecute +connect Box105.Widget Box86.Widget5 +connect Box63.BoxChange Box111.In1 +connect Box31.BoxChange Box111.In3 +connect Box111.BoxChange Box62._execute +connect Box63.BoxChange Box112.In1 +connect Box37.boxchange Box112.In3 +connect Box112.BoxChange Box72._execute # Complex input ports input point showNpoints.In " " diff --git a/bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx b/bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx index eef262f..f6068c1 100644 --- a/bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx +++ b/bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx @@ -19,7 +19,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints_Tools,bbtk::AtomicBlackBox); void ShowNPoints_Tools::NearestPointToMesh( vtkPoints *points,vtkStaticPointLocator *pointLocator,double *spc,double *p,double *pM) { - p[0] = p[0] * spc[0]; p[1] = p[1] * spc[1]; p[2] = p[2] * spc[2]; @@ -42,10 +41,8 @@ void ShowNPoints_Tools::CreatePatch_3points() void ShowNPoints_Tools::CreatePatch_4points() { WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints(); - wsp->StopAutoAddPoints(); wsp->StopTrackPoint(); - if ( (wsp->GetLstModelShowNPointsSize()==1) && (wsp->GetModelShowNPoints()->GetLstPointsSize()==4) && (bbGetInputMesh()!=NULL ) ) @@ -59,19 +56,16 @@ void ShowNPoints_Tools::CreatePatch_4points() vtkStaticPointLocator *pointLocator = vtkStaticPointLocator::New(); pointLocator->SetDataSet( bbGetInputMesh() ); pointLocator->BuildLocator(); - wsp->StopTrackPoint(); double p[3],pM[3]; double dx,dy,dz,s; std::vector lstX = wsp->GetModelShowNPoints()->GetLstPointsX(); std::vector lstY = wsp->GetModelShowNPoints()->GetLstPointsY(); std::vector lstZ = wsp->GetModelShowNPoints()->GetLstPointsZ(); - wsp->ErasePoint( 0 ); wsp->ErasePoint( 0 ); wsp->ErasePoint( 0 ); wsp->ErasePoint( 0 ); - // --- Group 0 --- dx = lstX[1]-lstX[0]; dy = lstY[1]-lstY[0]; @@ -150,7 +144,6 @@ void ShowNPoints_Tools::CreatePatch_4points() pointLocator->Delete(); - // Check normals // 1. Recorrer las normales de lstIdNormals y calcular el promedio -> V1 double *nValue; @@ -172,7 +165,6 @@ void ShowNPoints_Tools::CreatePatch_4points() n1[1] = n1[1]/size; n1[2] = n1[2]/size; - // 2. Calcular el promedio de 4 normales de la nueva superficie -> V2 double pC[3]; double pM1[3]; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx index 400838c..5574c86 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx @@ -249,10 +249,10 @@ sizer0->Add(sizer5); if ( (mtype==0) || (mtype==3) ) { - wxFlexGridSizer *sizer5 = new wxFlexGridSizer(2); + wxFlexGridSizer *sizer5 = new wxFlexGridSizer(1); sizer5->Add(txRadio); - sizer5->Add(txOpacity); sizer5->Add(sdrRadio,1,wxGROW ); + sizer5->Add(txOpacity); sizer5->Add(sdrOpacity,1,wxGROW ); sizer0->Add(sizer5); } // if mtype 0 3 @@ -1224,8 +1224,8 @@ void WidgetShowNPoints::RefreshCollectionText() wxString strTmp; strTmp.Printf(_T("%d / %d "), (int)mActualCollection+1, (int)lstModelShowNPoints.size() ); txtNrCollections->SetLabel( strTmp ); - SetOutputBox(); } // if mtype 4 + SetOutputBox(); } -- 2.47.1