TuttleOFX  1
dpx::Header Struct Reference

Complete DPX Header. More...

#include <DPXHeader.h>

Inheritance diagram for dpx::Header:
Collaboration diagram for dpx::Header:

Public Member Functions

 Header ()
void Reset ()
 Set the header data to a known start state.
bool Read (InStream *)
 Set the Input Stream object to read header from.
bool Write (OutStream *)
 Set the Output Stream object to write header to.
bool WriteOffsetData (OutStream *)
bool Validate ()
 Validate the header.
bool RequiresByteSwap () const
 Does header require endian byte swap.
const U32 Size () const
 Returns the size of the header.
void CalculateOffsets ()
 Calculate all of the offset members in the header.
bool DatumSwap (const int element) const
 Determine whether the components of an element should be swapped.
void SetDatumSwap (const bool swap)
 Set whether reader/writer should swap component ordering.
bool Check ()
U32 Height () const
 Height of the element adjusted for orientation.
U32 Width () const
 Width of the element adjusted for orientation.

Static Public Member Functions

static bool ValidMagicCookie (const U32 magic)
 Check magic cookie.

Protected Member Functions

bool DetermineByteSwap (const U32 magic) const

Protected Attributes

bool datumSwap

Detailed Description

Complete DPX Header.

Definition at line 1406 of file DPXHeader.h.


Constructor & Destructor Documentation

dpx::Header::Header ( )

Definition at line 65 of file DPXHeader.cpp.


Member Function Documentation

void dpx::Header::CalculateOffsets ( )

Calculate all of the offset members in the header.

Definition at line 531 of file DPXHeader.cpp.

References dpx::kUndefinedDescriptor, and MAX_ELEMENTS.

bool dpx::Header::Check ( )

Definition at line 199 of file DPXHeader.cpp.

bool dpx::Header::DatumSwap ( const int  element) const

Determine whether the components of an element should be swapped.

See also:
ComponentOrdering
Parameters:
elementimage element
Returns:
swap order of components

Definition at line 794 of file DPXHeader.cpp.

References dpx::kCbYCrY, and dpx::kRGB.

bool dpx::Header::DetermineByteSwap ( const U32  magic) const [protected]

Definition at line 324 of file DPXHeader.cpp.

References MAGIC_COOKIE.

Referenced by RequiresByteSwap().

dpx::U32 dpx::Header::Height ( ) const

Height of the element adjusted for orientation.

Returns:
height

Definition at line 815 of file DPXHeader.cpp.

References dpx::kBottomToTopLeftToRight, dpx::kBottomToTopRightToLeft, dpx::kTopToBottomLeftToRight, and dpx::kTopToBottomRightToLeft.

Referenced by dpx::RunLengthEncoding::Read().

bool dpx::Header::Read ( InStream io)

Set the Input Stream object to read header from.

Definition at line 182 of file DPXHeader.cpp.

References InStream::Read(), and InStream::Rewind().

Here is the call graph for this function:

bool dpx::Header::RequiresByteSwap ( ) const [inline]

Does header require endian byte swap.

Returns:
swap required true/false

Definition at line 1505 of file DPXHeader.h.

References DetermineByteSwap(), and dpx::GenericHeader::magicNumber.

Referenced by dpx::ElementReadStream::EndianDataCheck().

Here is the call graph for this function:

void dpx::Header::Reset ( )

Set the header data to a known start state.

Reimplemented from dpx::GenericHeader.

Definition at line 426 of file DPXHeader.cpp.

References dpx::GenericHeader::Reset(), and dpx::IndustryHeader::Reset().

Here is the call graph for this function:

void dpx::Header::SetDatumSwap ( const bool  swap)

Set whether reader/writer should swap component ordering.

Parameters:
swapallow swapping true/false

Definition at line 805 of file DPXHeader.cpp.

References std::swap().

Here is the call graph for this function:

const U32 dpx::Header::Size ( ) const [inline]

Returns the size of the header.

Returns:
2048 as defined by the standard

Definition at line 1510 of file DPXHeader.h.

bool dpx::Header::Validate ( )

Validate the header.

Definition at line 337 of file DPXHeader.cpp.

References MAX_ELEMENTS, and dpx::SwapBytes().

Here is the call graph for this function:

bool dpx::Header::ValidMagicCookie ( const U32  magic) [static]

Check magic cookie.

Returns:
valid true/false

Definition at line 311 of file DPXHeader.cpp.

References MAGIC_COOKIE, and dpx::SwapBytes().

Referenced by dpx::IdentifyFile().

Here is the call graph for this function:

bool dpx::Header::Write ( OutStream io)

Set the Output Stream object to write header to.

Definition at line 226 of file DPXHeader.cpp.

References OutStream::Write().

Here is the call graph for this function:

bool dpx::Header::WriteOffsetData ( OutStream io)

Definition at line 243 of file DPXHeader.cpp.

References OutStream::kStart, dpx::kUndefinedDescriptor, MAX_ELEMENTS, OutStream::Seek(), dpx::SwapBytes(), and OutStream::Write().

Here is the call graph for this function:


Field Documentation

bool dpx::Header::datumSwap [protected]

Definition at line 1487 of file DPXHeader.h.


The documentation for this struct was generated from the following files: