NDEVR
API Documentation
TIFImageFactory

Handles reading and writing TIFF image files through the ImageFormatHandler interface. More...

Inheritance diagram for TIFImageFactory:
[legend]
Collaboration diagram for TIFImageFactory:
[legend]

Public Member Functions

virtual bool canRead (const File &file) const override
 Checks whether the given file can be read as a TIFF.
virtual bool canRead (StringView format) const override
 Checks whether the given format string is readable.
virtual bool canWrite (StringView format) const override
 Checks whether the given format string is writable.
virtual StringView compressionFormat (const uint01 *data, uint04 size) override
 Determines the compression format of raw image data.
virtual bool getCompressed (ImageCacheData &, StringView) override
 Reads the image in its compressed format.
virtual bool getMetaData (ImageCacheData &) override
 Reads metadata from a TIFF image.
virtual bool getSize (ImageCacheData &) override
 Reads the image dimensions without fully decoding the image.
virtual void getSupportedFormats (AlocatingAlignedBuffer< FileFormat, 64 > &formats, bool is_read) const override
 Populates the list of supported TIFF file formats.
virtual bool getUncompressed (ImageCacheData &) override
 Reads and decompresses the image data.
virtual bool hasTransparency (ImageCacheData &) override
 Checks whether the TIFF image has an alpha channel.
virtual UUID id () const override
 Returns the unique identifier for this factory.

Static Public Member Functions

static TIFImageFactoryDefaultFactory ()
 Returns the singleton default TIFF image factory.

Detailed Description

Handles reading and writing TIFF image files through the ImageFormatHandler interface.


Definition at line 9 of file TIFImageFactory.h.

Member Function Documentation

◆ canRead() [1/2]

virtual bool TIFImageFactory::canRead ( const File & file) const
overridevirtual

Checks whether the given file can be read as a TIFF.

Parameters
[in]fileThe file to check.
Returns
True if the file is a readable TIFF.

Implements ImageFormatHandler.

◆ canRead() [2/2]

virtual bool TIFImageFactory::canRead ( StringView format) const
overridevirtual

Checks whether the given format string is readable.

Parameters
[in]formatThe format extension to check.
Returns
True if the format can be read.

Implements ImageFormatHandler.

◆ canWrite()

virtual bool TIFImageFactory::canWrite ( StringView format) const
overridevirtual

Checks whether the given format string is writable.

Parameters
[in]formatThe format extension to check.
Returns
True if the format can be written.

Implements ImageFormatHandler.

◆ compressionFormat()

virtual StringView TIFImageFactory::compressionFormat ( const uint01 * data,
uint04 size )
overridevirtual

Determines the compression format of raw image data.

Parameters
[in]dataThe raw image data bytes.
[in]sizeThe number of bytes in the data.
Returns
The compression format identifier.

Reimplemented from ImageFormatHandler.

◆ DefaultFactory()

TIFImageFactory & TIFImageFactory::DefaultFactory ( )
static

Returns the singleton default TIFF image factory.

Returns
A reference to the default TIFImageFactory.

◆ getCompressed()

virtual bool TIFImageFactory::getCompressed ( ImageCacheData & ,
StringView  )
overridevirtual

Reads the image in its compressed format.

Parameters
[in]Theimage cache data to populate.
[in]Thetarget compression format.
Returns
True if the compressed data was successfully read.

Reimplemented from ImageFormatHandler.

◆ getMetaData()

virtual bool TIFImageFactory::getMetaData ( ImageCacheData & )
overridevirtual

Reads metadata from a TIFF image.

Parameters
[in]Theimage cache data to populate with metadata.
Returns
True if metadata was successfully read.

Reimplemented from ImageFormatHandler.

◆ getSize()

virtual bool TIFImageFactory::getSize ( ImageCacheData & )
overridevirtual

Reads the image dimensions without fully decoding the image.

Parameters
[in]Theimage cache data to populate with size info.
Returns
True if the size was successfully read.

Reimplemented from ImageFormatHandler.

◆ getSupportedFormats()

virtual void TIFImageFactory::getSupportedFormats ( AlocatingAlignedBuffer< FileFormat, 64 > & formats,
bool is_read ) const
overridevirtual

Populates the list of supported TIFF file formats.

Parameters
[in]formatsThe buffer to populate with supported formats.
[in]is_readWhether to list read formats (true) or write formats (false).

Implements ImageFormatHandler.

◆ getUncompressed()

virtual bool TIFImageFactory::getUncompressed ( ImageCacheData & )
overridevirtual

Reads and decompresses the image data.

Parameters
[in]Theimage cache data to populate.
Returns
True if the image was successfully decompressed.

Reimplemented from ImageFormatHandler.

◆ hasTransparency()

virtual bool TIFImageFactory::hasTransparency ( ImageCacheData & )
overridevirtual

Checks whether the TIFF image has an alpha channel.

Parameters
[in]Theimage cache data to check.
Returns
True if the image has transparency.

Reimplemented from ImageFormatHandler.

◆ id()

virtual UUID TIFImageFactory::id ( ) const
inlineoverridevirtual

Returns the unique identifier for this factory.

Returns
The UUID of this factory.

Implements ImageFormatHandler.

Definition at line 17 of file TIFImageFactory.h.

References UUID::CreateUUID().


The documentation for this class was generated from the following file: