OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Class encapsulates a HDF5 Data set that can be loaded as an image. More...
#include <ossimH5ImageDataset.h>
Public Member Functions | |
ossimH5ImageDataset () | |
default constructor More... | |
ossimH5ImageDataset (const ossimH5ImageDataset &obj) | |
copy constructor More... | |
~ossimH5ImageDataset () | |
destructor More... | |
void | close () |
Calls H5::DataSet::close then deletes data set. More... | |
const ossimH5ImageDataset & | operator= (const ossimH5ImageDataset &rhs) |
bool | initialize (const H5::DataSet &dataset, const std::string &datasetName) |
Opens datasetName and initializes all data members on success. More... | |
const H5::DataSet * | getDataset () const |
Get const pointer to dataset. More... | |
H5::DataSet * | getDataset () |
Get pointer to dataset. More... | |
const std::string & | getName () const |
ossimScalarType | getScalarType () const |
ossim_uint32 | getNumberOfBands () const |
ossim_uint32 | getNumberOfLines () const |
ossim_uint32 | getNumberOfSamples () const |
bool | getSwapFlag () const |
const ossimIpt & | getSubImageOffset () const |
const ossimIrect & | getValidImageRect () const |
void | getTileBuf (void *buffer, const ossimIrect &rect, ossim_uint32 band) |
Method to grab a tile(rectangle) from image. More... | |
std::ostream & | print (std::ostream &out) const |
print method. More... | |
Private Attributes | |
H5::DataSet * | m_dataset |
std::string | m_datasetName |
ossimScalarType | m_scalar |
ossim_uint32 | m_bands |
ossim_uint32 | m_lines |
ossim_uint32 | m_samples |
ossimIrect | m_validRect |
Zero based image rect: More... | |
ossimEndian * | m_endian |
Friends | |
OSSIMDLLEXPORT std::ostream & | operator<< (std::ostream &out, const ossimH5ImageDataset &obj) |
Class encapsulates a HDF5 Data set that can be loaded as an image.
Definition at line 36 of file ossimH5ImageDataset.h.
ossimH5ImageDataset::ossimH5ImageDataset | ( | ) |
default constructor
Definition at line 33 of file ossimH5ImageDataset.cpp.
ossimH5ImageDataset::ossimH5ImageDataset | ( | const ossimH5ImageDataset & | obj | ) |
copy constructor
Definition at line 46 of file ossimH5ImageDataset.cpp.
References m_dataset.
ossimH5ImageDataset::~ossimH5ImageDataset | ( | ) |
destructor
Definition at line 63 of file ossimH5ImageDataset.cpp.
References close().
void ossimH5ImageDataset::close | ( | ) |
Calls H5::DataSet::close then deletes data set.
Definition at line 151 of file ossimH5ImageDataset.cpp.
References m_dataset, and m_endian.
Referenced by initialize(), and ~ossimH5ImageDataset().
const H5::DataSet * ossimH5ImageDataset::getDataset | ( | ) | const |
Get const pointer to dataset.
This can be null if not open.
Definition at line 166 of file ossimH5ImageDataset.cpp.
References m_dataset.
H5::DataSet * ossimH5ImageDataset::getDataset | ( | ) |
Get pointer to dataset.
This can be null if not open.
Definition at line 171 of file ossimH5ImageDataset.cpp.
References m_dataset.
const std::string & ossimH5ImageDataset::getName | ( | ) | const |
Definition at line 176 of file ossimH5ImageDataset.cpp.
References m_datasetName.
ossim_uint32 ossimH5ImageDataset::getNumberOfBands | ( | ) | const |
ossim_uint32 ossimH5ImageDataset::getNumberOfLines | ( | ) | const |
Definition at line 191 of file ossimH5ImageDataset.cpp.
References ossimIrect::height(), and m_validRect.
ossim_uint32 ossimH5ImageDataset::getNumberOfSamples | ( | ) | const |
Definition at line 196 of file ossimH5ImageDataset.cpp.
References m_validRect, and ossimIrect::width().
ossimScalarType ossimH5ImageDataset::getScalarType | ( | ) | const |
Definition at line 181 of file ossimH5ImageDataset.cpp.
References m_scalar.
const ossimIpt & ossimH5ImageDataset::getSubImageOffset | ( | ) | const |
Definition at line 206 of file ossimH5ImageDataset.cpp.
References m_validRect, and ossimIrect::ul().
bool ossimH5ImageDataset::getSwapFlag | ( | ) | const |
void ossimH5ImageDataset::getTileBuf | ( | void * | buffer, |
const ossimIrect & | rect, | ||
ossim_uint32 | band | ||
) |
Method to grab a tile(rectangle) from image.
buffer | Buffer for data for this method to copy data to. Should be the size of rect * bytes_per_pixel for scalar type. |
rect | The zero based rectangle to grab. Rectangle is relative to any sub image offset. E.g. A request for 0,0 is the upper left corner of the valid image rect. |
band |
Definition at line 216 of file ossimH5ImageDataset.cpp.
References ossimIrect::area(), ossimIrect::height(), m_dataset, m_endian, m_scalar, m_validRect, ossimNotify(), ossimNotifyLevel_WARN, ossimEndian::swap(), ossimIrect::ul(), ossimIrect::width(), ossimIpt::x, and ossimIpt::y.
const ossimIrect & ossimH5ImageDataset::getValidImageRect | ( | ) | const |
Definition at line 211 of file ossimH5ImageDataset.cpp.
References m_validRect.
bool ossimH5ImageDataset::initialize | ( | const H5::DataSet & | dataset, |
const std::string & | datasetName | ||
) |
Opens datasetName and initializes all data members on success.
Definition at line 95 of file ossimH5ImageDataset.cpp.
References ossim::byteOrder(), close(), ossim_hdf5::getByteOrder(), ossim_hdf5::getExtents(), ossim_hdf5::getScalarType(), ossim_hdf5::getValidBoundingRect(), m_bands, m_dataset, m_datasetName, m_endian, m_lines, m_samples, m_scalar, m_validRect, OSSIM_SCALAR_UNKNOWN, and ossim::scalarSizeInBytes().
Referenced by ossimH5ImageHandler::addImageDatasetEntries().
const ossimH5ImageDataset & ossimH5ImageDataset::operator= | ( | const ossimH5ImageDataset & | rhs | ) |
Definition at line 68 of file ossimH5ImageDataset.cpp.
References m_bands, m_dataset, m_datasetName, m_endian, m_lines, m_samples, m_scalar, and m_validRect.
std::ostream & ossimH5ImageDataset::print | ( | std::ostream & | out | ) | const |
print method.
Definition at line 349 of file ossimH5ImageDataset.cpp.
References ossimLookUpTable::getEntryString(), ossimScalarTypeLut::instance(), m_bands, m_dataset, m_datasetName, m_endian, m_lines, m_samples, m_scalar, and m_validRect.
Referenced by operator<<().
|
friend |
Definition at line 364 of file ossimH5ImageDataset.cpp.
|
private |
Definition at line 126 of file ossimH5ImageDataset.h.
Referenced by getNumberOfBands(), initialize(), operator=(), and print().
|
private |
Definition at line 123 of file ossimH5ImageDataset.h.
Referenced by close(), getDataset(), getTileBuf(), initialize(), operator=(), ossimH5ImageDataset(), and print().
|
private |
Definition at line 124 of file ossimH5ImageDataset.h.
Referenced by getName(), initialize(), operator=(), and print().
|
private |
Definition at line 138 of file ossimH5ImageDataset.h.
Referenced by close(), getSwapFlag(), getTileBuf(), initialize(), operator=(), and print().
|
private |
Definition at line 127 of file ossimH5ImageDataset.h.
Referenced by initialize(), operator=(), and print().
|
private |
Definition at line 128 of file ossimH5ImageDataset.h.
Referenced by initialize(), operator=(), and print().
|
private |
Definition at line 125 of file ossimH5ImageDataset.h.
Referenced by getScalarType(), getTileBuf(), initialize(), operator=(), and print().
|
private |
Zero based image rect:
H5 data can have null rows on the front or end. The valid rect is the scanned rectangle disregarding leading or trailing nulls. This does not handle null rows in the middle of the image.
Definition at line 137 of file ossimH5ImageDataset.h.
Referenced by getNumberOfLines(), getNumberOfSamples(), getSubImageOffset(), getTileBuf(), getValidImageRect(), initialize(), operator=(), and print().