00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkMedicalImageProperties_h
00027 #define __vtkMedicalImageProperties_h
00028
00029 #include "vtkObject.h"
00030
00031 class vtkMedicalImagePropertiesInternals;
00032
00033 class VTK_IO_EXPORT vtkMedicalImageProperties : public vtkObject
00034 {
00035 public:
00036 static vtkMedicalImageProperties *New();
00037 vtkTypeRevisionMacro(vtkMedicalImageProperties,vtkObject);
00038 void PrintSelf(ostream& os, vtkIndent indent);
00039
00041 virtual void Clear();
00042
00044
00045 vtkSetStringMacro(PatientName);
00046 vtkGetStringMacro(PatientName);
00048
00050
00051 vtkSetStringMacro(PatientID);
00052 vtkGetStringMacro(PatientID);
00054
00056
00059 vtkSetStringMacro(PatientAge);
00060 vtkGetStringMacro(PatientAge);
00062
00067 static int GetAgeAsFields(const char *age, int &year, int &month, int &week, int &day);
00068
00069
00070
00071
00072
00073
00074 int GetPatientAgeYear();
00075 int GetPatientAgeMonth();
00076 int GetPatientAgeWeek();
00077 int GetPatientAgeDay();
00078
00080
00081 vtkSetStringMacro(PatientSex);
00082 vtkGetStringMacro(PatientSex);
00084
00086
00088 vtkSetStringMacro(PatientBirthDate);
00089 vtkGetStringMacro(PatientBirthDate);
00091
00092
00093
00094 int GetPatientBirthDateYear();
00095 int GetPatientBirthDateMonth();
00096 int GetPatientBirthDateDay();
00097
00099
00100 vtkSetStringMacro(StudyDate);
00101 vtkGetStringMacro(StudyDate);
00103
00105
00107 vtkSetStringMacro(AcquisitionDate);
00108 vtkGetStringMacro(AcquisitionDate);
00110
00111
00112
00113 int GetAcquisitionDateYear();
00114 int GetAcquisitionDateMonth();
00115 int GetAcquisitionDateDay();
00116
00118
00120 vtkSetStringMacro(StudyTime);
00121 vtkGetStringMacro(StudyTime);
00123
00125
00128 vtkSetStringMacro(AcquisitionTime);
00129 vtkGetStringMacro(AcquisitionTime);
00131
00133
00135 vtkSetStringMacro(ImageDate);
00136 vtkGetStringMacro(ImageDate);
00138
00139
00140
00141 int GetImageDateYear();
00142 int GetImageDateMonth();
00143 int GetImageDateDay();
00144
00148 static int GetDateAsFields(const char *date, int &year, int &month, int &day);
00149
00153 static int GetDateAsLocale(const char *date, char *locale);
00154
00156
00158 vtkSetStringMacro(ImageTime);
00159 vtkGetStringMacro(ImageTime);
00161
00163
00164 vtkSetStringMacro(ImageNumber);
00165 vtkGetStringMacro(ImageNumber);
00167
00169
00170 vtkSetStringMacro(SeriesNumber);
00171 vtkGetStringMacro(SeriesNumber);
00173
00175
00177 vtkSetStringMacro(SeriesDescription);
00178 vtkGetStringMacro(SeriesDescription);
00180
00182
00183 vtkSetStringMacro(StudyID);
00184 vtkGetStringMacro(StudyID);
00186
00188
00189 vtkSetStringMacro(StudyDescription);
00190 vtkGetStringMacro(StudyDescription);
00192
00194
00195 vtkSetStringMacro(Modality);
00196 vtkGetStringMacro(Modality);
00198
00200
00201 vtkSetStringMacro(Manufacturer);
00202 vtkGetStringMacro(Manufacturer);
00204
00206
00207 vtkSetStringMacro(ManufacturerModelName);
00208 vtkGetStringMacro(ManufacturerModelName);
00210
00212
00213 vtkSetStringMacro(StationName);
00214 vtkGetStringMacro(StationName);
00216
00218
00219 vtkSetStringMacro(InstitutionName);
00220 vtkGetStringMacro(InstitutionName);
00222
00224
00226 vtkSetStringMacro(ConvolutionKernel);
00227 vtkGetStringMacro(ConvolutionKernel);
00229
00231
00233 vtkSetStringMacro(SliceThickness);
00234 vtkGetStringMacro(SliceThickness);
00235 virtual double GetSliceThicknessAsDouble();
00237
00239
00241 vtkSetStringMacro(KVP);
00242 vtkGetStringMacro(KVP);
00244
00246
00248 vtkSetStringMacro(GantryTilt);
00249 vtkGetStringMacro(GantryTilt);
00250 virtual double GetGantryTiltAsDouble();
00252
00254
00256 vtkSetStringMacro(EchoTime);
00257 vtkGetStringMacro(EchoTime);
00259
00261
00263 vtkSetStringMacro(EchoTrainLength);
00264 vtkGetStringMacro(EchoTrainLength);
00266
00268
00271 vtkSetStringMacro(RepetitionTime);
00272 vtkGetStringMacro(RepetitionTime);
00274
00276
00278 vtkSetStringMacro(ExposureTime);
00279 vtkGetStringMacro(ExposureTime);
00281
00283
00284 vtkSetStringMacro(XRayTubeCurrent);
00285 vtkGetStringMacro(XRayTubeCurrent);
00287
00289
00291 vtkSetStringMacro(Exposure);
00292 vtkGetStringMacro(Exposure);
00294
00295
00296
00297
00298 void AddUserDefinedValue(const char *name, const char *value);
00299
00300 const char *GetUserDefinedValue(const char *name);
00301
00302 unsigned int GetNumberOfUserDefinedValues();
00303
00304 const char *GetUserDefinedNameByIndex(unsigned int idx);
00305 const char *GetUserDefinedValueByIndex(unsigned int idx);
00306
00308 virtual void DeepCopy(vtkMedicalImageProperties *p);
00309
00311
00318 virtual void AddWindowLevelPreset(double w, double l);
00319 virtual void RemoveWindowLevelPreset(double w, double l);
00320 virtual void RemoveAllWindowLevelPresets();
00321 virtual int GetNumberOfWindowLevelPresets();
00322 virtual int HasWindowLevelPreset(double w, double l);
00323 virtual int GetNthWindowLevelPreset(int idx, double *w, double *l);
00324 virtual double* GetNthWindowLevelPreset(int idx);
00325 virtual void SetNthWindowLevelPresetComment(int idx, const char *comment);
00326 virtual const char* GetNthWindowLevelPresetComment(int idx);
00328
00330
00334 const char *GetInstanceUIDFromSliceID(int volumeidx, int sliceid);
00335 void SetInstanceUIDFromSliceID(int volumeidx, int sliceid, const char *uid);
00337
00340 int GetSliceIDFromInstanceUID(int &volumeidx, const char *uid);
00341
00342
00343 typedef enum {
00344 AXIAL = 0,
00345 CORONAL,
00346 SAGITTAL
00347 } OrientationType;
00348
00349 int GetOrientationType(int volumeidx);
00350 void SetOrientationType(int volumeidx, int orientation);
00351 static const char *GetStringFromOrientationType(unsigned int type);
00352
00353 protected:
00354 vtkMedicalImageProperties();
00355 ~vtkMedicalImageProperties();
00356
00357 char *StudyDate;
00358 char *AcquisitionDate;
00359 char *StudyTime;
00360 char *AcquisitionTime;
00361 char *ConvolutionKernel;
00362 char *EchoTime;
00363 char *EchoTrainLength;
00364 char *Exposure;
00365 char *ExposureTime;
00366 char *GantryTilt;
00367 char *ImageDate;
00368 char *ImageNumber;
00369 char *ImageTime;
00370 char *InstitutionName;
00371 char *KVP;
00372 char *ManufacturerModelName;
00373 char *Manufacturer;
00374 char *Modality;
00375 char *PatientAge;
00376 char *PatientBirthDate;
00377 char *PatientID;
00378 char *PatientName;
00379 char *PatientSex;
00380 char *RepetitionTime;
00381 char *SeriesDescription;
00382 char *SeriesNumber;
00383 char *SliceThickness;
00384 char *StationName;
00385 char *StudyDescription;
00386 char *StudyID;
00387 char *XRayTubeCurrent;
00388
00390
00391 vtkMedicalImagePropertiesInternals *Internals;
00392
00394
00395 private:
00396 vtkMedicalImageProperties(const vtkMedicalImageProperties&);
00397 void operator=(const vtkMedicalImageProperties&);
00398 };
00399
00400 #endif