dpx::Writer Class Reference

DPX Image Writer class. More...

#include <DPX.h>

Collaboration diagram for dpx::Writer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Writer ()
 Constructor.
virtual ~Writer ()
 Destructor.
void Start ()
 Start defining the header and writing the images.
void SetFileInfo (const char *fileName, const char *creationTimeDate=0, const char *creator=0, const char *project=0, const char *copyright=0, const U32 encryptKey=~0)
 Set the basic file information about DPX.
void SetImageInfo (const U32 width, const U32 height)
 Set the Width and Height of the images.
int NextAvailElement () const
 Get the next available element.
void SetElement (const int element=0, const Descriptor desc=kRGB, const U8 bitDepth=10, const Characteristic transfer=kLogarithmic, const Characteristic colorimetric=kLogarithmic, const Packing packing=kFilledMethodA, const Encoding encoding=kNone, const U32 dataSign=0, const U32 lowData=~0, const R32 lowQuantity=~0, const U32 highData=~0, const R32 highQuantity=~0, const U32 eolnPadding=0, const U32 eoimPadding=0)
 Set the parameters on an element.
void SetOutStream (OutStream *stream)
 Set the OutStream object will use to write the files.
void SetUserData (const long size)
 Set the size of the user data area.
bool WriteHeader ()
 Write the header.
bool WriteUserData (void *data)
 Write the user data.
bool WriteElement (const int element, void *data)
 Write the entire element to the dpx file.
bool WriteElement (const int element, void *data, const DataSize size)
bool WriteElement (const int element, void *data, const long count)
bool Finish ()
 Finish up writing image.

Public Attributes

Header header
 DPX Header.

Protected Member Functions

bool WriteThrough (void *, const U32, const U32, const int, const int, const U32, const U32, char *)

Protected Attributes

long fileLoc
OutStreamfd

Detailed Description

DPX Image Writer class.


Constructor & Destructor Documentation

dpx::Writer::Writer (  ) 

Constructor.

dpx::Writer::~Writer (  )  [virtual]

Destructor.


Member Function Documentation

bool dpx::Writer::Finish (  ) 

Finish up writing image.

Returns:
success true/false
int dpx::Writer::NextAvailElement (  )  const

Get the next available element.

Returns:
next available
void dpx::Writer::SetElement ( const int  element = 0,
const Descriptor  desc = kRGB,
const U8  bitDepth = 10,
const Characteristic  transfer = kLogarithmic,
const Characteristic  colorimetric = kLogarithmic,
const Packing  packing = kFilledMethodA,
const Encoding  encoding = kNone,
const U32  dataSign = 0,
const U32  lowData = ~0,
const R32  lowQuantity = ~0,
const U32  highData = ~0,
const R32  highQuantity = ~0,
const U32  eolnPadding = 0,
const U32  eoimPadding = 0 
)

Set the parameters on an element.

There are 8 elements maximum in an single DPX and each element used must be set before writing the header

Parameters:
element element number (0-7)
desc image descriptor
bitDepth bit depth of image, valid values are [8,10,12,16,32,64]
transfer transfer characteristic
colorimetric colorimetric specification
packing packing type
encoding encoding type
dataSign 
lowData 
lowQuantity 
highData 
highQuantity 
eolnPadding end of line padding (in bytes)
eoimPadding end of image padding (in bytes)
void dpx::Writer::SetFileInfo ( const char *  fileName,
const char *  creationTimeDate = 0,
const char *  creator = 0,
const char *  project = 0,
const char *  copyright = 0,
const U32  encryptKey = ~0 
)

Set the basic file information about DPX.

Parameters:
fileName name of this created file (100 characters max)
creationTimeDate creation time and date - format is "YYYY:MM:DD:HH:MM:SSLTZ" where HH is 24 hour time, LTZ is local time zone using either three character notation (i.e., -04) or five character notation representing hours and minutes offset from Greenwich Mean time (i.e., -0700) (24 characters max)
creator creator (100 characters max)
project project name (200 characters max)
copyright copyright statement (200 characters max)
encryptKey encryption key
void dpx::Writer::SetImageInfo ( const U32  width,
const U32  height 
)

Set the Width and Height of the images.

Parameters:
width width of the image
height height of the image
void dpx::Writer::SetOutStream ( OutStream stream  ) 

Set the OutStream object will use to write the files.

Parameters:
stream OutStream object
void dpx::Writer::SetUserData ( const long  size  ) 

Set the size of the user data area.

Parameters:
size size of user data
void dpx::Writer::Start (  ) 

Start defining the header and writing the images.

bool dpx::Writer::WriteElement ( const int  element,
void *  data,
const long  count 
)
bool dpx::Writer::WriteElement ( const int  element,
void *  data,
const DataSize  size 
)
bool dpx::Writer::WriteElement ( const int  element,
void *  data 
)

Write the entire element to the dpx file.

Parameters:
element element number (0-7)
data buffer
Returns:
success true/false
bool dpx::Writer::WriteHeader (  ) 

Write the header.

Returns:
success true/false
bool dpx::Writer::WriteThrough ( void *  data,
const U32  width,
const U32  height,
const int  noc,
const int  bytes,
const U32  eolnPad,
const U32  eoimPad,
char *  blank 
) [protected]
bool dpx::Writer::WriteUserData ( void *  data  ) 

Write the user data.

Parameters:
data buffer - must match size set in Writer::SetUserData()
Returns:
success true/false

Member Data Documentation

OutStream* dpx::Writer::fd [protected]
long dpx::Writer::fileLoc [protected]

DPX Header.


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

Generated by  doxygen 1.6.2