Linderdaum Engine: clBitmap Class Reference
Updated: Sun Feb 5 2012 22:59:49
clBitmap Class Reference

Class for bitmap image representation. More...

#include <Bitmap.h>

List of all members.

Public Member Functions

 clBitmap ()
 clBitmap (const int Width, const int Height, const int Depth, const LBitmapFormat BitmapFormat, const LTextureType TextureType)
 clBitmap (const sBitmapParams &Params)
virtual ~clBitmap ()
virtual void AfterConstruction ()
void Swap (clBitmap *Other)
 Exchange image data pointers between two images.
bool ReallocImageData (const sBitmapParams *Params)
 (Re)allocate the image with specified parameters
clBitmapMakeCopy () const
 Create exact copy of the bitmap.
virtual bool IsEqual (const clBitmap *Other) const
 Bit-by-bit comparison with Other bitmap. True if the bitmpas coincide.
bool Load2DImage (sEnvironment *Env, const std::string &FileName)
bool Load2DImageFromStream (sEnvironment *Env, iIStream *Stream)
bool Load3DImage (sEnvironment *Env, const std::string &FileName)
bool Load3D (sEnvironment *Env, const std::string &FileName, bool Gradients, bool ESL)
 Load 3D image.
bool Load3DImageESL (sEnvironment *Env, const std::string &FileName)
 Load precomputed ESL map for a given 3D volume file (precompute if it doesn't exist)
bool Load3DImageGradients (sEnvironment *Env, const std::string &FileName)
 Load precomputed gradients for a given 3D volume file (precompute if it doesn't exist)
bool LoadCubeImage (sEnvironment *Env, const std::string &FileName)
 Load cubemap with format autodetection.
virtual bool Save2DImage (sEnvironment *Env, const std::string &FileName)
 Save 2d image to file using VFS (Bitmap is not yet an iObject, so we must pass Env here)
virtual bool Save3DImage (sEnvironment *Env, const std::string &FileName)
 Save 3d image to file using VFS (Bitmap is not yet an iObject, so we must pass Env here)
void RenderHistogram (LHistogram1D *Hist, const LVector4 &Color)
 Render horizontal lines representing the histogram.
clBitmapRenderIntensityHistogram (int Width, int Height)
 Service function to generate intensity histogram.
clBitmapRenderChannelHistogram (int Width, int Height, int Channel)
 Service function to generate the channel histogram.
void MakeGlow2 (float ExposureFactor, float DiscSize)
 Two-dimensional alpha-transparent spot.
clBitmapMakeNormalMap ()
 Calculate normal map for this RGB image.
void NoiseFill2 (int nSeed)
 Generate 2D noise with specified seed.
void NoiseFill3 (int nSeed)
 Generate 3D noise with specified seed.
void GenerateVoronoiDiagram (int NumPoints, const LVector2 *Points, const LVector4 *Colors)
 Generate 2D Voronoi diagram.
void GenerateRandomVoronoiDiagram (int NumPoints)
 Generate a Voronoi diagram for a random set of points.
void MakeXorPattern ()
 Generator the (i ^ j ^ k) & 0xFF pattern.
void ApplyExposure (float Exposure, clBitmap *Out)
 Convert Color to ( 1 - exp(Exposure * Color) ). If Out is NULL, "this" is used.
void MakeRainbowGradient (const LVector2 &From, const LVector2 &To)
 Make 2D rainbow gradient.
void FillColorSquare ()
 Rainbow-colored square.
void MakeWave2D (const LVector2 &Center, float Ampl, const LVector2 &K, float Omega, float t, float Phi, bool Add)
 Make a single 2D sine wave.
void MakeWave3D (const LVector3 &Center, float Ampl, const LVector3 &K, float Omega, float t, float Phi, bool Add)
 Make a single 3D sine wave.
void FillBox (const LVector3 &Min, const LVector3 &Max, const LVector4 &Color)
 Fill rectangle/box.
void SolidTriangle (int x1, int y1, int x2, int y2, int x3, int y3, const vec4 &Color)
 Fill the triangle with color.
void CalculateChannelHistogram (LHistogram1D *Out, int Channel)
 Calculate 8-bit histogram for R,G,B or A channel.
void CalculateIntensityHistogram (LHistogram1D *Out)
 Calculate histogram for intensity (8-bit)
void FindMinMax (LVector4 *Min, LVector4 *Max)
 Find minimum and maximum for each channel.
void NormalizeImage (clBitmap *Out)
 Convert [min..max] intensities for each channel to [0..1] range. If out is null, then 'this' is used (inplace normalization)
clBitmapNormalizeImageAlloc ()
 Allocate appropriate RGBA image and normalize values.
void LogNormalize (clBitmap *Out)
 Convert X to Log(1+X) for each point/channel.
clBitmapLogNormalizeAlloc ()
 Allocate RGBA image and make Log normalization.
void Linearize32BitZBuffer (float zNear, float zFar)
 Linearize z-buffer values.
void CalculateCentroid3D (double &Area, double &Xbar, double &Ybar, double &Zbar) const
 3D centroid - "mass center"
LMatrix3 CalculateCovariance3D () const
 3D covariance matrix
void CalculateSecondMoments3D (double &Area, double &Xbar, double &Ybar, double &Zbar, double &m200, double &mu020, double &mu002, double &mu110, double &mu101, double &mu011) const
 mu_{i,j,k} central moments calculation
void HoughTransform2D (clBitmap *Out) const
 Make a Hough transform with the image. Out image contains W angles and H different R's.
void Substract (clBitmap *Another, clBitmap *Out)
 Substract values of Another from This and put it in Out. If Out is null, 'this' is used.
clBitmapDifferenceWith (clBitmap *Another)
 Allocate new bitmap and write the difference of 'this' with Another.
void FlipBitmapVertical (const Lubyte *Src, Lubyte *Dst) const
void CombineImages_Dense (const std::vector< clBitmap * > &Images, std::vector< vec2 > &Offsets)
 Combine a number of images to a single atlas.
void FlipVertical ()
 Invert the image lines ( map 'y' to 'H/2-y')
void Rotate90CW ()
 Rotate the image clock-wise 90 degrees.
void Rotate90CCW ()
 Rotate the image counter clock-wise 90 degrees.
void Rotate180 ()
 Rotate the image 180 degrees.
void Convert_BGRAToRGBA ()
 Swap R and B components for each pixel.
clBitmapConvertToGrayscale8bit () const
 Create a new bitmap with single channel from a given RGB image.
clBitmapToColorFromGrayscale () const
 Create a new colored 32-bit bitmap from a grayscale one.
clBitmapFloatToRGBA8 () const
 Convert floating point image to RGBA8.
clBitmapExtractColorPlane8bit (int Idx) const
 Extract specified color component (0,1,2 - R,G,B)for each pixel and create a new 8-bit image. Can be used to extract R component or Alpha.
void CopyColorPlane (clBitmap *Src, int FromIdx, int ToIdx)
 Assign specified color plane from Src bitmap to this.
void ScalePixelComponents (const LVector4 &Factor)
 Multiply each channel by the factor.
void Tangle2D (clBitmap *Out)
 "Tangle" (R,G) [single complex number] array stored as RGB_float texture to the R_float texture with (R,G) pairs
void Untangle2D (LFFT *fft)
 "Untangle" R_float texture with (R,G) pairs to to (R,G) [single complex number] array stored as RGB_float texture
void CalculateComplexMagnitude ()
 Store sqrt(r * r + g * g) to B channel.
void CalculateComplexPhase ()
 Store arg( r + i* g ) to A channel.
clBitmapCopyBitmap (int X1, int Y1, int X2, int Y2) const
 Create new bitmap from this one (extract rectangular region)
void PutBitmap (int X, int Y, const clBitmap &Other)
 Place a bitmap into this one (REM: no range checking here)
void PutBmp (int X, int Y, clBitmap *Other)
 Utility wrapper for script/.NET export.
void RescaleImage (const Lubyte *Src, Lubyte *Dst, int NewWidth, int NewHeight) const
 Rescales texture.
void RescaleBitmap (int NewWidth, int NewHeight)
template<typename T >
void BlendBitmap (clBitmap *Overlay, T BlendingOp)
 Blend two bitmaps using specified blending operator (see LBlending.h for details)
void ConvertCrossFormatToCubeMap (const Lubyte *Src, Lubyte *Dst) const
clBitmapTile3DImage (int AtlasW, int AtlasH) const
 Create a 2D image with tiles created from slices of the original image.
int PixelOffset (int X, int Y, int Z) const
 Offset of the pixel in raw data. Unsupported (incorrect) for compressed formats.
void SetPixel (int X, int Y, int Z, const LVector4 &Color)
 Set pixel value with autoconversion from [0..1]^4 color.
LVector4 GetPixel (int X, int Y, int Z) const
 Get pixel value with autoconversion to [0..1]^4.
void SetPixelComponent (int X, int Y, int Z, int Idx, float Val)
 Set pixel component (R,G,B,A)
float GetPixelComponent (int X, int Y, int Z, int Idx) const
 Get pixel component (R,G,B,A)
void DrawLine2D (int x0, int y0, int x1, int y1, const LVector4 &Color)
 Draw the using Bresenham's algorithm.
void DrawLine3D (int _x0, int _y0, int _z0, int _x1, int _y1, int _z1, const LVector4 &Color)
 Draw the line in a 3D volume using a Bresenham-like algorithm.
void HorizontalLine (int y, int x1, int x2, const vec4 &Color)
 Draw colored horizontal line.
void Clear (const LVector4 &Color)
 Clear the bitmap using specified color.
LVector4 BilinearInterpolate (float x, float y)
 Bilinearly filtered GetPixel.
virtual void DisposeObject ()
 Overload/Emulation of iObject::DisposeObject()
int GetWidth () const
 Image width (x-dimension)
int GetHeight () const
 Image height (y-dimension)
int GetDepth () const
 Image depth (z-dimension)
int GetBitsPerPixel () const
 Bits per pixel.
bool IsCompressed () const
 Check if this bitmap's data is compressed.
LTextureType GetTextureType () const
 Information about texture type.
LBitmapFormat GetBitmapFormat () const
 Information about bitmap format.

Static Public Member Functions

static clBitmapCombineImages (const std::vector< clBitmap * > Src, int MaxWidth, int InterDistance, std::vector< vec2 > &Offsets)
 Combine a number of 2D bitmaps to the single atlas.
static clBitmapCreateEmptyBitmap (sEnvironment *Env)
 Create new empty bitmap.
static clBitmapCreateBitmap (sEnvironment *Env, int W, int H, int D, LBitmapFormat BMPFormat, LTextureType TextureType)
 Create new bitmap with specified dimensions, bpp and type/format.

Public Attributes

sBitmapParams FBitmapParams
 The structure with bitmap parameters (format, type, size, bpp)
LubyteFBitmapData
 Actual image data.

Private Member Functions

 clBitmap (const clBitmap &Other)
clBitmapoperator= (const clBitmap &Other)
void Bresenham_SetPixel (int x, int y, int Sign, int Inverse, const LVector4 &Color)
void BHM (int x0, int y0, int x1, int y1, int Sign, int Inverse, const LVector4 &Color)
 Internal implementation of Bresenham's 2d line.

Detailed Description

Class for bitmap image representation.

Most of the time bitmaps are assumed to be 2D, but many functions support 3D volumes also


Constructor & Destructor Documentation

clBitmap::clBitmap ( ) [inline]
clBitmap::clBitmap ( const int  Width,
const int  Height,
const int  Depth,
const LBitmapFormat  BitmapFormat,
const LTextureType  TextureType 
)
clBitmap::clBitmap ( const sBitmapParams Params) [explicit]
clBitmap::clBitmap ( const clBitmap Other) [private]
clBitmap::~clBitmap ( ) [virtual]

Member Function Documentation

virtual void clBitmap::AfterConstruction ( ) [inline, virtual]

Reimplemented from iObject.

void clBitmap::ApplyExposure ( float  Exposure,
clBitmap Out 
)

Convert Color to ( 1 - exp(Exposure * Color) ). If Out is NULL, "this" is used.

void clBitmap::BHM ( int  x0,
int  y0,
int  x1,
int  y1,
int  Sign,
int  Inverse,
const LVector4 Color 
) [private]

Internal implementation of Bresenham's 2d line.

LVector4 clBitmap::BilinearInterpolate ( float  x,
float  y 
)

Bilinearly filtered GetPixel.

template<typename T >
void clBitmap::BlendBitmap ( clBitmap Overlay,
BlendingOp 
)

Blend two bitmaps using specified blending operator (see LBlending.h for details)

void clBitmap::Bresenham_SetPixel ( int  x,
int  y,
int  Sign,
int  Inverse,
const LVector4 Color 
) [private]
void clBitmap::CalculateCentroid3D ( double Area,
double Xbar,
double Ybar,
double Zbar 
) const

3D centroid - "mass center"

void clBitmap::CalculateChannelHistogram ( LHistogram1D Out,
int  Channel 
)

Calculate 8-bit histogram for R,G,B or A channel.

void clBitmap::CalculateComplexMagnitude ( )

Store sqrt(r * r + g * g) to B channel.

void clBitmap::CalculateComplexPhase ( )

Store arg( r + i* g ) to A channel.

LMatrix3 clBitmap::CalculateCovariance3D ( ) const

3D covariance matrix

mu_{200} -> M[0][0] mu_{110} -> M[0][1], M[1][0] mu_{101} -> M[0][2], M[2][0] mu_{020} -> M[1][1] mu_{011} -> M[1][2], M[2][1] mu_{002} -> M[2][2]

void clBitmap::CalculateIntensityHistogram ( LHistogram1D Out)

Calculate histogram for intensity (8-bit)

void clBitmap::CalculateSecondMoments3D ( double Area,
double Xbar,
double Ybar,
double Zbar,
double m200,
double mu020,
double mu002,
double mu110,
double mu101,
double mu011 
) const

mu_{i,j,k} central moments calculation

void clBitmap::Clear ( const LVector4 Color)

Clear the bitmap using specified color.

clBitmap * clBitmap::CombineImages ( const std::vector< clBitmap * >  Src,
int  MaxWidth,
int  InterDistance,
std::vector< vec2 > &  Offsets 
) [static]

Combine a number of 2D bitmaps to the single atlas.

Takes Src[] array and tiles them into the [MaxWidth x Height] atlas preserving 'InterDistance' number of pixels between adjacents images.

Calculates Offsets[] array for later texture coordinates fixing.

The algorithm is in no way space-optimal, it is not an optimal solution of '2d knapsack problem'.

It is a simple linear run through the Src[] array. This should give acceptable results when the source images are equally sized.

If the current image does not fit into the row we adjust the offsets

void clBitmap::CombineImages_Dense ( const std::vector< clBitmap * > &  Images,
std::vector< vec2 > &  Offsets 
)

Combine a number of images to a single atlas.

void clBitmap::Convert_BGRAToRGBA ( )

Swap R and B components for each pixel.

void clBitmap::ConvertCrossFormatToCubeMap ( const Lubyte Src,
Lubyte Dst 
) const

Converts 2D texture stored in cross format to cube map. Cross format looks like this:

------ | +Y | ---------------- | -X | -Z | +X | ---------------- | -Y | ------ | +Z | ------

clBitmap * clBitmap::ConvertToGrayscale8bit ( ) const

Create a new bitmap with single channel from a given RGB image.

Create a new bitmap with single intensity channel from a given RGB image.

clBitmap * clBitmap::CopyBitmap ( int  X1,
int  Y1,
int  X2,
int  Y2 
) const

Create new bitmap from this one (extract rectangular region)

void clBitmap::CopyColorPlane ( clBitmap Src,
int  FromIdx,
int  ToIdx 
)

Assign specified color plane from Src bitmap to this.

clBitmap * clBitmap::CreateBitmap ( sEnvironment Env,
int  W,
int  H,
int  D,
LBitmapFormat  BMPFormat,
LTextureType  TextureType 
) [static]

Create new bitmap with specified dimensions, bpp and type/format.

clBitmap * clBitmap::CreateEmptyBitmap ( sEnvironment Env) [static]

Create new empty bitmap.

clBitmap * clBitmap::DifferenceWith ( clBitmap Another)

Allocate new bitmap and write the difference of 'this' with Another.

void clBitmap::DisposeObject ( ) [virtual]

Overload/Emulation of iObject::DisposeObject()

Reimplemented from iObject.

void clBitmap::DrawLine2D ( int  x0,
int  y0,
int  x1,
int  y1,
const LVector4 Color 
)

Draw the using Bresenham's algorithm.

void clBitmap::DrawLine3D ( int  _x0,
int  _y0,
int  _z0,
int  _x1,
int  _y1,
int  _z1,
const LVector4 Color 
)

Draw the line in a 3D volume using a Bresenham-like algorithm.

clBitmap * clBitmap::ExtractColorPlane8bit ( int  Idx) const

Extract specified color component (0,1,2 - R,G,B)for each pixel and create a new 8-bit image. Can be used to extract R component or Alpha.

void clBitmap::FillBox ( const LVector3 Min,
const LVector3 Max,
const LVector4 Color 
)

Fill rectangle/box.

void clBitmap::FillColorSquare ( )

Rainbow-colored square.

Rainbow fill.

void clBitmap::FindMinMax ( LVector4 Min,
LVector4 Max 
)

Find minimum and maximum for each channel.

void clBitmap::FlipBitmapVertical ( const Lubyte Src,
Lubyte Dst 
) const

Flips the texture vertically

Parameters:
Src- source image, with storage properties defined in FBitmapFormat
Dst- pointer to store destination image with the same size and format
void clBitmap::FlipVertical ( )

Invert the image lines ( map 'y' to 'H/2-y')

clBitmap * clBitmap::FloatToRGBA8 ( ) const

Convert floating point image to RGBA8.

void clBitmap::GenerateRandomVoronoiDiagram ( int  NumPoints)

Generate a Voronoi diagram for a random set of points.

void clBitmap::GenerateVoronoiDiagram ( int  NumPoints,
const LVector2 Points,
const LVector4 Colors 
)

Generate 2D Voronoi diagram.

O(W * H * n) brute-force algorithm

LBitmapFormat clBitmap::GetBitmapFormat ( ) const [inline]

Information about bitmap format.

int clBitmap::GetBitsPerPixel ( ) const [inline]

Bits per pixel.

int clBitmap::GetDepth ( ) const [inline]

Image depth (z-dimension)

int clBitmap::GetHeight ( ) const [inline]

Image height (y-dimension)

LVector4 clBitmap::GetPixel ( int  X,
int  Y,
int  Z 
) const

Get pixel value with autoconversion to [0..1]^4.

float clBitmap::GetPixelComponent ( int  X,
int  Y,
int  Z,
int  Idx 
) const

Get pixel component (R,G,B,A)

LTextureType clBitmap::GetTextureType ( ) const [inline]

Information about texture type.

int clBitmap::GetWidth ( ) const [inline]

Image width (x-dimension)

void clBitmap::HorizontalLine ( int  y,
int  x1,
int  x2,
const vec4 Color 
)

Draw colored horizontal line.

Sure, this is far from being optimized.

void clBitmap::HoughTransform2D ( clBitmap Out) const

Make a Hough transform with the image. Out image contains W angles and H different R's.

bool clBitmap::IsCompressed ( ) const

Check if this bitmap's data is compressed.

bool clBitmap::IsEqual ( const clBitmap Other) const [virtual]

Bit-by-bit comparison with Other bitmap. True if the bitmpas coincide.

void clBitmap::Linearize32BitZBuffer ( float  zNear,
float  zFar 
)

Linearize z-buffer values.

Might be useful to inspect z-buffer in shadow mapping

z_linear = b / (z_buffer_value - a)

Where: a = zFar / ( zFar - zNear ) b = zFar * zNear / ( zNear - zFar )

bool clBitmap::Load2DImage ( sEnvironment Env,
const std::string &  FileName 
)
bool clBitmap::Load2DImageFromStream ( sEnvironment Env,
iIStream Stream 
)
bool clBitmap::Load3D ( sEnvironment Env,
const std::string &  FileName,
bool  Gradients,
bool  ESL 
)

Load 3D image.

bool clBitmap::Load3DImage ( sEnvironment Env,
const std::string &  FileName 
) [inline]
bool clBitmap::Load3DImageESL ( sEnvironment Env,
const std::string &  FileName 
) [inline]

Load precomputed ESL map for a given 3D volume file (precompute if it doesn't exist)

bool clBitmap::Load3DImageGradients ( sEnvironment Env,
const std::string &  FileName 
) [inline]

Load precomputed gradients for a given 3D volume file (precompute if it doesn't exist)

bool clBitmap::LoadCubeImage ( sEnvironment Env,
const std::string &  FileName 
)

Load cubemap with format autodetection.

void clBitmap::LogNormalize ( clBitmap Out)

Convert X to Log(1+X) for each point/channel.

clBitmap * clBitmap::LogNormalizeAlloc ( )

Allocate RGBA image and make Log normalization.

clBitmap * clBitmap::MakeCopy ( ) const

Create exact copy of the bitmap.

void clBitmap::MakeGlow2 ( float  ExposureFactor,
float  DiscSize 
)

Two-dimensional alpha-transparent spot.

clBitmap * clBitmap::MakeNormalMap ( )

Calculate normal map for this RGB image.

void clBitmap::MakeRainbowGradient ( const LVector2 From,
const LVector2 To 
)

Make 2D rainbow gradient.

Calculate the number of points in [From,To] segment

Trace the line with N direction and base point P

void clBitmap::MakeWave2D ( const LVector2 Center,
float  Ampl,
const LVector2 K,
float  Omega,
float  t,
float  Phi,
bool  Add 
)

Make a single 2D sine wave.

void clBitmap::MakeWave3D ( const LVector3 Center,
float  Ampl,
const LVector3 K,
float  Omega,
float  t,
float  Phi,
bool  Add 
)

Make a single 3D sine wave.

void clBitmap::MakeXorPattern ( )

Generator the (i ^ j ^ k) & 0xFF pattern.

void clBitmap::NoiseFill2 ( int  nSeed)

Generate 2D noise with specified seed.

void clBitmap::NoiseFill3 ( int  nSeed)

Generate 3D noise with specified seed.

void clBitmap::NormalizeImage ( clBitmap Out)

Convert [min..max] intensities for each channel to [0..1] range. If out is null, then 'this' is used (inplace normalization)

clBitmap * clBitmap::NormalizeImageAlloc ( )

Allocate appropriate RGBA image and normalize values.

clBitmap& clBitmap::operator= ( const clBitmap Other) [private]
int clBitmap::PixelOffset ( int  X,
int  Y,
int  Z 
) const [inline]

Offset of the pixel in raw data. Unsupported (incorrect) for compressed formats.

void clBitmap::PutBitmap ( int  X,
int  Y,
const clBitmap Other 
)

Place a bitmap into this one (REM: no range checking here)

void clBitmap::PutBmp ( int  X,
int  Y,
clBitmap Other 
) [inline]

Utility wrapper for script/.NET export.

bool clBitmap::ReallocImageData ( const sBitmapParams Params)

(Re)allocate the image with specified parameters

clBitmap * clBitmap::RenderChannelHistogram ( int  Width,
int  Height,
int  Channel 
)

Service function to generate the channel histogram.

void clBitmap::RenderHistogram ( LHistogram1D Hist,
const LVector4 Color 
)

Render horizontal lines representing the histogram.

clBitmap * clBitmap::RenderIntensityHistogram ( int  Width,
int  Height 
)

Service function to generate intensity histogram.

void clBitmap::RescaleBitmap ( int  NewWidth,
int  NewHeight 
)
void clBitmap::RescaleImage ( const Lubyte Src,
Lubyte Dst,
int  NewWidth,
int  NewHeight 
) const

Rescales texture.

void clBitmap::Rotate180 ( )

Rotate the image 180 degrees.

void clBitmap::Rotate90CCW ( )

Rotate the image counter clock-wise 90 degrees.

void clBitmap::Rotate90CW ( )

Rotate the image clock-wise 90 degrees.

bool clBitmap::Save2DImage ( sEnvironment Env,
const std::string &  FileName 
) [virtual]

Save 2d image to file using VFS (Bitmap is not yet an iObject, so we must pass Env here)

bool clBitmap::Save3DImage ( sEnvironment Env,
const std::string &  FileName 
) [virtual]

Save 3d image to file using VFS (Bitmap is not yet an iObject, so we must pass Env here)

void clBitmap::ScalePixelComponents ( const LVector4 Factor)

Multiply each channel by the factor.

void clBitmap::SetPixel ( int  X,
int  Y,
int  Z,
const LVector4 Color 
)

Set pixel value with autoconversion from [0..1]^4 color.

void clBitmap::SetPixelComponent ( int  X,
int  Y,
int  Z,
int  Idx,
float  Val 
)

Set pixel component (R,G,B,A)

void clBitmap::SolidTriangle ( int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3,
const vec4 Color 
)

Fill the triangle with color.

void clBitmap::Substract ( clBitmap Another,
clBitmap Out 
)

Substract values of Another from This and put it in Out. If Out is null, 'this' is used.

void clBitmap::Swap ( clBitmap Other)

Exchange image data pointers between two images.

void clBitmap::Tangle2D ( clBitmap Out)

"Tangle" (R,G) [single complex number] array stored as RGB_float texture to the R_float texture with (R,G) pairs

Tangling is used to encode complex-valued array to the non-symmetric (r,g) array suitable for real DFT

clBitmap * clBitmap::Tile3DImage ( int  AtlasW,
int  AtlasH 
) const

Create a 2D image with tiles created from slices of the original image.

clBitmap * clBitmap::ToColorFromGrayscale ( ) const

Create a new colored 32-bit bitmap from a grayscale one.

void clBitmap::Untangle2D ( LFFT fft)

"Untangle" R_float texture with (R,G) pairs to to (R,G) [single complex number] array stored as RGB_float texture

This operation is the opposite of Tangle2D()

0 < k1 < n1, 0 < k2 < n2/2,

0 < k2 < n2/2

0 < k1 < n1/2,


Member Data Documentation

Actual image data.

The structure with bitmap parameters (format, type, size, bpp)


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