From 9075226c98f81d6936ec2869d429a7155be2b627 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Wed, 20 Mar 2024 16:42:15 +0100 Subject: [PATCH] #3521 CompareImages new version --- .../bbs/boxes/CompareImagesByRGB-Widget.bbg | 132 +++++++++++------- .../bbs/boxes/CompareImagesByRGB-Widget.bbs | 16 ++- .../bbcreaVtkMeshReduction_DecimatePro.cxx | 21 +-- .../src/bbcreaVtkTransformPolyDataFilter.h | 2 +- 4 files changed, 100 insertions(+), 71 deletions(-) diff --git a/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg index 01e4a79..8e66657 100644 --- a/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg +++ b/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg @@ -1,49 +1,54 @@ # ---------------------------------- -# - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg +# - BBTKGEditor v 1.6 BBG BlackBox Diagram file +# - /Users/davila/Creatis/C23/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbg # ---------------------------------- APP_START CATEGORY: DESCRIPTION:Description ?? AUTHOR:Author ?? +EXPORTFORMAT:0 COMPLEXBOX:TRUE COMPLEXBOXNAME:CompareImagesByRGB-Widget PACKAGENAME:creaVtk COMPLEXOUTPUTS:1 COMPLEX_PORT OutWidget --141.188304:-163.078587:-900.000000 +-96.899656:-60.971144:-900.000000 FIN_COMPLEX_PORT -COMPLEXINPUTS:2 +COMPLEXINPUTS:3 COMPLEX_PORT Image1 --40.537616:163.388080:-900.000000 +-28.376331:49.016424:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT Image2 -30.013598:159.944870:-900.000000 +21.009519:47.983461:-900.000000 FIN_COMPLEX_PORT -BOXES:20 +COMPLEX_PORT +boxExecute +-79.374801:54.164565:-900.000000 +FIN_COMPLEX_PORT +BOXES:22 BOX creaMaracasVisu:ViewerNV:Box00 ISEXEC:FALSE --43.426794:-66.268413:-900.000000 -20.293206:-76.268413:-900.000000 +-30.398756:-19.880524:-900.000000 +9.961244:-22.380524:-900.000000 PORT nTypeView:"1 2 0" FIN_BOX BOX creaVtk:ImageAppendComponents:Box02 ISEXEC:FALSE --203.582916:-29.421199:-900.000000 --150.532916:-39.421199:-900.000000 +-142.508041:-8.826360:-900.000000 +-119.203041:-11.326360:-900.000000 FIN_BOX BOX vtk:RescaleSlopeIntercept:Box05 ISEXEC:FALSE --43.951428:89.905525:-900.000000 -4.173572:79.905525:-900.000000 +-30.766000:26.971657:-900.000000 +-7.941000:24.471657:-900.000000 PORT A:"0" PORT @@ -56,30 +61,30 @@ FIN_BOX BOX creaMaracasVisu:SetwxVtkBaseViewLookupTable:Box06 ISEXEC:FALSE --12.855698:-115.985952:-900.000000 -43.994302:-125.985952:-900.000000 +-8.998989:-34.795786:-900.000000 +14.691011:-37.295786:-900.000000 FIN_BOX BOX wx:LayoutSplit:Box07 ISEXEC:FALSE --141.202294:-144.516735:-900.000000 --102.122294:-154.516735:-900.000000 +-97.136761:-50.174399:-900.000000 +-74.376761:-52.674399:-900.000000 PORT -Proportion:"50" +Proportion:"90" FIN_BOX BOX creaVtk:ScalarsToColors:Box10 ISEXEC:FALSE -55.522942:-52.647302:-900.000000 -97.047942:-62.647302:-900.000000 +38.866059:-15.794191:-900.000000 +61.026059:-18.294191:-900.000000 PORT Type:"3" FIN_BOX BOX vtk:RescaleSlopeIntercept:Box13 ISEXEC:FALSE -23.644953:90.680497:-900.000000 -71.769953:80.680497:-900.000000 +16.551467:27.204149:-900.000000 +39.376467:24.704149:-900.000000 PORT A:"0" PORT @@ -92,8 +97,8 @@ FIN_BOX BOX std:StringSelect:Box18 ISEXEC:FALSE --202.842874:73.343866:-900.000000 --160.682874:63.343866:-900.000000 +-141.990012:22.003160:-900.000000 +-117.470012:19.503160:-900.000000 PORT In0:"1 1 1" PORT @@ -114,90 +119,104 @@ FIN_BOX BOX PackRecalage:AddImageToVector:Box19 ISEXEC:FALSE --13.743788:38.895326:-900.000000 -31.656212:28.895326:-900.000000 +-9.620652:11.668598:-900.000000 +14.899348:9.168598:-900.000000 FIN_BOX BOX std:GetVectorStringElement:Box20 ISEXEC:FALSE --271.077722:53.758698:-900.000000 --221.677722:43.758698:-900.000000 +-189.754405:16.127609:-900.000000 +-166.799405:13.627609:-900.000000 PORT I:"0" FIN_BOX BOX std:GetVectorStringElement:Box21 ISEXEC:FALSE --205.073499:53.172640:-900.000000 --155.673499:43.172640:-900.000000 +-143.551449:15.951792:-900.000000 +-120.596449:13.451792:-900.000000 PORT I:"1" FIN_BOX BOX std:GetVectorStringElement:Box22 ISEXEC:FALSE --138.754214:52.260973:-900.000000 --89.354214:42.260973:-900.000000 +-97.127950:15.678292:-900.000000 +-74.172950:13.178292:-900.000000 PORT I:"2" FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box23 ISEXEC:FALSE --270.964594:-0.569468:-900.000000 --212.714594:-10.569468:-900.000000 +-189.675216:-0.170840:-900.000000 +-165.840216:-2.670840:-900.000000 FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box24 ISEXEC:FALSE --185.710508:-1.005972:-900.000000 --127.460508:-11.005972:-900.000000 +-129.997356:-0.301792:-900.000000 +-106.162356:-2.801792:-900.000000 FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box25 ISEXEC:FALSE --98.887475:-1.939186:-900.000000 --40.637475:-11.939186:-900.000000 +-69.221232:-0.581756:-900.000000 +-45.386232:-3.081756:-900.000000 FIN_BOX BOX wx:Slider:Box26 ISEXEC:FALSE --306.701264:117.651337:-900.000000 --255.301264:107.651337:-900.000000 +-214.690885:35.295401:-900.000000 +-184.890885:32.795401:-900.000000 PORT Max:"7" PORT Min:"0" +PORT +ReactiveOnTrack:"true" FIN_BOX BOX vtk:vtkImageDataPointerRelay:Box29 ISEXEC:FALSE --48.945155:121.673754:-900.000000 -3.229845:111.673754:-900.000000 +-34.261608:36.502126:-900.000000 +-11.051608:34.002126:-900.000000 FIN_BOX BOX vtk:vtkImageDataPointerRelay:Box30 ISEXEC:FALSE -24.733746:117.421238:-900.000000 -76.908746:107.421238:-900.000000 +17.313622:35.226371:-900.000000 +40.523622:32.726371:-900.000000 FIN_BOX BOX wx:LayoutLine:Box31 ISEXEC:FALSE --308.385679:-23.643024:-900.000000 --250.825679:-33.643024:-900.000000 +-215.869975:-7.092907:-900.000000 +-182.549975:-9.592907:-900.000000 PORT Orientation:"H" FIN_BOX BOX wx:CheckBox:Box32 ISEXEC:FALSE --323.671153:15.952937:-900.000000 --287.346153:5.952937:-900.000000 +-226.569807:4.785881:-900.000000 +-204.939807:2.285881:-900.000000 PORT Title:"Interpolation" FIN_BOX -CONNECTIONS:32 +BOX +std:MagicBox:Box33 +ISEXEC:FALSE +-75.880313:44.013910:-900.000000 +-54.280313:41.513910:-900.000000 +FIN_BOX +BOX +std:MultipleInputs:Box34 +ISEXEC:FALSE +-96.436044:-26.534530:-900.000000 +-74.466044:-29.034530:-900.000000 +FIN_BOX +CONNECTIONS:35 CONNECTION Box02:Out:Box00:In NumberOfControlPoints:0 @@ -274,9 +293,6 @@ CONNECTION Box07:Widget:OutWidget:OutWidget NumberOfControlPoints:0 CONNECTION -Box26:BoxChange:Box06:BoxExecute -NumberOfControlPoints:0 -CONNECTION Box26:Widget:Box31:Widget1 NumberOfControlPoints:0 CONNECTION @@ -294,4 +310,16 @@ NumberOfControlPoints:0 CONNECTION Box31:Widget:Box07:Widget2 NumberOfControlPoints:0 +CONNECTION +boxExecute:boxExecute:Box33:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box26:BoxChange:Box34:In1 +NumberOfControlPoints:0 +CONNECTION +Box34:BoxChange:Box06:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box33:BoxChange:Box34:In2 +NumberOfControlPoints:0 APP_END diff --git a/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs index 47680a9..9a467c6 100644 --- a/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs +++ b/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs @@ -1,6 +1,6 @@ # ---------------------------------- -# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/C11/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs +# - BBTKGEditor v 1.6 BBS BlackBox Script (Complex Box) +# - /Users/davila/Creatis/C23/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/CompareImagesByRGB-Widget.bbs # ---------------------------------- include std @@ -33,7 +33,7 @@ new vtk:RescaleSlopeIntercept Box05 new creaMaracasVisu:SetwxVtkBaseViewLookupTable Box06 new wx:LayoutSplit Box07 - set Box07.Proportion "50" + set Box07.Proportion "90" new creaVtk:ScalarsToColors Box10 set Box10.Type "3" @@ -74,6 +74,7 @@ new vtk:GetVectorVtkImageDataElement Box25 new wx:Slider Box26 set Box26.Max "7" set Box26.Min "0" + set Box26.ReactiveOnTrack "true" new vtk:vtkImageDataPointerRelay Box29 @@ -85,6 +86,10 @@ new wx:LayoutLine Box31 new wx:CheckBox Box32 set Box32.Title "Interpolation" +new std:MagicBox Box33 + +new std:MultipleInputs Box34 + connect Box02.Out Box00.In connect Box10.LookupTable Box06.ScalarToColors @@ -108,17 +113,20 @@ connect Box00.wxVtkBaseView2 Box06.BaseView2 connect Box00.wxVtkBaseView3 Box06.BaseView3 connect Box29.Out Box05.In connect Box30.Out Box13.In -connect Box26.BoxChange Box06.BoxExecute connect Box26.Widget Box31.Widget1 connect Box32.Widget Box31.Widget2 connect Box32.Out Box00.Interpolate connect Box32.BoxChange Box00.BoxExecute connect Box00.Widget Box07.Widget1 connect Box31.Widget Box07.Widget2 +connect Box26.BoxChange Box34.In1 +connect Box34.BoxChange Box06.BoxExecute +connect Box33.BoxChange Box34.In2 # Complex input ports input Image1 Box29.In " " input Image2 Box30.In " " +input boxExecute Box33.BoxExecute " " # Complex output ports output OutWidget Box07.Widget " " diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkMeshReduction_DecimatePro.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkMeshReduction_DecimatePro.cxx index fa077d8..04b33a2 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkMeshReduction_DecimatePro.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkMeshReduction_DecimatePro.cxx @@ -36,9 +36,7 @@ void MeshReduction_DecimatePro::Process() decimatepro->SetInputData( bbGetInputIn() ); decimatepro->SetTargetReduction( bbGetInputTargetReduction() ); decimatepro->PreserveTopologyOn(); - printf("EED MeshReduction_DecimatePro::Process Running... \n"); decimatepro->Update(); - printf("EED MeshReduction_DecimatePro::Process ...finish \n"); bbSetOutputOut(decimatepro->GetOutput() ); } else { bbSetOutputOut( NULL ); @@ -49,8 +47,7 @@ void MeshReduction_DecimatePro::Process() //===== void MeshReduction_DecimatePro::bbUserSetDefaultValues() { - -// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 firsttime = true; decimatepro = NULL; @@ -63,20 +60,17 @@ void MeshReduction_DecimatePro::bbUserSetDefaultValues() //===== void MeshReduction_DecimatePro::bbUserInitializeProcessing() { - // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers -// if any - - +// if any } -//===== + +//===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== void MeshReduction_DecimatePro::bbUserFinalizeProcessing() { - // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers @@ -85,10 +79,9 @@ void MeshReduction_DecimatePro::bbUserFinalizeProcessing() if (decimatepro!=NULL) { decimatepro->Delete(); - } - -} + } } -// EO namespace bbcreaVtk + +}// EO namespace bbcreaVtk diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkTransformPolyDataFilter.h b/bbtk_creaVtk_PKG/src/bbcreaVtkTransformPolyDataFilter.h index fdf5aec..5c4330b 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkTransformPolyDataFilter.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkTransformPolyDataFilter.h @@ -34,7 +34,7 @@ class bbcreaVtk_EXPORT TransformPolyDataFilter BBTK_BEGIN_DESCRIBE_BLACK_BOX(TransformPolyDataFilter,bbtk::AtomicBlackBox); BBTK_NAME("TransformPolyDataFilter"); BBTK_AUTHOR("InfoDev"); - BBTK_DESCRIPTION("No Description."); + BBTK_DESCRIPTION("(C++,Python) No Description."); BBTK_CATEGORY("empty"); BBTK_INPUT(TransformPolyDataFilter,Transform,"vtk Linear Transform",vtkLinearTransform*,""); BBTK_INPUT(TransformPolyDataFilter,In,"Mesh input",vtkPolyData*,""); -- 2.45.1