From: eduardo.davila@creatis.insa-lyon.fr Date: Tue, 23 Apr 2024 11:03:15 +0000 (+0200) Subject: #3471 Add manual option to CompareImageSwitcherWidget X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b5ce366f3f04b6c97e5b429a6d9106aa32cc4f9f;p=creaRigidRegistration.git #3471 Add manual option to CompareImageSwitcherWidget --- diff --git a/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbg b/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbg index 2cc6c5c..6eb1472 100644 --- a/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbg +++ b/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbg @@ -29,18 +29,20 @@ COMPLEX_PORT windowcolorlevel 26.116036:118.799900:-900.000000 FIN_COMPLEX_PORT -BOXES:47 +BOXES:60 BOX PackRecalage:ImageSwitcherBox:switch ISEXEC:FALSE -35.808314:39.559590:-900.000000 -60.328314:37.059590:-900.000000 +17.204325:54.153237:-900.000000 +41.724325:51.653237:-900.000000 +PORT +Title:"200" FIN_BOX BOX wx:CheckBox:checkS ISEXEC:FALSE -99.970091:48.296279:-900.000000 -121.755091:45.796279:-900.000000 +107.667949:73.655113:-900.000000 +129.452949:71.155113:-900.000000 PORT In:"true" PORT @@ -49,14 +51,14 @@ FIN_BOX BOX wx:Slider:sdrT ISEXEC:FALSE -56.777333:48.066658:-900.000000 -86.577333:45.566658:-900.000000 +26.064277:72.980860:-900.000000 +55.864277:70.480860:-900.000000 PORT In:"500" PORT Max:"1000" PORT -Min:"0" +Min:"200" PORT ReactiveOnTrack:"True" FIN_BOX @@ -115,16 +117,16 @@ FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box19 ISEXEC:FALSE --138.982871:97.038762:-900.000000 --115.147871:94.538762:-900.000000 +-155.694844:97.038762:-900.000000 +-131.859844:94.538762:-900.000000 PORT I:"1" FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box21 ISEXEC:FALSE --124.050297:90.126201:-900.000000 --100.215297:87.626201:-900.000000 +-140.762270:90.126201:-900.000000 +-116.927270:87.626201:-900.000000 PORT I:"1" FIN_BOX @@ -157,16 +159,16 @@ FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box26 ISEXEC:FALSE --207.179942:93.857994:-900.000000 --183.344942:91.357994:-900.000000 +-280.873704:87.012125:-900.000000 +-257.038704:84.512125:-900.000000 PORT I:"0" FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box27 ISEXEC:FALSE --175.213103:88.435397:-900.000000 --151.378103:85.935397:-900.000000 +-255.551384:82.797623:-900.000000 +-231.716384:80.297623:-900.000000 PORT I:"0" FIN_BOX @@ -347,8 +349,8 @@ FIN_BOX BOX wx:CheckBox:Box64 ISEXEC:FALSE -126.816162:48.316211:-900.000000 -148.446162:45.816211:-900.000000 +134.633997:74.683788:-900.000000 +156.263997:72.183788:-900.000000 PORT In:"true" PORT @@ -357,24 +359,118 @@ FIN_BOX BOX std:MultipleInputs:Box65 ISEXEC:FALSE --114.976662:-4.084889:-900.000000 --93.006662:-6.584889:-900.000000 +-113.869242:-6.078245:-900.000000 +-91.899242:-8.578245:-900.000000 FIN_BOX BOX std:MultipleInputs:Box66 ISEXEC:FALSE --11.875208:27.305416:-900.000000 -10.094792:24.805416:-900.000000 +28.760696:25.841059:-900.000000 +50.730696:23.341059:-900.000000 FIN_BOX BOX wx:CommandButton:Box67 ISEXEC:FALSE -114.591980:18.682653:-900.000000 -136.866980:16.182653:-900.000000 +49.245053:54.559397:-900.000000 +71.520053:52.059397:-900.000000 PORT Label:"Switch" FIN_BOX -CONNECTIONS:75 +BOX +vtk:AddImageToVector:Box70 +ISEXEC:FALSE +-268.739369:73.708456:-900.000000 +-244.219369:71.208456:-900.000000 +FIN_BOX +BOX +vtk:GetVectorVtkImageDataElement:Box72 +ISEXEC:FALSE +-276.390634:35.452131:-900.000000 +-252.555634:32.952131:-900.000000 +FIN_BOX +BOX +std:StringSelect:Box73 +ISEXEC:FALSE +-94.572419:67.063936:-900.000000 +-70.052419:64.563936:-900.000000 +PORT +In0:"0 1" +PORT +In1:"0 0" +PORT +In2:"1 1" +FIN_BOX +BOX +wx:RadioButton:Box74 +ISEXEC:FALSE +66.506842:73.507107:-900.000000 +103.346842:71.007107:-900.000000 +PORT +In0:"A B" +PORT +In1:"A A" +PORT +In2:"B B" +FIN_BOX +BOX +std:GetVectorIntElement:Box75 +ISEXEC:FALSE +-104.841221:61.224813:-900.000000 +-82.181221:58.724813:-900.000000 +PORT +I:"0" +FIN_BOX +BOX +vtk:GetVectorVtkImageDataElement:Box76 +ISEXEC:FALSE +-239.839538:35.411659:-900.000000 +-216.004538:32.911659:-900.000000 +FIN_BOX +BOX +std:GetVectorIntElement:Box77 +ISEXEC:FALSE +-75.538692:61.184341:-900.000000 +-52.878692:58.684341:-900.000000 +PORT +I:"1" +FIN_BOX +BOX +vtk:AddImageToVector:Box84 +ISEXEC:FALSE +-162.521492:77.292267:-900.000000 +-138.001492:74.792267:-900.000000 +FIN_BOX +BOX +vtk:GetVectorVtkImageDataElement:Box85 +ISEXEC:FALSE +-170.172757:39.035942:-900.000000 +-146.337757:36.535942:-900.000000 +FIN_BOX +BOX +vtk:GetVectorVtkImageDataElement:Box88 +ISEXEC:FALSE +-133.621661:38.995470:-900.000000 +-109.786661:36.495470:-900.000000 +FIN_BOX +BOX +vtk:AddImageToVector:Box90 +ISEXEC:FALSE +-62.344088:78.057191:-900.000000 +-37.824088:75.557191:-900.000000 +FIN_BOX +BOX +vtk:GetVectorVtkImageDataElement:Box91 +ISEXEC:FALSE +-69.995353:39.800866:-900.000000 +-46.160353:37.300866:-900.000000 +FIN_BOX +BOX +vtk:GetVectorVtkImageDataElement:Box94 +ISEXEC:FALSE +-33.444256:39.760394:-900.000000 +-9.609256:37.260394:-900.000000 +FIN_BOX +CONNECTIONS:97 CONNECTION checkS:Out:switch:On NumberOfControlPoints:0 @@ -418,24 +514,6 @@ CONNECTION Box23:Out:Box21:In NumberOfControlPoints:0 CONNECTION -Box19:Out:Box17:In1 -NumberOfControlPoints:0 -CONNECTION -Box21:Out:Box17:In2 -NumberOfControlPoints:0 -CONNECTION -Box26:Out:Box25:In1 -NumberOfControlPoints:0 -CONNECTION -Box27:Out:Box25:In2 -NumberOfControlPoints:0 -CONNECTION -Box31:Out:Box30:In1 -NumberOfControlPoints:0 -CONNECTION -Box32:Out:Box30:In2 -NumberOfControlPoints:0 -CONNECTION Box29:Widget:Box10:Widget2 NumberOfControlPoints:0 CONNECTION @@ -600,4 +678,88 @@ NumberOfControlPoints:0 CONNECTION Box66:BoxChange:Box30:BoxExecute NumberOfControlPoints:0 +CONNECTION +Box26:Out:Box70:In0 +NumberOfControlPoints:0 +CONNECTION +Box27:Out:Box70:In1 +NumberOfControlPoints:0 +CONNECTION +Box70:Out:Box72:In +NumberOfControlPoints:0 +CONNECTION +Box74:Widget:Box47:Widget4 +NumberOfControlPoints:0 +CONNECTION +Box74:Out:Box73:In +NumberOfControlPoints:0 +CONNECTION +Box73:Out:Box75:In +NumberOfControlPoints:0 +CONNECTION +Box75:Out:Box72:I +NumberOfControlPoints:0 +CONNECTION +Box77:Out:Box76:I +NumberOfControlPoints:0 +CONNECTION +Box73:Out:Box77:In +NumberOfControlPoints:0 +CONNECTION +Box72:Out:Box25:In1 +NumberOfControlPoints:0 +CONNECTION +Box76:Out:Box25:In2 +NumberOfControlPoints:0 +CONNECTION +Box70:Out:Box76:In +NumberOfControlPoints:0 +CONNECTION +Box84:Out:Box85:In +NumberOfControlPoints:0 +CONNECTION +Box84:Out:Box88:In +NumberOfControlPoints:0 +CONNECTION +Box90:Out:Box91:In +NumberOfControlPoints:0 +CONNECTION +Box90:Out:Box94:In +NumberOfControlPoints:0 +CONNECTION +Box31:Out:Box90:In0 +NumberOfControlPoints:0 +CONNECTION +Box32:Out:Box90:In1 +NumberOfControlPoints:0 +CONNECTION +Box91:Out:Box30:In1 +NumberOfControlPoints:0 +CONNECTION +Box94:Out:Box30:In2 +NumberOfControlPoints:0 +CONNECTION +Box75:Out:Box85:I +NumberOfControlPoints:0 +CONNECTION +Box77:Out:Box88:I +NumberOfControlPoints:0 +CONNECTION +Box75:Out:Box91:I +NumberOfControlPoints:0 +CONNECTION +Box77:Out:Box94:I +NumberOfControlPoints:0 +CONNECTION +Box85:Out:Box17:In1 +NumberOfControlPoints:0 +CONNECTION +Box88:Out:Box17:In2 +NumberOfControlPoints:0 +CONNECTION +Box19:Out:Box84:In0 +NumberOfControlPoints:0 +CONNECTION +Box21:Out:Box84:In1 +NumberOfControlPoints:0 APP_END diff --git a/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbs b/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbs index c64b9a6..40fb2a3 100644 --- a/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbs +++ b/PackRecalage/bbs/boxes/CompareImagesSwitcherWidget_3Dp.bbs @@ -19,6 +19,7 @@ description "creatisRecalage" category "example" new PackRecalage:ImageSwitcherBox switch + set switch.Title "200" new wx:CheckBox checkS set checkS.In "true" @@ -27,7 +28,7 @@ new wx:CheckBox checkS new wx:Slider sdrT set sdrT.In "500" set sdrT.Max "1000" - set sdrT.Min "0" + set sdrT.Min "200" set sdrT.ReactiveOnTrack "True" new wx:LayoutSplit switchWindow @@ -143,6 +144,40 @@ new std:MultipleInputs Box66 new wx:CommandButton Box67 set Box67.Label "Switch" +new vtk:AddImageToVector Box70 + +new vtk:GetVectorVtkImageDataElement Box72 + +new std:StringSelect Box73 + set Box73.In0 "0 1" + set Box73.In1 "0 0" + set Box73.In2 "1 1" + +new wx:RadioButton Box74 + set Box74.In0 "A B" + set Box74.In1 "A A" + set Box74.In2 "B B" + +new std:GetVectorIntElement Box75 + set Box75.I "0" + +new vtk:GetVectorVtkImageDataElement Box76 + +new std:GetVectorIntElement Box77 + set Box77.I "1" + +new vtk:AddImageToVector Box84 + +new vtk:GetVectorVtkImageDataElement Box85 + +new vtk:GetVectorVtkImageDataElement Box88 + +new vtk:AddImageToVector Box90 + +new vtk:GetVectorVtkImageDataElement Box91 + +new vtk:GetVectorVtkImageDataElement Box94 + connect checkS.Out switch.On connect sdrT.Out switch.Time @@ -155,12 +190,6 @@ connect Box12.Widget Box10.Widget1 connect Box10.Widget switchWindow.Widget1 connect Box22.Out Box19.In connect Box23.Out Box21.In -connect Box19.Out Box17.In1 -connect Box21.Out Box17.In2 -connect Box26.Out Box25.In1 -connect Box27.Out Box25.In2 -connect Box31.Out Box30.In1 -connect Box32.Out Box30.In2 connect Box29.Widget Box10.Widget2 connect Box22.Out Box26.In connect Box23.Out Box27.In @@ -215,6 +244,34 @@ connect Box67.BoxChange Box66.In2 connect Box66.BoxChange Box25.BoxExecute connect Box66.BoxChange Box17.BoxExecute connect Box66.BoxChange Box30.BoxExecute +connect Box26.Out Box70.In0 +connect Box27.Out Box70.In1 +connect Box70.Out Box72.In +connect Box74.Widget Box47.Widget4 +connect Box74.Out Box73.In +connect Box73.Out Box75.In +connect Box75.Out Box72.I +connect Box77.Out Box76.I +connect Box73.Out Box77.In +connect Box72.Out Box25.In1 +connect Box76.Out Box25.In2 +connect Box70.Out Box76.In +connect Box84.Out Box85.In +connect Box84.Out Box88.In +connect Box90.Out Box91.In +connect Box90.Out Box94.In +connect Box31.Out Box90.In0 +connect Box32.Out Box90.In1 +connect Box91.Out Box30.In1 +connect Box94.Out Box30.In2 +connect Box75.Out Box85.I +connect Box77.Out Box88.I +connect Box75.Out Box91.I +connect Box77.Out Box94.I +connect Box85.Out Box17.In1 +connect Box88.Out Box17.In2 +connect Box19.Out Box84.In0 +connect Box21.Out Box84.In1 # Complex input ports input ImageVector1 Box22.In " " diff --git a/PackRecalage/src/bbPackRecalageImageSwitcherFilter.cxx b/PackRecalage/src/bbPackRecalageImageSwitcherFilter.cxx index 4605dfe..ad45b04 100644 --- a/PackRecalage/src/bbPackRecalageImageSwitcherFilter.cxx +++ b/PackRecalage/src/bbPackRecalageImageSwitcherFilter.cxx @@ -30,19 +30,19 @@ void ImageSwitcherFilter::Process() // std::cout << "Output value = " <