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 void DealWithNiveau1(std::string level1Directory, std::string currentOutputDirName);
79 void DealWithNiveau2(std::string level2Directory, std::string currentOutputDirName);
80 void DealWithNiveau3(std::string level3Directory, std::string currentOutputDirName);
82 void dealWithCarto(GDCM_NAME_SPACE::DirListType &fileNames, int NX, int NY, int nbSlices,
83 double fovX, double fovY, double sliceDistance,
84 char *copyFile, std::string ¤tOutputDirName,
85 char *outputMhdFileName, char *output2dseqCartoName);
89 // these ones are for debugging only
90 // don't bbfy the accessors.
96 std::string InputDirName;
97 std::string OutputDirName;
103 BrukerDataSet br_subject;
104 BrukerDataSet br_acqp;
105 BrukerDataSet br_method;
106 BrukerDataSet br_d3proc;
107 BrukerDataSet br_isa;
108 BrukerDataSet br_reco;
110 std::vector<BrukerImage> imageSet;
114 std::string strStudyUID;
115 std::string strSerieUID;
116 std::string strStudyDescr;
117 std::string strSerieDescr;
118 std::string strStudyTimeDate;
119 std::string strPatientName;