Public Member Functions | |
FileHandler * | handler () const |
void | close () |
const char * | getFilename () const |
void | setReadFormat (const Format *fmt) |
void | setFullSizeFormat (const Format *fmt) |
void | setFormat (const Format *fmt) |
FormatPair & | getFormats () |
const FormatPair & | getFormats () const |
const DD::Image::Format * | getReadFormat () const |
const Format * | expected_full_size_format () const |
const Format * | expected_format () const |
const Format * | expected_read_format () const |
const Format & | read_format () const |
bool | videosequence () const |
Read (Node *node=0) | |
void | append (Hash &) |
void | retriveInfo () |
void | setIgnoreCachedErrors (bool ignoreCachedErrors) |
void | frame_for_reader (int n) |
int | frame_for_reader () const |
void | filename (const char *f) |
const char * | filename () const |
int | view_for_reader () const |
virtual ViewSet | splitForViews () const |
int | current_view (const DD::Image::OutputContext *oc) const |
void | expectedFrameRange (int first, int last) |
int | expected_first_frame () const |
int | expected_last_frame () const |
int | first_frame () const |
int | last_frame () const |
int | colorspace () const |
void | colorspace (int v) |
bool | raw () const |
void | raw (bool v) |
bool | premult () const |
void | premult (bool v) |
bool | autoAlpha () const |
void | autoAlpha (bool v) |
void | knobs (Knob_Callback) |
int | knob_changed (Knob *) |
bool | invalidate (Hash hash) |
bool | invalidate () |
int | output_type () const |
bool | ignore_missing_clip () const |
void | output_type (int v) |
void | force_near_frame (bool b) |
void | force_format (bool b) |
void | setEdgeCode (const std::string &edgeCode) |
void | setTimeCode (const std::string &edgeCode) |
const char * | Class () const |
const char * | node_help () const |
Static Public Attributes | |
static const Description | d |
Protected Member Functions | |
virtual Op * | op () |
Reader * | create_reader (const char *fname) const |
void | make_format () |
void | make_reader () |
Read * | firstRead () |
const Read * | firstRead () const |
const Reader::Description * | format_for_name (const char *) |
void | asengine (int y, int x, int r, ChannelMask channels, Row &row) |
const MetaData::Bundle & | _fetchMetaData (const char *key) |
virtual const char * | file_type () const |
bool | set_file_type (const char *) |
bool | set_file_type_from_filename (Knob *knob=0) |
void | _validate (bool) |
void | _open () |
void | engine (int y, int x, int r, ChannelMask, Row &) |
void | _close () |
Protected Attributes | |
Reader * | reader |
ReaderFormat * | fileformat |
const Reader::Description * | reader_type |
const DD::Image::Description * | _readerdesc |
Iop::Info | readerInfo |
bool | _errorOnConstructor |
bool | readerInfoOk |
bool | videosequence_ |
bool | force_near_frame_ |
bool | force_format_ |
Hash | filehash |
bool | _ignoreCachedErrors |
int | frame_for_reader_ |
int | view_for_reader_ |
const char * | filename_ |
const char * | file_type_ |
int | colorspace_ |
bool | raw_ |
bool | premult_ |
bool | autoAlpha_ |
int | _outputType |
int | frame_range [2] |
bool | proxyscale |
float | sx |
float | sy |
float | tx |
float | ty |
Format | localFormat |
MetaData::Bundle | _meta |
FormatPair | formats |
const Format * | readFormat |
If the filename is null a black frame of the expected_format() (or video if no format is given) is produced. This is done so that a new Read in Nuke will not produce an error.
All the work is done by the various subclasses of Reader. Read just chooses what subclass to instantiate and returns the output from it, and correctly destroys and instantiates new ones as needed.
void Read::make_format | ( | ) | [protected] |
Open the file and create the Reader object.
References DD::Image::Reader::Description::format_constructor, DD::Image::Knob::get_text(), DD::Image::Op::knob(), and make_format().
Referenced by make_format().
const MetaData::Bundle & Read::_fetchMetaData | ( | const char * | key | ) | [protected, virtual] |
We can't return this directly, because the Reader might get deleted (thus invalidating the reference) when the Read is closed.
So, let us make a local copy to store it in, which is guaranteed to be around for as long as we need it. We can put some non-reader specific things in this, also.
Reimplemented from DD::Image::Op.
References DD::Image::Reader::fetchMetaData(), DD::Image::Reader::height(), DD::Image::Reader::prefetchMetaData(), DD::Image::MetaData::Bundle::setData(), and DD::Image::Reader::width().
void Read::_validate | ( | bool | for_real | ) | [protected, virtual] |
validate() will destroy any previous Reader and open a new one if the filename has changed or the version number has changed (the version number is incremented by the reload button).
After opening the file, it copies the info_ from the Reader object. This will have been initialized with expected_first_frame(), expected_last_frame(), expected_format(), and expected_full_size_format(), but the Reader subclass may have changed this information.
For Nuke, this may be called with for_real set to false. In this case it does not try to open the file. Instead it assumes everything is at the expected settings. Anything that actually needs the data will open the file.
Reimplemented from DD::Image::Iop.
References DD::Image::Iop::default_input(), DD::Image::OutputContext::from_proxy_wh(), DD::Image::OutputContext::from_proxy_xy(), DD::Image::Op::outputContext(), DD::Image::OutputContext::setProxyscale(), DD::Image::OutputContext::to_proxy(), DD::Image::OutputContext::to_proxy_wh(), and DD::Image::OutputContext::to_proxy_xy().
void Read::_open | ( | ) | [protected, virtual] |
Calls open() on the reader object.
Reimplemented from DD::Image::Iop.
References DD::Image::Reader::open().
void Read::engine | ( | int | y, | |
int | x, | |||
int | r, | |||
ChannelMask | channels, | |||
Row & | row | |||
) | [protected, virtual] |
void Read::_close | ( | ) | [protected, virtual] |
Call this to close any current file. This will free up resources. Nuke calls this automatically after a timeout.
open() will reopen the file, but it assumes the file is the same one. You must call invalidate() if there is a possibility the existence, readability, or dimensions of the file has changed.
Reimplemented from DD::Image::Iop.
void Read::append | ( | Hash & | hash | ) | [virtual] |
Indicate that the frame number, view, autoAlpha, and LUT may affect the output.
Reimplemented from DD::Image::Op.
References DD::Image::Hash::append(), DD::Image::OutputContext::from_proxy_wh(), DD::Image::OutputContext::from_proxy_xy(), DD::Image::Op::outputContext(), and DD::Image::OutputContext::view().
void Read::expectedFrameRange | ( | int | first, | |
int | last | |||
) | [virtual] |
Set the frame range returned if the image file itself does not contain a frame range.
Implements DD::Image::ReadFileKnobOwner.
void Read::colorspace | ( | int | v | ) | [inline] |
void Read::raw | ( | bool | v | ) | [inline] |
void Read::premult | ( | bool | v | ) | [inline] |
Indicates that data should be divided by the alpha channel before being run through the LUT, and then multiplied again afterwards. This will convert data that was premultiplied in the file's colorspace into data that is premultiplied in linear colorspace.
This makes a difference if the LUT is anything other than LUT::LINEAR for any pixels where the alpha is greater than zero and less than one.
void Read::output_type | ( | int | v | ) | [inline, virtual] |
Sets exactly what is in the pixels that the Read produces. This is used by Nuke to produce results with the correct size and channels for missing frames, such as out-of-range frame numbers, or missing files in the middle of the range. This is done by setting the filename to an actual existing file, but using this to make the read produce black or a checkerboard.
Implements DD::Image::ReadFileKnobOwner.
void DD::Image::Read::force_near_frame | ( | bool | b | ) | [inline, virtual] |
Force the read node to use near frame in case of error !
Implements DD::Image::ReadFileKnobOwner.
void DD::Image::Read::force_format | ( | bool | b | ) | [inline] |
Force the read node to output at the expected format !
©2009 The Foundry Visionmongers, Ltd. All Rights Reserved. |