CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxImageInterpolation.h File Reference
#include "ctxBase.h"
#include <math.h>

Go to the source code of this file.

Enumerations

enum  ctxImageInterpolationType { CTX_IMAGE_INTERPOLATION_NEAREST , CTX_IMAGE_INTERPOLATION_LINEAR }
 Explicit interpolation for caller-owned image accessors. More...

Functions

template<class ImageAccess>
gzFloat ctxInterpolateImageComponent (ImageAccess &access, gzUInt32 id, double x, double y, gzInt32 depth, ctxImageInterpolationType interpolation)
 Read a component with the same kernel in SDK and standalone builds.

Enumeration Type Documentation

◆ ctxImageInterpolationType

Explicit interpolation for caller-owned image accessors.

Enumerator
CTX_IMAGE_INTERPOLATION_NEAREST 
CTX_IMAGE_INTERPOLATION_LINEAR 

Definition at line 24 of file ctxImageInterpolation.h.

Function Documentation

◆ ctxInterpolateImageComponent()

template<class ImageAccess>
gzFloat ctxInterpolateImageComponent ( ImageAccess & access,
gzUInt32 id,
double x,
double y,
gzInt32 depth,
ctxImageInterpolationType interpolation )
inline

Read a component with the same kernel in SDK and standalone builds.

The accessor supplies getNumberOfImages(), getImageDepth() and getComponentValue(id,x,y,depth), including its border policy. It is borrowed only for this call. Coordinates use double precision and integer pixel centers; nearest ties use floor(x+.5). Invalid requests return zero without reading components. This helper does not enumerate or transform samples.

Definition at line 37 of file ctxImageInterpolation.h.

References CTX_IMAGE_INTERPOLATION_LINEAR, CTX_IMAGE_INTERPOLATION_NEAREST, and ctxInterpolateImageComponent().

Referenced by ctxInterpolateImageComponent().