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