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 vtkTypeMacro(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
00075 int GetPatientAgeYear();
00076 int GetPatientAgeMonth();
00077 int GetPatientAgeWeek();
00078 int GetPatientAgeDay();
00079
00081
00082 vtkSetStringMacro(PatientSex);
00083 vtkGetStringMacro(PatientSex);
00085
00087
00089 vtkSetStringMacro(PatientBirthDate);
00090 vtkGetStringMacro(PatientBirthDate);
00092
00093
00094
00095 int GetPatientBirthDateYear();
00096 int GetPatientBirthDateMonth();
00097 int GetPatientBirthDateDay();
00098
00100
00101 vtkSetStringMacro(StudyDate);
00102 vtkGetStringMacro(StudyDate);
00104
00106
00108 vtkSetStringMacro(AcquisitionDate);
00109 vtkGetStringMacro(AcquisitionDate);
00111
00112
00113
00114 int GetAcquisitionDateYear();
00115 int GetAcquisitionDateMonth();
00116 int GetAcquisitionDateDay();
00117
00119
00121 vtkSetStringMacro(StudyTime);
00122 vtkGetStringMacro(StudyTime);
00124
00126
00129 vtkSetStringMacro(AcquisitionTime);
00130 vtkGetStringMacro(AcquisitionTime);
00132
00134
00136 vtkSetStringMacro(ImageDate);
00137 vtkGetStringMacro(ImageDate);
00139
00140
00141
00142 int GetImageDateYear();
00143 int GetImageDateMonth();
00144 int GetImageDateDay();
00145
00149 static int GetDateAsFields(const char *date, int &year, int &month, int &day);
00150
00154 static int GetTimeAsFields(const char *time, int &hour, int &minute, int &second );
00155
00159 static int GetDateAsLocale(const char *date, char *locale);
00160
00162
00164 vtkSetStringMacro(ImageTime);
00165 vtkGetStringMacro(ImageTime);
00167
00169
00170 vtkSetStringMacro(ImageNumber);
00171 vtkGetStringMacro(ImageNumber);
00173
00175
00176 vtkSetStringMacro(SeriesNumber);
00177 vtkGetStringMacro(SeriesNumber);
00179
00181
00183 vtkSetStringMacro(SeriesDescription);
00184 vtkGetStringMacro(SeriesDescription);
00186
00188
00189 vtkSetStringMacro(StudyID);
00190 vtkGetStringMacro(StudyID);
00192
00194
00195 vtkSetStringMacro(StudyDescription);
00196 vtkGetStringMacro(StudyDescription);
00198
00200
00201 vtkSetStringMacro(Modality);
00202 vtkGetStringMacro(Modality);
00204
00206
00207 vtkSetStringMacro(Manufacturer);
00208 vtkGetStringMacro(Manufacturer);
00210
00212
00213 vtkSetStringMacro(ManufacturerModelName);
00214 vtkGetStringMacro(ManufacturerModelName);
00216
00218
00219 vtkSetStringMacro(StationName);
00220 vtkGetStringMacro(StationName);
00222
00224
00225 vtkSetStringMacro(InstitutionName);
00226 vtkGetStringMacro(InstitutionName);
00228
00230
00232 vtkSetStringMacro(ConvolutionKernel);
00233 vtkGetStringMacro(ConvolutionKernel);
00235
00237
00239 vtkSetStringMacro(SliceThickness);
00240 vtkGetStringMacro(SliceThickness);
00241 virtual double GetSliceThicknessAsDouble();
00243
00245
00247 vtkSetStringMacro(KVP);
00248 vtkGetStringMacro(KVP);
00250
00252
00254 vtkSetStringMacro(GantryTilt);
00255 vtkGetStringMacro(GantryTilt);
00256 virtual double GetGantryTiltAsDouble();
00258
00260
00262 vtkSetStringMacro(EchoTime);
00263 vtkGetStringMacro(EchoTime);
00265
00267
00269 vtkSetStringMacro(EchoTrainLength);
00270 vtkGetStringMacro(EchoTrainLength);
00272
00274
00277 vtkSetStringMacro(RepetitionTime);
00278 vtkGetStringMacro(RepetitionTime);
00280
00282
00284 vtkSetStringMacro(ExposureTime);
00285 vtkGetStringMacro(ExposureTime);
00287
00289
00290 vtkSetStringMacro(XRayTubeCurrent);
00291 vtkGetStringMacro(XRayTubeCurrent);
00293
00295
00297 vtkSetStringMacro(Exposure);
00298 vtkGetStringMacro(Exposure);
00300
00302
00303 vtkSetVector6Macro(DirectionCosine,double);
00304 vtkGetVector6Macro(DirectionCosine,double);
00306
00307
00308
00309
00310
00311 virtual void AddUserDefinedValue(const char *name, const char *value);
00312 virtual const char *GetUserDefinedValue(const char *name);
00313 virtual unsigned int GetNumberOfUserDefinedValues();
00314 virtual const char *GetUserDefinedNameByIndex(unsigned int idx);
00315 virtual const char *GetUserDefinedValueByIndex(unsigned int idx);
00316 virtual void RemoveAllUserDefinedValues();
00317
00319
00327 virtual int AddWindowLevelPreset(double w, double l);
00328 virtual void RemoveWindowLevelPreset(double w, double l);
00329 virtual void RemoveAllWindowLevelPresets();
00330 virtual int GetNumberOfWindowLevelPresets();
00331 virtual int HasWindowLevelPreset(double w, double l);
00332 virtual int GetWindowLevelPresetIndex(double w, double l);
00333 virtual int GetNthWindowLevelPreset(int idx, double *w, double *l);
00334 virtual double* GetNthWindowLevelPreset(int idx);
00335 virtual void SetNthWindowLevelPresetComment(int idx, const char *comment);
00336 virtual const char* GetNthWindowLevelPresetComment(int idx);
00338
00340
00344 const char *GetInstanceUIDFromSliceID(int volumeidx, int sliceid);
00345 void SetInstanceUIDFromSliceID(int volumeidx, int sliceid, const char *uid);
00347
00350 int GetSliceIDFromInstanceUID(int &volumeidx, const char *uid);
00351
00352
00353 typedef enum {
00354 AXIAL = 0,
00355 CORONAL,
00356 SAGITTAL
00357 } OrientationType;
00358
00359 int GetOrientationType(int volumeidx);
00360 void SetOrientationType(int volumeidx, int orientation);
00361 static const char *GetStringFromOrientationType(unsigned int type);
00362
00364 virtual void DeepCopy(vtkMedicalImageProperties *p);
00365
00366 protected:
00367 vtkMedicalImageProperties();
00368 ~vtkMedicalImageProperties();
00369
00370 char *StudyDate;
00371 char *AcquisitionDate;
00372 char *StudyTime;
00373 char *AcquisitionTime;
00374 char *ConvolutionKernel;
00375 char *EchoTime;
00376 char *EchoTrainLength;
00377 char *Exposure;
00378 char *ExposureTime;
00379 char *GantryTilt;
00380 char *ImageDate;
00381 char *ImageNumber;
00382 char *ImageTime;
00383 char *InstitutionName;
00384 char *KVP;
00385 char *ManufacturerModelName;
00386 char *Manufacturer;
00387 char *Modality;
00388 char *PatientAge;
00389 char *PatientBirthDate;
00390 char *PatientID;
00391 char *PatientName;
00392 char *PatientSex;
00393 char *RepetitionTime;
00394 char *SeriesDescription;
00395 char *SeriesNumber;
00396 char *SliceThickness;
00397 char *StationName;
00398 char *StudyDescription;
00399 char *StudyID;
00400 char *XRayTubeCurrent;
00401 double DirectionCosine[6];
00402
00403
00405
00406 vtkMedicalImagePropertiesInternals *Internals;
00407
00409
00410 private:
00411 vtkMedicalImageProperties(const vtkMedicalImageProperties&);
00412 void operator=(const vtkMedicalImageProperties&);
00413 };
00414
00415 #endif