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 "vtkMedicalImageProperties.h"
30
31class vtkGDCMMedicalImagePropertiesInternals;
32//BTX
33namespace gdcm { class File; }
34//ETX
35
36class VTK_EXPORT vtkGDCMMedicalImageProperties : public vtkMedicalImageProperties
37{
38public:
40 vtkTypeMacro(vtkGDCMMedicalImageProperties,vtkMedicalImageProperties);
41 void PrintSelf(ostream& os, vtkIndent indent);
42
46 virtual void Clear();
47
48/*
50
54 vtkSetStringMacro(PatientName);
55 vtkGetStringMacro(PatientName);
57
59
63 vtkSetStringMacro(PatientID);
64 vtkGetStringMacro(PatientID);
66
68
74 vtkSetStringMacro(PatientAge);
75 vtkGetStringMacro(PatientAge);
77
84 static int GetAgeAsFields(const char *age, int &year, int &month, int &week, int &day);
85
86 // For Tcl:
87 // From C++ use GetPatientAge + GetAgeAsField
88 // Those function parse a DICOM string, and return the value of the number expressed
89 // this is either expressed in year, month or days. Thus if a string is expressed in years
90 // GetPatientAgeDay/GetPatientAgeWeek/GetPatientAgeMonth will return 0
91 int GetPatientAgeYear();
92 int GetPatientAgeMonth();
93 int GetPatientAgeWeek();
94 int GetPatientAgeDay();
95
97
101 vtkSetStringMacro(PatientSex);
102 vtkGetStringMacro(PatientSex);
104
106
111 vtkSetStringMacro(PatientBirthDate);
112 vtkGetStringMacro(PatientBirthDate);
114
115 // For Tcl:
116 // From C++ use GetPatientBirthDate + GetDateAsFields
117 int GetPatientBirthDateYear();
118 int GetPatientBirthDateMonth();
119 int GetPatientBirthDateDay();
120
122
127 vtkSetStringMacro(StudyDate);
128 vtkGetStringMacro(StudyDate);
130
132
137 vtkSetStringMacro(AcquisitionDate);
138 vtkGetStringMacro(AcquisitionDate);
140
141 // For Tcl:
142 // From C++ use GetAcquisitionDate + GetDateAsFields
143 int GetAcquisitionDateYear();
144 int GetAcquisitionDateMonth();
145 int GetAcquisitionDateDay();
146
148
153 vtkSetStringMacro(StudyTime);
154 vtkGetStringMacro(StudyTime);
156
158
163 vtkSetStringMacro(AcquisitionTime);
164 vtkGetStringMacro(AcquisitionTime);
166
168
173 vtkSetStringMacro(ImageDate);
174 vtkGetStringMacro(ImageDate);
176
177 // For Tcl:
178 // From C++ use GetImageDate + GetDateAsFields
179 int GetImageDateYear();
180 int GetImageDateMonth();
181 int GetImageDateDay();
182
188 static int GetDateAsFields(const char *date, int &year, int &month, int &day);
189
196 static int GetDateAsLocale(const char *date, char *locale);
197
199
204 vtkSetStringMacro(ImageTime);
205 vtkGetStringMacro(ImageTime);
207
209
213 vtkSetStringMacro(ImageNumber);
214 vtkGetStringMacro(ImageNumber);
216
218
222 vtkSetStringMacro(SeriesNumber);
223 vtkGetStringMacro(SeriesNumber);
225
227
232 vtkSetStringMacro(SeriesDescription);
233 vtkGetStringMacro(SeriesDescription);
235
237
241 vtkSetStringMacro(StudyID);
242 vtkGetStringMacro(StudyID);
244
246
250 vtkSetStringMacro(StudyDescription);
251 vtkGetStringMacro(StudyDescription);
253
255
259 vtkSetStringMacro(Modality);
260 vtkGetStringMacro(Modality);
262
264
268 vtkSetStringMacro(Manufacturer);
269 vtkGetStringMacro(Manufacturer);
271
273
277 vtkSetStringMacro(ManufacturerModelName);
278 vtkGetStringMacro(ManufacturerModelName);
280
282
286 vtkSetStringMacro(StationName);
287 vtkGetStringMacro(StationName);
289
291
295 vtkSetStringMacro(InstitutionName);
296 vtkGetStringMacro(InstitutionName);
298
300
304 vtkSetStringMacro(ConvolutionKernel);
305 vtkGetStringMacro(ConvolutionKernel);
307
309
313 vtkSetStringMacro(SliceThickness);
314 vtkGetStringMacro(SliceThickness);
315 virtual double GetSliceThicknessAsDouble();
317
319
323 vtkSetStringMacro(KVP);
324 vtkGetStringMacro(KVP);
326
328
333 vtkSetStringMacro(GantryTilt);
334 vtkGetStringMacro(GantryTilt);
335 virtual double GetGantryTiltAsDouble();
337
339
345 vtkSetStringMacro(EchoTime);
346 vtkGetStringMacro(EchoTime);
348
350
355 vtkSetStringMacro(EchoTrainLength);
356 vtkGetStringMacro(EchoTrainLength);
358
360
366 vtkSetStringMacro(RepetitionTime);
367 vtkGetStringMacro(RepetitionTime);
369
371
375 vtkSetStringMacro(ExposureTime);
376 vtkGetStringMacro(ExposureTime);
378
380
384 vtkSetStringMacro(XRayTubeCurrent);
385 vtkGetStringMacro(XRayTubeCurrent);
387
389
394 vtkSetStringMacro(Exposure);
395 vtkGetStringMacro(Exposure);
397
398 // Interface to allow insertion of user define values, for instance in DICOM one would want to
399 // store the Protocol Name (0018,1030), in this case one would do:
400 // AddUserDefinedValue( "Protocol Name", "T1W/SE/1024" );
401 void AddUserDefinedValue(const char *name, const char *value);
402 // Get a particular user value
403 const char *GetUserDefinedValue(const char *name);
404 // Get the number of user defined values
405 unsigned int GetNumberOfUserDefinedValues();
406 // Get a name/value by index
407 const char *GetUserDefinedNameByIndex(unsigned int idx);
408 const char *GetUserDefinedValueByIndex(unsigned int idx);
409
413 virtual void DeepCopy(vtkGDCMMedicalImageProperties *p);
414
416
425 virtual void AddWindowLevelPreset(double w, double l);
426 virtual void RemoveWindowLevelPreset(double w, double l);
427 virtual void RemoveAllWindowLevelPresets();
428 virtual int GetNumberOfWindowLevelPresets();
429 virtual int HasWindowLevelPreset(double w, double l);
430 virtual int GetNthWindowLevelPreset(int idx, double *w, double *l);
431 virtual double* GetNthWindowLevelPreset(int idx);
432 virtual void SetNthWindowLevelPresetComment(int idx, const char *comment);
433 virtual const char* GetNthWindowLevelPresetComment(int idx);
435
437
442 const char *GetInstanceUIDFromSliceID(int volumeidx, int sliceid);
443 void SetInstanceUIDFromSliceID(int volumeidx, int sliceid, const char *uid);
445
450 int GetSliceIDFromInstanceUID(int &volumeidx, const char *uid);
451
452//BTX
453 typedef enum {
454 AXIAL = 0,
455 CORONAL,
456 SAGITTAL
457 } OrientationType;
458//ETX
459 int GetOrientationType(int volumeidx);
460 void SetOrientationType(int volumeidx, int orientation);
461 static const char *GetStringFromOrientationType(unsigned int type);
462*/
463protected:
466
467//BTX
468 friend class vtkGDCMImageReader;
470 friend class vtkGDCMImageWriter;
471 void PushBackFile(gdcm::File const &f);
472 gdcm::File const & GetFile(unsigned int t);
473//ETX
474
475private:
476 vtkGDCMMedicalImagePropertiesInternals *Internals;
477
479 void operator=(const vtkGDCMMedicalImageProperties&); // Not implemented.
480};
481
482#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)