• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/IO/vtkMedicalImageProperties.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMedicalImageProperties.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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   // For Tcl:
00070   // From C++ use GetPatientAge + GetAgeAsField
00071   // Those function parse a DICOM string, and return the value of the number
00072   // expressed this is either expressed in year, month or days. Thus if a
00073   // string is expressed in years 
00074   // GetPatientAgeDay/GetPatientAgeWeek/GetPatientAgeMonth will return 0 
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   // For Tcl:
00094   // From C++ use GetPatientBirthDate + GetDateAsFields
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   // For Tcl:
00113   // From C++ use GetAcquisitionDate + GetDateAsFields
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   // For Tcl:
00141   // From C++ use GetImageDate + GetDateAsFields
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 GetDateAsLocale(const char *date, char *locale);
00155 
00157 
00159   vtkSetStringMacro(ImageTime);
00160   vtkGetStringMacro(ImageTime);
00162 
00164 
00165   vtkSetStringMacro(ImageNumber);
00166   vtkGetStringMacro(ImageNumber);
00168 
00170 
00171   vtkSetStringMacro(SeriesNumber);
00172   vtkGetStringMacro(SeriesNumber);
00174 
00176 
00178   vtkSetStringMacro(SeriesDescription);
00179   vtkGetStringMacro(SeriesDescription);
00181 
00183 
00184   vtkSetStringMacro(StudyID);
00185   vtkGetStringMacro(StudyID);
00187 
00189 
00190   vtkSetStringMacro(StudyDescription);
00191   vtkGetStringMacro(StudyDescription);
00193 
00195 
00196   vtkSetStringMacro(Modality);
00197   vtkGetStringMacro(Modality);
00199 
00201 
00202   vtkSetStringMacro(Manufacturer);
00203   vtkGetStringMacro(Manufacturer);
00205 
00207 
00208   vtkSetStringMacro(ManufacturerModelName);
00209   vtkGetStringMacro(ManufacturerModelName);
00211 
00213 
00214   vtkSetStringMacro(StationName);
00215   vtkGetStringMacro(StationName);
00217 
00219 
00220   vtkSetStringMacro(InstitutionName);
00221   vtkGetStringMacro(InstitutionName);
00223 
00225 
00227   vtkSetStringMacro(ConvolutionKernel);
00228   vtkGetStringMacro(ConvolutionKernel);
00230 
00232 
00234   vtkSetStringMacro(SliceThickness);
00235   vtkGetStringMacro(SliceThickness);
00236   virtual double GetSliceThicknessAsDouble();
00238 
00240 
00242   vtkSetStringMacro(KVP);
00243   vtkGetStringMacro(KVP);
00245 
00247 
00249   vtkSetStringMacro(GantryTilt);
00250   vtkGetStringMacro(GantryTilt);
00251   virtual double GetGantryTiltAsDouble();
00253 
00255 
00257   vtkSetStringMacro(EchoTime);
00258   vtkGetStringMacro(EchoTime);
00260 
00262 
00264   vtkSetStringMacro(EchoTrainLength);
00265   vtkGetStringMacro(EchoTrainLength);
00267 
00269 
00272   vtkSetStringMacro(RepetitionTime);
00273   vtkGetStringMacro(RepetitionTime);
00275 
00277 
00279   vtkSetStringMacro(ExposureTime);
00280   vtkGetStringMacro(ExposureTime);
00282 
00284 
00285   vtkSetStringMacro(XRayTubeCurrent);
00286   vtkGetStringMacro(XRayTubeCurrent);
00288 
00290 
00292   vtkSetStringMacro(Exposure);
00293   vtkGetStringMacro(Exposure);
00295 
00297 
00298   vtkSetVector6Macro(DirectionCosine,double);
00299   vtkGetVector6Macro(DirectionCosine,double);
00301 
00302   // Interface to allow insertion of user define values, for instance in DICOM
00303   // one would want to 
00304   // store the Protocol Name (0018,1030), in this case one would do:
00305   // AddUserDefinedValue( "Protocol Name", "T1W/SE/1024" );
00306   virtual void AddUserDefinedValue(const char *name, const char *value);
00307   virtual const char *GetUserDefinedValue(const char *name);
00308   virtual unsigned int GetNumberOfUserDefinedValues();
00309   virtual const char *GetUserDefinedNameByIndex(unsigned int idx);
00310   virtual const char *GetUserDefinedValueByIndex(unsigned int idx);
00311   virtual void RemoveAllUserDefinedValues();
00312 
00314 
00322   virtual int AddWindowLevelPreset(double w, double l);
00323   virtual void RemoveWindowLevelPreset(double w, double l);
00324   virtual void RemoveAllWindowLevelPresets();
00325   virtual int GetNumberOfWindowLevelPresets();
00326   virtual int HasWindowLevelPreset(double w, double l);
00327   virtual int GetWindowLevelPresetIndex(double w, double l);
00328   virtual int GetNthWindowLevelPreset(int idx, double *w, double *l);
00329   virtual double* GetNthWindowLevelPreset(int idx);
00330   virtual void SetNthWindowLevelPresetComment(int idx, const char *comment);
00331   virtual const char* GetNthWindowLevelPresetComment(int idx);
00333 
00335 
00339   const char *GetInstanceUIDFromSliceID(int volumeidx, int sliceid);
00340   void SetInstanceUIDFromSliceID(int volumeidx, int sliceid, const char *uid);
00342   
00345   int GetSliceIDFromInstanceUID(int &volumeidx, const char *uid);
00346 
00347   //BTX
00348   typedef enum {
00349     AXIAL = 0,
00350     CORONAL,
00351     SAGITTAL
00352   } OrientationType;
00353   //ETX
00354   int GetOrientationType(int volumeidx);
00355   void SetOrientationType(int volumeidx, int orientation);
00356   static const char *GetStringFromOrientationType(unsigned int type);
00357 
00359   virtual void DeepCopy(vtkMedicalImageProperties *p);
00360 
00361 protected:
00362   vtkMedicalImageProperties();
00363   ~vtkMedicalImageProperties();
00364 
00365   char *StudyDate;
00366   char *AcquisitionDate;
00367   char *StudyTime;
00368   char *AcquisitionTime;
00369   char *ConvolutionKernel;
00370   char *EchoTime;
00371   char *EchoTrainLength;
00372   char *Exposure;
00373   char *ExposureTime;
00374   char *GantryTilt;
00375   char *ImageDate;
00376   char *ImageNumber;
00377   char *ImageTime;
00378   char *InstitutionName;
00379   char *KVP;
00380   char *ManufacturerModelName;
00381   char *Manufacturer;
00382   char *Modality;
00383   char *PatientAge;
00384   char *PatientBirthDate;
00385   char *PatientID;
00386   char *PatientName;
00387   char *PatientSex;
00388   char *RepetitionTime;
00389   char *SeriesDescription;
00390   char *SeriesNumber;
00391   char *SliceThickness;
00392   char *StationName;
00393   char *StudyDescription;
00394   char *StudyID;
00395   char *XRayTubeCurrent;
00396   double DirectionCosine[6];
00397 
00399 
00400   vtkMedicalImagePropertiesInternals *Internals;
00401   //ETX
00403 
00404 private:
00405   vtkMedicalImageProperties(const vtkMedicalImageProperties&); // Not implemented.
00406   void operator=(const vtkMedicalImageProperties&); // Not implemented.
00407 };
00408 
00409 #endif

Generated by  doxygen 1.7.1