TImageBuilder

[TImageBuilder](API\Runtime\GeometryCore\Image\TImageBuilder) is used to create and populate a 2D image with a templated "pixel" type.

Choose your operating system:

Windows

macOS

Linux

References

Module

GeometryCore

Header

/Engine/Source/Runtime/GeometryCore/Public/Image/ImageBuilder.h

Include

#include "Image/ImageBuilder.h"

Syntax

template<typename PixelType>
class TImageBuilder

Remarks

TImageBuilder is used to create and populate a 2D image with a templated "pixel" type.

Variables

Name Description

Protected variable

FImageDimension...

 

Dimensions

Protected variable

TDenseGrid2< Pi...

 

Image

Functions

Name Description

Public function Const

PixelType

 

BilinearSample

(
    const FVector2d& PixelCoords,
    const PixelType& InvalidValue
)

Sample the image value at floating-point pixel coords with Bilinear interpolation

Public function Const

PixelType

 

BilinearSampleUV

(
    const FVector2d& UVCoords,
    const PixelType& InvalidValue
)

Sample the image value at floating-point UV coords with Bilinear interpolation.

Public function

void

 

Clear

(
    const PixelType& ClearValue
)

Clear all Pixels in the current Mip to the clear/default color for the texture build type

Public function Const

bool

 

ContainsPixel

(
    int32 X,
    int32 Y
)

Public function Const

bool

 

ContainsPixel

(
    const FVector2i& ImageCoords
)

Public function Const

void

 

Convert

(
    TFunctionRef< OtherType(const Pixel...,
    TImageBuilder< OtherType >& Conver...
)

Convert to a different data type of same Dimensions using ConvertFunc

Public function

void

 

CopyPixel

(
    int64 FromLinearIndex,
    int64 ToLinearIndex
)

Copy Pixel value from one linear index to another

Public function Const

TImageBuilde...

 

FastDownsample

(
    int32 SubSteps,
    const PixelType& ZeroValue,
    TFunctionRef< PixelType(PixelType, ...
)

Very basic downsampling technqiue that just averages NxN pixel blocks. Multi-threaded.

Public function Const

const FImage...

 

GetDimensions()

Public function

PixelType &

 

GetPixel

(
    const FVector2i& ImageCoords
)

Get the Pixel at the given X/Y coordinates

Public function

PixelType &

 

GetPixel

(
    int64 LinearIndex
)

Get the Pixel at the given linear index

Public function Const

const PixelT...

 

GetPixel

(
    const FVector2i& ImageCoords
)

Get the Pixel at the given X/Y coordinates

Public function Const

const PixelT...

 

GetPixel

(
    int64 LinearIndex
)

Get the Pixel at the given linear index

Public function

PixelType &

 

GetPixel

(
    int32 X,
    int32 Y
)

Get the Pixel at the given X/Y coordinates

Public function Const

const PixelT...

 

GetPixel

(
    int32 X,
    int32 Y
)

Get the Pixel at the given X/Y coordinates

Public function Const

bool

 

IsConstantValue()

Public function

void

 

SetDimensions

(
    FImageDimensions DimensionsIn
)

Public function

void

 

SetPixel

(
    int64 LinearIndex,
    const PixelType& NewValue
)

Set the Pixel at the given linear index to the given PixelType

Public function

void

 

SetPixel

(
    const FVector2i& ImageCoords,
    const PixelType& NewValue
)

Set the Pixel at the given X/Y coordinates to the given PixelType

Public function

void

 

SetPixel

(
    int32 X,
    int32 Y,
    const PixelType& NewValue
)

Set the Pixel at the given X/Y coordinates to the given PixelType