PCL
|
Handles transparent, type-independent allocation of local and shared pixel data blocks. More...
#include <SharedPixelData.h>
Public Member Functions | |
SharedPixelData ()=default | |
SharedPixelData (const SharedPixelData &x) | |
SharedPixelData (int width, int height, int numberOfChannels, int bitsPerSample, bool floatSample, int colorSpace) | |
SharedPixelData (void *handle, int bitsPerSample, bool floatSample, bool complexSample) | |
virtual | ~SharedPixelData () |
void * | Handle () const noexcept |
bool | IsAliased () const |
bool | IsOwner () const |
bool | IsShared () const noexcept |
SharedPixelData & | operator= (const SharedPixelData &x) |
bool | operator== (const SharedPixelData &x) const noexcept |
Definition at line 76 of file SharedPixelData.h.
|
default |
Constructs a SharedPixelData object that represents a local image.
pcl::SharedPixelData::SharedPixelData | ( | void * | handle, |
int | bitsPerSample, | ||
bool | floatSample, | ||
bool | complexSample | ||
) |
References an existing shared image with the specified handle and sample data type.
handle | Handle to a shared image. |
bitsPerSample | Number of bits per pixel sample. |
floatSample | Whether this image stores floating point pixel data, or integer pixel data. |
complexSample | Whether this image stores complex pixel data or real pixel data. |
pcl::SharedPixelData::SharedPixelData | ( | int | width, |
int | height, | ||
int | numberOfChannels, | ||
int | bitsPerSample, | ||
bool | floatSample, | ||
int | colorSpace | ||
) |
Creates a new shared image with the specified geometry, sample data type and color space.
width | Image width in pixels. |
height | Image height in pixels. |
numberOfChannels | Number of channels, including nominal channels or color components and alpha channels. |
bitsPerSample | Number of bits per pixel sample. |
floatSample | Whether this image stores floating point pixel data, or integer pixel data. |
colorSpace | Color space where pixels are represented. |
|
inline |
Copy constructor.
If the argument object x represents a shared image, this constructor references the same shared image. If x is a local image, this function just copies the null handle and has no further effect.
Definition at line 135 of file SharedPixelData.h.
|
inlinevirtual |
Virtual destructor.
If this object represents a shared image, it is dereferenced. If the shared image becomes unreferenced, it will be garbage-collected and eventually destroyed by the PixInsight core application.
If this object represents a local image, this destructor has no effect.
Definition at line 150 of file SharedPixelData.h.
|
inlinenoexcept |
Returns the handle to the shared image represented by this object, or zero (a null pointer) if this object represents a local image.
Definition at line 187 of file SharedPixelData.h.
bool pcl::SharedPixelData::IsAliased | ( | ) | const |
Returns true iff the shared image represented by this object is not uniquely referenced, i.e. if there exist other SharedPixelData objects representing the same shared image. Returns false if the shared image is only referenced by this object, or if this object represents a local image.
bool pcl::SharedPixelData::IsOwner | ( | ) | const |
Returns true iff this object is the owner of the represented shared image. Returns false if this object does not own the shared image, or if this object does not represent a shared image.
|
inlinenoexcept |
Returns true if this object represents a shared image; false if it represents a local image. Shared images live in the PixInsight core application. Local images live in the calling module.
Definition at line 197 of file SharedPixelData.h.
|
inline |
Copy assignment operator. Returns a reference to this object.
If this object represents a shared image, it is dereferenced. If the specified object x represents a shared image, then this object will reference it; otherwhise this operator just copies the null handle without further effect.
Definition at line 163 of file SharedPixelData.h.
|
inlinenoexcept |
Returns true iff this object represents the same shared image as another object x, or if both objects represent local images.
Definition at line 178 of file SharedPixelData.h.
Referenced by pcl::PixelAllocator< P >::operator==().