Composition operations are found in this class: multi-tile compositor and multi-channel compositor.
More...
#include <libCZI_Compositor.h>
|
static void | ComposeSingleChannelTiles (const std::function< bool(int index, std::shared_ptr< libCZI::IBitmapData > &src, int &x, int &y)> &getTiles, libCZI::IBitmapData *dest, int xPos, int yPos, const ComposeSingleTileOptions *pOptions) |
| Composes a set of tiles (which are retrieved by calling the getTiles-functor) in the following way: The destination bitmap is taken to be positioned at (xPos,yPos) - which specifies the top-left corner. The tiles (retrieved from the functor) are positioned at the coordinate as reported by the functor-call. Then the intersection area of source and destination is copied to the destination bitmap. If the intersection is empty, then nothing is copied. More...
|
|
static void | ComposeMultiChannel_Bgr24 (libCZI::IBitmapData *dest, int channelCount, libCZI::IBitmapData *const *srcBitmaps, const ChannelInfo *channelInfos) |
|
static void | ComposeMultiChannel_Bgra32 (libCZI::IBitmapData *dest, std::uint8_t alphaVal, int channelCount, libCZI::IBitmapData *const *srcBitmaps, const ChannelInfo *channelInfos) |
|
static std::shared_ptr< IBitmapData > | ComposeMultiChannel_Bgr24 (int channelCount, libCZI::IBitmapData *const *srcBitmaps, const ChannelInfo *channelInfos) |
|
static std::shared_ptr< IBitmapData > | ComposeMultiChannel_Bgra32 (std::uint8_t alphaVal, int channelCount, libCZI::IBitmapData *const *srcBitmaps, const ChannelInfo *channelInfos) |
|
static std::shared_ptr< IBitmapData > | ComposeMultiChannel_Bgr24 (int channelCount, std::vector< std::shared_ptr< libCZI::IBitmapData >>::iterator srcBitmapsIterator, const ChannelInfo *channelInfos) |
|
static std::shared_ptr< IBitmapData > | ComposeMultiChannel_Bgra32 (std::uint8_t alphaVal, int channelCount, std::vector< std::shared_ptr< libCZI::IBitmapData >>::iterator srcBitmapsIterator, const ChannelInfo *channelInfos) |
|
Composition operations are found in this class: multi-tile compositor and multi-channel compositor.
◆ ComposeMultiChannel_Bgr24() [1/3]
Create the multi-channel-composite - applying tinting or gradation to the specified bitmaps and write the result to a newly allocated destination bitmap. All source bitmaps must have same width and height, and the destination bitmap will also have this same width/height. The pixeltype of the destination bitmap will be Bgr24.
- Parameters
-
channelCount | The number of channels. |
srcBitmaps | An array of source bitmaps. The array must contain as many elements as specified by channelCount . |
channelInfos | An array of channelInfo for the source channels. The array must contain as many elements as specified by channelCount . |
- Returns
- A std::shared_ptr<IBitmapData>.
◆ ComposeMultiChannel_Bgr24() [2/3]
static std::shared_ptr<IBitmapData> libCZI::Compositors::ComposeMultiChannel_Bgr24 |
( |
int |
channelCount, |
|
|
std::vector< std::shared_ptr< libCZI::IBitmapData >>::iterator |
srcBitmapsIterator, |
|
|
const ChannelInfo * |
channelInfos |
|
) |
| |
|
inlinestatic |
Create the multi-channel-composite - applying tinting or gradation to the specified bitmaps and write the result to the specified destination bitmap. All source bitmaps must have same width and height, and the destination bitmap also has to have this same width/height. The pixeltype of the destination bitmap must be Bgr24.
- Parameters
-
channelCount | Number of channels. |
srcBitmapsIterator | Source bitmaps iterator. |
channelInfos | An array of channelInfo for the source channels. The array must contain as many elements as specified by channelCount . |
- Returns
- A std::shared_ptr<IBitmapData>.
◆ ComposeMultiChannel_Bgr24() [3/3]
Create the multi-channel-composite - applying tinting or gradation to the specified bitmaps and write the result to the specified destination bitmap. All source bitmaps must have same width and height, and the destination bitmap also has to have this same width/height. The pixeltype of the destination bitmap must be Bgr24.
- Parameters
-
[in] | dest | The destination bitmap - must have same width/height as the source bitmaps and must be Bgr24. |
| channelCount | The number of channels. |
| srcBitmaps | An array of source bitmaps. The array must contain as many elements as specified by channelCount . |
| channelInfos | An array of channelInfo for the source channels. The array must contain as many elements as specified by channelCount . |
◆ ComposeMultiChannel_Bgra32() [1/3]
Create the multi-channel-composite - applying tinting or gradation to the specified bitmaps and write the result to the specified destination bitmap. All source bitmaps must have same width and height, and the destination bitmap also has to have this same width/height. The pixeltype of the destination bitmap must be Bgra32. The value of the parameter 'alphaVal' is written to all alpha-pixels in the destination.
- Parameters
-
[in] | dest | The destination bitmap - must have same width/height as the source bitmaps and must be Bgra32. |
| alphaVal | The alpha value. |
| channelCount | The number of channels. |
| srcBitmaps | An array of source bitmaps. The array must contain as many elements as specified by channelCount . |
| channelInfos | An array of channelInfo for the source channels. The array must contain as many elements as specified by channelCount . |
◆ ComposeMultiChannel_Bgra32() [2/3]
Create the multi-channel-composite - applying tinting or gradation to the specified bitmaps and write the result to a newly allocated destination bitmap. All source bitmaps must have same width and height, and the destination bitmap will also have this same width/height. The pixeltype of the destination bitmap will be Bgra32, and each alpha-pixel-value will be set to 'alphaVal'.
- Parameters
-
alphaVal | The alpha value. |
channelCount | The number of channels. |
srcBitmaps | An array of source bitmaps. The array must contain as many elements as specified by channelCount . |
channelInfos | An array of channelInfo for the source channels. The array must contain as many elements as specified by channelCount . |
- Returns
- A std::shared_ptr<IBitmapData>.
◆ ComposeMultiChannel_Bgra32() [3/3]
static std::shared_ptr<IBitmapData> libCZI::Compositors::ComposeMultiChannel_Bgra32 |
( |
std::uint8_t |
alphaVal, |
|
|
int |
channelCount, |
|
|
std::vector< std::shared_ptr< libCZI::IBitmapData >>::iterator |
srcBitmapsIterator, |
|
|
const ChannelInfo * |
channelInfos |
|
) |
| |
|
inlinestatic |
Create the multi-channel-composite - applying tinting or gradation to the specified bitmaps and write the result to the specified destination bitmap. All source bitmaps must have same width and height, and the destination bitmap also has to have this same width/height. The pixeltype of the destination bitmap must be Bgra32.
- Parameters
-
alphaVal | The alpha value. |
channelCount | Number of channels. |
srcBitmapsIterator | Source bitmaps iterator. |
channelInfos | An array of channelInfo for the source channels. The array must contain as many elements as specified by channelCount . |
- Returns
- A std::shared_ptr<IBitmapData>.
◆ ComposeSingleChannelTiles()
Composes a set of tiles (which are retrieved by calling the getTiles-functor) in the following way: The destination bitmap is taken to be positioned at (xPos,yPos) - which specifies the top-left corner. The tiles (retrieved from the functor) are positioned at the coordinate as reported by the functor-call. Then the intersection area of source and destination is copied to the destination bitmap. If the intersection is empty, then nothing is copied.
- Parameters
-
getTiles | [in] The functor which is called in order to retrieve the tiles to compose. The second and the third parameter specify the x- and y-position of this tile. We address a tile with the parameter index. If the index is out-of-range, then this functor is expected to return false. |
dest | [in,out] The destination bitmap. |
xPos | The x-coordinate of the top-left of the destination bitmap. |
yPos | The y-coordinate of the top-left of the destination bitmap. |
pOptions | Options for controlling the operation. This argument is optional (may be nullptr). |
The documentation for this class was generated from the following file: