libCZI
Reading and Writing CZI documents made easy
Loading...
Searching...
No Matches
libCZI::ISingleChannelScalingTileAccessor Class Referenceabstract

#include <libCZI_Compositor.h>

Inheritance diagram for libCZI::ISingleChannelScalingTileAccessor:
libCZI::IAccessor

Classes

struct  Options
 Options used for this accessor. More...
 

Public Member Functions

virtual libCZI::IntSize CalcSize (const libCZI::IntRect &roi, float zoom) const =0
 
virtual std::shared_ptr< libCZI::IBitmapDataGet (const libCZI::IntRectAndFrameOfReference &roi, const libCZI::IDimCoordinate *planeCoordinate, float zoom, const libCZI::ISingleChannelScalingTileAccessor::Options *pOptions)=0
 
virtual std::shared_ptr< libCZI::IBitmapDataGet (libCZI::PixelType pixeltype, const libCZI::IntRectAndFrameOfReference &roi, const libCZI::IDimCoordinate *planeCoordinate, float zoom, const libCZI::ISingleChannelScalingTileAccessor::Options *pOptions)=0
 
virtual void Get (libCZI::IBitmapData *pDest, const libCZI::IntRectAndFrameOfReference &roi, const libCZI::IDimCoordinate *planeCoordinate, float zoom, const libCZI::ISingleChannelScalingTileAccessor::Options *pOptions)=0
 
std::shared_ptr< libCZI::IBitmapDataGet (const libCZI::IntRect &roi, const libCZI::IDimCoordinate *planeCoordinate, float zoom, const libCZI::ISingleChannelScalingTileAccessor::Options *pOptions)
 
std::shared_ptr< libCZI::IBitmapDataGet (libCZI::PixelType pixeltype, const libCZI::IntRect &roi, const libCZI::IDimCoordinate *planeCoordinate, float zoom, const libCZI::ISingleChannelScalingTileAccessor::Options *pOptions)
 
void Get (libCZI::IBitmapData *pDest, const libCZI::IntRect &roi, const libCZI::IDimCoordinate *planeCoordinate, float zoom, const libCZI::ISingleChannelScalingTileAccessor::Options *pOptions)
 

Detailed Description

Interface for single channel scaling tile accessors. This accessor creates a multi-tile composite of a single channel (and a single plane) with a given zoom-factor. It will use pyramid sub-blocks (if present) in order to create the destination bitmap. In this operation, it will use the pyramid-layer just above the specified zoom-factor and scale down to the requested size.
The scaling operation employed here is a simple nearest-neighbor algorithm.

Member Function Documentation

◆ CalcSize()

virtual libCZI::IntSize libCZI::ISingleChannelScalingTileAccessor::CalcSize ( const libCZI::IntRect roi,
float  zoom 
) const
pure virtual

Calculates the size a bitmap will have (when created by this accessor) for the specified ROI and the specified Zoom. Since the exact size if subject to rounding errors, one should always use this method if the exact size must be known beforehand. The Get-method which operates on a pre-allocated bitmap will only work if the size (of the bitmap passed in) exactly matches.

Parameters
roiThe ROI (since only the size is relevant here currently, the coordinate system it is given in does not matter).
zoomThe zoom factor.
Returns
The size of the composite created by this accessor (for these parameters).

◆ Get() [1/6]

std::shared_ptr< libCZI::IBitmapData > libCZI::ISingleChannelScalingTileAccessor::Get ( const libCZI::IntRect roi,
const libCZI::IDimCoordinate planeCoordinate,
float  zoom,
const libCZI::ISingleChannelScalingTileAccessor::Options pOptions 
)
inline

Gets the scaled tile composite of the specified plane and the specified ROI with the specified zoom factor.
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
roiThe ROI (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
planeCoordinateThe plane coordinate.
zoomThe zoom.
pOptionsOptions for controlling the operation (may be nullptr).
Returns
A std::shared_ptr<libCZI::IBitmapData> containing the composite.

◆ Get() [2/6]

virtual std::shared_ptr< libCZI::IBitmapData > libCZI::ISingleChannelScalingTileAccessor::Get ( const libCZI::IntRectAndFrameOfReference roi,
const libCZI::IDimCoordinate planeCoordinate,
float  zoom,
const libCZI::ISingleChannelScalingTileAccessor::Options pOptions 
)
pure virtual

Gets the scaled tile composite of the specified plane and the specified ROI with the specified zoom factor.
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
roiThe ROI and the coordinate system it is defined in.
planeCoordinateThe plane coordinate.
zoomThe zoom.
pOptionsOptions for controlling the operation (may be nullptr).
Returns
A std::shared_ptr<libCZI::IBitmapData> containing the composite.

◆ Get() [3/6]

void libCZI::ISingleChannelScalingTileAccessor::Get ( libCZI::IBitmapData pDest,
const libCZI::IntRect roi,
const libCZI::IDimCoordinate planeCoordinate,
float  zoom,
const libCZI::ISingleChannelScalingTileAccessor::Options pOptions 
)
inline

Copy the composite to the specified bitmap. The size of the bitmap must exactly match the size reported by the method "CalcSize" (for the same ROI and zoom), otherwise an invalid_argument-exception is thrown.

Parameters
[in,out]pDestThe destination bitmap.
roiThe ROI (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
planeCoordinateThe plane coordinate.
zoomThe zoom factor.
pOptionsOptions controlling the operation. May be nullptr.

◆ Get() [4/6]

virtual void libCZI::ISingleChannelScalingTileAccessor::Get ( libCZI::IBitmapData pDest,
const libCZI::IntRectAndFrameOfReference roi,
const libCZI::IDimCoordinate planeCoordinate,
float  zoom,
const libCZI::ISingleChannelScalingTileAccessor::Options pOptions 
)
pure virtual

Copy the composite to the specified bitmap. The size of the bitmap must exactly match the size reported by the method "CalcSize" (for the same ROI and zoom), otherwise an invalid_argument-exception is thrown.

Parameters
[in,out]pDestThe destination bitmap.
roiThe ROI and the coordinate system it is defined in.
planeCoordinateThe plane coordinate.
zoomThe zoom factor.
pOptionsOptions controlling the operation. May be nullptr.

◆ Get() [5/6]

std::shared_ptr< libCZI::IBitmapData > libCZI::ISingleChannelScalingTileAccessor::Get ( libCZI::PixelType  pixeltype,
const libCZI::IntRect roi,
const libCZI::IDimCoordinate planeCoordinate,
float  zoom,
const libCZI::ISingleChannelScalingTileAccessor::Options pOptions 
)
inline

Gets the scaled tile composite of the specified plane and the specified ROI with the specified zoom factor.

Parameters
pixeltypeThe pixeltype (of the destination bitmap).
roiThe ROI (given in raw-subblock-coordinate-system, c.f. Coordinate Systems).
planeCoordinateThe plane coordinate.
zoomThe zoom factor.
pOptionsOptions for controlling the operation (may be nullptr).
Returns
A std::shared_ptr<libCZI::IBitmapData> containing the composite.

◆ Get() [6/6]

virtual std::shared_ptr< libCZI::IBitmapData > libCZI::ISingleChannelScalingTileAccessor::Get ( libCZI::PixelType  pixeltype,
const libCZI::IntRectAndFrameOfReference roi,
const libCZI::IDimCoordinate planeCoordinate,
float  zoom,
const libCZI::ISingleChannelScalingTileAccessor::Options pOptions 
)
pure virtual

Gets the scaled tile composite of the specified plane and the specified ROI with the specified zoom factor.

Parameters
pixeltypeThe pixeltype (of the destination bitmap).
roiThe ROI and the coordinate system it is defined in.
planeCoordinateThe plane coordinate.
zoomThe zoom factor.
pOptionsOptions for controlling the operation (may be nullptr).
Returns
A std::shared_ptr<libCZI::IBitmapData> containing the composite.

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