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 <ossimHdf5ImageDataset.h>
Public Member Functions | |
ossimHdf5ImageDataset (ossimHdf5ImageHandler *owner=0) | |
default constructor More... | |
ossimHdf5ImageDataset (const ossimHdf5ImageDataset &obj) | |
copy constructor More... | |
~ossimHdf5ImageDataset () | |
destructor More... | |
void | close () |
Calls H5::DataSet::close then deletes data set. More... | |
const ossimHdf5ImageDataset & | operator= (const ossimHdf5ImageDataset &rhs) |
bool | initialize (const H5::DataSet &dataset) |
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... | |
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 |
double | getMaxPixelValue (ossim_uint32 band=0) const |
double | getMinPixelValue (ossim_uint32 band=0) const |
bool | isMinPixelSet () const |
bool | isMaxPixelSet () const |
void | getTileBuf (void *buffer, const ossimIrect &rect, ossim_uint32 band, bool scale=true) |
Method to grab a tile(rectangle) from image. More... | |
std::ostream & | print (std::ostream &out) const |
print method. More... | |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Private Member Functions | |
bool | determineExtents () |
Returns true if datasets's endianness differs from this platform. More... | |
bool | scanForValidImageRect () |
bool | determineScalarType () |
bool | scanForMinMax () |
Private Attributes | |
ossimRefPtr< ossimHdf5ImageHandler > | m_handler |
ossimRefPtr< ossimHdf5 > | m_hdf5 |
H5::DataSet | m_dataset |
H5::DataSpace | m_dataSpace |
ossimScalarType | m_scalar |
ossim_uint32 | m_bands |
ossim_uint32 | m_lines |
ossim_uint32 | m_samples |
ossimEndian * | m_endian |
std::vector< ossim_float32 > | m_minValue |
std::vector< ossim_float32 > | m_maxValue |
ossimIrect | m_validRect |
H5 data can have null rows on the front or end. More... | |
Friends | |
OSSIMDLLEXPORT std::ostream & | operator<< (std::ostream &out, const ossimHdf5ImageDataset &obj) |
Additional Inherited Members | |
![]() | |
virtual | ~ossimReferenced () |
Class encapsulates a HDF5 Data set that can be loaded as an image.
Definition at line 35 of file ossimHdf5ImageDataset.h.
ossimHdf5ImageDataset::ossimHdf5ImageDataset | ( | ossimHdf5ImageHandler * | owner = 0 | ) |
default constructor
Definition at line 32 of file ossimHdf5ImageDataset.cpp.
References m_hdf5, ossimHdf5ImageHandler::m_hdf5, m_validRect, and ossimIrect::makeNan().
ossimHdf5ImageDataset::ossimHdf5ImageDataset | ( | const ossimHdf5ImageDataset & | obj | ) |
copy constructor
Definition at line 47 of file ossimHdf5ImageDataset.cpp.
ossimHdf5ImageDataset::~ossimHdf5ImageDataset | ( | ) |
destructor
Definition at line 60 of file ossimHdf5ImageDataset.cpp.
References close().
void ossimHdf5ImageDataset::close | ( | ) |
Calls H5::DataSet::close then deletes data set.
Definition at line 493 of file ossimHdf5ImageDataset.cpp.
References m_dataset, and m_endian.
Referenced by initialize(), and ~ossimHdf5ImageDataset().
|
private |
Returns true if datasets's endianness differs from this platform.
Definition at line 97 of file ossimHdf5ImageDataset.cpp.
References m_bands, m_dataset, m_lines, m_samples, m_validRect, ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by initialize().
|
private |
Definition at line 519 of file ossimHdf5ImageDataset.cpp.
References ossim::byteOrder(), ossimHdf5::getByteOrder(), m_dataset, m_endian, m_hdf5, m_scalar, OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_SCALAR_UNKNOWN, OSSIM_SINT16, OSSIM_SINT32, OSSIM_SINT64, OSSIM_SINT8, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT64, OSSIM_UINT8, ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by initialize().
const H5::DataSet * ossimHdf5ImageDataset::getDataset | ( | ) | const |
Get const pointer to dataset.
This can be null if not open.
Definition at line 499 of file ossimHdf5ImageDataset.cpp.
References m_dataset.
H5::DataSet * ossimHdf5ImageDataset::getDataset | ( | ) |
Get pointer to dataset.
This can be null if not open.
Definition at line 504 of file ossimHdf5ImageDataset.cpp.
References m_dataset.
double ossimHdf5ImageDataset::getMaxPixelValue | ( | ossim_uint32 | band = 0 | ) | const |
Definition at line 780 of file ossimHdf5ImageDataset.cpp.
References ossim::defaultMax(), m_maxValue, and m_scalar.
double ossimHdf5ImageDataset::getMinPixelValue | ( | ossim_uint32 | band = 0 | ) | const |
Definition at line 788 of file ossimHdf5ImageDataset.cpp.
References ossim::defaultMin(), m_minValue, and m_scalar.
string ossimHdf5ImageDataset::getName | ( | ) | const |
Definition at line 509 of file ossimHdf5ImageDataset.cpp.
References m_dataset.
ossim_uint32 ossimHdf5ImageDataset::getNumberOfBands | ( | ) | const |
Definition at line 571 of file ossimHdf5ImageDataset.cpp.
References m_bands.
ossim_uint32 ossimHdf5ImageDataset::getNumberOfLines | ( | ) | const |
Definition at line 576 of file ossimHdf5ImageDataset.cpp.
References ossimIrect::height(), and m_validRect.
ossim_uint32 ossimHdf5ImageDataset::getNumberOfSamples | ( | ) | const |
Definition at line 581 of file ossimHdf5ImageDataset.cpp.
References m_validRect, and ossimIrect::width().
ossimScalarType ossimHdf5ImageDataset::getScalarType | ( | ) | const |
Definition at line 514 of file ossimHdf5ImageDataset.cpp.
References m_scalar.
Referenced by getTileBuf(), scanForMinMax(), and scanForValidImageRect().
const ossimIpt & ossimHdf5ImageDataset::getSubImageOffset | ( | ) | const |
Definition at line 591 of file ossimHdf5ImageDataset.cpp.
References m_validRect, and ossimIrect::ul().
bool ossimHdf5ImageDataset::getSwapFlag | ( | ) | const |
Definition at line 586 of file ossimHdf5ImageDataset.cpp.
References m_endian.
void ossimHdf5ImageDataset::getTileBuf | ( | void * | buffer, |
const ossimIrect & | rect, | ||
ossim_uint32 | band, | ||
bool | scale = true |
||
) |
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. |
scale | If true, uses min and max to stretch the data to a UINT16 range. |
Definition at line 601 of file ossimHdf5ImageDataset.cpp.
References ossim::almostEqual(), ossimIrect::area(), ossimHdf5ImageHandler::getNullPixelValue(), getScalarType(), ossimIrect::height(), m_bands, m_dataset, m_endian, m_handler, m_maxValue, m_minValue, m_scalar, OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_SINT16, OSSIM_SINT32, OSSIM_SINT8, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT8, ossimNotify(), ossimNotifyLevel_WARN, ossimEndian::swap(), ossimIrect::ul(), ossimIrect::width(), ossimIpt::x, and ossimIpt::y.
Referenced by scanForMinMax().
const ossimIrect & ossimHdf5ImageDataset::getValidImageRect | ( | ) | const |
Definition at line 596 of file ossimHdf5ImageDataset.cpp.
References m_validRect.
bool ossimHdf5ImageDataset::initialize | ( | const H5::DataSet & | dataset | ) |
Opens datasetName and initializes all data members on success.
Definition at line 81 of file ossimHdf5ImageDataset.cpp.
References close(), determineExtents(), determineScalarType(), and m_dataset.
bool ossimHdf5ImageDataset::isMaxPixelSet | ( | ) | const |
Definition at line 800 of file ossimHdf5ImageDataset.cpp.
References m_maxValue.
bool ossimHdf5ImageDataset::isMinPixelSet | ( | ) | const |
Definition at line 795 of file ossimHdf5ImageDataset.cpp.
References m_minValue.
const ossimHdf5ImageDataset & ossimHdf5ImageDataset::operator= | ( | const ossimHdf5ImageDataset & | rhs | ) |
Definition at line 65 of file ossimHdf5ImageDataset.cpp.
References m_bands, m_dataset, m_dataSpace, m_endian, m_lines, m_samples, m_scalar, and m_validRect.
std::ostream & ossimHdf5ImageDataset::print | ( | std::ostream & | out | ) | const |
print method.
Definition at line 805 of file ossimHdf5ImageDataset.cpp.
References ossimLookUpTable::getEntryString(), ossimScalarTypeLut::instance(), m_bands, m_dataset, m_endian, m_lines, m_samples, m_scalar, m_validRect, ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by operator<<().
|
private |
Definition at line 401 of file ossimHdf5ImageDataset.cpp.
References ossimHdf5ImageHandler::getNullPixelValue(), getScalarType(), getTileBuf(), ossimIrect::lr(), m_bands, m_handler, m_maxValue, m_minValue, m_validRect, OSSIM_DEFAULT_MAX_PIX_FLOAT, OSSIM_DEFAULT_MIN_PIX_FLOAT, OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_SCALAR_UNKNOWN, OSSIM_SINT16, OSSIM_SINT32, OSSIM_SINT64, OSSIM_SINT8, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT64, OSSIM_UINT8, ossim::scalarSizeInBytes(), ossimIrect::ul(), ossimIrect::ur(), ossimIrect::width(), x, and y.
|
private |
Definition at line 131 of file ossimHdf5ImageDataset.cpp.
References ossim::almostEqual(), ossimLookUpTable::getEntryString(), getScalarType(), ossimScalarTypeLut::instance(), ossimIrect::lr(), m_dataset, m_endian, m_lines, m_samples, m_validRect, OSSIM_FLOAT32, ossimNotify(), ossimNotifyLevel_WARN, ossimIrect::set_lr(), ossimIrect::set_ul(), ossimEndian::swap(), ossimIrect::ul(), ossimIrect::width(), ossimIpt::x, and ossimIpt::y.
|
friend |
Definition at line 828 of file ossimHdf5ImageDataset.cpp.
|
private |
Definition at line 139 of file ossimHdf5ImageDataset.h.
Referenced by determineExtents(), getNumberOfBands(), getTileBuf(), operator=(), print(), and scanForMinMax().
|
private |
Definition at line 136 of file ossimHdf5ImageDataset.h.
Referenced by close(), determineExtents(), determineScalarType(), getDataset(), getName(), getTileBuf(), initialize(), operator=(), print(), and scanForValidImageRect().
|
private |
Definition at line 137 of file ossimHdf5ImageDataset.h.
Referenced by operator=().
|
private |
Definition at line 142 of file ossimHdf5ImageDataset.h.
Referenced by close(), determineScalarType(), getSwapFlag(), getTileBuf(), operator=(), print(), and scanForValidImageRect().
|
private |
Definition at line 134 of file ossimHdf5ImageDataset.h.
Referenced by getTileBuf(), and scanForMinMax().
|
private |
Definition at line 135 of file ossimHdf5ImageDataset.h.
Referenced by determineScalarType(), and ossimHdf5ImageDataset().
|
private |
Definition at line 140 of file ossimHdf5ImageDataset.h.
Referenced by determineExtents(), operator=(), print(), and scanForValidImageRect().
|
private |
Definition at line 144 of file ossimHdf5ImageDataset.h.
Referenced by getMaxPixelValue(), getTileBuf(), isMaxPixelSet(), and scanForMinMax().
|
private |
Definition at line 143 of file ossimHdf5ImageDataset.h.
Referenced by getMinPixelValue(), getTileBuf(), isMinPixelSet(), and scanForMinMax().
|
private |
Definition at line 141 of file ossimHdf5ImageDataset.h.
Referenced by determineExtents(), operator=(), print(), and scanForValidImageRect().
|
private |
Definition at line 138 of file ossimHdf5ImageDataset.h.
Referenced by determineScalarType(), getMaxPixelValue(), getMinPixelValue(), getScalarType(), getTileBuf(), operator=(), and print().
|
private |
H5 data can have null rows on the front or end.
The valid rect is the scanned rectangle disregarding leading or trailing nulls. This doesn't handle nulls in the middle of image.
Definition at line 149 of file ossimHdf5ImageDataset.h.
Referenced by determineExtents(), getNumberOfLines(), getNumberOfSamples(), getSubImageOffset(), getValidImageRect(), operator=(), ossimHdf5ImageDataset(), print(), scanForMinMax(), and scanForValidImageRect().