ome-files  0.5.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ome::files::tiff::TileInfo Class Reference

Tile information for an IFD. More...

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

Classes

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

Public Member Functions

virtual ~TileInfo ()
 Destructor.
 
TileType tileType () const
 Get the type of a tile. More...
 
dimension_size_type tileWidth () const
 Get the width of a tile. More...
 
dimension_size_type tileHeight () const
 Get the height of a tile. More...
 
dimension_size_type tileCount () const
 Get the total number of tiles. More...
 
dimension_size_type tileRowCount () const
 Get the total number of rows. More...
 
dimension_size_type tileColumnCount () const
 Get the total number of columns. More...
 
dimension_size_type bufferSize () const
 Get the buffer size needed to contain a single tile. More...
 
dimension_size_type tileIndex (dimension_size_type x, dimension_size_type y, dimension_size_type s=0) const
 Get the tile index covering the given coordinates. More...
 
dimension_size_type tileColumn (dimension_size_type index) const
 Get the column index for the given tile index. More...
 
dimension_size_type tileRow (dimension_size_type index) const
 Get the row index for the given tile index. More...
 
dimension_size_type tileSample (dimension_size_type index) const
 Get the sample index for the given tile index. More...
 
PlaneRegion tileRegion (dimension_size_type index, const PlaneRegion &clip) const
 Get the region covered by the given tile index. More...
 
PlaneRegion tileRegion (dimension_size_type index) const
 Get the region covered by the given tile index. More...
 
std::vector< dimension_size_typetileCoverage (PlaneRegion region) const
 Get a list of the tiles covering an image region. More...
 

Protected Member Functions

 TileInfo (std::shared_ptr< IFD > ifd)
 Constructor. More...
 

Protected Attributes

std::shared_ptr< Implimpl
 Private implementation details.
 

Friends

class IFD
 IFD uses protected TileInfo methods.
 

Detailed Description

Tile information for an IFD.

Note
Strips are considered a special case of tiles where the tile width is the image width.

Constructor & Destructor Documentation

◆ TileInfo()

ome::files::tiff::TileInfo::TileInfo ( std::shared_ptr< IFD ifd)
protected

Constructor.

Parameters
ifdthe directory the tile belongs to.

Member Function Documentation

◆ bufferSize()

dimension_size_type ome::files::tiff::TileInfo::bufferSize ( ) const

Get the buffer size needed to contain a single tile.

Returns
the buffer size.

References impl.

◆ tileColumn()

dimension_size_type ome::files::tiff::TileInfo::tileColumn ( dimension_size_type  index) const

Get the column index for the given tile index.

Parameters
indexthe tile index.
Returns
the column index.

References impl.

Referenced by tileCoverage(), and tileRegion().

+ Here is the caller graph for this function:

◆ tileColumnCount()

dimension_size_type ome::files::tiff::TileInfo::tileColumnCount ( ) const

Get the total number of columns.

Returns
the column count.

References impl.

◆ tileCount()

dimension_size_type ome::files::tiff::TileInfo::tileCount ( ) const

Get the total number of tiles.

Returns
the tile count.

References impl.

◆ tileCoverage()

std::vector< dimension_size_type > ome::files::tiff::TileInfo::tileCoverage ( PlaneRegion  region) const

Get a list of the tiles covering an image region.

Note
The tiles may extend outside the specified region, and the same area may be covered by multiple tiles if the samples are planar.
Parameters
regionthe image region to cover.
Returns
a list of tile indexes.

References ome::files::PlaneRegion::h, impl, ome::files::tiff::SEPARATE, tileColumn(), tileIndex(), tileRow(), ome::files::PlaneRegion::w, ome::files::PlaneRegion::x, and ome::files::PlaneRegion::y.

Referenced by ome::files::tiff::IFD::readImage().

+ Here is the caller graph for this function:

◆ tileHeight()

dimension_size_type ome::files::tiff::TileInfo::tileHeight ( ) const

Get the height of a tile.

Returns
the height of a tile.

References impl.

◆ tileIndex()

dimension_size_type ome::files::tiff::TileInfo::tileIndex ( dimension_size_type  x,
dimension_size_type  y,
dimension_size_type  s = 0 
) const

Get the tile index covering the given coordinates.

Parameters
xthe image column.
ythe image row.
sthe image subchannel.
Returns
the tile index.

References impl.

Referenced by tileCoverage().

+ Here is the caller graph for this function:

◆ tileRegion() [1/2]

PlaneRegion ome::files::tiff::TileInfo::tileRegion ( dimension_size_type  index,
const PlaneRegion clip 
) const

Get the region covered by the given tile index.

If the tile index is invalid, the region will be of zero size. The clip region is a bounding box which will be intersected with the tile index to compute the returned region.

Note
For tiles at the image edges, the region size may differ from the tile size if the image size is not an exact multiple of the tile size. Clip to the full image size to obtain the usable area.
Parameters
indexthe tile index.
clipthe clip region.
Returns
the region covered.

◆ tileRegion() [2/2]

PlaneRegion ome::files::tiff::TileInfo::tileRegion ( dimension_size_type  index) const

Get the region covered by the given tile index.

If the tile index is invalid, the region will be of zero size.

Note
This method does not take into account tiles which overlap the edge of the image, and will always return the full tile size including areas outside the image. Use the clip variant of this method to clip tiles to the image edge.
Parameters
indexthe tile index.
Returns
the region covered.

References impl, tileColumn(), and tileRow().

◆ tileRow()

dimension_size_type ome::files::tiff::TileInfo::tileRow ( dimension_size_type  index) const

Get the row index for the given tile index.

Parameters
indexthe tile index.
Returns
the row index.

References impl.

Referenced by tileCoverage(), and tileRegion().

+ Here is the caller graph for this function:

◆ tileRowCount()

dimension_size_type ome::files::tiff::TileInfo::tileRowCount ( ) const

Get the total number of rows.

Returns
the row count.

References impl.

◆ tileSample()

dimension_size_type ome::files::tiff::TileInfo::tileSample ( dimension_size_type  index) const

Get the sample index for the given tile index.

Note
Only meaningful for planar images.
Parameters
indexthe tile index.
Returns
the sample index.

References impl.

◆ tileType()

TileType ome::files::tiff::TileInfo::tileType ( ) const

Get the type of a tile.

Returns
the tile type.

References impl.

◆ tileWidth()

dimension_size_type ome::files::tiff::TileInfo::tileWidth ( ) const

Get the width of a tile.

Returns
the width of a tile.

References impl.


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