1 /*=========================================================================
4 Module: $RCSfile: marGdcmDicom.h,v $
6 Date: $Date: 2008/10/31 16:32:55 $
7 Version: $Revision: 1.1 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
18 #ifndef __MAR__KERNEL__MARGDCMDICOM__HXX__
19 #define __MAR__KERNEL__MARGDCMDICOM__HXX__
24 #include <wx/string.h>
29 #include "gdcmDicomDir.h"
30 #include "gdcmSerieHelper.h"
31 #include "gdcmDicomDirPatient.h"
32 #include "gdcmDicomDirStudy.h"
33 #include "gdcmDicomDirSerie.h"
34 #include "gdcmDicomDirImage.h"
35 #include "marDicomBase.h"
41 typedef std::vector<wxArrayString> SerieInfo; //DICOM info for each serie
43 * Shouldn't we break the dependencies to wx ???
45 * We use vector instead of list for efficiency: for access time
46 * futhermore the number of patient is not changing a lot, so we
47 * might add the number of patient to params.dat, to allocate the right
53 // class MAR_KERNEL_EXPORT marGdcmDicom : public marObject
56 class marGdcmDicom : public marFilesBase
60 marGdcmDicom( marParameters* p = NULL );
66 void loadActualSerie(wxGauge* gauge );
67 void loadVolume( bool force = false, wxGauge* gauge = NULL);
68 void PrepareLoadVolumeDispers();
69 virtual bool loadImage(int i);
70 bool loadFileDicom(void* p_vol,int *dim,char *namefile);
77 void Cleaning_gdcmFileList();
79 void copyFrom( const marObject& from );
83 bool save( std::ofstream& os );
84 bool load( std::ifstream& is );
86 void CreateDicomFile( );
87 void FillDicomInfo(bool parseDir);
89 wxString GetPatientName();
91 GDCM_NAME_SPACE::DicomDir* getGdcmDicomDir();
93 GDCM_NAME_SPACE::DicomDirStudy* getActualStudy();
95 void setActualPatient(GDCM_NAME_SPACE::DicomDirPatient *patient);
96 void setActualStudy(GDCM_NAME_SPACE::DicomDirStudy *study);
97 void setActualSerie(GDCM_NAME_SPACE::DicomDirSerie *serie);
99 void setIniSlice(int iniSlice);
100 void setEndSlice(int endSlice);
102 GDCM_NAME_SPACE::DicomDirSerie *getActualSerie();
108 std::vector< SerieInfo > m_DicomInfo;
109 GDCM_NAME_SPACE::DicomDir *_dicomDir;
110 GDCM_NAME_SPACE::DicomDirPatient *_actualPatient;
111 GDCM_NAME_SPACE::DicomDirStudy *_actualStudy;
112 GDCM_NAME_SPACE::DicomDirSerie *_actualSerie;
113 GDCM_NAME_SPACE::DicomDirImage *_actualImage;
118 virtual void CreateSerieHelper();
119 void CreateEmptyVoxel();
120 void ExtactSpacing();
121 void ExtactInterceptSlope();
123 bool SerieVerification( GDCM_NAME_SPACE::FileList *gdcmFileList );
124 bool SerieVerificationEqImageSize( GDCM_NAME_SPACE::FileList *gdcmFileList );
125 // bool SerieVerificationEqImageOrientation( GDCM_NAME_SPACE::GdcmFileList *gdcmFileList );
130 GDCM_NAME_SPACE::FileList _gdcmFileList;
135 //-------------------------------------------------------------------
137 class marGdcmDicomILPD : public marGdcmDicom
140 marGdcmDicomILPD( marParameters* p = NULL );
142 virtual void CreateSerieHelper();
146 //-------------------------------------------------------------------
148 #endif // __MAR__KERNEL__MARGDCMDICOM__HXX__