Class ISingleChannelTileAccessor#
Defined in File libCZI_Compositor.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public libCZI::IAccessor
(Class IAccessor)
Class Documentation#
-
class ISingleChannelTileAccessor : public libCZI::IAccessor#
This accessor creates a multi-tile composite of a single channel (and a single plane). The accessor will request all tiles that intersect with the specified ROI and are on the specified plane and create a composite as shown here:
The resulting output bitmap will look like this:
This accessor only operates on pyramid layer 0 - i.e. only sub-blocks with logical_size = physical_size will be considered. If the flag “drawTileBorder” is set, then the tiles will be sorted by their M-index (tiles with higher M-index are placed ‘on top’).
The pixel type of the output bitmap is either specified as an argument or it is automatically determined. In the latter case the first sub-block found on the specified plane is examined for its pixeltype, and this pixeltype is used.
The pixels in the output bitmap get converted from the source pixels (if their pixeltypes differ).Public Functions
-
virtual std::shared_ptr<libCZI::IBitmapData> Get(const libCZI::IntRectAndFrameOfReference &roi, const IDimCoordinate *planeCoordinate, const Options *pOptions) = 0#
Gets the tile composite of the specified plane and the specified ROI. The pixeltype is determined by examining the first subblock found in the specified plane (which is an arbitrary subblock). A newly allocated bitmap is returned.
- Parameters:
roi – The ROI and the coordinate system it is defined in.
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
- Returns:
A std::shared_ptr<libCZI::IBitmapData> containing the tile-composite.
-
virtual std::shared_ptr<libCZI::IBitmapData> Get(libCZI::PixelType pixeltype, const libCZI::IntRectAndFrameOfReference &roi, const IDimCoordinate *planeCoordinate, const Options *pOptions) = 0#
Gets the tile composite of the specified plane and the specified ROI.
- Parameters:
pixeltype – The pixeltype.
roi – The ROI and the coordinate system it is defined in.
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
- Returns:
A std::shared_ptr<libCZI::IBitmapData> containing the tile-composite.
-
virtual void Get(libCZI::IBitmapData *pDest, const IntPointAndFrameOfReference &position, const IDimCoordinate *planeCoordinate, const Options *pOptions) = 0#
Copy the tile composite into the specified bitmap. The bitmap passed in here determines the width and the height of the ROI (and the pixeltype).
- Parameters:
pDest – [in] The destination bitmap.
position – The x-position and y-position of the ROI (width and height are given by pDest), and the coordinate system they are defined in.
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
-
inline std::shared_ptr<libCZI::IBitmapData> Get(int xPos, int yPos, int width, int height, const IDimCoordinate *planeCoordinate, const Options *pOptions)#
Gets the tile composite of the specified plane and the specified ROI. The pixeltype is determined by examining the first subblock found in the specified plane (which is an arbitrary subblock). A newly allocated bitmap is returned.
- Parameters:
xPos – The x-position (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
yPos – The y-position (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
width – The width.
height – The height.
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
- Returns:
A std::shared_ptr<libCZI::IBitmapData> containing the tile-composite.
-
inline std::shared_ptr<libCZI::IBitmapData> Get(libCZI::PixelType pixeltype, int xPos, int yPos, int width, int height, const IDimCoordinate *planeCoordinate, const Options *pOptions)#
Gets the tile composite of the specified plane and the specified ROI.
- Parameters:
pixeltype – The pixeltype.
xPos – The x-position (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
yPos – The y-position (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
width – The width.
height – The height.
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
- Returns:
A std::shared_ptr<libCZI::IBitmapData> containing the tile-composite.
-
inline std::shared_ptr<libCZI::IBitmapData> Get(const libCZI::IntRect &roi, const IDimCoordinate *planeCoordinate, const Options *pOptions)#
Gets the tile composite of the specified plane and the specified ROI. The pixeltype is determined by examining the first subblock found in the specified plane (which is an arbitrary subblock). A newly allocated bitmap is returned.
- Parameters:
roi – The ROI (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
- Returns:
A std::shared_ptr<libCZI::IBitmapData> containing the tile-composite.
-
inline std::shared_ptr<libCZI::IBitmapData> Get(libCZI::PixelType pixeltype, const libCZI::IntRect &roi, const IDimCoordinate *planeCoordinate, const Options *pOptions)#
Gets the tile composite of the specified plane and the specified ROI.
- Parameters:
pixeltype – The pixeltype.
roi – The ROI (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
- Returns:
A std::shared_ptr<libCZI::IBitmapData> containing the tile-composite.
-
inline void Get(libCZI::IBitmapData *pDest, int xPos, int yPos, const IDimCoordinate *planeCoordinate, const Options *pOptions)#
Copy the tile composite into the specified bitmap. The bitmap passed in here determines the width and the height of the ROI (and the pixeltype).
- Parameters:
pDest – [in] The destination bitmap.
xPos – The x-position of the ROI (width and height are given by pDest) - given in raw-subblock-coordinate-system, c.f. Coordinate Systems.
yPos – The y-position of the ROI (width and height are given by pDest) - given in raw-subblock-coordinate-system, c.f. Coordinate Systems.
planeCoordinate – The plane coordinate.
pOptions – Options for controlling the operation.
Protected Functions
-
~ISingleChannelTileAccessor() override = default#
-
struct Options#
Options for controlling the composition operation.
Public Functions
-
inline void Clear()#
Clears this object to its blank state.
Public Members
-
RgbFloatColor backGroundColor#
The background color. If the destination bitmap is a grayscale-type, then the mean from R, G and B is calculated and multiplied with the maximum pixel value (of the specific pixeltype). If it is an RGB-color type, then R, G and B are separately multiplied with the maximum pixel value. If any of R, G or B is NaN, then the background is not cleared.
-
bool sortByM#
If true, then the tiles are sorted by their M-index (tile with highest M-index will be ‘on top’). Otherwise, the Z-order is arbitrary.
-
bool useVisibilityCheckOptimization#
If true, then the tile-visibility-check-optimization is used. When doing the multi-tile composition, all relevant tiles are checked whether they are visible in the destination bitmap. If a tile is not visible, then the corresponding sub-block is not read. This can speed up the operation considerably. The result is the same as without this optimization - i.e. there should be no reason to turn it off besides potential bugs.
-
bool drawTileBorder#
If true, then a one-pixel wide boundary will be drawn around each tile (in black color).
-
std::shared_ptr<libCZI::IIndexSet> sceneFilter#
If specified, only subblocks with a scene-index contained in the set will be considered.
-
std::shared_ptr<libCZI::ISubBlockCacheOperation> subBlockCache#
If specified, then the sub-block cache is used. This can speed up the operation considerably. Bitmaps that are read by the accessor are added to the cache. If a bitmap is needed which is already in the cache, then the bitmap from the cache is used instead of reading the sub-block from the file.
-
bool onlyUseSubBlockCacheForCompressedData#
If true, then only bitmaps from sub-blocks with compressed data are added to the cache. For uncompressed data, the time for reading the bitmap can be negligible, so the benefit of caching might not outweigh the increased memory usage.
-
inline void Clear()#
-
virtual std::shared_ptr<libCZI::IBitmapData> Get(const libCZI::IntRectAndFrameOfReference &roi, const IDimCoordinate *planeCoordinate, const Options *pOptions) = 0#