ULIS  dev4.0.7
Utility Library for Imaging Systems
Public Types | Public Member Functions | Static Public Attributes | List of all members
FKernel Class Referencefinal

The FKernel class provides a mean of storing and manipulating convolution kernels. More...

Inheritance diagram for FKernel:

Public Types

typedef FKernel tSelf
 
typedef FBlock tSuperClass
 

Public Member Functions

 FKernel (const FKernel &)
 
 FKernel (const FVec2I &iSize, float iValue=0.f)
 
 FKernel (const FVec2I &iSize, std::initializer_list< float > iNums)
 
 FKernel (FKernel &&)
 
 ~FKernel ()
 
void Add (float iValue)
 
float At (const FVec2I &iPoint) const
 
float At (int iX, int iY) const
 
void Clear ()
 
void Fill (float iValue)
 
FKernel FlippedX () const
 
FKernel FlippedY () const
 
void FlipX ()
 
void FlipY ()
 
bool IsNormalized () const
 
void Mul (float iValue)
 
void Normalize ()
 
FKernel Normalized () const
 
FKerneloperator= (const FKernel &)
 
FKerneloperator= (FKernel &&)
 
const FVec2IPivot () const
 
void Rotate180 ()
 
void Rotate90CCW ()
 
void Rotate90CW ()
 
FKernel Rotated180 () const
 
FKernel Rotated90CCW () const
 
FKernel Rotated90CW () const
 
void Set (std::initializer_list< float > iNums)
 
void SetAt (const FVec2I &iPoint, float iValue)
 
void SetAt (int iX, int iY, float iValue)
 
void SetOnes ()
 
void SetPivot (const FVec2I &iPivot)
 
void SetZeroes ()
 
const FVec2I Size () const
 
float Sum () const
 
- Public Member Functions inherited from FBlock
 FBlock (const FBlock &)=delete
 
 FBlock (uint16 iWidth, uint16 iHeight, eFormat iFormat=eFormat::Format_RGBA8, const FColorSpace *iColorSpace=nullptr, const FOnInvalidBlock &iOnInvalid=FOnInvalidBlock(), const FOnCleanupData &iOnCleanup=FOnCleanupData(&OnCleanup_FreeMemory))
 
 FBlock (uint8 *iData=nullptr, uint16 iWidth=0, uint16 iHeight=0, eFormat iFormat=eFormat::Format_RGBA8, const FColorSpace *iColorSpace=nullptr, const FOnInvalidBlock &iOnInvalid=FOnInvalidBlock(), const FOnCleanupData &iOnCleanup=FOnCleanupData())
 
 ~FBlock ()
 
uint8Bits ()
 
const uint8Bits () const
 
uint32 BytesPerPlane () const
 
uint32 BytesPerScanLine () const
 
uint64 BytesTotal () const
 
FColor Color (uint16 iX, uint16 iY) const
 
uint32 CRC32 () const
 
void Dirty (bool iCallOnInvalid=true) const
 
void Dirty (const FRectI &iRect, bool iCallOnInvalid=true) const
 
void Dirty (const FRectI *iRectList, const uint32 iNumRects=1, bool iCallOnInvalid=true) const
 
bool IsHollow () const
 
void LoadFromData (uint8 *iData, uint16 iWidth, uint16 iHeight, eFormat iFormat, const FColorSpace *iColorSpace=nullptr, const FOnInvalidBlock &iOnInvalid=FOnInvalidBlock(), const FOnCleanupData &iOnCleanup=FOnCleanupData())
 
FBlock MakeHollow ()
 
const FOnCleanupDataOnCleanup () const
 
void OnCleanup (const FOnCleanupData &iOnCleanup)
 
const FOnInvalidBlockOnInvalid () const
 
void OnInvalid (const FOnInvalidBlock &iOnInvalid)
 
FBlockoperator= (const FBlock &)=delete
 
FPixel Pixel (uint16 iX, uint16 iY)
 
const FPixel Pixel (uint16 iX, uint16 iY) const
 
uint8PixelBits (uint16 iX, uint16 iY)
 
const uint8PixelBits (uint16 iX, uint16 iY) const
 
uint8PlaneBits (uint16 iPlane)
 
const uint8PlaneBits (uint16 iPlane) const
 
void ReallocInternalData (uint16 iWidth, uint16 iHeight, eFormat iFormat, const FColorSpace *iColorSpace=nullptr, const FOnInvalidBlock &iOnInvalid=FOnInvalidBlock(), const FOnCleanupData &iOnCleanup=FOnCleanupData())
 
FColor Sample (int16 iX, int16 iY, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const FColor &iConstant=FColor::Transparent) const
 
FColor SampleSubpixel (float iX, float iY, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const FColor &iConstant=FColor::Transparent, bool iCompensateBlackDrifting=true) const
 
uint8ScanlineBits (uint16 iRow)
 
const uint8ScanlineBits (uint16 iRow) const
 
void SetPixel (uint16 iX, uint16 iY, const ISample &iSample)
 
void SetPixelSafe (uint16 iX, uint16 iY, const ISample &iSample)
 
- Public Member Functions inherited from IHasFormat
 ~IHasFormat ()
 
uint8 AlphaIndex () const
 
uint8 BytesPerPixel () const
 
uint8 BytesPerSample () const
 
uint8 DefaultProfileCode () const
 
eFormat Format () const
 
const FFormatMetricsFormatMetrics () const
 
bool HasAlpha () const
 
const uint8IndexTable () const
 
bool Linear () const
 
eColorModel Model () const
 
uint8 NumColorChannels () const
 
bool Planar () const
 
bool Premultiplied () const
 
uint8 RedirectedIndex (uint8 iIndex) const
 
bool Reversed () const
 
uint8 SamplesPerPixel () const
 
bool Swapped () const
 
eType Type () const
 
- Public Member Functions inherited from IHasColorSpace
 ~IHasColorSpace ()
 
void AssignColorSpace (const FColorSpace *iColorSpace)
 
const FColorSpaceColorSpace () const
 
- Public Member Functions inherited from IHasSize2D
 ~IHasSize2D ()
 
uint32 Area () const
 
uint16 Height () const
 
FRectI Rect () const
 
FVec2I Size () const
 
uint16 Width () const
 

Static Public Attributes

static const FKernel BoxBlur
 
static const FKernel Edge4
 
static const FKernel Edge8
 
static const FKernel GaussianBlur
 
static const FKernel Identity
 
static const FKernel Sharpen
 
static const FKernel UnsharpMask
 

Additional Inherited Members

- Protected Member Functions inherited from IHasFormat
 IHasFormat (eFormat iFormat)
 
void ReinterpretFormat (eFormat iFormat)
 
- Protected Member Functions inherited from IHasColorSpace
 IHasColorSpace (const FColorSpace *iColorSpace=nullptr)
 
- Protected Member Functions inherited from IHasSize2D
 IHasSize2D (const FVec2UI16 &iSize)
 
void ReinterpretSize (const FVec2UI16 &iSize)
 
- Protected Attributes inherited from FBlock
uint8mBitmap
 Contiguous memory storage buffer for the block. More...
 
uint32 mBytesPerPlane
 Cached number of bytes per plane. More...
 
uint32 mBytesPerScanline
 Cached number of bytes per scanline. More...
 
uint64 mBytesTotal
 Cached number of bytes for the whole buffer. More...
 
FOnCleanupData mOnCleanup
 The callback for when the block is destroyed. More...
 
FOnInvalidBlock mOnInvalid
 The callback for when the block is dirty. More...
 

Detailed Description

The kernel is actually a block in Gray floating point format. kernel data lives on CPU, kernel can also be used as matrix.

Member Typedef Documentation

◆ tSelf

◆ tSuperClass

Constructor & Destructor Documentation

◆ ~FKernel()

FKernel::~FKernel ( )

◆ FKernel() [1/4]

FKernel::FKernel ( const FVec2I iSize,
float  iValue = 0.f 
)

◆ FKernel() [2/4]

FKernel::FKernel ( const FVec2I iSize,
std::initializer_list< float >  iNums 
)

◆ FKernel() [3/4]

FKernel::FKernel ( const FKernel )

◆ FKernel() [4/4]

FKernel::FKernel ( FKernel &&  )

Member Function Documentation

◆ Add()

void FKernel::Add ( float  iValue)

◆ At() [1/2]

float FKernel::At ( const FVec2I iPoint) const

◆ At() [2/2]

float FKernel::At ( int  iX,
int  iY 
) const

◆ Clear()

void FKernel::Clear ( )

◆ Fill()

void FKernel::Fill ( float  iValue)

◆ FlippedX()

FKernel FKernel::FlippedX ( ) const

◆ FlippedY()

FKernel FKernel::FlippedY ( ) const

◆ FlipX()

void FKernel::FlipX ( )

◆ FlipY()

void FKernel::FlipY ( )

◆ IsNormalized()

bool FKernel::IsNormalized ( ) const

◆ Mul()

void FKernel::Mul ( float  iValue)

◆ Normalize()

void FKernel::Normalize ( )

◆ Normalized()

FKernel FKernel::Normalized ( ) const

◆ operator=() [1/2]

FKernel& FKernel::operator= ( const FKernel )

◆ operator=() [2/2]

FKernel& FKernel::operator= ( FKernel &&  )

◆ Pivot()

const FVec2I& FKernel::Pivot ( ) const

◆ Rotate180()

void FKernel::Rotate180 ( )

◆ Rotate90CCW()

void FKernel::Rotate90CCW ( )

◆ Rotate90CW()

void FKernel::Rotate90CW ( )

◆ Rotated180()

FKernel FKernel::Rotated180 ( ) const

◆ Rotated90CCW()

FKernel FKernel::Rotated90CCW ( ) const

◆ Rotated90CW()

FKernel FKernel::Rotated90CW ( ) const

◆ Set()

void FKernel::Set ( std::initializer_list< float >  iNums)

◆ SetAt() [1/2]

void FKernel::SetAt ( const FVec2I iPoint,
float  iValue 
)

◆ SetAt() [2/2]

void FKernel::SetAt ( int  iX,
int  iY,
float  iValue 
)

◆ SetOnes()

void FKernel::SetOnes ( )

◆ SetPivot()

void FKernel::SetPivot ( const FVec2I iPivot)

◆ SetZeroes()

void FKernel::SetZeroes ( )

◆ Size()

const FVec2I FKernel::Size ( ) const

◆ Sum()

float FKernel::Sum ( ) const

Member Data Documentation

◆ BoxBlur

const FKernel FKernel::BoxBlur
static

◆ Edge4

const FKernel FKernel::Edge4
static

◆ Edge8

const FKernel FKernel::Edge8
static

◆ GaussianBlur

const FKernel FKernel::GaussianBlur
static

◆ Identity

const FKernel FKernel::Identity
static

◆ Sharpen

const FKernel FKernel::Sharpen
static

◆ UnsharpMask

const FKernel FKernel::UnsharpMask
static