From: Eduardo DAVILA Date: Mon, 11 May 2020 14:28:00 +0000 (+0200) Subject: #3423 BBTK Feature New Normal - box std MapToLst X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9bf7192c017da8a947bec6b26ad209a194ccd090;p=bbtk.git #3423 BBTK Feature New Normal - box std MapToLst --- diff --git a/packages/std/src/bbstdMapToLst.cxx b/packages/std/src/bbstdMapToLst.cxx new file mode 100644 index 0000000..69c6c61 --- /dev/null +++ b/packages/std/src/bbstdMapToLst.cxx @@ -0,0 +1,83 @@ +//===== +// 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) +//===== +#include "bbstdMapToLst.h" +#include "bbstdPackage.h" +namespace bbstd +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MapToLst) +BBTK_BLACK_BOX_IMPLEMENTATION(MapToLst,bbtk::AtomicBlackBox); +//===== +// 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 MapToLst::Process() +{ + printf("EED MapToLst::Process Start\n"); +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') + + std::vector lstTitles; + std::vector lstValues; + + for ( auto& element : bbGetInputInMap() ) + { + lstTitles.push_back(element.first); + lstValues.push_back(element.second); + } // for + + bbSetOutputLstTitles( lstTitles ); + bbSetOutputLstValues( lstValues ); + + printf("EED MapToLst::Process End\n"); + +} +//===== +// 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 MapToLst::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 +// bbSetInputIn(0); + +} +//===== +// 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 MapToLst::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// 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 MapToLst::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbstd + + diff --git a/packages/std/src/bbstdMapToLst.h b/packages/std/src/bbstdMapToLst.h new file mode 100644 index 0000000..9aa8413 --- /dev/null +++ b/packages/std/src/bbstdMapToLst.h @@ -0,0 +1,51 @@ +//===== +// 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) +//===== +#ifndef __bbstdMapToLst_h_INCLUDED__ +#define __bbstdMapToLst_h_INCLUDED__ + +#include "bbstd_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" +#include +#include +typedef std::map mapString; + +namespace bbstd +{ + +class bbstd_EXPORT MapToLst + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(MapToLst,bbtk::AtomicBlackBox); +//===== +// 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) +//===== + BBTK_DECLARE_INPUT(InMap,mapString); + BBTK_DECLARE_OUTPUT(LstTitles,std::vector); + BBTK_DECLARE_OUTPUT(LstValues,std::vector); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(MapToLst,bbtk::AtomicBlackBox); + BBTK_NAME("MapToLst"); + BBTK_AUTHOR("InfoDev"); + BBTK_DESCRIPTION("No Description."); + BBTK_CATEGORY("empty"); + BBTK_INPUT(MapToLst,InMap,"Input map",mapString,""); + BBTK_OUTPUT(MapToLst,LstTitles,"List of map.first",std::vector,""); + BBTK_OUTPUT(MapToLst,LstValues,"List of map.second",std::vector,""); +BBTK_END_DESCRIBE_BLACK_BOX(MapToLst); +//===== +// 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) +//===== +} +// EO namespace bbstd + +#endif // __bbstdMapToLst_h_INCLUDED__ + diff --git a/packages/vtk/src/bbvtkMetaImageWriter.xml b/packages/vtk/src/bbvtkMetaImageWriter.xml index 21f22d7..d702d95 100644 --- a/packages/vtk/src/bbvtkMetaImageWriter.xml +++ b/packages/vtk/src/bbvtkMetaImageWriter.xml @@ -8,6 +8,7 @@ vtkMetaImageWriter.h vtkImageData.h + vtkMetaImageWriter @@ -15,6 +16,7 @@
+
    vtkMetaImageWriter* w = vtkMetaImageWriter::New();
 
 
diff --git a/packages/wx/src/bbwxComboBox.cxx b/packages/wx/src/bbwxComboBox.cxx
index 05f3a33..26d8e17 100644
--- a/packages/wx/src/bbwxComboBox.cxx
+++ b/packages/wx/src/bbwxComboBox.cxx
@@ -169,7 +169,7 @@ void ComboBoxWidget::FillItems( int iSelection, std::vector< std::string > lstIn
 		len2 = strLength - lstIn[i].length();
 		for (ii=0;ii