]> Creatis software - creaBruker.git/blobdiff - lib/src1/bruker2dicom.h
Deal with multi study directory
[creaBruker.git] / lib / src1 / bruker2dicom.h
index 71ff5dbe827e893e9b18268c7f52d532b3fb63ff..31460269e3a3c471d49e93eef4abca7a8cd693ce 100644 (file)
@@ -30,10 +30,10 @@ public:
 */
   ~Bruker2Dicom (){};
 
-  void SetInputDirectory (const std::string &i) { InputDirName  = i;  }
-  void SetOutputDirectory(const std::string &o) { OutputDirName = o;  }
-  void SetConvertModeToDicom()                  { dicom = 1; mhd  = 0;}
-  void SetConvertModeToMhd()                    { dicom = 0; mhd  = 1;}  
+  void SetInputDirectory (const std::string &i) { InputDirName   = i;}
+  void SetOutputDirectory(const std::string &o) { OutputDirName  = o;}
+  void SetConvertModeToDicom()                  { dicom = 1; mhd = 0;}
+  void SetConvertModeToMhd()                    { dicom = 0; mhd = 1;}  
   bool Execute();
   
   /* 
@@ -73,11 +73,14 @@ void getImhDataType(BrukerFieldData &bDPT,
                    
 void cleanString(std::string &s);
 
-bool CreateDirectory(std::string dirNameout);
+bool CreateDirectory(std::string &dirNameout);
 
-void DealWithNiveau1(std::string level1Directory, std::string currentOutputDirName);
-void DealWithNiveau2(std::string level2Directory, std::string currentOutputDirName);
-void DealWithNiveau3(std::string level3Directory, std::string currentOutputDirName);
+int CheckUserDirectory(std::string &userDirName);
+void DealWithMultiStudyDirectory(GDCM_NAME_SPACE::DirListType &fileNames);
+void DealWithSingleStudyDirectory(GDCM_NAME_SPACE::DirListType &fileNames);
+void DealWithNiveau1(std::string &level1Directory, std::string &currentOutputDirName);
+void DealWithNiveau2(std::string &level2Directory, std::string &currentOutputDirName);
+void DealWithNiveau3(std::string &level3Directory, std::string &currentOutputDirName);
                    
 void dealWithCarto(GDCM_NAME_SPACE::DirListType &fileNames, int NX, int NY, int nbSlices, 
                    double fovX, double fovY, double sliceDistance,
@@ -95,6 +98,14 @@ public:
 private :
    std::string InputDirName;
    std::string OutputDirName;
+
+   bool subjectFound;
+   bool acqpFound;
+   
+   std::string subject_entry;
+   std::string subject_position;
+   std::string subject_date;
+   std::string subject_study_name;
  
    int mhd;
    int dicom;
@@ -116,8 +127,11 @@ private :
    std::string strStudyDescr; 
    std::string strSerieDescr;
    std::string strStudyTimeDate;
-   std::string strPatientName;      
+   std::string strPatientName;
+   std::string subject_name; // cleaned strPatientName
+   int serieNumber;
+   int instanceNumber;      
 };
 
-
 #endif