ome-files 0.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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_type > | tileCoverage (PlaneRegion region) const
| Get a list of the tiles covering an image region. More...

## Protected Member Functions
| TileInfo (ome::compat::shared_ptr< IFD > ifd)
| Constructor. More...

## Protected Attributes
ome::compat::shared_ptr< Impl > | impl
| Private implementation details.

## Friends
class | IFD

## 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

ome::files::tiff::TileInfo::TileInfo | ( | ome::compat::shared_ptr< IFD > | ifd | ) |
| protected

Constructor.

Parameters

  ifd | the directory the tile belongs to.

## Member Function Documentation

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.

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

Get the column index for the given tile index.

Parameters

  index | the tile index.

Returns
  the column index.

References impl.

Referenced by tileCoverage(), and tileRegion().

Here is the caller graph for this function:

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

Get the total number of columns.

Returns
  the column count.

References impl.

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

Get the total number of tiles.

Returns
  the tile count.

References impl.

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

  region | the 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(), and ome::files::tiff::IFD::writeImage().

Here is the caller graph for this function:

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

Get the height of a tile.

Returns
  the height of a tile.

References impl.

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

  x | the image column.
  y | the image row.
  s | the image subchannel.

Returns
  the tile index.

References impl.

Referenced by tileCoverage().

Here is the caller graph for this function:

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

  index | the tile index.
  clip | the clip region.

Returns
  the region covered.

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

  index | the tile index.

Returns
  the region covered.

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

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

Get the row index for the given tile index.

Parameters

  index | the tile index.

Returns
  the row index.

References impl.

Referenced by tileCoverage(), and tileRegion().

Here is the caller graph for this function:

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

Get the total number of rows.

Returns
  the row count.

References impl.

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

  index | the tile index.

Returns
  the sample index.

References impl.

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

Get the type of a tile.

Returns
  the tile type.

References impl.

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:

- ome/files/tiff/TileInfo.h
- ome/files/tiff/TileInfo.cpp