From 7ab36668fbb2063eaf14b89ecf803ff24c1d9b12 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 28 Jul 2016 15:20:20 +0200 Subject: [PATCH 1/1] 2999CreaMiniToolsFeatureNewNormalcrop-viewer-widget-manaul --- .../bbs/appli/viewerNVExample.bbg | 44 ++++--- .../bbs/appli/viewerNVExample.bbs | 22 ++-- .../bbs/boxes/crop-viewer-widget-manual.bbg | 38 +++--- .../bbs/boxes/crop-viewer-widget.bbg | 114 ++++++++++-------- .../bbs/boxes/crop-viewer-widget.bbs | 24 ++-- 5 files changed, 135 insertions(+), 107 deletions(-) diff --git a/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbg b/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbg index c6d1feb..9c6c102 100755 --- a/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbg +++ b/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbg @@ -151,14 +151,14 @@ FIN_BOX BOX vtk:LoadHola:Box26 ISEXEC:FALSE --86.603558:156.948489:-900.000000 --41.028558:146.948489:-900.000000 +-82.733089:161.786575:-900.000000 +-37.158089:151.786575:-900.000000 FIN_BOX BOX std:MultipleInputs:Box34 ISEXEC:FALSE -23.509727:-94.029608:-900.000000 -69.084727:-104.029608:-900.000000 +-28.171891:-99.413110:-900.000000 +17.403109:-109.413110:-900.000000 FIN_BOX BOX wx:LayoutTab:Box36 @@ -222,13 +222,15 @@ ISEXEC:FALSE -252.852156:3.171851:-900.000000 -201.452156:-6.828149:-900.000000 PORT +ChangeResolution:"true" +PORT In:"0" PORT Label:"true" PORT -Max:"2000" +Max:"1000" PORT -Min:"-2000" +Min:"-1000" PORT ReactiveOnTrack:"true" PORT @@ -240,13 +242,15 @@ ISEXEC:FALSE -228.513959:18.615970:-900.000000 -177.113959:8.615970:-900.000000 PORT +ChangeResolution:"true" +PORT In:"0" PORT Label:"true" PORT -Max:"2000" +Max:"1000" PORT -Min:"-2000" +Min:"-1000" PORT ReactiveOnTrack:"true" PORT @@ -255,8 +259,8 @@ FIN_BOX BOX wx:Slider:Box80 ISEXEC:FALSE --191.021078:3.992223:-900.000000 --139.621078:-6.007777:-900.000000 +-191.379978:3.992223:-900.000000 +-139.979978:-6.007777:-900.000000 PORT ChangeResolution:"true" PORT @@ -264,9 +268,9 @@ In:"0" PORT Label:"true" PORT -Max:"2000" +Max:"1000" PORT -Min:"-2000" +Min:"-1000" PORT ReactiveOnTrack:"true" PORT @@ -293,8 +297,8 @@ FIN_BOX BOX std:MathOperationVector:Box87 ISEXEC:FALSE --153.040843:-77.209071:-900.000000 --81.865843:-87.209071:-900.000000 +-152.877707:-84.484955:-900.000000 +-81.702707:-94.484955:-900.000000 FIN_BOX BOX creaMiniTools:crop-viewer-widget:Box88 @@ -432,9 +436,6 @@ CONNECTION Box75:Widget:Box11:Widget3 NumberOfControlPoints:0 CONNECTION -Box26:Out:Box24:In -NumberOfControlPoints:0 -CONNECTION Box78:Widget:Box77:Widget1 NumberOfControlPoints:0 CONNECTION @@ -468,9 +469,6 @@ CONNECTION Box01:Point:Box87:In1 NumberOfControlPoints:0 CONNECTION -Box50:Out:Box34:In2 -NumberOfControlPoints:0 -CONNECTION Box01:Renderer1:Box88:renderer NumberOfControlPoints:0 CONNECTION @@ -548,4 +546,10 @@ NumberOfControlPoints:0 CONNECTION Box91:BoxChange:Box34:In3 NumberOfControlPoints:0 +CONNECTION +Box50:BoxChange:Box34:In2 +NumberOfControlPoints:0 +CONNECTION +Box00:Out:Box24:In +NumberOfControlPoints:0 APP_END diff --git a/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbs b/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbs index af89a1a..b6d8886 100755 --- a/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbs +++ b/bbtk_package_creaMiniTools/bbs/appli/viewerNVExample.bbs @@ -100,18 +100,20 @@ new wx:LayoutLine Box77 set Box77.Orientation "H" new wx:Slider Box78 + set Box78.ChangeResolution "true" set Box78.In "0" set Box78.Label "true" - set Box78.Max "2000" - set Box78.Min "-2000" + set Box78.Max "1000" + set Box78.Min "-1000" set Box78.ReactiveOnTrack "true" set Box78.Title "delta X" new wx:Slider Box79 + set Box79.ChangeResolution "true" set Box79.In "0" set Box79.Label "true" - set Box79.Max "2000" - set Box79.Min "-2000" + set Box79.Max "1000" + set Box79.Min "-1000" set Box79.ReactiveOnTrack "true" set Box79.Title "delta Y" @@ -119,8 +121,8 @@ new wx:Slider Box80 set Box80.ChangeResolution "true" set Box80.In "0" set Box80.Label "true" - set Box80.Max "2000" - set Box80.Min "-2000" + set Box80.Max "1000" + set Box80.Min "-1000" set Box80.ReactiveOnTrack "true" set Box80.Title "delta Z" @@ -212,8 +214,6 @@ connect Box74.widget Box75.Widget1 connect Box75.Widget Box11.Widget3 -connect Box26.Out Box24.In - connect Box78.Widget Box77.Widget1 connect Box79.Widget Box77.Widget2 @@ -236,8 +236,6 @@ connect Box86.Out Box87.In0 connect Box01.Point Box87.In1 -connect Box50.Out Box34.In2 - connect Box01.Renderer1 Box88.renderer connect Box23.Out Box88.size @@ -290,6 +288,10 @@ connect Box80.BoxChange Box91.In3 connect Box91.BoxChange Box34.In3 +connect Box50.BoxChange Box34.In2 + +connect Box00.Out Box24.In + # Complex input ports diff --git a/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget-manual.bbg b/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget-manual.bbg index 742212e..ff82c8f 100644 --- a/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget-manual.bbg +++ b/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget-manual.bbg @@ -18,23 +18,23 @@ FIN_COMPLEX_PORT COMPLEXINPUTS:5 COMPLEX_PORT _title --36.651464:167.150712:-900.000000 +68.758033:71.780215:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT _size --65.931745:166.765222:-900.000000 +26.301565:73.904475:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT _renderer --99.943564:166.351469:-900.000000 +0.446433:73.490722:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT _position --145.279212:165.352495:-900.000000 +-26.066091:71.864310:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT _execute --169.125433:164.442652:-900.000000 +97.535496:66.562405:-900.000000 FIN_COMPLEX_PORT BOXES:16 BOX @@ -52,22 +52,22 @@ FIN_BOX BOX wx:OutputText:Box48 ISEXEC:FALSE -399.208097:-52.527858:-900.000000 -444.783097:-62.527858:-900.000000 +340.228974:-88.919232:-900.000000 +385.803974:-98.919232:-900.000000 PORT In:"Drop your *.MHD file here!" FIN_BOX BOX wx:OutputText:Box49 ISEXEC:FALSE -312.616841:-0.759770:-900.000000 -358.191841:-10.759770:-900.000000 +312.971013:-0.405598:-900.000000 +358.546013:-10.405598:-900.000000 FIN_BOX BOX wx:LayoutLine:Box52 ISEXEC:FALSE -315.908353:-120.866096:-900.000000 -373.468353:-130.866096:-900.000000 +259.438980:-128.395346:-900.000000 +316.998980:-138.395346:-900.000000 PORT WinTitle:"Image A" FIN_BOX @@ -84,8 +84,8 @@ FIN_BOX BOX creaImageIO:ImagesChooserDialogBox:Box58 ISEXEC:FALSE -411.972303:58.695318:-900.000000 -483.147303:48.695318:-900.000000 +411.618131:59.049490:-900.000000 +482.793131:49.049490:-900.000000 PORT BoxProcessMode:"Manual" PORT @@ -94,8 +94,8 @@ FIN_BOX BOX wx:CommandButton:Box59 ISEXEC:FALSE -379.620954:94.019278:-900.000000 -425.195954:84.019278:-900.000000 +379.620954:93.746013:-900.000000 +425.195954:83.746013:-900.000000 PORT Label:"Load Image" FIN_BOX @@ -120,8 +120,8 @@ FIN_BOX BOX wx:LayoutLine:Box64 ISEXEC:FALSE -360.112523:-92.633715:-900.000000 -417.672523:-102.633715:-900.000000 +307.407775:-107.064777:-900.000000 +364.967775:-117.064777:-900.000000 PORT Orientation:"H" FIN_BOX @@ -152,8 +152,8 @@ FIN_BOX BOX std:MultipleInputs:Box15 ISEXEC:FALSE -181.341066:-78.685848:-900.000000 -226.916066:-88.685848:-900.000000 +181.695238:-78.685848:-900.000000 +227.270238:-88.685848:-900.000000 FIN_BOX CONNECTIONS:29 CONNECTION diff --git a/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbg b/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbg index 7e2d2af..0bf98ae 100644 --- a/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbg +++ b/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbg @@ -30,7 +30,7 @@ image FIN_COMPLEX_PORT COMPLEX_PORT position -40.901574:-16.489887:-900.000000 +-52.531103:-17.676334:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT size @@ -40,18 +40,18 @@ COMPLEX_PORT title 167.087228:-19.215667:-900.000000 FIN_COMPLEX_PORT -BOXES:16 +BOXES:17 BOX vtk:ExtractVtkImageFilter:Box22 ISEXEC:FALSE -12.947100:-159.196100:-900.000000 -84.122100:-169.196100:-900.000000 +-9.595387:-168.391062:-900.000000 +61.579613:-178.391062:-900.000000 FIN_BOX BOX vtk:VolumeRenderer:Box29 ISEXEC:FALSE -9.708222:-280.850162:-900.000000 -55.283222:-290.850162:-900.000000 +17.113639:-274.410669:-900.000000 +62.688639:-284.410669:-900.000000 FIN_BOX BOX creaVtk:Actor:Box30 @@ -64,8 +64,8 @@ FIN_BOX BOX creaMaracasVisu:TransferFunctionView:Box31 ISEXEC:FALSE -46.335305:-245.397816:-900.000000 -117.510305:-255.397816:-900.000000 +59.038668:-244.109917:-900.000000 +130.213668:-254.109917:-900.000000 FIN_BOX BOX wx:LayoutLine:Box32 @@ -84,20 +84,22 @@ FIN_BOX BOX std:MultipleInputs:Box34 ISEXEC:FALSE -108.182051:-127.242714:-900.000000 -153.757051:-137.242714:-900.000000 +114.972860:-123.094058:-900.000000 +160.547860:-133.094058:-900.000000 FIN_BOX BOX wxvtk:IsoSurfaceWidget:Box35 ISEXEC:FALSE -111.025183:-343.234341:-900.000000 -156.600183:-353.234341:-900.000000 +111.610591:-336.502144:-900.000000 +157.185591:-346.502144:-900.000000 +PORT +Colour:"1 0 0" FIN_BOX BOX std:MathOperationVector:Box54 ISEXEC:FALSE --46.375674:-89.238759:-900.000000 -24.799326:-99.238759:-900.000000 +-45.189227:-90.476684:-900.000000 +25.985773:-100.476684:-900.000000 PORT In1:"-2 -2 -2" PORT @@ -106,24 +108,24 @@ FIN_BOX BOX std:MathOperationVector:Box56 ISEXEC:FALSE --38.438797:-116.012843:-900.000000 -32.736203:-126.012843:-900.000000 +-70.769469:-115.123008:-900.000000 +0.405531:-125.123008:-900.000000 PORT In1:"-2 -2 -2" FIN_BOX BOX creaMaracasVisu:ImageChangeInformation:Box69 ISEXEC:FALSE -51.949681:-183.190158:-900.000000 -123.124681:-193.190158:-900.000000 +41.265977:-189.483299:-900.000000 +112.440977:-199.483299:-900.000000 PORT NewSpacing:"1 1 1" FIN_BOX BOX wx:RadioButton:Box83 ISEXEC:FALSE -76.570723:-81.212597:-900.000000 -140.290723:-91.212597:-900.000000 +75.985315:-81.505301:-900.000000 +139.705315:-91.505301:-900.000000 PORT In0:"Open" PORT @@ -132,18 +134,12 @@ FIN_BOX BOX std:MathOperation:Box84 ISEXEC:FALSE -48.074061:-123.305171:-900.000000 -93.649061:-133.305171:-900.000000 +51.001103:-133.257114:-900.000000 +96.576103:-143.257114:-900.000000 PORT In2:"-1" FIN_BOX BOX -vtk:CleanExternalPlane:Box85 -ISEXEC:FALSE -75.444666:-210.255607:-900.000000 -121.019666:-220.255607:-900.000000 -FIN_BOX -BOX std:MagicBox:Box88 ISEXEC:FALSE 205.000453:-205.651384:-900.000000 @@ -152,10 +148,24 @@ FIN_BOX BOX std:MagicBox:Box89 ISEXEC:FALSE --30.073336:-60.226027:-900.000000 -15.501664:-70.226027:-900.000000 +-9.903742:-60.522639:-900.000000 +35.671258:-70.522639:-900.000000 +FIN_BOX +BOX +wx:OutputText:Box20 +ISEXEC:FALSE +-53.912867:-228.214411:-900.000000 +-8.337867:-238.214411:-900.000000 +FIN_BOX +BOX +vtk:CleanExternalPlane:Box23 +ISEXEC:FALSE +73.843095:-224.062944:-900.000000 +119.418095:-234.062944:-900.000000 +PORT +BoxProcessMode:"Always" FIN_BOX -CONNECTIONS:35 +CONNECTIONS:37 CONNECTION Box31:Active:Box30:Active NumberOfControlPoints:0 @@ -187,9 +197,6 @@ CONNECTION Box56:Out:Box22:Index NumberOfControlPoints:0 CONNECTION -Box22:Out:Box69:In -NumberOfControlPoints:0 -CONNECTION Box35:Widget:Box32:Widget3 NumberOfControlPoints:0 CONNECTION @@ -202,15 +209,6 @@ CONNECTION Box83:Out:Box84:In1 NumberOfControlPoints:0 CONNECTION -Box69:Out:Box85:In -NumberOfControlPoints:0 -CONNECTION -Box85:Out:Box31:In -NumberOfControlPoints:0 -CONNECTION -Box84:Out:Box85:Type -NumberOfControlPoints:0 -CONNECTION Box34:BoxChange:Box22:BoxExecute NumberOfControlPoints:0 CONNECTION @@ -229,9 +227,6 @@ CONNECTION box_Execute:box_Execute:Box34:In1 NumberOfControlPoints:0 CONNECTION -image:image:Box22:In -NumberOfControlPoints:0 -CONNECTION position:position:Box56:In0 NumberOfControlPoints:0 CONNECTION @@ -253,12 +248,33 @@ CONNECTION Box83:BoxChange:Box34:In2 NumberOfControlPoints:0 CONNECTION -Box34:BoxChange:Box85:BoxExecute +Box34:BoxChange:Box35:BoxExecute NumberOfControlPoints:0 CONNECTION -Box85:Out:Box35:In +image:image:Box22:In NumberOfControlPoints:0 CONNECTION -Box34:BoxChange:Box35:BoxExecute +Box34:BoxChange:Box20:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box84:Out:Box20:In +NumberOfControlPoints:0 +CONNECTION +Box20:Widget:Box32:Widget4 +NumberOfControlPoints:0 +CONNECTION +Box84:Out:Box23:Type +NumberOfControlPoints:0 +CONNECTION +Box34:BoxChange:Box23:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box23:Out:Box31:In +NumberOfControlPoints:0 +CONNECTION +Box22:Out:Box23:In +NumberOfControlPoints:0 +CONNECTION +Box23:Out:Box35:In NumberOfControlPoints:0 APP_END diff --git a/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbs b/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbs index 6aabbb9..ea159d6 100644 --- a/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbs +++ b/bbtk_package_creaMiniTools/bbs/boxes/crop-viewer-widget.bbs @@ -36,6 +36,7 @@ new vtk:UpdateRender Box33 new std:MultipleInputs Box34 new wxvtk:IsoSurfaceWidget Box35 + set Box35.Colour "1 0 0" new std:MathOperationVector Box54 set Box54.In1 "-2 -2 -2" @@ -54,12 +55,15 @@ new wx:RadioButton Box83 new std:MathOperation Box84 set Box84.In2 "-1" -new vtk:CleanExternalPlane Box85 - new std:MagicBox Box88 new std:MagicBox Box89 +new wx:OutputText Box20 + +new vtk:CleanExternalPlane Box23 + set Box23.BoxProcessMode "Always" + connect Box31.Active Box30.Active connect Box31.OpacityFunction Box29.OpacityFunction @@ -71,14 +75,10 @@ connect Box34.BoxChange Box29.BoxExecute connect Box22.Out Box29.In connect Box54.Out Box56.In1 connect Box56.Out Box22.Index -connect Box22.Out Box69.In connect Box35.Widget Box32.Widget3 connect Box31.Widget Box32.Widget2 connect Box83.Widget Box32.Widget1 connect Box83.Out Box84.In1 -connect Box69.Out Box85.In -connect Box85.Out Box31.In -connect Box84.Out Box85.Type connect Box34.BoxChange Box22.BoxExecute connect Box88.Out Box35.vtkRenderer connect Box88.Out Box30.Renderer @@ -86,17 +86,23 @@ connect Box88.Out Box33.Renderer connect Box89.Out Box54.In0 connect Box89.Out Box22.Size connect Box83.BoxChange Box34.In2 -connect Box34.BoxChange Box85.BoxExecute -connect Box85.Out Box35.In connect Box34.BoxChange Box35.BoxExecute +connect Box34.BoxChange Box20.BoxExecute +connect Box84.Out Box20.In +connect Box20.Widget Box32.Widget4 +connect Box84.Out Box23.Type +connect Box34.BoxChange Box23.BoxExecute +connect Box23.Out Box31.In +connect Box22.Out Box23.In +connect Box23.Out Box35.In # Complex input ports input renderer Box88.In " " input box_Execute Box34.In1 " " -input image Box22.In " " input position Box56.In0 " " input size Box89.In " " input title Box32.WinTitle " " +input image Box22.In " " # Complex output ports output widget Box32.Widget " " -- 2.46.2