TuttleOFX
1
|
#include <J2KReader.hpp>
Public Member Functions | |
J2KReader () | |
virtual | ~J2KReader () |
void | open (const std::string &filename) |
void | decode (bool headeronly=false) |
void | close () |
bool | componentsConform () |
Check if components have the same properties. | |
const size_t | components () const |
Get number of components. | |
const size_t | width (const size_t nc=0) const |
Get width of nc component. | |
const size_t | height (const size_t nc=0) const |
Get height of nc component. | |
const size_t | precision (const size_t nc=0) const |
Get precision of nc component. | |
const uint8_t * | compData (const size_t nc) const |
Get the nc component data. | |
bool | imageReady () const |
Is image ready? | |
Private Attributes | |
OpenJpegStuffs | _openjpeg |
OpenJpeg 2000 structs. | |
uint8_t * | _fileData |
Image data. | |
std::ssize_t | _dataLength |
Data length. |
Definition at line 18 of file J2KReader.hpp.
tuttle::io::J2KReader::J2KReader | ( | ) |
Definition at line 22 of file J2KReader.cpp.
References _dataLength, _fileData, and _openjpeg.
tuttle::io::J2KReader::~J2KReader | ( | ) | [virtual] |
Definition at line 29 of file J2KReader.cpp.
References close().
void tuttle::io::J2KReader::close | ( | ) |
Definition at line 155 of file J2KReader.cpp.
References _dataLength, _fileData, _openjpeg, OFX::memory::free(), and tuttle::io::OpenJpegStuffs::image.
Referenced by tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::changedParam(), open(), tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo(), ~J2KReader(), and tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::~Jpeg2000ReaderPlugin().
const uint8_t * tuttle::io::J2KReader::compData | ( | const size_t | nc | ) | const [inline] |
Get the nc component data.
Definition at line 119 of file J2KReader.hpp.
References _openjpeg, components(), and tuttle::io::OpenJpegStuffs::image.
const size_t tuttle::io::J2KReader::components | ( | ) | const [inline] |
Get number of components.
Definition at line 69 of file J2KReader.hpp.
References _openjpeg, and tuttle::io::OpenJpegStuffs::image.
Referenced by compData(), componentsConform(), precision(), and tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
bool tuttle::io::J2KReader::componentsConform | ( | ) | [inline] |
Check if components have the same properties.
Definition at line 46 of file J2KReader.hpp.
References components(), height(), precision(), and width().
Referenced by tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
void tuttle::io::J2KReader::decode | ( | bool | headeronly = false | ) |
Definition at line 98 of file J2KReader.cpp.
References _dataLength, _fileData, _openjpeg, tuttle::io::OpenJpegStuffs::event_mgr, tuttle::io::OpenJpegStuffs::image, and parameters.
Referenced by tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::render(), and tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
const size_t tuttle::io::J2KReader::height | ( | const size_t | nc = 0 | ) | const [inline] |
Get height of nc component.
Definition at line 93 of file J2KReader.hpp.
References _openjpeg, and tuttle::io::OpenJpegStuffs::image.
Referenced by componentsConform(), and tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
bool tuttle::io::J2KReader::imageReady | ( | ) | const [inline] |
Is image ready?
Definition at line 41 of file J2KReader.hpp.
References _fileData, _openjpeg, and tuttle::io::OpenJpegStuffs::image.
Referenced by tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
void tuttle::io::J2KReader::open | ( | const std::string & | filename | ) |
Definition at line 34 of file J2KReader.cpp.
References _dataLength, _fileData, OFX::memory::allocate(), close(), OFX::memory::free(), MAYBE_MAGIC, and MAYBE_REV_MAGIC.
Referenced by tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
const size_t tuttle::io::J2KReader::precision | ( | const size_t | nc = 0 | ) | const [inline] |
Get precision of nc component.
Definition at line 105 of file J2KReader.hpp.
References _openjpeg, components(), and tuttle::io::OpenJpegStuffs::image.
Referenced by componentsConform(), and tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo().
const size_t tuttle::io::J2KReader::width | ( | const size_t | nc = 0 | ) | const [inline] |
Get width of nc component.
Definition at line 81 of file J2KReader.hpp.
References _openjpeg, and tuttle::io::OpenJpegStuffs::image.
Referenced by componentsConform(), tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderPlugin::retrieveFileInfo(), and tuttle::plugin::jpeg2000::reader::Jpeg2000ReaderProcess< View >::switchPrecisionCopy().
Data length.
Definition at line 38 of file J2KReader.hpp.
Referenced by close(), decode(), J2KReader(), and open().
uint8_t* tuttle::io::J2KReader::_fileData [private] |
Image data.
Definition at line 37 of file J2KReader.hpp.
Referenced by close(), decode(), imageReady(), J2KReader(), and open().
OpenJpeg 2000 structs.
Definition at line 36 of file J2KReader.hpp.
Referenced by close(), compData(), components(), decode(), height(), imageReady(), J2KReader(), precision(), and width().