ome-files  0.5.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ome::files::tiff::IFD Class Reference

Image File Directory (IFD). More...

#include <ome/files/tiff/IFD.h>

+ Inheritance diagram for ome::files::tiff::IFD:
+ Collaboration diagram for ome::files::tiff::IFD:

Classes

class  Impl
 Internal implementation details of OffsetIFD. More...
 

Public Member Functions

virtual ~IFD ()
 Destructor.
 
std::shared_ptr< TIFF > & getTIFF () const
 Get the source TIFF this descriptor belongs to. More...
 
void makeCurrent () const
 Make this IFD the current directory. More...
 
offset_type getOffset () const
 Get the directory offset. More...
 
void getRawField (tag_type tag,...) const
 Get a field by its tag number. More...
 
void getRawFieldDefaulted (tag_type tag,...) const
 Get a field by its tag number, falling back to default if unset. More...
 
void setRawField (tag_type tag,...)
 Set a field by its tag number. More...
 
template<typename TagCategory >
Field< TagCategory > getField (TagCategory tag)
 Get a Field by its tag enumeration. More...
 
template<typename TagCategory >
const Field< TagCategory > getField (TagCategory tag) const
 Get a Field by its tag enumeration. More...
 
TileType getTileType () const
 Get the tile type. More...
 
void setTileType (TileType type)
 Set the tile type. More...
 
dimension_size_type getCurrentTile () const
 Get the current tile being written. More...
 
void setCurrentTile (dimension_size_type tile)
 Set the current tile being written. More...
 
TileInfo getTileInfo ()
 Get tiling metadata. More...
 
const TileInfo getTileInfo () const
 Get tiling metadata. More...
 
std::vector< TileCoverage > & getTileCoverage ()
 Get tile coverage cache. More...
 
const std::vector< TileCoverage > & getTileCoverage () const
 Get tile coverage cache. More...
 
uint32_t getImageWidth () const
 Get the image width. More...
 
void setImageWidth (uint32_t width)
 Set the image width. More...
 
uint32_t getImageHeight () const
 Get the image height. More...
 
void setImageHeight (uint32_t height)
 Set the image height. More...
 
uint32_t getTileWidth () const
 Get the tile width. More...
 
void setTileWidth (uint32_t width)
 Set the tile width. More...
 
uint32_t getTileHeight () const
 Get the tile height. More...
 
void setTileHeight (uint32_t height)
 Set the tile height. More...
 
::ome::xml::model::enums::PixelType getPixelType () const
 Get the OME data model PixelType. More...
 
void setPixelType (::ome::xml::model::enums::PixelType type)
 Set the OME data model PixelType. More...
 
uint16_t getBitsPerSample () const
 Get bits per sample. More...
 
void setBitsPerSample (uint16_t samples)
 Set bits per sample. More...
 
uint16_t getSamplesPerPixel () const
 Get samples per pixel. More...
 
void setSamplesPerPixel (uint16_t samples)
 Set samples per pixel. More...
 
PlanarConfiguration getPlanarConfiguration () const
 Get planar configuration. More...
 
void setPlanarConfiguration (PlanarConfiguration planarconfig)
 Set planar configuration. More...
 
PhotometricInterpretation getPhotometricInterpretation () const
 Get photometric interpretation. More...
 
void setPhotometricInterpretation (PhotometricInterpretation photometric)
 Set photometric interpretation. More...
 
Compression getCompression () const
 Get compression scheme. More...
 
void setCompression (Compression compression)
 Set compression scheme. More...
 
void readImage (VariantPixelBuffer &buf) const
 Read a whole image plane into a pixel buffer. More...
 
void readImage (VariantPixelBuffer &buf, dimension_size_type subC) const
 Read a whole image plane into a pixel buffer. More...
 
void readImage (VariantPixelBuffer &dest, dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h) const
 Read a region of an image plane into a pixel buffer. More...
 
void readImage (VariantPixelBuffer &dest, dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h, dimension_size_type subC) const
 Read a region of an image plane into a pixel buffer. More...
 
void readLookupTable (VariantPixelBuffer &buf) const
 Read a lookup table into a pixel buffer. More...
 
void writeImage (const VariantPixelBuffer &buf)
 Write a whole image plane from a pixel buffer. More...
 
void writeImage (const VariantPixelBuffer &buf, dimension_size_type subC)
 Write a whole image plane from a pixel buffer. More...
 
void writeImage (const VariantPixelBuffer &source, dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h)
 Write a whole image plane from a pixel buffer. More...
 
void writeImage (const VariantPixelBuffer &source, dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h, dimension_size_type subC)
 Write a whole image plane from a pixel buffer. More...
 
std::shared_ptr< IFDnext () const
 Get next directory. More...
 
bool last () const
 Check if this is the last directory. More...
 

Static Public Member Functions

static std::shared_ptr< IFDopenIndex (std::shared_ptr< TIFF > &tiff, directory_index_type index)
 Open an IFD by index. More...
 
static std::shared_ptr< IFDopenOffset (std::shared_ptr< TIFF > &tiff, offset_type offset)
 Open an IFD. More...
 
static std::shared_ptr< IFDcurrent (std::shared_ptr< TIFF > &tiff)
 Get the current IFD. More...
 

Protected Member Functions

 IFD (std::shared_ptr< TIFF > &tiff, offset_type offset)
 Constructor (not public). More...
 
 IFD (std::shared_ptr< TIFF > &tiff)
 Constructor (not public). More...
 

Private Attributes

std::shared_ptr< Implimpl
 Private implementation details.
 

Detailed Description

Image File Directory (IFD).

An IFD represents a subfile within a TIFF.

Constructor & Destructor Documentation

◆ IFD() [1/2]

ome::files::tiff::IFD::IFD ( std::shared_ptr< TIFF > &  tiff,
offset_type  offset 
)
protected

Constructor (not public).

Parameters
tiffthe TIFF this IFD belongs to.
offsetthe IFD offset in the TIFF.

◆ IFD() [2/2]

ome::files::tiff::IFD::IFD ( std::shared_ptr< TIFF > &  tiff)
protected

Constructor (not public).

Parameters
tiffthe TIFF this IFD belongs to.

Member Function Documentation

◆ current()

std::shared_ptr< IFD > ome::files::tiff::IFD::current ( std::shared_ptr< TIFF > &  tiff)
static

Get the current IFD.

Parameters
tiffthe source TIFF.
Returns
the open IFD.

Referenced by ome::files::tiff::TIFF::getCurrentDirectory().

+ Here is the caller graph for this function:

◆ getBitsPerSample()

uint16_t ome::files::tiff::IFD::getBitsPerSample ( ) const

Get bits per sample.

Returns
the number of bits per sample.

References ome::files::tiff::BITSPERSAMPLE, getField(), and impl.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), and getPixelType().

+ Here is the caller graph for this function:

◆ getCompression()

Compression ome::files::tiff::IFD::getCompression ( ) const

Get compression scheme.

Returns
the compression scheme.

References ome::files::tiff::COMPRESSION, getField(), and impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ getCurrentTile()

dimension_size_type ome::files::tiff::IFD::getCurrentTile ( ) const

Get the current tile being written.

This is the tile currently being modified pending flush.

Returns
the current tile.

References impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ getField() [1/2]

template<typename TagCategory >
Field<TagCategory> ome::files::tiff::IFD::getField ( TagCategory  tag)
inline

◆ getField() [2/2]

template<typename TagCategory >
const Field<TagCategory> ome::files::tiff::IFD::getField ( TagCategory  tag) const
inline

◆ getImageHeight()

uint32_t ome::files::tiff::IFD::getImageHeight ( ) const

Get the image height.

Returns
the image height.

References getField(), ome::files::tiff::IMAGELENGTH, and impl.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), ome::files::in::MinimalTIFFReader::initFile(), readImage(), and writeImage().

+ Here is the caller graph for this function:

◆ getImageWidth()

uint32_t ome::files::tiff::IFD::getImageWidth ( ) const

Get the image width.

Returns
the image width.

References getField(), ome::files::tiff::IMAGEWIDTH, and impl.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), getTileWidth(), ome::files::in::MinimalTIFFReader::initFile(), readImage(), and writeImage().

+ Here is the caller graph for this function:

◆ getOffset()

offset_type ome::files::tiff::IFD::getOffset ( ) const

Get the directory offset.

Internally this is simply a call to TIFFCurrentDirOffset.

Returns
the directory offset.

References impl.

◆ getPhotometricInterpretation()

PhotometricInterpretation ome::files::tiff::IFD::getPhotometricInterpretation ( ) const

Get photometric interpretation.

Returns
the photometric interpretation of sample values.

References getField(), impl, and ome::files::tiff::PHOTOMETRIC.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), and ome::files::in::MinimalTIFFReader::initFile().

+ Here is the caller graph for this function:

◆ getPixelType()

ome::xml::model::enums::PixelType ome::files::tiff::IFD::getPixelType ( ) const

Get the OME data model PixelType.

This is computed based upon the SampleFormat and BitsPerSample tags for this IFD.

Returns
the PixelType.
Exceptions
anException if there is no corresponding PixelType for the SampleFormat and BitsPerSample in use.

References ome::files::tiff::COMPLEX_FLOAT, ome::files::tiff::FLOAT, getBitsPerSample(), getField(), impl, ome::files::tiff::SAMPLEFORMAT, ome::files::tiff::SIGNED_INT, and ome::files::tiff::UNSIGNED_INT.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), ome::files::in::MinimalTIFFReader::initFile(), readImage(), setBitsPerSample(), and writeImage().

+ Here is the caller graph for this function:

◆ getPlanarConfiguration()

PlanarConfiguration ome::files::tiff::IFD::getPlanarConfiguration ( ) const

Get planar configuration.

Returns
the number of planar configuration.

References getField(), impl, and ome::files::tiff::PLANARCONFIG.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), ome::files::in::MinimalTIFFReader::initFile(), readImage(), and writeImage().

+ Here is the caller graph for this function:

◆ getRawField()

void ome::files::tiff::IFD::getRawField ( tag_type  tag,
  ... 
) const

Get a field by its tag number.

Note
This should not be used except internally. Use getField(TagCategory) instead which offers a type-safe interface on top of this lower-level TIFFGetField wrapper.
Parameters
tagthe tag number.
...pointers to variables to store the value(s) in.

References ome::files::tiff::Sentry::error(), getTIFF(), and makeCurrent().

◆ getRawFieldDefaulted()

void ome::files::tiff::IFD::getRawFieldDefaulted ( tag_type  tag,
  ... 
) const

Get a field by its tag number, falling back to default if unset.

Note
This should not be used except internally. Use getField(TagCategory) instead which offers a type-safe interface on top of this lower-level TIFFGetField wrapper.
Parameters
tagthe tag number.
...pointers to variables to store the value(s) in.

References ome::files::tiff::Sentry::error(), getTIFF(), and makeCurrent().

◆ getSamplesPerPixel()

uint16_t ome::files::tiff::IFD::getSamplesPerPixel ( ) const

Get samples per pixel.

Returns
the number of samples per pixel.

References getField(), impl, and ome::files::tiff::SAMPLESPERPIXEL.

Referenced by ome::files::tiff::getCoreMetadata(), getField(), ome::files::in::MinimalTIFFReader::initFile(), readImage(), and writeImage().

+ Here is the caller graph for this function:

◆ getTIFF()

std::shared_ptr< TIFF > & ome::files::tiff::IFD::getTIFF ( ) const

Get the source TIFF this descriptor belongs to.

Returns
the source TIFF.

References impl.

Referenced by getRawField(), getRawFieldDefaulted(), last(), makeCurrent(), next(), and setRawField().

+ Here is the caller graph for this function:

◆ getTileCoverage() [1/2]

std::vector< TileCoverage > & ome::files::tiff::IFD::getTileCoverage ( )

Get tile coverage cache.

Returns
the TileCoverage cache for this IFD.

References impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ getTileCoverage() [2/2]

const std::vector< TileCoverage > & ome::files::tiff::IFD::getTileCoverage ( ) const

Get tile coverage cache.

Returns
the TileCoverage cache for this IFD.

References impl.

◆ getTileHeight()

uint32_t ome::files::tiff::IFD::getTileHeight ( ) const

Get the tile height.

Returns
the tile height.

References getField(), getTileType(), impl, ome::files::tiff::ROWSPERSTRIP, ome::files::tiff::TILE, and ome::files::tiff::TILELENGTH.

Referenced by getField().

+ Here is the caller graph for this function:

◆ getTileInfo() [1/2]

TileInfo ome::files::tiff::IFD::getTileInfo ( )

Get tiling metadata.

Returns
the TileInfo metadata for this IFD.
Exceptions
anException if tiles are not supported.

Referenced by getField(), readImage(), and writeImage().

+ Here is the caller graph for this function:

◆ getTileInfo() [2/2]

const TileInfo ome::files::tiff::IFD::getTileInfo ( ) const

Get tiling metadata.

Returns
the TileInfo metadata for this IFD.
Exceptions
anException if tiles are not supported.

◆ getTileType()

TileType ome::files::tiff::IFD::getTileType ( ) const

Get the tile type.

Returns
the tile type.

References getField(), impl, ome::files::tiff::ROWSPERSTRIP, ome::files::tiff::STRIP, ome::files::tiff::TILE, ome::files::tiff::TILELENGTH, and ome::files::tiff::TILEWIDTH.

Referenced by getField(), getTileHeight(), getTileWidth(), setTileHeight(), and setTileWidth().

+ Here is the caller graph for this function:

◆ getTileWidth()

uint32_t ome::files::tiff::IFD::getTileWidth ( ) const

Get the tile width.

Returns
the tile width.

References getField(), getImageWidth(), getTileType(), impl, ome::files::tiff::TILE, and ome::files::tiff::TILEWIDTH.

Referenced by getField().

+ Here is the caller graph for this function:

◆ last()

bool ome::files::tiff::IFD::last ( ) const

Check if this is the last directory.

Returns
true if last, false otherwise.

References getTIFF(), and makeCurrent().

Referenced by getField().

+ Here is the caller graph for this function:

◆ makeCurrent()

void ome::files::tiff::IFD::makeCurrent ( ) const

Make this IFD the current directory.

Internally this is simply a call to TIFFSetDirectory.

References ome::files::tiff::Sentry::error(), getTIFF(), and impl.

Referenced by getRawField(), getRawFieldDefaulted(), last(), next(), and setRawField().

+ Here is the caller graph for this function:

◆ next()

std::shared_ptr< IFD > ome::files::tiff::IFD::next ( ) const

Get next directory.

Returns
the next directory, or null if this is the last directory.

References getTIFF(), makeCurrent(), and openOffset().

Referenced by getField().

+ Here is the caller graph for this function:

◆ openIndex()

std::shared_ptr< IFD > ome::files::tiff::IFD::openIndex ( std::shared_ptr< TIFF > &  tiff,
directory_index_type  index 
)
static

Open an IFD by index.

Parameters
tiffthe source TIFF.
indexthe directory index.
Returns
the open IFD.
Deprecated:
Use openOffset() instead.

References ome::files::tiff::Sentry::error(), and openOffset().

◆ openOffset()

std::shared_ptr< IFD > ome::files::tiff::IFD::openOffset ( std::shared_ptr< TIFF > &  tiff,
offset_type  offset 
)
static

Open an IFD.

Parameters
tiffthe source TIFF.
offsetthe directory offset.
Returns
the open IFD.

Referenced by ome::files::tiff::TIFF::getDirectoryByOffset(), next(), and openIndex().

+ Here is the caller graph for this function:

◆ readImage() [1/4]

void ome::files::tiff::IFD::readImage ( VariantPixelBuffer buf) const

Read a whole image plane into a pixel buffer.

Parameters
bufthe destination pixel buffer.

References getImageHeight(), and getImageWidth().

Referenced by getField(), and readImage().

+ Here is the caller graph for this function:

◆ readImage() [2/4]

void ome::files::tiff::IFD::readImage ( VariantPixelBuffer buf,
dimension_size_type  subC 
) const

Read a whole image plane into a pixel buffer.

Parameters
bufthe destination pixel buffer.
subCthe subchannel to read.

References getImageHeight(), getImageWidth(), and readImage().

◆ readImage() [3/4]

void ome::files::tiff::IFD::readImage ( VariantPixelBuffer dest,
dimension_size_type  x,
dimension_size_type  y,
dimension_size_type  w,
dimension_size_type  h 
) const

Read a region of an image plane into a pixel buffer.

If the destination pixel buffer is of a different size to the region being read, or is of the incorrect pixel type, or has a different storage order, it will be resized using the correct pixel type and storage order.

Parameters
destthe destination pixel buffer.
xthe X coordinate of the upper-left corner of the sub-image.
ythe Y coordinate of the upper-left corner of the sub-image.
wthe width of the sub-image.
hthe height of the sub-image.

References ome::files::DIM_CHANNEL, ome::files::DIM_MODULO_C, ome::files::DIM_MODULO_T, ome::files::DIM_MODULO_Z, ome::files::DIM_SPATIAL_X, ome::files::DIM_SPATIAL_Y, ome::files::DIM_SPATIAL_Z, ome::files::DIM_SUBCHANNEL, ome::files::DIM_TEMPORAL_T, ome::files::PixelBufferBase::dimensions, getPixelType(), getPlanarConfiguration(), getSamplesPerPixel(), getTileInfo(), ome::files::PixelBufferBase::make_storage_order(), ome::files::VariantPixelBuffer::pixelType(), ome::files::tiff::SEPARATE, ome::files::VariantPixelBuffer::setBuffer(), ome::files::VariantPixelBuffer::shape(), ome::files::VariantPixelBuffer::storage_order(), ome::files::tiff::TileInfo::tileCoverage(), ome::files::VariantPixelBuffer::vbuffer(), and ome::xml::model::enums::DimensionOrder::XYZTC.

◆ readImage() [4/4]

void ome::files::tiff::IFD::readImage ( VariantPixelBuffer dest,
dimension_size_type  x,
dimension_size_type  y,
dimension_size_type  w,
dimension_size_type  h,
dimension_size_type  subC 
) const

Read a region of an image plane into a pixel buffer.

If the destination pixel buffer is of a different size to the region being read, or is of the incorrect pixel type, or has a different storage order, it will be resized using the correct pixel type and storage order.

Parameters
destthe destination pixel buffer.
xthe X coordinate of the upper-left corner of the sub-image.
ythe Y coordinate of the upper-left corner of the sub-image.
wthe width of the sub-image.
hthe height of the sub-image.
subCthe subchannel to read.

References readImage(), and ome::files::VariantPixelBuffer::vbuffer().

◆ readLookupTable()

void ome::files::tiff::IFD::readLookupTable ( VariantPixelBuffer buf) const

◆ setBitsPerSample()

void ome::files::tiff::IFD::setBitsPerSample ( uint16_t  samples)

Set bits per sample.

Parameters
samplesthe number of bits per sample.

References ome::files::tiff::BITSPERSAMPLE, getField(), getPixelType(), impl, and ome::files::significantBitsPerPixel().

Referenced by getField().

+ Here is the caller graph for this function:

◆ setCompression()

void ome::files::tiff::IFD::setCompression ( Compression  compression)

Set compression scheme.

Parameters
compressionthe compression scheme.

References ome::files::tiff::COMPRESSION, getField(), and impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setCurrentTile()

void ome::files::tiff::IFD::setCurrentTile ( dimension_size_type  tile)

Set the current tile being written.

This is the tile currently being modified pending flush.

Note
This should not be set by hand; it will be updated by the code writing out tile data called internally by writeImage().
Parameters
tilethe current tile.

References impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setImageHeight()

void ome::files::tiff::IFD::setImageHeight ( uint32_t  height)

Set the image height.

Parameters
heightthe image height.

References getField(), ome::files::tiff::IMAGELENGTH, and impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setImageWidth()

void ome::files::tiff::IFD::setImageWidth ( uint32_t  width)

Set the image width.

Parameters
widththe image width.

References getField(), ome::files::tiff::IMAGEWIDTH, and impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setPhotometricInterpretation()

void ome::files::tiff::IFD::setPhotometricInterpretation ( PhotometricInterpretation  photometric)

Set photometric interpretation.

Parameters
photometricthe photometric interpretation of sample values.

References getField(), impl, and ome::files::tiff::PHOTOMETRIC.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setPixelType()

void ome::files::tiff::IFD::setPixelType ( ::ome::xml::model::enums::PixelType  type)

Set the OME data model PixelType.

This sets the SampleFormat and BitsPerSample tags for this IFD which correspond to the PixelType in use.

Parameters
typethe PixelType to set.
Exceptions
anException if the PixelType is invalid.

References ome::files::tiff::COMPLEX_FLOAT, ome::files::tiff::FLOAT, getField(), impl, ome::files::tiff::SAMPLEFORMAT, ome::files::tiff::SIGNED_INT, and ome::files::tiff::UNSIGNED_INT.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setPlanarConfiguration()

void ome::files::tiff::IFD::setPlanarConfiguration ( PlanarConfiguration  planarconfig)

Set planar configuration.

Parameters
planarconfigthe number of planar configuration.

References getField(), impl, and ome::files::tiff::PLANARCONFIG.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setRawField()

void ome::files::tiff::IFD::setRawField ( tag_type  tag,
  ... 
)

Set a field by its tag number.

Note
This should not be used except internally. Use getField(TagCategory) instead which offers a type-safe interface on top of this lower-level TIFFSetField wrapper.
Parameters
tagthe tag number.
...variables containing the value(s) to set.

References ome::files::tiff::Sentry::error(), getTIFF(), and makeCurrent().

◆ setSamplesPerPixel()

void ome::files::tiff::IFD::setSamplesPerPixel ( uint16_t  samples)

Set samples per pixel.

Parameters
samplesthe number of samples per pixel.

References getField(), impl, and ome::files::tiff::SAMPLESPERPIXEL.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setTileHeight()

void ome::files::tiff::IFD::setTileHeight ( uint32_t  height)

Set the tile height.

Parameters
heightthe tile height.

References getField(), getTileType(), impl, ome::files::tiff::ROWSPERSTRIP, ome::files::tiff::TILE, and ome::files::tiff::TILELENGTH.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setTileType()

void ome::files::tiff::IFD::setTileType ( TileType  type)

Set the tile type.

Parameters
typethe tile type.

References impl.

Referenced by getField().

+ Here is the caller graph for this function:

◆ setTileWidth()

void ome::files::tiff::IFD::setTileWidth ( uint32_t  width)

Set the tile width.

Parameters
widththe tile width.

References getField(), getTileType(), impl, ome::files::tiff::TILE, and ome::files::tiff::TILEWIDTH.

Referenced by getField().

+ Here is the caller graph for this function:

◆ writeImage() [1/4]

void ome::files::tiff::IFD::writeImage ( const VariantPixelBuffer buf)

Write a whole image plane from a pixel buffer.

Parameters
bufthe source pixel buffer.

References getImageHeight(), and getImageWidth().

Referenced by getField(), and writeImage().

+ Here is the caller graph for this function:

◆ writeImage() [2/4]

void ome::files::tiff::IFD::writeImage ( const VariantPixelBuffer buf,
dimension_size_type  subC 
)

Write a whole image plane from a pixel buffer.

Parameters
bufthe source pixel buffer.
subCthe subchannel to write.

References getImageHeight(), getImageWidth(), and writeImage().

◆ writeImage() [3/4]

void ome::files::tiff::IFD::writeImage ( const VariantPixelBuffer source,
dimension_size_type  x,
dimension_size_type  y,
dimension_size_type  w,
dimension_size_type  h 
)

Write a whole image plane from a pixel buffer.

The source pixel buffer must match the size of the region being written, and must also the same pixel type and storage ordering as the TIFF image.

Parameters
sourcethe source pixel buffer.
xthe X coordinate of the upper-left corner of the sub-image.
ythe Y coordinate of the upper-left corner of the sub-image.
wthe width of the sub-image.
hthe height of the sub-image.

References ome::files::DIM_CHANNEL, ome::files::DIM_MODULO_C, ome::files::DIM_MODULO_T, ome::files::DIM_MODULO_Z, ome::files::DIM_SPATIAL_X, ome::files::DIM_SPATIAL_Y, ome::files::DIM_SPATIAL_Z, ome::files::DIM_SUBCHANNEL, ome::files::DIM_TEMPORAL_T, ome::files::PixelBufferBase::dimensions, getPixelType(), getPlanarConfiguration(), getSamplesPerPixel(), getTileInfo(), impl, ome::files::PixelBufferBase::make_storage_order(), ome::files::VariantPixelBuffer::pixelType(), ome::files::tiff::SEPARATE, ome::files::VariantPixelBuffer::shape(), ome::files::VariantPixelBuffer::storage_order(), ome::files::VariantPixelBuffer::vbuffer(), and ome::xml::model::enums::DimensionOrder::XYZTC.

◆ writeImage() [4/4]

void ome::files::tiff::IFD::writeImage ( const VariantPixelBuffer source,
dimension_size_type  x,
dimension_size_type  y,
dimension_size_type  w,
dimension_size_type  h,
dimension_size_type  subC 
)

Write a whole image plane from a pixel buffer.

The source pixel buffer must match the size of the region being written, and must also the same pixel type and storage ordering as the TIFF image.

Parameters
sourcethe source pixel buffer.
xthe X coordinate of the upper-left corner of the sub-image.
ythe Y coordinate of the upper-left corner of the sub-image.
wthe width of the sub-image.
hthe height of the sub-image.
subCthe subchannel to write.

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