From e56917cf6685c5f490e28eefc8807114d3999cd2 Mon Sep 17 00:00:00 2001 From: davila Date: Mon, 26 May 2014 08:10:02 +0200 Subject: [PATCH] 2378 creaMaracasVisu Feature New Normal new box: ColorWindowLevel_Interface 2379 creaMaracasVisu Bug New Normal box manualRoiContour: Clean message --- bbtk/bbs/boxes/ColorWindowLevel_Interface.bbg | 193 ++++++++++++++++++ bbtk/bbs/boxes/ColorWindowLevel_Interface.bbs | 83 ++++++++ .../bbcreaMaracasVisuPanelButtonContainer.cxx | 2 +- .../bbcreaMaracasVisuPanelButtonContainer.h | 14 +- ...aracasVisuPanelButtonContainerSettings.cxx | 8 +- .../model/structBCSettings.h | 10 +- .../manualContour/manualRoiControler.cpp | 1 - 7 files changed, 294 insertions(+), 17 deletions(-) create mode 100644 bbtk/bbs/boxes/ColorWindowLevel_Interface.bbg create mode 100644 bbtk/bbs/boxes/ColorWindowLevel_Interface.bbs diff --git a/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbg b/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbg new file mode 100644 index 0000000..d98e754 --- /dev/null +++ b/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbg @@ -0,0 +1,193 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:TRUE +COMPLEXBOXNAME:ColorWindowLevel_Interface +PACKAGENAME:creaMaracasVisu +COMPLEXOUTPUTS:4 +COMPLEX_PORT +widget +-18.697870:-101.429846:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +Box_Change +-100.221345:-97.067464:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +ColorLevel +-54.622965:-100.097316:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +WindowLevel +58.482630:-97.687609:-900.000000 +FIN_COMPLEX_PORT +COMPLEXINPUTS:1 +COMPLEX_PORT +Image +-16.285288:96.529729:-900.000000 +FIN_COMPLEX_PORT +BOXES:11 +BOX +wx:LayoutLine:Box00 +ISEXEC:FALSE +-26.665967:-46.893933:-900.000000 +30.894033:-56.893933:-900.000000 +PORT +WinTitle:"Color-Window Level" +FIN_BOX +BOX +wx:Slider:Box01 +ISEXEC:FALSE +-92.181917:-9.603051:-900.000000 +-40.781917:-19.603051:-900.000000 +PORT +ChangeResolution:"true" +PORT +Label:"true" +PORT +ReactiveOnTrack:"true" +PORT +Title:"Color Level" +FIN_BOX +BOX +wx:Slider:Box02 +ISEXEC:FALSE +8.472128:-9.242461:-900.000000 +59.872128:-19.242461:-900.000000 +PORT +ChangeResolution:"true" +PORT +Label:"true" +PORT +ReactiveOnTrack:"true" +PORT +Title:"Window Level" +FIN_BOX +BOX +vtk:vtkImageDataPointerRelay:Box04 +ISEXEC:FALSE +-23.902599:81.032439:-900.000000 +47.272401:71.032439:-900.000000 +FIN_BOX +BOX +vtk:ImageVtkProperties:Box05 +ISEXEC:FALSE +-35.459900:64.484485:-900.000000 +10.115100:54.484485:-900.000000 +FIN_BOX +BOX +std:GetVectorFloatElement:Box06 +ISEXEC:FALSE +-8.667976:43.733877:-900.000000 +62.507024:33.733877:-900.000000 +PORT +I:"1" +FIN_BOX +BOX +std:GetVectorFloatElement:Box07 +ISEXEC:FALSE +-84.015708:43.771266:-900.000000 +-12.840708:33.771266:-900.000000 +PORT +I:"0" +FIN_BOX +BOX +std:MultipleInputs:Box08 +ISEXEC:FALSE +-102.554271:-50.388262:-900.000000 +-56.979271:-60.388262:-900.000000 +FIN_BOX +BOX +std:Div:Box09 +ISEXEC:FALSE +-114.136218:13.584129:-900.000000 +-81.361218:3.584129:-900.000000 +PORT +In2:"2" +FIN_BOX +BOX +wx:LayoutSplit:Box10 +ISEXEC:FALSE +-23.454771:-76.983624:-900.000000 +22.120229:-86.983624:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:HistogramView:Box11 +ISEXEC:FALSE +20.853115:-36.606276:-900.000000 +66.428115:-46.606276:-900.000000 +FIN_BOX +CONNECTIONS:22 +CONNECTION +Box01:Widget:Box00:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box02:Widget:Box00:Widget2 +NumberOfControlPoints:0 +CONNECTION +Image:Image:Box04:In +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box05:In +NumberOfControlPoints:0 +CONNECTION +Box05:MinMax:Box06:In +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box01:Max +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box02:Max +NumberOfControlPoints:0 +CONNECTION +Box05:MinMax:Box07:In +NumberOfControlPoints:0 +CONNECTION +Box07:Out:Box01:Min +NumberOfControlPoints:0 +CONNECTION +Box07:Out:Box02:Min +NumberOfControlPoints:0 +CONNECTION +Box01:BoxChange:Box08:In1 +NumberOfControlPoints:0 +CONNECTION +Box02:BoxChange:Box08:In2 +NumberOfControlPoints:0 +CONNECTION +Box08:Out:Box_Change:Box_Change +NumberOfControlPoints:0 +CONNECTION +Box01:Out:ColorLevel:ColorLevel +NumberOfControlPoints:0 +CONNECTION +Box02:Out:WindowLevel:WindowLevel +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box09:In1 +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box01:In +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box02:In +NumberOfControlPoints:0 +CONNECTION +Box10:Widget:widget:widget +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box11:In +NumberOfControlPoints:0 +CONNECTION +Box11:Widget:Box10:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box00:Widget:Box10:Widget2 +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbs b/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbs new file mode 100644 index 0000000..127ac09 --- /dev/null +++ b/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbs @@ -0,0 +1,83 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ColorWindowLevel_Interface.bbs +# ---------------------------------- + +include std +include itkvtk +include wx +include vtk +include std +include creaMaracasVisu + +define ColorWindowLevel_Interface creaMaracasVisu + +author "Author ??" +description "Description ??" + +category "" + +new LayoutLine Box00 + set Box00.WinTitle "Color-Window Level" + +new Slider Box01 + set Box01.ChangeResolution "true" + set Box01.Label "true" + set Box01.ReactiveOnTrack "true" + set Box01.Title "Color Level" + +new Slider Box02 + set Box02.ChangeResolution "true" + set Box02.Label "true" + set Box02.ReactiveOnTrack "true" + set Box02.Title "Window Level" + +new vtkImageDataPointerRelay Box04 + +new ImageVtkProperties Box05 + +new GetVectorFloatElement Box06 + set Box06.I "1" + +new GetVectorFloatElement Box07 + set Box07.I "0" + +new MultipleInputs Box08 + +new Div Box09 + set Box09.In2 "2" + +new LayoutSplit Box10 + +new HistogramView Box11 + + +connect Box01.Widget Box00.Widget1 +connect Box02.Widget Box00.Widget2 +connect Box04.Out Box05.In +connect Box05.MinMax Box06.In +connect Box06.Out Box01.Max +connect Box06.Out Box02.Max +connect Box05.MinMax Box07.In +connect Box07.Out Box01.Min +connect Box07.Out Box02.Min +connect Box01.BoxChange Box08.In1 +connect Box02.BoxChange Box08.In2 +connect Box06.Out Box09.In1 +connect Box09.Out Box01.In +connect Box09.Out Box02.In +connect Box04.Out Box11.In +connect Box11.Widget Box10.Widget1 +connect Box00.Widget Box10.Widget2 + +# Complex input ports +input Image Box04.In " " + +# Complex output ports +output Box_Change Box08.Out " " +output ColorLevel Box01.Out " " +output WindowLevel Box02.Out " " +output widget Box10.Widget " " + + +endefine diff --git a/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx b/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx index 35900cf..3695464 100644 --- a/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx +++ b/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx @@ -45,7 +45,7 @@ PanelButtonContainer::Process( ) settings->AddButtons( bbGetInputIn( ) ); PBContainer* panel = new PBContainer( myPanel, settings ); - wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL ); sizer->Add( panel, 1, wxEXPAND, 0 ); this->myPanel->SetSizer(sizer); diff --git a/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.h b/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.h index ee7e061..bbf30e6 100644 --- a/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.h +++ b/bbtk/src/bbcreaMaracasVisuPanelButtonContainer.h @@ -63,12 +63,14 @@ class bbcreaMaracasVisu_EXPORT PanelButtonContainer }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(PanelButtonContainer,bbtk::WxBlackBox); -BBTK_NAME("PanelButtonContainer"); -BBTK_AUTHOR("caceres@creatis.insa-lyon.fr"); -BBTK_DESCRIPTION("This blackbox creates a Widget of creaButtonContainerPanel"); -BBTK_CATEGORY("__CategoryBlackBox__"); -BBTK_INPUT(PanelButtonContainer,Title,"Title prepended to the text",std::string,""); -BBTK_INPUT(PanelButtonContainer,In,"ButtonContainerSettings List",BCStructVectorType,""); + BBTK_NAME("PanelButtonContainer"); + BBTK_AUTHOR("caceres@creatis.insa-lyon.fr"); + BBTK_DESCRIPTION("This blackbox creates a Widget of creaButtonContainerPanel"); + BBTK_CATEGORY("__CategoryBlackBox__"); + + BBTK_INPUT(PanelButtonContainer,Title,"Title prepended to the text",std::string,""); + BBTK_INPUT(PanelButtonContainer,In,"ButtonContainerSettings List",BCStructVectorType,""); + BBTK_END_DESCRIBE_BLACK_BOX(PanelButtonContainer); //===== // 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) diff --git a/bbtk/src/bbcreaMaracasVisuPanelButtonContainerSettings.cxx b/bbtk/src/bbcreaMaracasVisuPanelButtonContainerSettings.cxx index c12645b..ecc5b70 100644 --- a/bbtk/src/bbcreaMaracasVisuPanelButtonContainerSettings.cxx +++ b/bbtk/src/bbcreaMaracasVisuPanelButtonContainerSettings.cxx @@ -43,10 +43,10 @@ PanelButtonContainerSettings::Process( ) this->m_BSettings->groupName = bbGetInputGroupName( ); this->m_BSettings->buttonName = bbGetInputButtonName( ); - this->m_BSettings->buttonDescription = bbGetInputButtonDescription( ); - this->m_BSettings->iconpath = bbGetInputIconpath( ); - this->m_BSettings->panel = this->myPanel; - this->m_BCSettingsVector = bbGetInputIn(); + this->m_BSettings->buttonDescription = bbGetInputButtonDescription( ); + this->m_BSettings->iconpath = bbGetInputIconpath( ); + this->m_BSettings->panel = this->myPanel; + this->m_BCSettingsVector = bbGetInputIn(); this->m_BCSettingsVector.push_back( this->m_BSettings ); bbSetOutputOut( this->m_BCSettingsVector ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/structBCSettings.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/structBCSettings.h index 0c33124..c7b015d 100755 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/structBCSettings.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/structBCSettings.h @@ -51,11 +51,11 @@ namespace creaButtonContainer */ struct BCSettingsStruct { - StringType groupName; //!