]> Creatis software - creaImageIO.git/blobdiff - src/creaImageIOSettings.cpp
#2854 creaImageIO Feature New Normal - creaImageIOWxSimpleDlg add infoImageSource...
[creaImageIO.git] / src / creaImageIOSettings.cpp
index 770a80215678d69e318623d8b4c76892dee824f1..ee95cd1a7bbcfb0589615ae00117917776aeb448 100644 (file)
@@ -1,6 +1,37 @@
+/*
+# ---------------------------------------------------------------------
+#
+# 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 <creaImageIOSettings.h>
 #include <boost/filesystem/fstream.hpp>
 #include <boost/algorithm/string/replace.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp>
+
 #include <iostream>
 #include <fstream>
 
@@ -16,7 +47,7 @@ namespace creaImageIO
     Settings::Settings(const std::string i_path)
     {
         //need to position path in user directory first.
-        m_SettingsFileName = i_path + "\\.gimmick\\Shared\\gimmick\\app.config";
+        m_SettingsFileName = i_path + "\\.creaImageIO\\share\\creaImageIO\\app.config";
         //Test if Settings File exist
         if(!boost::filesystem::exists(m_SettingsFileName) )
         {
@@ -40,6 +71,8 @@ namespace creaImageIO
                Keys.push_back(SETTINGS_SYNC_FREQ);
                Keys.push_back(SETTINGS_COPY_PATH);
                Keys.push_back(SETTINGS_REMOVE_PATIENT_DISPLAY);
+               Keys.push_back(SETTINGS_OUTPUT_ASK);
+               Keys.push_back(SETTINGS_OUTPUT_DIM);
                readSettings(Keys, sets);
 
     }
@@ -63,6 +96,8 @@ namespace creaImageIO
        m_SettingsMap[SETTINGS_DICOM_LIBRARY] = "gdcm";
           m_SettingsMap[SETTINGS_COPY_PATH] = m_SettingsFileName.substr(0,m_SettingsFileName.find_last_of('\\')+1)+"Copied files";
           m_SettingsMap[SETTINGS_REMOVE_PATIENT_DISPLAY] = "0";
+          m_SettingsMap[SETTINGS_OUTPUT_ASK] ="true";
+          m_SettingsMap[SETTINGS_OUTPUT_DIM] = "1";
        writeSettingsFile();
    }