bioformats
5.1.8
|
Interface for all biological file format readers and writers. More...
#include <ome/bioformats/FormatHandler.h>
Public Member Functions | |
virtual | ~FormatHandler () |
Destructor. | |
virtual bool | isThisType (const boost::filesystem::path &name, bool open=true) const =0 |
Check if the given file is a valid instance of this file format. More... | |
virtual const std::string & | getFormat () const =0 |
Get the name of this file format. More... | |
virtual const std::string & | getFormatDescription () const =0 |
Get the description of this file format. More... | |
virtual const std::vector< boost::filesystem::path > & | getSuffixes () const =0 |
Get the default file suffixes for this file format. More... | |
virtual const std::vector< boost::filesystem::path > & | getCompressionSuffixes () const =0 |
Get the default compression suffixes for this file format. More... | |
virtual void | setId (const boost::filesystem::path &id)=0 |
Set the current file name. More... | |
virtual void | close (bool fileOnly=false)=0 |
Close the currently open file. More... | |
Static Public Member Functions | |
static bool | checkSuffix (const boost::filesystem::path &name, const boost::filesystem::path &suffix) |
Perform suffix matching for the given filename. More... | |
static bool | checkSuffix (const boost::filesystem::path &name, const std::vector< boost::filesystem::path > &suffixes) |
Perform suffix matching for the given filename. More... | |
static bool | checkSuffix (const boost::filesystem::path &name, const std::vector< boost::filesystem::path > &suffixes, const std::vector< boost::filesystem::path > &compression_suffixes) |
Perform suffix matching for the given filename. More... | |
static void | assertId (const boost::optional< boost::filesystem::path > &id, bool notNull=true) |
Assert that the current file is valid. More... | |
Protected Member Functions | |
FormatHandler () | |
Constructor. | |
Private Member Functions | |
FormatHandler (const FormatHandler &) | |
Copy constructor (deleted). | |
FormatHandler & | operator= (const FormatHandler &) |
Assignment operator (deleted). | |
Interface for all biological file format readers and writers.
|
inlinestatic |
Assert that the current file is valid.
Assert if the current file is null, or not, according to the given flag. If the assertion fails, an exception is thrown.
id | Filename to test. |
notNull | true if id should be non-null, false if id should be null. |
std::logic_error | if the assertion fails. |
Referenced by ome::bioformats::detail::FormatWriter::changeOutputFile(), ome::bioformats::detail::FormatReader::FormatReader(), ome::bioformats::detail::FormatWriter::FormatWriter(), ome::bioformats::detail::FormatReader::getBitsPerPixel(), ome::bioformats::detail::FormatReader::getCoreMetadataList(), ome::bioformats::detail::FormatReader::getDimensionOrder(), ome::bioformats::in::OMETIFFReader::getDomains(), ome::bioformats::detail::FormatReader::getDomains(), ome::bioformats::detail::FormatReader::getImageCount(), ome::bioformats::detail::FormatWriter::getIndex(), ome::bioformats::detail::FormatReader::getIndex(), ome::bioformats::in::MinimalTIFFReader::getLookupTable(), ome::bioformats::in::OMETIFFReader::getLookupTable(), ome::bioformats::detail::FormatReader::getLookupTable(), ome::bioformats::in::OMETIFFReader::getOptimalTileHeight(), ome::bioformats::detail::FormatReader::getOptimalTileHeight(), ome::bioformats::in::OMETIFFReader::getOptimalTileWidth(), ome::bioformats::detail::FormatReader::getOptimalTileWidth(), ome::bioformats::detail::FormatReader::getPixelType(), ome::bioformats::detail::FormatWriter::getPlane(), ome::bioformats::detail::FormatReader::getPlane(), ome::bioformats::detail::FormatReader::getResolutionCount(), ome::bioformats::detail::FormatWriter::getSeries(), ome::bioformats::detail::FormatReader::getSeriesCount(), ome::bioformats::detail::FormatReader::getSeriesMetadata(), ome::bioformats::detail::FormatReader::getSeriesMetadataValue(), ome::bioformats::in::OMETIFFReader::getSeriesUsedFiles(), ome::bioformats::detail::FormatReader::getSizeC(), ome::bioformats::detail::FormatReader::getSizeT(), ome::bioformats::detail::FormatReader::getSizeX(), ome::bioformats::detail::FormatReader::getSizeY(), ome::bioformats::detail::FormatReader::getSizeZ(), ome::bioformats::detail::FormatReader::getThumbSize(), ome::bioformats::detail::FormatWriter::getZCTCoords(), ome::bioformats::detail::FormatReader::getZCTCoords(), ome::bioformats::detail::FormatReader::getZCTModuloCoords(), ome::bioformats::detail::FormatReader::isFalseColor(), ome::bioformats::detail::FormatReader::isIndexed(), ome::bioformats::detail::FormatReader::isInterleaved(), ome::bioformats::detail::FormatReader::isLittleEndian(), ome::bioformats::detail::FormatReader::isMetadataComplete(), ome::bioformats::detail::FormatReader::isOrderCertain(), ome::bioformats::detail::FormatReader::isRGB(), ome::bioformats::detail::FormatReader::isThumbnailSeries(), ome::bioformats::in::MinimalTIFFReader::openBytesImpl(), ome::bioformats::in::OMETIFFReader::openBytesImpl(), ome::bioformats::detail::FormatReader::openThumbBytes(), ome::bioformats::out::MinimalTIFFWriter::saveBytes(), ome::bioformats::out::OMETIFFWriter::saveBytes(), ome::bioformats::detail::FormatWriter::saveBytes(), ome::bioformats::detail::FormatReader::setFlattenedResolutions(), ome::bioformats::detail::FormatReader::setGroupFiles(), ome::bioformats::detail::FormatWriter::setLookupTable(), ome::bioformats::detail::FormatReader::setMetadataFiltered(), ome::bioformats::detail::FormatWriter::setMetadataRetrieve(), ome::bioformats::detail::FormatReader::setMetadataStore(), ome::bioformats::detail::FormatReader::setNormalized(), ome::bioformats::detail::FormatReader::setOriginalMetadataPopulated(), ome::bioformats::detail::FormatWriter::setPlane(), ome::bioformats::detail::FormatReader::setPlane(), and ome::bioformats::detail::FormatWriter::setSeries().
|
inlinestatic |
Perform suffix matching for the given filename.
name | the name to check. |
suffix | the suffix to match. |
true
if the suffix is suppored, false
otherwise. Referenced by checkSuffix(), ome::bioformats::in::OMETIFFReader::initFile(), ome::bioformats::in::OMETIFFReader::isSingleFile(), ome::bioformats::in::OMETIFFReader::isThisType(), ome::bioformats::detail::FormatWriter::isThisType(), and ome::bioformats::detail::FormatReader::isThisType().
|
inlinestatic |
Perform suffix matching for the given filename.
name | the name to check. |
suffixes | the suffixes to match. |
true
if the suffix is suppored, false
otherwise. References checkSuffix().
|
inlinestatic |
Perform suffix matching for the given filename.
name | the name to check. |
suffixes | the suffixes to match. |
compression_suffixes | the compression suffixes to match. |
true
if the suffix is suppored, false
otherwise. References checkSuffix().
|
pure virtual |
Close the currently open file.
An exception may be thrown when closing the file, for example if there are problems flushing any pending writes, or if there are any inconsistencies in the metadata which prevent completing any final writes. The causes are reader- or writer-dependent, and the exception type is dependent upon the implementation details of the reader or writer in use. It is advised to always explicitly close writers, since if this is automatically called at destruction time, any errors will be lost. If an exception is thrown, the object may be left in an inconsistent state and should not be reused.
fileOnly | close the open file only if true , or else free all internal state if false ; only meaningful for readers, since writers will always free all internal state. |
On | error; exception type may vary. |
Implemented in ome::bioformats::detail::FormatReader, ome::bioformats::detail::FormatWriter, ome::bioformats::in::OMETIFFReader, ome::bioformats::out::OMETIFFWriter, ome::bioformats::in::MinimalTIFFReader, ome::bioformats::out::MinimalTIFFWriter, and ome::bioformats::in::TIFFReader.
|
pure virtual |
Get the default compression suffixes for this file format.
Implemented in ome::bioformats::detail::FormatReader, and ome::bioformats::detail::FormatWriter.
|
pure virtual |
Get the name of this file format.
Implemented in ome::bioformats::detail::FormatReader, and ome::bioformats::detail::FormatWriter.
|
pure virtual |
Get the description of this file format.
Implemented in ome::bioformats::detail::FormatReader, and ome::bioformats::detail::FormatWriter.
|
pure virtual |
Get the default file suffixes for this file format.
Implemented in ome::bioformats::detail::FormatReader, and ome::bioformats::detail::FormatWriter.
|
pure virtual |
Check if the given file is a valid instance of this file format.
name | the file to open for checking. |
open | If true , and the file extension is insufficient to determine the file type, the file may be opened for further analysis, or other relatively expensive file system operations (such as file existence tests and directory listings) may be performed. If false , file system access is not allowed. |
true
if the file is valid, false
otherwise.Implemented in ome::bioformats::detail::FormatReader, ome::bioformats::detail::FormatWriter, ome::bioformats::FormatReader, and ome::bioformats::in::OMETIFFReader.
|
pure virtual |
Set the current file name.
Note this will throw FormatException if there are problems opening the file.
id | the filename to open. |
Implemented in ome::bioformats::detail::FormatReader, ome::bioformats::detail::FormatWriter, ome::bioformats::out::OMETIFFWriter, and ome::bioformats::out::MinimalTIFFWriter.
Referenced by ome::bioformats::out::MinimalTIFFWriter::setId().