vtkgdcm
vtkGDCMMedicalImageProperties.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
26#ifndef VTKGDCMMEDICALIMAGEPROPERTIES_H
27#define VTKGDCMMEDICALIMAGEPROPERTIES_H
28
29#include "vtkgdcmModule.h"
30#include "vtkMedicalImageProperties.h"
31
32class vtkGDCMMedicalImagePropertiesInternals;
33//BTX
34namespace gdcm { class File; }
35//ETX
36
37class VTKGDCM_EXPORT vtkGDCMMedicalImageProperties : public vtkMedicalImageProperties
38{
39public:
41 vtkTypeMacro(vtkGDCMMedicalImageProperties,vtkMedicalImageProperties);
42 void PrintSelf(ostream& os, vtkIndent indent);
43
47 virtual void Clear();
48
49/*
51
55 vtkSetStringMacro(PatientName);
56 vtkGetStringMacro(PatientName);
58
60
64 vtkSetStringMacro(PatientID);
65 vtkGetStringMacro(PatientID);
67
69
75 vtkSetStringMacro(PatientAge);
76 vtkGetStringMacro(PatientAge);
78
85 static int GetAgeAsFields(const char *age, int &year, int &month, int &week, int &day);
86
87 // For Tcl:
88 // From C++ use GetPatientAge + GetAgeAsField
89 // Those function parse a DICOM string, and return the value of the number expressed
90 // this is either expressed in year, month or days. Thus if a string is expressed in years
91 // GetPatientAgeDay/GetPatientAgeWeek/GetPatientAgeMonth will return 0
92 int GetPatientAgeYear();
93 int GetPatientAgeMonth();
94 int GetPatientAgeWeek();
95 int GetPatientAgeDay();
96
98
102 vtkSetStringMacro(PatientSex);
103 vtkGetStringMacro(PatientSex);
105
107
112 vtkSetStringMacro(PatientBirthDate);
113 vtkGetStringMacro(PatientBirthDate);
115
116 // For Tcl:
117 // From C++ use GetPatientBirthDate + GetDateAsFields
118 int GetPatientBirthDateYear();
119 int GetPatientBirthDateMonth();
120 int GetPatientBirthDateDay();
121
123
128 vtkSetStringMacro(StudyDate);
129 vtkGetStringMacro(StudyDate);
131
133
138 vtkSetStringMacro(AcquisitionDate);
139 vtkGetStringMacro(AcquisitionDate);
141
142 // For Tcl:
143 // From C++ use GetAcquisitionDate + GetDateAsFields
144 int GetAcquisitionDateYear();
145 int GetAcquisitionDateMonth();
146 int GetAcquisitionDateDay();
147
149
154 vtkSetStringMacro(StudyTime);
155 vtkGetStringMacro(StudyTime);
157
159
164 vtkSetStringMacro(AcquisitionTime);
165 vtkGetStringMacro(AcquisitionTime);
167
169
174 vtkSetStringMacro(ImageDate);
175 vtkGetStringMacro(ImageDate);
177
178 // For Tcl:
179 // From C++ use GetImageDate + GetDateAsFields
180 int GetImageDateYear();
181 int GetImageDateMonth();
182 int GetImageDateDay();
183
189 static int GetDateAsFields(const char *date, int &year, int &month, int &day);
190
197 static int GetDateAsLocale(const char *date, char *locale);
198
200
205 vtkSetStringMacro(ImageTime);
206 vtkGetStringMacro(ImageTime);
208
210
214 vtkSetStringMacro(ImageNumber);
215 vtkGetStringMacro(ImageNumber);
217
219
223 vtkSetStringMacro(SeriesNumber);
224 vtkGetStringMacro(SeriesNumber);
226
228
233 vtkSetStringMacro(SeriesDescription);
234 vtkGetStringMacro(SeriesDescription);
236
238
242 vtkSetStringMacro(StudyID);
243 vtkGetStringMacro(StudyID);
245
247
251 vtkSetStringMacro(StudyDescription);
252 vtkGetStringMacro(StudyDescription);
254
256
260 vtkSetStringMacro(Modality);
261 vtkGetStringMacro(Modality);
263
265
269 vtkSetStringMacro(Manufacturer);
270 vtkGetStringMacro(Manufacturer);
272
274
278 vtkSetStringMacro(ManufacturerModelName);
279 vtkGetStringMacro(ManufacturerModelName);
281
283
287 vtkSetStringMacro(StationName);
288 vtkGetStringMacro(StationName);
290
292
296 vtkSetStringMacro(InstitutionName);
297 vtkGetStringMacro(InstitutionName);
299
301
305 vtkSetStringMacro(ConvolutionKernel);
306 vtkGetStringMacro(ConvolutionKernel);
308
310
314 vtkSetStringMacro(SliceThickness);
315 vtkGetStringMacro(SliceThickness);
316 virtual double GetSliceThicknessAsDouble();
318
320
324 vtkSetStringMacro(KVP);
325 vtkGetStringMacro(KVP);
327
329
334 vtkSetStringMacro(GantryTilt);
335 vtkGetStringMacro(GantryTilt);
336 virtual double GetGantryTiltAsDouble();
338
340
346 vtkSetStringMacro(EchoTime);
347 vtkGetStringMacro(EchoTime);
349
351
356 vtkSetStringMacro(EchoTrainLength);
357 vtkGetStringMacro(EchoTrainLength);
359
361
367 vtkSetStringMacro(RepetitionTime);
368 vtkGetStringMacro(RepetitionTime);
370
372
376 vtkSetStringMacro(ExposureTime);
377 vtkGetStringMacro(ExposureTime);
379
381
385 vtkSetStringMacro(XRayTubeCurrent);
386 vtkGetStringMacro(XRayTubeCurrent);
388
390
395 vtkSetStringMacro(Exposure);
396 vtkGetStringMacro(Exposure);
398
399 // Interface to allow insertion of user define values, for instance in DICOM one would want to
400 // store the Protocol Name (0018,1030), in this case one would do:
401 // AddUserDefinedValue( "Protocol Name", "T1W/SE/1024" );
402 void AddUserDefinedValue(const char *name, const char *value);
403 // Get a particular user value
404 const char *GetUserDefinedValue(const char *name);
405 // Get the number of user defined values
406 unsigned int GetNumberOfUserDefinedValues();
407 // Get a name/value by index
408 const char *GetUserDefinedNameByIndex(unsigned int idx);
409 const char *GetUserDefinedValueByIndex(unsigned int idx);
410
414 virtual void DeepCopy(vtkGDCMMedicalImageProperties *p);
415
417
426 virtual void AddWindowLevelPreset(double w, double l);
427 virtual void RemoveWindowLevelPreset(double w, double l);
428 virtual void RemoveAllWindowLevelPresets();
429 virtual int GetNumberOfWindowLevelPresets();
430 virtual int HasWindowLevelPreset(double w, double l);
431 virtual int GetNthWindowLevelPreset(int idx, double *w, double *l);
432 virtual double* GetNthWindowLevelPreset(int idx);
433 virtual void SetNthWindowLevelPresetComment(int idx, const char *comment);
434 virtual const char* GetNthWindowLevelPresetComment(int idx);
436
438
443 const char *GetInstanceUIDFromSliceID(int volumeidx, int sliceid);
444 void SetInstanceUIDFromSliceID(int volumeidx, int sliceid, const char *uid);
446
451 int GetSliceIDFromInstanceUID(int &volumeidx, const char *uid);
452
453//BTX
454 typedef enum {
455 AXIAL = 0,
456 CORONAL,
457 SAGITTAL
458 } OrientationType;
459//ETX
460 int GetOrientationType(int volumeidx);
461 void SetOrientationType(int volumeidx, int orientation);
462 static const char *GetStringFromOrientationType(unsigned int type);
463*/
464protected:
467
468//BTX
469 friend class vtkGDCMImageReader;
471 friend class vtkGDCMImageWriter;
472 void PushBackFile(gdcm::File const &f);
473 gdcm::File const & GetFile(unsigned int t);
474//ETX
475
476private:
477 vtkGDCMMedicalImagePropertiesInternals *Internals;
478
480 void operator=(const vtkGDCMMedicalImageProperties&); // Not implemented.
481};
482
483#endif
read DICOM Image files (Pixel Data)
read DICOM Image files (Pixel Data)
write DICOM files
some medical image properties.
gdcm::File const & GetFile(unsigned int t)
virtual void Clear()
Convenience method to reset all fields to an empty string/value.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkGDCMMedicalImageProperties * New()
void PushBackFile(gdcm::File const &f)