6 #include "gdcmFileHelper.h"
7 #include "gdcmCommon.h"
10 #include "gdcmDirList.h"
12 #include "gdcmArgMgr.h"
13 #include "brukerSystem.h"
14 #include "brukerdataset.h"
15 #include "brukerkspaceobject.h"
16 #include "brukerimage.h"
23 class creaBruker_EXPORT Bruker2Dicom {
26 /*! \brief Constructor
28 Bruker2Dicom () /* : verbose(0), mhd(0), dicom(0), day(O)*/ {};
33 void SetInputDirectory (const std::string &i) { InputDirName = i;}
34 void SetOutputDirectory(const std::string &o) { OutputDirName = o;}
35 void SetConvertModeToDicom() { dicom = 1; mhd = 0;}
36 void SetConvertModeToMhd() { dicom = 0; mhd = 1;}
40 // For debugging pupose only.
41 //Don't need accessors : Attributes are 'public'
43 void SetVerbose(int v) { verbose = v;}
44 void SetMhd(int m) { mhd = m; }
45 void SetDicom(int d) { dicom = d; }
50 void MakeDicomImage(unsigned char *tabPixels,
55 double spacingX, double spacingY, double sliceDistance,
56 std::string dcmImageName,
57 const std::string &patientName,
59 std::string &studyUID,
60 std::string &serieUID,
61 std::string &studyDescr,
62 std::string &serieDescr,
63 std::string &strStudyTimeDate,
65 GDCM_NAME_SPACE::ImageContentType contentType
68 std::vector<BrukerImage> CreateImageSet ( );
70 void getImhDataType(BrukerFieldData &bDPT,
71 std::string &mhdDataPixelType,
74 void cleanString(std::string &s);
76 bool CreateDirectory(std::string &dirNameout);
78 int CheckUserDirectory(std::string &userDirName);
79 void DealWithMultiStudyDirectory(GDCM_NAME_SPACE::DirListType &fileNames);
80 void DealWithSingleStudyDirectory(GDCM_NAME_SPACE::DirListType &fileNames);
81 void DealWithNiveau1(std::string &level1Directory, std::string ¤tOutputDirName);
82 void DealWithNiveau2(std::string &level2Directory, std::string ¤tOutputDirName);
83 void DealWithNiveau3(std::string &level3Directory, std::string ¤tOutputDirName);
85 void dealWithCarto(GDCM_NAME_SPACE::DirListType &fileNames, int NX, int NY, int nbSlices,
86 double fovX, double fovY, double sliceDistance,
87 char *copyFile, std::string ¤tOutputDirName,
88 char *outputMhdFileName, char *output2dseqCartoName);
92 // these ones are for debugging only
93 // don't bbfy the accessors.
99 std::string InputDirName;
100 std::string OutputDirName;
105 std::string subject_entry;
106 std::string subject_position;
107 std::string subject_date;
108 std::string subject_study_name;
114 BrukerDataSet br_subject;
115 BrukerDataSet br_acqp;
116 BrukerDataSet br_method;
117 BrukerDataSet br_d3proc;
118 BrukerDataSet br_isa;
119 BrukerDataSet br_reco;
121 std::vector<BrukerImage> imageSet;
125 std::string strStudyUID;
126 std::string strSerieUID;
127 std::string strStudyDescr;
128 std::string strSerieDescr;
129 std::string strStudyTimeDate;
130 std::string strPatientName;
131 std::string subject_name; // cleaned strPatientName