X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaImageIOWxGimmickView.cpp;h=ef9ee5c956af0a4a31b86f6e2c2a28850e56caff;hb=f6c90a7f05ae0fd545dfdba5cd5a37d124bd8056;hp=c1b7acb8fc5e68aab4efdffb84f9e41c6878171c;hpb=dd6cfbad206f1743fc7226c43b835b782c1f46ee;p=creaImageIO.git diff --git a/src/creaImageIOWxGimmickView.cpp b/src/creaImageIOWxGimmickView.cpp index c1b7acb..ef9ee5c 100644 --- a/src/creaImageIOWxGimmickView.cpp +++ b/src/creaImageIOWxGimmickView.cpp @@ -26,11 +26,9 @@ */ -#include + #include -#include #include -#include #include #include #include @@ -41,6 +39,10 @@ #include #include +#if defined(_WIN32) +#pragma warning(disable: 4996) +#endif + using namespace crea; // Icons #include "icons/accept.xpm" @@ -202,8 +204,8 @@ namespace creaImageIO /// \TODO fix warning: unused variable hsize int hsize = size.GetHeight(); - int top_minsize = 450; - int bottom_minsize = 50; + int top_minsize = 450; + int bottom_minsize = 50; mSplitter->SetMinimumPaneSize( bottom_minsize ); mSplitter->SplitHorizontally( mNotebook, mBottomPanel, @@ -356,7 +358,7 @@ namespace creaImageIO bool mult, const std::string out_model) { // First we select the files - std::vector files; + std::vector files; std::string db_name = crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())); GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files); @@ -367,6 +369,7 @@ namespace creaImageIO mGimmick->GetSetting(SETTINGS_OUTPUT_ASK, asking); mGimmick->GetSetting(SETTINGS_OUTPUT_DIM, dim); + if (asking == "true") { // display the output dialog box @@ -379,37 +382,35 @@ namespace creaImageIO dim = dlg->getDim(); mGimmick->UpdateSetting(SETTINGS_OUTPUT_ASK, dlg->getAsking()); mGimmick->UpdateSetting(SETTINGS_OUTPUT_DIM, dim); - } - else - { + } else { return; } - } - else - { + } else { } sscanf(dim.c_str(),"%d",&i_dim_out); - // Next we create the structure for dicom output infos OutputAttr Oattr; +//EED 01/09/2014 + if (i_dim_out==2) + { + Oattr.mult=true; + } // i_dim_out + + Oattr.db = crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())); if(i_attr.empty()) { // We don't send informations! - } - else if( i_attr.size() == 1 && i_attr.front() == "ALL") + } else if( i_attr.size() == 1 && i_attr.front() == "ALL") { // we send all database Oattr.inside.push_back("ALL"); - } - else if( (i_attr.size() == 1 && i_attr.front() != "ALL") + } else if( (i_attr.size() == 1 && i_attr.front() != "ALL") || (i_attr.size() >1) ) { mGimmick->fillVectInfos(i_attr, Oattr); - } - else - { + } else { // nothing } @@ -1174,9 +1175,9 @@ namespace creaImageIO //======================================================================== void WxGimmickView::CreateEditFieldsDialog(tree::Node* node, std::vector names, std::vector keys) { - wxDialog* dial= new wxDialog (this,-1,crea::std2wx("Edit Fields for node "+node->GetLabel()),wxDefaultPosition, wxSize(350,155)); - wxBoxSizer *siz = new wxBoxSizer(wxVERTICAL); - WxEditFieldsPanel* ef = new WxEditFieldsPanel(dial, dial, this, node, names, keys); + wxDialog *dial= new wxDialog (this,-1,crea::std2wx("Edit Fields for node "+node->GetLabel()),wxDefaultPosition, wxSize(350,155)); + wxBoxSizer *siz = new wxBoxSizer(wxVERTICAL); + WxEditFieldsPanel *ef = new WxEditFieldsPanel(dial, dial, this, node, names, keys); siz->Add( ef,1,wxGROW ,0); dial->SetSizer(siz);