DpxFile.H
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 RASTER_DPXFILE_H_DEFINED
00039 #define RASTER_DPXFILE_H_DEFINED
00040
00041 #include "Image/Dims.H"
00042 #include "Image/Image.H"
00043 #include "Util/Types.H"
00044
00045
00046
00047
00048
00049
00050
00051 class DpxFile
00052 {
00053 public:
00054 DpxFile(const char* fname);
00055
00056 struct FileHeader
00057 {
00058 uint32 MagicNumber;
00059 uint32 ImageDataOffset;
00060 char HeaderVersion[8];
00061 uint32 FileSize;
00062 uint32 DittoKey;
00063 uint32 GenericHeaderSize;
00064 uint32 IndustryHeaderSize;
00065 uint32 UserDefinedDataSize;
00066 char ImageFilename[100];
00067 char CreateTime[24];
00068 char Creator[100];
00069 char Project[200];
00070 char Copyright[200];
00071 uint32 EncryptKey;
00072 char Reserved[104];
00073 };
00074
00075 struct ImageElementInfo
00076 {
00077 uint32 DataSign;
00078 uint32 LowData;
00079 float LowQuantity;
00080 uint32 HighData;
00081 float HighQuantity;
00082 byte Descriptor;
00083 byte Transfer;
00084 byte Colorimetric;
00085 byte BitSize;
00086 uint16 Packing;
00087 uint16 Encoding;
00088 uint32 DataOffset;
00089 uint32 EndOfLinePadding;
00090 uint32 EndOfImagePadding;
00091 char Description[32];
00092 };
00093
00094 struct ImageHeader
00095 {
00096 uint16 Orientation;
00097 uint16 NumberElements;
00098 uint32 PixelsPerLine;
00099 uint32 LinesPerElement;
00100 ImageElementInfo ImageElement[8];
00101 byte Reserved[52];
00102 };
00103
00104 struct OrientationHeader
00105 {
00106 uint32 XOffset;
00107 uint32 YOffset;
00108 float XCenter;
00109 float YCenter;
00110 uint32 XOriginalSize;
00111 uint32 YOriginalSize;
00112 char FileName[100];
00113 char TimeDate[24];
00114 char InputName[32];
00115 char InputSN[32];
00116 uint16 Border[4];
00117 uint32 AspectRatio[2];
00118 byte Reserved[28];
00119 };
00120
00121 struct FilmIndustryHeader
00122 {
00123 char FilmMfgId[2];
00124 char FilmType[2];
00125 char Offset[2];
00126 char Prefix[6];
00127 char Count[4];
00128 char Format[32];
00129 uint32 FramePosition;
00130 uint32 SequenceLen;
00131 uint32 HeldCount;
00132 float FrameRate;
00133 float ShutterAngle;
00134 char FrameId[32];
00135 char SlateInfo[100];
00136 byte Reserved[56];
00137 };
00138
00139 struct TelevisionIndustryHeader
00140 {
00141 uint32 TimeCode;
00142 uint32 UserBits;
00143 byte Interlace;
00144 byte FiledNumber;
00145 byte VideoSignal;
00146 byte Padding;
00147 float HorzSampleRate;
00148 float VertSampleRate;
00149 float FrameRate;
00150 float TimeOffset;
00151 float Gamma;
00152 float BlackLevel;
00153 float BlackGain;
00154 float Breakpoint;
00155 float WhiteLevel;
00156 float IntegrationTimes;
00157 byte Reserved[76];
00158 };
00159
00160 Dims dims;
00161
00162 FileHeader fh;
00163 ImageHeader ih;
00164 OrientationHeader oh;
00165 FilmIndustryHeader fih;
00166 TelevisionIndustryHeader tih;
00167
00168 Image<uint16> rawimage;
00169 };
00170
00171
00172
00173
00174
00175
00176
00177
00178 #endif // RASTER_DPXFILE_H_DEFINED