libcineon
0.1
|
Generic File and Image Header Information. More...
#include <CineonHeader.h>
Public Member Functions | |
GenericHeader () | |
Constructor. More... | |
void | Reset () |
Reset class to initial state. More... | |
int | ImageElementCount () const |
Number of Active Elements in the Image. More... | |
void | CalculateNumberOfElements () |
Set member numberOfElements based on channel structure. More... | |
int | ImageElementComponentCount (const int element) const |
Number of components for the element. More... | |
DataSize | ComponentDataSize (const int element) const |
DataSize required for individual image element components. More... | |
int | ComponentByteCount (const int element) const |
Byte count of data element components. More... | |
File Information Methods | |
U32 | MagicNumber () const |
Get magic number, used for byte ordering identification. More... | |
U32 | ImageOffset () const |
Get the offset in bytes to the start of the first image element. More... | |
void | SetImageOffset (const U32 offset) |
Set the offset in bytes to the start of the first image element. More... | |
U32 | GenericSize () const |
Get the size of the generic section within the header. More... | |
U32 | IndustrySize () const |
Get the size of the industry section within the header. More... | |
U32 | UserSize () const |
Get the size of the user data. More... | |
void | SetUserSize (const U32 size) |
Set the size of the user data. More... | |
U32 | FileSize () const |
Get the size of the entire file. More... | |
void | SetFileSize (const U32 fs) |
Set the size of the entire file. More... | |
void | Version (char *v) const |
Get current version string of header. More... | |
void | SetVersion (const char *v) |
Set the version string. More... | |
void | FileName (char *fn) const |
Get the file name. More... | |
void | SetFileName (const char *fn) |
Set the file name. More... | |
void | CreationDate (char *ct) const |
Get the creation time/date. More... | |
void | SetCreationDate (const char *ct) |
Set the creation time/date. More... | |
void | CreationTime (char *ct) const |
Get the creation time/date. More... | |
void | SetCreationTime (const char *ct) |
Set the creation time/date. More... | |
void | SetCreationTimeDate (const long secs) |
Set the creation time/date. More... | |
Image Information Methods | |
Orientation | ImageOrientation () const |
Get the image orientation. More... | |
void | SetImageOrientation (const Orientation orient) |
Set the image orientation. More... | |
U8 | NumberOfElements () const |
Get the number of elements. More... | |
void | SetNumberOfElements (const U8 num) |
Set the number of elements. More... | |
U8 | Metric (const int i) const |
Get the first byte of the channel designator - metric info. More... | |
void | SetMetric (const int i, const U8 m) |
Set the first byte of the channel designator - metric info. More... | |
Descriptor | ImageDescriptor (const int i) const |
Get the second byte of the channel designator. More... | |
void | SetImageDescriptor (const int i, const Descriptor d) |
Set the second byte of the channel designator. More... | |
U8 | BitDepth (const int i) const |
Get the bits per pixel. More... | |
void | SetBitDepth (const int i, const U8 bpp) |
Set the bits per pixel. More... | |
U32 | PixelsPerLine (const int i) const |
Get the pixels per line. More... | |
void | SetPixelsPerLine (const int i, const U32 ppl) |
Set the pixels per line. More... | |
U32 | LinesPerElement (const int i) const |
Get the lines per element. More... | |
void | SetLinesPerElement (const int i, const U32 lpe) |
Set the lines per element. More... | |
R32 | LowData (const int i) const |
Get the minimum data value. More... | |
void | SetLowData (const int i, const R32 data) |
Set the minimum data value. More... | |
R32 | LowQuantity (const int i) const |
Get the quantity of minimum data value. More... | |
void | SetLowQuantity (const int i, const R32 quant) |
Set the quantity of minimum data value. More... | |
R32 | HighData (const int i) const |
Get the maximum data value. More... | |
void | SetHighData (const int i, const R32 data) |
Set the maximum data value. More... | |
R32 | HighQuantity (const int i) const |
Get the quantity of maximum data value. More... | |
void | SetHighQuantity (const int i, const R32 quant) |
Set the quantity of maximum data value. More... | |
void | WhitePoint (R32 xy[2]) const |
Get the white point primary x, y pair. More... | |
void | SetWhitePoint (const R32 xy[2]) |
Set the white point primary x, y pair. More... | |
void | RedPrimary (R32 xy[2]) const |
Get the red primary x, y pair. More... | |
void | SetRedPrimary (const R32 xy[2]) |
Set the red primary x, y pair. More... | |
void | GreenPrimary (R32 xy[2]) const |
Get the green primary x, y pair. More... | |
void | SetGreenPrimary (const R32 xy[2]) |
Set the green primary x, y pair. More... | |
void | BluePrimary (R32 xy[2]) const |
Get the blue primary x, y pair. More... | |
void | SetBluePrimary (const R32 xy[2]) |
Set the blue primary x, y pair. More... | |
void | LabelText (char *ct) const |
Get the label text. More... | |
void | SetLabelText (const char *ct) |
Set the label text. More... | |
Interleave | ImageInterleave () const |
Get the data interleave mode. More... | |
void | SetImageInterleave (const Interleave inter) |
Set the data intearleave mode. More... | |
Packing | ImagePacking () const |
Get the data packing mode. More... | |
void | SetImagePacking (const Packing pack) |
Set the data packing mode. More... | |
U8 | DataSign () const |
Get the data sign (0 = unsigned, 1 = signed) More... | |
void | SetDataSign (const U8 sign) |
Set the data sign (0 = unsigned, 1 = signed) More... | |
U8 | ImageSense () const |
Get the image sense (0 = positive, 1 = negative) More... | |
void | SetImageSense (const U8 sense) |
Set the image sense (0 = positive, 1 = negative) More... | |
U32 | EndOfLinePadding () const |
Get the number of bytes padding the end of each line. More... | |
void | SetEndOfLinePadding (const U32 eolp) |
Set the number of bytes padding the end of each line. More... | |
U32 | EndOfImagePadding () const |
Get the number of bytes padding the end of the image element. More... | |
void | SetEndOfImagePadding (const U32 eoip) |
Set the number of bytes padding the end of the image element. More... | |
Image Origination Methods | |
S32 | XOffset () const |
Get the line offset (in pixels) from the first pixel in original image. More... | |
void | SetXOffset (const S32 offset) |
Set the line offset (in pixels) from the first pixel in original image. More... | |
S32 | YOffset () const |
Get the frame offset (in lines) from the first line in original image. More... | |
void | SetYOffset (const S32 offset) |
Set the frame offset (in lines) from the first line in original image. More... | |
void | SourceImageFileName (char *fn) const |
Get the source image file name that this image was extracted. More... | |
void | SetSourceImageFileName (const char *fn) |
Set the source image file name that this image was extracted. More... | |
void | SourceDate (char *td) const |
Get the source image time and date that this image was extracted. More... | |
void | SetSourceDate (const char *td) |
Set the source image time and date that this image was extracted. More... | |
void | SourceTime (char *td) const |
Get the source image time and date that this image was extracted. More... | |
void | SetSourceTime (const char *td) |
Set the source image time and date that this image was extracted. More... | |
void | SetSourceTimeDate (const long secs) |
Set the source image time and date that this image was extracted. More... | |
void | InputDevice (char *dev) const |
Get the input device name. More... | |
void | SetInputDevice (const char *dev) |
Set the input device name. More... | |
void | InputDeviceModelNumber (char *sn) const |
Get the input device model number. More... | |
void | SetInputDeviceModelNumber (const char *sn) |
Set the input device model number. More... | |
void | InputDeviceSerialNumber (char *sn) const |
Get the input device serial number. More... | |
void | SetInputDeviceSerialNumber (const char *sn) |
Set the input device serial number. More... | |
R32 | XDevicePitch () const |
Get the horizontal pitch of the device. More... | |
void | SetXDevicePitch (const R32 size) |
Set the horizontal pitch of the device. More... | |
R32 | YDevicePitch () const |
Get the veritcal pitch of the device. More... | |
void | SetYDevicePitch (const R32 size) |
Set the vertical pitch of the device. More... | |
R32 | Gamma () const |
Get the gamma correction exponent. More... | |
void | SetGamma (const R32 gamma) |
Set the gamma correction exponent. More... | |
Static Public Member Functions | |
static int | DataSizeByteCount (const DataSize ds) |
Public Attributes | |
File Information Members | |
U32 | magicNumber |
Indicates start of DPX image file and is used to determine byte order. More... | |
U32 | imageOffset |
Offset to image data (in bytes) More... | |
U32 | genericSize |
Generic Header length (in bytes) More... | |
U32 | industrySize |
Industry Header length (in bytes) More... | |
U32 | userSize |
User defined header length (in bytes) More... | |
U32 | fileSize |
Total file size (in bytes) More... | |
ASCII | version [8] |
Version number of header format. More... | |
ASCII | fileName [100] |
File name. More... | |
ASCII | creationDate [12] |
Create date /see DateTimeFormat. More... | |
ASCII | creationTime [12] |
Create time /see DateTimeFormat. More... | |
ASCII | reserved1 [36] |
Reserved. More... | |
Image Information Members | |
U8 | imageOrientation |
Image orientation. More... | |
U8 | numberOfElements |
Number of elements (1-8) More... | |
U8 | unused1 [2] |
Unused (word alignment) More... | |
ImageElement | chan [MAX_ELEMENTS] |
Image element data structures. More... | |
R32 | whitePoint [2] |
White point (x, y pair) More... | |
R32 | redPrimary [2] |
Red primary chromaticity (x, y pair) More... | |
R32 | greenPrimary [2] |
Green primary chromaticity (x, y pair) More... | |
R32 | bluePrimary [2] |
Blue primary chromaticity (x, y pair) More... | |
ASCII | labelText [200] |
Label text. More... | |
ASCII | reserved2 [28] |
Reserved. More... | |
U8 | interleave |
Data interleave. More... | |
U8 | packing |
Packing. More... | |
U8 | dataSign |
Data sign (0 = unsigned, 1 = signed) More... | |
U8 | imageSense |
Image sense (0 = positive image, 1 = negative image) More... | |
U32 | endOfLinePadding |
End-of-Line Padding. More... | |
U32 | endOfImagePadding |
End-of-Image Padding. More... | |
ASCII | reserved3 [20] |
Image Origination Members | |
S32 | xOffset |
X offset. More... | |
S32 | yOffset |
Y offset. More... | |
ASCII | sourceImageFileName [100] |
Source image file name. More... | |
ASCII | sourceDate [12] |
Source date /see DateTimeFormat. More... | |
ASCII | sourceTime [12] |
Source time /see DateTimeFormat. More... | |
ASCII | inputDevice [64] |
Input device name. More... | |
ASCII | inputDeviceModelNumber [32] |
Input device model number. More... | |
ASCII | inputDeviceSerialNumber [32] |
Input device serial number. More... | |
R32 | xDevicePitch |
X device pitch (samples/mm) More... | |
R32 | yDevicePitch |
Y device pitch (samples/mm) More... | |
R32 | gamma |
Gamma. More... | |
ASCII | reserved4 [40] |
Reserved. More... | |
Generic File and Image Header Information.
cineon::GenericHeader::GenericHeader | ( | ) |
Constructor.
|
inline |
Get the bits per pixel.
i | element index (0-7) |
|
inline |
Get the blue primary x, y pair.
xy | buffer to store the x, y pair (2 32-bit floats) |
void cineon::GenericHeader::CalculateNumberOfElements | ( | ) |
Set member numberOfElements based on channel structure.
int cineon::GenericHeader::ComponentByteCount | ( | const int | element | ) | const |
Byte count of data element components.
cineon::DataSize cineon::GenericHeader::ComponentDataSize | ( | const int | element | ) | const |
DataSize required for individual image element components.
|
inline |
Get the creation time/date.
ct | buffer to store creation time/date (24+1 chars) |
|
inline |
Get the creation time/date.
ct | buffer to store creation time/date (24+1 chars) |
|
inline |
Get the data sign (0 = unsigned, 1 = signed)
|
static |
|
inline |
Get the number of bytes padding the end of the image element.
i | element index (0-7) |
|
inline |
Get the number of bytes padding the end of each line.
i | element index (0-7) |
|
inline |
Get the file name.
fn | buffer to store filename (100+1 chars) |
|
inline |
Get the size of the entire file.
|
inline |
Get the gamma correction exponent.
|
inline |
Get the size of the generic section within the header.
|
inline |
Get the green primary x, y pair.
xy | buffer to store the x, y pair (2 32-bit floats) |
|
inline |
Get the maximum data value.
i | element index (0-7) |
|
inline |
Get the quantity of maximum data value.
i | element index (0-7) |
|
inline |
Get the second byte of the channel designator.
i | element index (0-7) |
int cineon::GenericHeader::ImageElementComponentCount | ( | const int | element | ) | const |
Number of components for the element.
int cineon::GenericHeader::ImageElementCount | ( | ) | const |
Number of Active Elements in the Image.
|
inline |
Get the data interleave mode.
|
inline |
Get the offset in bytes to the start of the first image element.
|
inline |
Get the image orientation.
|
inline |
Get the data packing mode.
|
inline |
Get the image sense (0 = positive, 1 = negative)
|
inline |
Get the size of the industry section within the header.
|
inline |
Get the input device name.
dev | buffer to write device (64+1) |
|
inline |
Get the input device model number.
sn | buffer to write device model number (32+1) |
|
inline |
Get the input device serial number.
sn | buffer to write device serial number (32+1) |
|
inline |
Get the label text.
ct | buffer to store label text (200 chars) |
|
inline |
Get the lines per element.
i | element index (0-7) |
|
inline |
Get the minimum data value.
i | element index (0-7) |
|
inline |
Get the quantity of minimum data value.
i | element index (0-7) |
|
inline |
Get magic number, used for byte ordering identification.
|
inline |
Get the first byte of the channel designator - metric info.
i | element index (0-7) |
|
inline |
Get the number of elements.
|
inline |
Get the pixels per line.
i | element index (0-7) |
|
inline |
Get the red primary x, y pair.
xy | buffer to store the x, y pair (2 32-bit floats) |
void cineon::GenericHeader::Reset | ( | ) |
Reset class to initial state.
|
inline |
Set the bits per pixel.
i | element index (0-7) |
bpp | bit count |
|
inline |
Set the blue primary x, y pair.
xy | the x, y pair (2 32-bit floats) |
|
inline |
Set the creation time/date.
ct | buffer with creation time/date |
|
inline |
Set the creation time/date.
ct | buffer with creation time/date |
void cineon::GenericHeader::SetCreationTimeDate | ( | const long | secs | ) |
Set the creation time/date.
secs | number of seconds since January 1, 1970 00:00 |
|
inline |
Set the data sign (0 = unsigned, 1 = signed)
sign | data sign |
|
inline |
Set the number of bytes padding the end of the image element.
i | element index (0-7) |
eoip | count |
|
inline |
Set the number of bytes padding the end of each line.
i | element index (0-7) |
eolp | count |
|
inline |
Set the file name.
fn | buffer with filename |
|
inline |
Set the size of the entire file.
fs | file size in bytes |
|
inline |
Set the gamma correction exponent.
gamma | gamma exponent |
|
inline |
Set the green primary x, y pair.
xy | the x, y pair (2 32-bit floats) |
|
inline |
Set the maximum data value.
i | element index (0-7) |
data | maximum value |
|
inline |
Set the quantity of maximum data value.
i | element index (0-7) |
quant | quantity |
|
inline |
Set the second byte of the channel designator.
i | element index (0-7) |
d | channel descriptor |
|
inline |
Set the data intearleave mode.
inter | intearleave method |
|
inline |
Set the offset in bytes to the start of the first image element.
offset | offset in bytes |
|
inline |
Set the image orientation.
orient | orientation |
|
inline |
Set the data packing mode.
pack | packing method |
|
inline |
Set the image sense (0 = positive, 1 = negative)
sense | image sense |
|
inline |
Set the input device name.
dev | buffer with device name |
|
inline |
Set the input device model number.
sn | buffer with device model number |
|
inline |
Set the input device serial number.
sn | buffer with device serial number |
|
inline |
Set the label text.
ct | buffer with label text |
|
inline |
Set the lines per element.
i | element index (0-7) |
lpe | lines count |
|
inline |
Set the minimum data value.
i | element index (0-7) |
data | minimum value |
|
inline |
Set the quantity of minimum data value.
i | element index (0-7) |
quant | quantity |
|
inline |
Set the first byte of the channel designator - metric info.
i | element index (0-7) |
ppl | metric |
|
inline |
Set the number of elements.
num | element count |
|
inline |
Set the pixels per line.
i | element index (0-7) |
ppl | pixel count |
|
inline |
Set the red primary x, y pair.
xy | the x, y pair (2 32-bit floats) |
|
inline |
Set the source image time and date that this image was extracted.
td | buffer with time/date string |
|
inline |
Set the source image file name that this image was extracted.
fn | buffer with source file name |
|
inline |
Set the source image time and date that this image was extracted.
td | buffer with time/date string |
void cineon::GenericHeader::SetSourceTimeDate | ( | const long | secs | ) |
Set the source image time and date that this image was extracted.
secs | number of seconds since January 1, 1970 00:00 |
|
inline |
Set the size of the user data.
size | user data size in bytes |
|
inline |
Set the version string.
v | version string |
|
inline |
Set the white point primary x, y pair.
xy | the x, y pair (2 32-bit floats) |
|
inline |
Set the horizontal pitch of the device.
size | pitch in samples/mm |
|
inline |
Set the line offset (in pixels) from the first pixel in original image.
offset | offset count |
|
inline |
Set the vertical pitch of the device.
size | pitch in samples/mm |
|
inline |
Set the frame offset (in lines) from the first line in original image.
offset | offset count |
|
inline |
Get the source image time and date that this image was extracted.
td | buffer to write time/date string (24+1) |
|
inline |
Get the source image file name that this image was extracted.
fn | buffer to write source file name (100+1) |
|
inline |
Get the source image time and date that this image was extracted.
td | buffer to write time/date string (24+1) |
|
inline |
Get the size of the user data.
|
inline |
Get current version string of header.
v | buffer to place string, needs to be at least 8+1 bytes long |
|
inline |
Get the white point primary x, y pair.
xy | buffer to store the x, y pair (2 32-bit floats) |
|
inline |
Get the horizontal pitch of the device.
|
inline |
Get the line offset (in pixels) from the first pixel in original image.
|
inline |
Get the veritcal pitch of the device.
|
inline |
Get the frame offset (in lines) from the first line in original image.
R32 cineon::GenericHeader::bluePrimary[2] |
Blue primary chromaticity (x, y pair)
ImageElement cineon::GenericHeader::chan[MAX_ELEMENTS] |
Image element data structures.
ASCII cineon::GenericHeader::creationDate[12] |
Create date /see DateTimeFormat.
ASCII cineon::GenericHeader::creationTime[12] |
Create time /see DateTimeFormat.
U8 cineon::GenericHeader::dataSign |
Data sign (0 = unsigned, 1 = signed)
U32 cineon::GenericHeader::endOfImagePadding |
End-of-Image Padding.
U32 cineon::GenericHeader::endOfLinePadding |
End-of-Line Padding.
ASCII cineon::GenericHeader::fileName[100] |
File name.
U32 cineon::GenericHeader::fileSize |
Total file size (in bytes)
R32 cineon::GenericHeader::gamma |
Gamma.
R32 cineon::GenericHeader::greenPrimary[2] |
Green primary chromaticity (x, y pair)
U32 cineon::GenericHeader::imageOffset |
Offset to image data (in bytes)
U8 cineon::GenericHeader::imageOrientation |
Image orientation.
U8 cineon::GenericHeader::imageSense |
Image sense (0 = positive image, 1 = negative image)
ASCII cineon::GenericHeader::inputDevice[64] |
Input device name.
ASCII cineon::GenericHeader::inputDeviceModelNumber[32] |
Input device model number.
ASCII cineon::GenericHeader::inputDeviceSerialNumber[32] |
Input device serial number.
U8 cineon::GenericHeader::interleave |
Data interleave.
ASCII cineon::GenericHeader::labelText[200] |
Label text.
U32 cineon::GenericHeader::magicNumber |
Indicates start of DPX image file and is used to determine byte order.
U8 cineon::GenericHeader::numberOfElements |
Number of elements (1-8)
R32 cineon::GenericHeader::redPrimary[2] |
Red primary chromaticity (x, y pair)
ASCII cineon::GenericHeader::reserved1[36] |
Reserved.
ASCII cineon::GenericHeader::reserved2[28] |
Reserved.
ASCII cineon::GenericHeader::reserved3[20] |
ASCII cineon::GenericHeader::reserved4[40] |
Reserved.
ASCII cineon::GenericHeader::sourceDate[12] |
Source date /see DateTimeFormat.
ASCII cineon::GenericHeader::sourceImageFileName[100] |
Source image file name.
ASCII cineon::GenericHeader::sourceTime[12] |
Source time /see DateTimeFormat.
U8 cineon::GenericHeader::unused1[2] |
Unused (word alignment)
U32 cineon::GenericHeader::userSize |
User defined header length (in bytes)
ASCII cineon::GenericHeader::version[8] |
Version number of header format.
R32 cineon::GenericHeader::whitePoint[2] |
White point (x, y pair)
R32 cineon::GenericHeader::xDevicePitch |
X device pitch (samples/mm)
S32 cineon::GenericHeader::xOffset |
X offset.
R32 cineon::GenericHeader::yDevicePitch |
Y device pitch (samples/mm)
S32 cineon::GenericHeader::yOffset |
Y offset.