Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef VTKGDCMIMAGEWRITER_H
00040 #define VTKGDCMIMAGEWRITER_H
00041
00042 #include "vtkImageWriter.h"
00043
00044 class vtkLookupTable;
00045 class vtkMedicalImageProperties;
00046 class vtkMatrix4x4;
00047 class vtkStringArray;
00048 class VTK_EXPORT vtkGDCMImageWriter : public vtkImageWriter
00049 {
00050 public:
00051 static vtkGDCMImageWriter *New();
00052 vtkTypeRevisionMacro(vtkGDCMImageWriter,vtkImageWriter);
00053 virtual void PrintSelf(ostream& os, vtkIndent indent);
00054
00055
00056
00057
00058 vtkGetObjectMacro(MedicalImageProperties, vtkMedicalImageProperties);
00059 virtual void SetMedicalImageProperties(vtkMedicalImageProperties*);
00060
00061
00062
00063 virtual void SetFileNames(vtkStringArray*);
00064 vtkGetObjectMacro(FileNames, vtkStringArray);
00065
00066
00067
00068 vtkGetMacro(LossyFlag,int);
00069 vtkSetMacro(LossyFlag,int);
00070 vtkBooleanMacro(LossyFlag,int);
00071
00072
00073 virtual void Write();
00074
00075
00076
00077 virtual const char* GetFileExtensions() {
00078 return ".dcm .DCM"; }
00079
00080
00081
00082 virtual const char* GetDescriptiveName() {
00083 return "DICOM"; }
00084
00085
00086
00087
00088 virtual void SetDirectionCosines(vtkMatrix4x4 *matrix);
00089 vtkGetObjectMacro(DirectionCosines, vtkMatrix4x4);
00090 virtual void SetDirectionCosinesFromImageOrientationPatient(const double dircos[6]);
00091
00092
00093
00094 vtkSetMacro(Shift, double);
00095 vtkGetMacro(Shift, double);
00096 vtkSetMacro(Scale, double);
00097 vtkGetMacro(Scale, double);
00098
00099
00100
00101 vtkGetMacro(ImageFormat,int);
00102 vtkSetMacro(ImageFormat,int);
00103
00104
00105
00106
00107 vtkBooleanMacro(FileLowerLeft, int);
00108 vtkGetMacro(FileLowerLeft, int);
00109 vtkSetMacro(FileLowerLeft, int);
00110
00111
00112
00113 vtkSetMacro(PlanarConfiguration,int);
00114 vtkGetMacro(PlanarConfiguration,int);
00115
00116
00117
00118 vtkSetStringMacro(StudyUID);
00119 vtkGetStringMacro(StudyUID);
00120 vtkSetStringMacro(SeriesUID);
00121 vtkGetStringMacro(SeriesUID);
00122
00123
00124 enum CompressionTypes {
00125 NO_COMPRESSION = 0,
00126 JPEG_COMPRESSION,
00127 JPEG2000_COMPRESSION,
00128 JPEGLS_COMPRESSION,
00129 RLE_COMPRESSION
00130 };
00131
00132
00133 vtkSetMacro(CompressionType, int);
00134 vtkGetMacro(CompressionType, int);
00135
00136
00137
00138
00139 protected:
00140 vtkGDCMImageWriter();
00141 ~vtkGDCMImageWriter();
00142
00143 #if (VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 )
00144 int FillInputPortInformation(int port, vtkInformation *info);
00145 int RequestInformation(
00146 vtkInformation *request,
00147 vtkInformationVector **inputVector,
00148 vtkInformationVector *outputVector);
00149 int RequestUpdateExtent(
00150 vtkInformation *request,
00151 vtkInformationVector **inputVector,
00152 vtkInformationVector *outputVector);
00153 int RequestData(
00154 vtkInformation *request,
00155 vtkInformationVector **inputVector,
00156 vtkInformationVector *outputVector);
00157 #else
00158 void WriteSlice(vtkImageData *data);
00159 #endif
00160 int WriteGDCMData(vtkImageData *data, int timeStep);
00161
00162 protected:
00163 virtual char *GetFileName();
00164
00165 private:
00166 vtkGDCMImageWriter(const vtkGDCMImageWriter&);
00167 void operator=(const vtkGDCMImageWriter&);
00168
00169
00170
00171 vtkMedicalImageProperties *MedicalImageProperties;
00172 char *StudyUID;
00173 char *SeriesUID;
00174
00175 int DataUpdateExtent[6];
00176 int ImageFormat;
00177
00178 vtkStringArray *FileNames;
00179 vtkMatrix4x4 *DirectionCosines;
00180
00181 double Shift;
00182 double Scale;
00183 int FileLowerLeft;
00184 int PlanarConfiguration;
00185 int LossyFlag;
00186 int CompressionType;
00187 };
00188
00189 #endif