/usr/include/vtk-5.8/vtkMedicalImageProperties.h is in libvtk5-dev 5.8.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkMedicalImageProperties.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkMedicalImageProperties - some medical image properties.
// .SECTION Description
// vtkMedicalImageProperties is a helper class that can be used by medical
// image readers and applications to encapsulate medical image/acquisition
// properties. Later on, this should probably be extended to add
// any user-defined property.
// .SECTION See Also
// vtkMedicalImageReader2
#ifndef __vtkMedicalImageProperties_h
#define __vtkMedicalImageProperties_h
#include "vtkObject.h"
class vtkMedicalImagePropertiesInternals;
class VTK_IO_EXPORT vtkMedicalImageProperties : public vtkObject
{
public:
static vtkMedicalImageProperties *New();
vtkTypeMacro(vtkMedicalImageProperties,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Convenience method to reset all fields to an emptry string/value
virtual void Clear();
// Description:
// Patient name
// For ex: DICOM (0010,0010) = DOE,JOHN
vtkSetStringMacro(PatientName);
vtkGetStringMacro(PatientName);
// Description:
// Patient ID
// For ex: DICOM (0010,0020) = 1933197
vtkSetStringMacro(PatientID);
vtkGetStringMacro(PatientID);
// Description:
// Patient age
// Format: nnnD, nnW, nnnM or nnnY (eventually nnD, nnW, nnY)
// with D (day), M (month), W (week), Y (year)
// For ex: DICOM (0010,1010) = 031Y
vtkSetStringMacro(PatientAge);
vtkGetStringMacro(PatientAge);
// Description:
// Take as input a string in VR=AS (DICOM PS3.5) and extract either
// different fields namely: year month week day
// Return 0 on error, 1 on success
// One can test fields if they are different from -1 upon success
static int GetAgeAsFields(const char *age, int &year, int &month, int &week, int &day);
// For Tcl:
// From C++ use GetPatientAge + GetAgeAsField
// Those function parse a DICOM string, and return the value of the number
// expressed this is either expressed in year, month or days. Thus if a
// string is expressed in years
// GetPatientAgeDay/GetPatientAgeWeek/GetPatientAgeMonth will return 0
int GetPatientAgeYear();
int GetPatientAgeMonth();
int GetPatientAgeWeek();
int GetPatientAgeDay();
// Description:
// Patient sex
// For ex: DICOM (0010,0040) = M
vtkSetStringMacro(PatientSex);
vtkGetStringMacro(PatientSex);
// Description:
// Patient birth date
// Format: yyyymmdd
// For ex: DICOM (0010,0030) = 19680427
vtkSetStringMacro(PatientBirthDate);
vtkGetStringMacro(PatientBirthDate);
// For Tcl:
// From C++ use GetPatientBirthDate + GetDateAsFields
int GetPatientBirthDateYear();
int GetPatientBirthDateMonth();
int GetPatientBirthDateDay();
// Description:
// Study Date
// Format: yyyymmdd
// For ex: DICOM (0008,0020) = 20030617
vtkSetStringMacro(StudyDate);
vtkGetStringMacro(StudyDate);
// Description:
// Acquisition Date
// Format: yyyymmdd
// For ex: DICOM (0008,0022) = 20030617
vtkSetStringMacro(AcquisitionDate);
vtkGetStringMacro(AcquisitionDate);
// For Tcl:
// From C++ use GetAcquisitionDate + GetDateAsFields
int GetAcquisitionDateYear();
int GetAcquisitionDateMonth();
int GetAcquisitionDateDay();
// Description:
// Study Time
// Format: hhmmss.frac (any trailing component(s) can be ommited)
// For ex: DICOM (0008,0030) = 162552.0705 or 230012, or 0012
vtkSetStringMacro(StudyTime);
vtkGetStringMacro(StudyTime);
// Description:
// Acquisition time
// Format: hhmmss.frac (any trailing component(s) can be ommited)
// For ex: DICOM (0008,0032) = 162552.0705 or 230012, or 0012
vtkSetStringMacro(AcquisitionTime);
vtkGetStringMacro(AcquisitionTime);
// Description:
// Image Date aka Content Date
// Format: yyyymmdd
// For ex: DICOM (0008,0023) = 20030617
vtkSetStringMacro(ImageDate);
vtkGetStringMacro(ImageDate);
// For Tcl:
// From C++ use GetImageDate + GetDateAsFields
int GetImageDateYear();
int GetImageDateMonth();
int GetImageDateDay();
// Description:
// Take as input a string in ISO 8601 date (YYYY/MM/DD) and extract the
// different fields namely: year month day
// Return 0 on error, 1 on success
static int GetDateAsFields(const char *date, int &year, int &month, int &day);
// Description:
// Take as input a string in VR:TM format (HHMMSS) and extract the
// different fields namely: hour, minute and second
// Return 0 on error, 1 on success
static int GetTimeAsFields(const char *time, int &hour, int &minute, int &second /* , long &milliseconds */);
// Description:
// Take as input a string in ISO 8601 date (YYYY/MM/DD) and construct a
// locale date based on the different fields (see GetDateAsFields to extract
// different fields)
// Return 0 on error, 1 on success
static int GetDateAsLocale(const char *date, char *locale);
// Description:
// Image Time
// Format: hhmmss.frac (any trailing component(s) can be ommited)
// For ex: DICOM (0008,0033) = 162552.0705 or 230012, or 0012
vtkSetStringMacro(ImageTime);
vtkGetStringMacro(ImageTime);
// Description:
// Image number
// For ex: DICOM (0020,0013) = 1
vtkSetStringMacro(ImageNumber);
vtkGetStringMacro(ImageNumber);
// Description:
// Series number
// For ex: DICOM (0020,0011) = 902
vtkSetStringMacro(SeriesNumber);
vtkGetStringMacro(SeriesNumber);
// Description:
// Series Description
// User provided description of the Series
// For ex: DICOM (0008,103e) = SCOUT
vtkSetStringMacro(SeriesDescription);
vtkGetStringMacro(SeriesDescription);
// Description:
// Study ID
// For ex: DICOM (0020,0010) = 37481
vtkSetStringMacro(StudyID);
vtkGetStringMacro(StudyID);
// Description:
// Study description
// For ex: DICOM (0008,1030) = BRAIN/C-SP/FACIAL
vtkSetStringMacro(StudyDescription);
vtkGetStringMacro(StudyDescription);
// Description:
// Modality
// For ex: DICOM (0008,0060)= CT
vtkSetStringMacro(Modality);
vtkGetStringMacro(Modality);
// Description:
// Manufacturer
// For ex: DICOM (0008,0070) = Siemens
vtkSetStringMacro(Manufacturer);
vtkGetStringMacro(Manufacturer);
// Description:
// Manufacturer's Model Name
// For ex: DICOM (0008,1090) = LightSpeed QX/i
vtkSetStringMacro(ManufacturerModelName);
vtkGetStringMacro(ManufacturerModelName);
// Description:
// Station Name
// For ex: DICOM (0008,1010) = LSPD_OC8
vtkSetStringMacro(StationName);
vtkGetStringMacro(StationName);
// Description:
// Institution Name
// For ex: DICOM (0008,0080) = FooCity Medical Center
vtkSetStringMacro(InstitutionName);
vtkGetStringMacro(InstitutionName);
// Description:
// Convolution Kernel (or algorithm used to reconstruct the data)
// For ex: DICOM (0018,1210) = Bone
vtkSetStringMacro(ConvolutionKernel);
vtkGetStringMacro(ConvolutionKernel);
// Description:
// Slice Thickness (Nominal reconstructed slice thickness, in mm)
// For ex: DICOM (0018,0050) = 0.273438
vtkSetStringMacro(SliceThickness);
vtkGetStringMacro(SliceThickness);
virtual double GetSliceThicknessAsDouble();
// Description:
// Peak kilo voltage output of the (x-ray) generator used
// For ex: DICOM (0018,0060) = 120
vtkSetStringMacro(KVP);
vtkGetStringMacro(KVP);
// Description:
// Gantry/Detector tilt (Nominal angle of tilt in degrees of the scanning
// gantry.)
// For ex: DICOM (0018,1120) = 15
vtkSetStringMacro(GantryTilt);
vtkGetStringMacro(GantryTilt);
virtual double GetGantryTiltAsDouble();
// Description:
// Echo Time
// (Time in ms between the middle of the excitation pulse and the peak of
// the echo produced)
// For ex: DICOM (0018,0081) = 105
vtkSetStringMacro(EchoTime);
vtkGetStringMacro(EchoTime);
// Description:
// Echo Train Length
// (Number of lines in k-space acquired per excitation per image)
// For ex: DICOM (0018,0091) = 35
vtkSetStringMacro(EchoTrainLength);
vtkGetStringMacro(EchoTrainLength);
// Description:
// Repetition Time
// The period of time in msec between the beginning of a pulse sequence and
// the beginning of the succeeding (essentially identical) pulse sequence.
// For ex: DICOM (0018,0080) = 2040
vtkSetStringMacro(RepetitionTime);
vtkGetStringMacro(RepetitionTime);
// Description:
// Exposure time (time of x-ray exposure in msec)
// For ex: DICOM (0018,1150) = 5
vtkSetStringMacro(ExposureTime);
vtkGetStringMacro(ExposureTime);
// Description:
// X-ray tube current (in mA)
// For ex: DICOM (0018,1151) = 400
vtkSetStringMacro(XRayTubeCurrent);
vtkGetStringMacro(XRayTubeCurrent);
// Description:
// Exposure (The exposure expressed in mAs, for example calculated
// from Exposure Time and X-ray Tube Current)
// For ex: DICOM (0018,1152) = 114
vtkSetStringMacro(Exposure);
vtkGetStringMacro(Exposure);
// Description:
// Get the direction cosine (default to 1,0,0,0,1,0)
vtkSetVector6Macro(DirectionCosine,double);
vtkGetVector6Macro(DirectionCosine,double);
// Interface to allow insertion of user define values, for instance in DICOM
// one would want to
// store the Protocol Name (0018,1030), in this case one would do:
// AddUserDefinedValue( "Protocol Name", "T1W/SE/1024" );
virtual void AddUserDefinedValue(const char *name, const char *value);
virtual const char *GetUserDefinedValue(const char *name);
virtual unsigned int GetNumberOfUserDefinedValues();
virtual const char *GetUserDefinedNameByIndex(unsigned int idx);
virtual const char *GetUserDefinedValueByIndex(unsigned int idx);
virtual void RemoveAllUserDefinedValues();
// Description:
// Add/Remove/Query the window/level presets that may have been associated
// to a medical image. Window is also known as 'width', level is also known
// as 'center'. The same window/level pair can not be added twice.
// As a convenience, a comment (aka Explanation) can be associated to
// a preset.
// For ex:
// \verbatim
// DICOM Window Center (0028,1050) = 00045\000470
// DICOM Window Width (0028,1051) = 0106\03412
// DICOM Window Center Width Explanation (0028,1055) = WINDOW1\WINDOW2
// \endverbatim
virtual int AddWindowLevelPreset(double w, double l);
virtual void RemoveWindowLevelPreset(double w, double l);
virtual void RemoveAllWindowLevelPresets();
virtual int GetNumberOfWindowLevelPresets();
virtual int HasWindowLevelPreset(double w, double l);
virtual int GetWindowLevelPresetIndex(double w, double l);
virtual int GetNthWindowLevelPreset(int idx, double *w, double *l);
virtual double* GetNthWindowLevelPreset(int idx);
virtual void SetNthWindowLevelPresetComment(int idx, const char *comment);
virtual const char* GetNthWindowLevelPresetComment(int idx);
// Description:
// Mapping from a sliceidx within a volumeidx into a DICOM Instance UID
// Some DICOM reader can populate this structure so that later on from
// a slice index in a vtkImageData volume we can backtrack and find out
// which 2d slice it was coming from
const char *GetInstanceUIDFromSliceID(int volumeidx, int sliceid);
void SetInstanceUIDFromSliceID(int volumeidx, int sliceid, const char *uid);
// Description:
// Provides the inverse mapping. Returns -1 if a slice for this uid is
// not found.
int GetSliceIDFromInstanceUID(int &volumeidx, const char *uid);
//BTX
typedef enum {
AXIAL = 0,
CORONAL,
SAGITTAL
} OrientationType;
//ETX
int GetOrientationType(int volumeidx);
void SetOrientationType(int volumeidx, int orientation);
static const char *GetStringFromOrientationType(unsigned int type);
// Description:
// Copy the contents of p to this instance.
virtual void DeepCopy(vtkMedicalImageProperties *p);
protected:
vtkMedicalImageProperties();
~vtkMedicalImageProperties();
char *StudyDate;
char *AcquisitionDate;
char *StudyTime;
char *AcquisitionTime;
char *ConvolutionKernel;
char *EchoTime;
char *EchoTrainLength;
char *Exposure;
char *ExposureTime;
char *GantryTilt;
char *ImageDate;
char *ImageNumber;
char *ImageTime;
char *InstitutionName;
char *KVP;
char *ManufacturerModelName;
char *Manufacturer;
char *Modality;
char *PatientAge;
char *PatientBirthDate;
char *PatientID;
char *PatientName;
char *PatientSex;
char *RepetitionTime;
char *SeriesDescription;
char *SeriesNumber;
char *SliceThickness;
char *StationName;
char *StudyDescription;
char *StudyID;
char *XRayTubeCurrent;
double DirectionCosine[6];
//BTX
// Description:
// PIMPL Encapsulation for STL containers
vtkMedicalImagePropertiesInternals *Internals;
//ETX
private:
vtkMedicalImageProperties(const vtkMedicalImageProperties&); // Not implemented.
void operator=(const vtkMedicalImageProperties&); // Not implemented.
};
#endif
|