X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaImageIOWxGimmickView.cpp;h=0ee66e527742783db26a6974ce6f4980a4252c02;hb=bae8afe7ee037a3368be7060c3a0708582e7d413;hp=df8a67caee3b769ab986d41a1c494fce68f862b9;hpb=8b2e08a17fde8da75c203d985757742f919e3398;p=creaImageIO.git diff --git a/src/creaImageIOWxGimmickView.cpp b/src/creaImageIOWxGimmickView.cpp index df8a67c..0ee66e5 100644 --- a/src/creaImageIOWxGimmickView.cpp +++ b/src/creaImageIOWxGimmickView.cpp @@ -1,8 +1,34 @@ -#include +/* +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Santé) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ +*/ + + + #include -#include #include -#include #include #include #include @@ -13,6 +39,10 @@ #include #include +#if defined(_WIN32) +#pragma warning(disable: 4996) +#endif + using namespace crea; // Icons #include "icons/accept.xpm" @@ -171,6 +201,7 @@ namespace creaImageIO mBottomPanel->SetSizer(mbottom_sizer); // Splitting + /// \TODO fix warning: unused variable hsize int hsize = size.GetHeight(); int top_minsize = 450; @@ -327,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); @@ -338,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 @@ -350,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 } @@ -590,7 +620,7 @@ namespace creaImageIO { if (recursive) { - nb += NumberFilesToAdd(itr->string(), recursive); + nb += NumberFilesToAdd(itr->path().string(), recursive); } } else @@ -606,7 +636,7 @@ namespace creaImageIO bool WxGimmickView::isNeedRecursive(std::string i_name) { boost::filesystem::directory_iterator iter(i_name), end_iter; - bool bfindir = false; + //bool bfindir = false; for(; iter != end_iter; ++iter) { if(boost::filesystem::is_directory(*iter)) @@ -956,7 +986,7 @@ namespace creaImageIO if (dial->GetReturnCode() == wxID_OK) { #if defined(BUILD_BRUKER) - if (nb->GetSelection()==0)//Selection: Bruker Image Reader + if (nb->GetSelection()==0)//Selection: Bruker Image Reader { std::string inputDir = crea::wx2std(gimmickTools->getInputDir()); std::string outputDir = crea::wx2std(gimmickTools->getOutputDir());