Ptex: PtexSeparableKernel Class Reference

Ptex

Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Static Private Member Functions | Static Private Attributes | List of all members
PtexSeparableKernel Class Reference

`#include <PtexSeparableKernel.h>`

## Public Member Functions
| PtexSeparableKernel ()
| PtexSeparableKernel (const PtexSeparableKernel &k)
PtexSeparableKernel & | operator= (const PtexSeparableKernel &k)
void | set (Res resVal, int uVal, int vVal, int uwVal, int vwVal, const float *kuVal, const float *kvVal, int rotVal=0)
void | stripZeros ()
float | weight () const
void | mergeL (BorderMode mode)
void | mergeR (BorderMode mode)
void | mergeB (BorderMode mode)
void | mergeT (BorderMode mode)
void | splitL (PtexSeparableKernel &k)
void | splitR (PtexSeparableKernel &k)
void | splitB (PtexSeparableKernel &k)
void | splitT (PtexSeparableKernel &k)
void | flipU ()
void | flipV ()
void | swapUV ()
void | rotate (int rotVal)
bool | adjustMainToSubface (int eid)
void | adjustSubfaceToMain (int eid)
void | downresU ()
void | downresV ()
void | upresU ()
void | upresV ()
float | makeSymmetric (float initialWeight)
void | apply (float *dst, void *data, DataType dt, int nChan, int nTxChan)
void | applyConst (float *dst, void *data, DataType dt, int nChan)

## Public Attributes
Res | res
int | u
int | v
int | uw
int | vw
float * | ku
float * | kv
float | kubuff [kmax]
float | kvbuff [kmax]
int | rot

## Static Public Attributes
static const int | kmax = 10

## Private Types
typedef void(* | ApplyFn) (PtexSeparableKernel &k, float *dst, void *data, int nChan, int nTxChan)
typedef void(* | ApplyConstFn) (float weight, float *dst, void *data, int nChan)

## Static Private Member Functions
static float | accumulate (const float *p, int n)

## Static Private Attributes
static ApplyFn | applyFunctions [40]
static ApplyConstFn | applyConstFunctions [20]

## Detailed Description

Definition at line 48 of file PtexSeparableKernel.h.

## Member Typedef Documentation

## ◆ ApplyConstFn

typedef void(* PtexSeparableKernel::ApplyConstFn) (float weight, float *dst, void *data, int nChan)
| private

Definition at line 471 of file PtexSeparableKernel.h.

## ◆ ApplyFn

typedef void(* PtexSeparableKernel::ApplyFn) (PtexSeparableKernel &k, float *dst, void *data, int nChan, int nTxChan)
| private

Definition at line 470 of file PtexSeparableKernel.h.

## Constructor & Destructor Documentation

## ◆ PtexSeparableKernel() [1/2]

PtexSeparableKernel::PtexSeparableKernel | ( |  | ) |
| inline

Definition at line 60 of file PtexSeparableKernel.h.

References kubuff, and kvbuff.

## ◆ PtexSeparableKernel() [2/2]

PtexSeparableKernel::PtexSeparableKernel | ( | const PtexSeparableKernel & | k | ) |
| inline

Definition at line 67 of file PtexSeparableKernel.h.

References ku, kv, res, rot, set(), u, uw, v, and vw.

## Member Function Documentation

## ◆ accumulate()

static float PtexSeparableKernel::accumulate | ( | const float * | p,
|  | int | n
| ) |  |
| inlinestaticprivate

Definition at line 474 of file PtexSeparableKernel.h.

Referenced by mergeB(), mergeL(), mergeR(), mergeT(), and weight().

## ◆ adjustMainToSubface()

bool PtexSeparableKernel::adjustMainToSubface | ( | int | eid | ) |
| inline

Definition at line 266 of file PtexSeparableKernel.h.

References Ptex::e_bottom, Ptex::e_left, Ptex::e_right, Ptex::e_top, res, u, upresU(), upresV(), and v.

Referenced by PtexSeparableFilter::applyAcrossEdge(), and PtexSeparableFilter::applyToCornerFace().

## ◆ adjustSubfaceToMain()

void PtexSeparableKernel::adjustSubfaceToMain | ( | int | eid | ) |
| inline

Definition at line 302 of file PtexSeparableKernel.h.

References Ptex::e_bottom, Ptex::e_left, Ptex::e_right, Ptex::e_top, res, u, and v.

Referenced by PtexSeparableFilter::applyAcrossEdge(), PtexSeparableFilter::applyToCorner(), and PtexSeparableFilter::applyToCornerFace().

## ◆ apply()

void PtexSeparableKernel::apply | ( | float * | dst,
|  | void * | data,
|  | DataType | dt,
|  | int | nChan,
|  | int | nTxChan
| ) |  |
| inline

Definition at line 457 of file PtexSeparableKernel.h.

References applyFunctions.

Referenced by PtexSeparableFilter::apply().

## ◆ applyConst()

void PtexSeparableKernel::applyConst | ( | float * | dst,
|  | void * | data,
|  | DataType | dt,
|  | int | nChan
| ) |  |
| inline

Definition at line 464 of file PtexSeparableKernel.h.

References PtexUtils::applyConst(), and weight().

Referenced by PtexSeparableFilter::apply().

## ◆ downresU()

void PtexSeparableKernel::downresU | ( |  | ) |
| inline

Definition at line 313 of file PtexSeparableKernel.h.

References ku, res, u, and uw.

Referenced by PtexSeparableFilter::apply(), and makeSymmetric().

## ◆ downresV()

void PtexSeparableKernel::downresV | ( |  | ) |
| inline

Definition at line 342 of file PtexSeparableKernel.h.

References kv, res, v, and vw.

Referenced by PtexSeparableFilter::apply(), and makeSymmetric().

## ◆ flipU()

void PtexSeparableKernel::flipU | ( |  | ) |
| inline

Definition at line 234 of file PtexSeparableKernel.h.

References ku, res, u, and uw.

Referenced by rotate().

## ◆ flipV()

void PtexSeparableKernel::flipV | ( |  | ) |
| inline

Definition at line 240 of file PtexSeparableKernel.h.

References kv, res, v, and vw.

Referenced by rotate().

## ◆ makeSymmetric()

float PtexSeparableKernel::makeSymmetric | ( | float | initialWeight | ) |
| inline

Definition at line 397 of file PtexSeparableKernel.h.

References downresU(), downresV(), ku, kv, PtexUtils::min(), res, u, uw, v, and vw.

Referenced by PtexSeparableFilter::applyToCorner().

## ◆ mergeB()

void PtexSeparableKernel::mergeB | ( | BorderMode | mode | ) |
| inline

Definition at line 129 of file PtexSeparableKernel.h.

References accumulate(), kv, Ptex::m_black, v, and vw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ mergeL()

void PtexSeparableKernel::mergeL | ( | BorderMode | mode | ) |
| inline

Definition at line 110 of file PtexSeparableKernel.h.

References accumulate(), ku, Ptex::m_black, u, and uw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ mergeR()

void PtexSeparableKernel::mergeR | ( | BorderMode | mode | ) |
| inline

Definition at line 120 of file PtexSeparableKernel.h.

References accumulate(), ku, Ptex::m_black, res, u, and uw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ mergeT()

void PtexSeparableKernel::mergeT | ( | BorderMode | mode | ) |
| inline

Definition at line 139 of file PtexSeparableKernel.h.

References accumulate(), kv, Ptex::m_black, res, v, and vw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ operator=()

PtexSeparableKernel & PtexSeparableKernel::operator= | ( | const PtexSeparableKernel & | k | ) |
| inline

Definition at line 72 of file PtexSeparableKernel.h.

References ku, kv, res, rot, set(), u, uw, v, and vw.

## ◆ rotate()

void PtexSeparableKernel::rotate | ( | int | rotVal | ) |
| inline

Definition at line 254 of file PtexSeparableKernel.h.

References flipU(), flipV(), rot, and swapUV().

Referenced by PtexSeparableFilter::applyAcrossEdge(), PtexSeparableFilter::applyToCorner(), and PtexSeparableFilter::applyToCornerFace().

## ◆ set()

void PtexSeparableKernel::set | ( | Res | resVal,
|  | int | uVal,
|  | int | vVal,
|  | int | uwVal,
|  | int | vwVal,
|  | const float * | kuVal,
|  | const float * | kvVal,
|  | int | rotVal = `0`
| ) |  |
| inline

Definition at line 78 of file PtexSeparableKernel.h.

References kmax, ku, kubuff, kv, kvbuff, res, rot, u, uw, v, and vw.

Referenced by operator=(), PtexSeparableKernel(), splitB(), splitL(), splitR(), and splitT().

## ◆ splitB()

void PtexSeparableKernel::splitB | ( | PtexSeparableKernel & | k | ) |
| inline

Definition at line 192 of file PtexSeparableKernel.h.

References ku, kv, res, set(), u, uw, v, and vw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ splitL()

void PtexSeparableKernel::splitL | ( | PtexSeparableKernel & | k | ) |
| inline

Definition at line 148 of file PtexSeparableKernel.h.

References ku, kv, res, set(), u, uw, v, and vw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ splitR()

void PtexSeparableKernel::splitR | ( | PtexSeparableKernel & | k | ) |
| inline

Definition at line 171 of file PtexSeparableKernel.h.

References ku, kv, res, set(), u, uw, v, and vw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ splitT()

void PtexSeparableKernel::splitT | ( | PtexSeparableKernel & | k | ) |
| inline

Definition at line 214 of file PtexSeparableKernel.h.

References ku, kv, res, set(), u, uw, v, and vw.

Referenced by PtexSeparableFilter::splitAndApply().

## ◆ stripZeros()

void PtexSeparableKernel::stripZeros | ( |  | ) |
| inline

Definition at line 96 of file PtexSeparableKernel.h.

References ku, kv, u, uw, v, and vw.

Referenced by PtexSeparableFilter::eval().

## ◆ swapUV()

void PtexSeparableKernel::swapUV | ( |  | ) |
| inline

Definition at line 246 of file PtexSeparableKernel.h.

References ku, kv, res, u, uw, v, and vw.

Referenced by rotate().

## ◆ upresU()

void PtexSeparableKernel::upresU | ( |  | ) |
| inline

Definition at line 371 of file PtexSeparableKernel.h.

References ku, res, u, and uw.

Referenced by adjustMainToSubface(), and PtexSeparableFilter::eval().

## ◆ upresV()

void PtexSeparableKernel::upresV | ( |  | ) |
| inline

Definition at line 384 of file PtexSeparableKernel.h.

References kv, res, v, and vw.

Referenced by adjustMainToSubface(), and PtexSeparableFilter::eval().

## ◆ weight()

float PtexSeparableKernel::weight | ( |  | ) | const
| inline

Definition at line 105 of file PtexSeparableKernel.h.

References accumulate(), ku, kv, uw, and vw.

Referenced by applyConst(), PtexSeparableFilter::applyToCorner(), and PtexSeparableFilter::eval().

## Member Data Documentation

## ◆ applyConstFunctions

ApplyConstFn PtexSeparableKernel::applyConstFunctions[20]
| staticprivate

Definition at line 473 of file PtexSeparableKernel.h.

## ◆ applyFunctions

PtexSeparableKernel::ApplyFn PtexSeparableKernel::applyFunctions
| staticprivate

Initial value:
= {
ApplyN<uint8_t>, ApplyN<uint16_t>, ApplyN<PtexHalf>, ApplyN<float>,
Apply<uint8_t,1>, Apply<uint16_t,1>, Apply<PtexHalf,1>, Apply<float,1>,
Apply<uint8_t,2>, Apply<uint16_t,2>, Apply<PtexHalf,2>, Apply<float,2>,
Apply<uint8_t,3>, Apply<uint16_t,3>, Apply<PtexHalf,3>, Apply<float,3>,
Apply<uint8_t,4>, Apply<uint16_t,4>, Apply<PtexHalf,4>, Apply<float,4>,
ApplyN<uint8_t>, ApplyN<uint16_t>, ApplyN<PtexHalf>, ApplyN<float>,
ApplyS<uint8_t,1>, ApplyS<uint16_t,1>, ApplyS<PtexHalf,1>, ApplyS<float,1>,
ApplyS<uint8_t,2>, ApplyS<uint16_t,2>, ApplyS<PtexHalf,2>, ApplyS<float,2>,
ApplyS<uint8_t,3>, ApplyS<uint16_t,3>, ApplyS<PtexHalf,3>, ApplyS<float,3>,
ApplyS<uint8_t,4>, ApplyS<uint16_t,4>, ApplyS<PtexHalf,4>, ApplyS<float,4>,
}

Definition at line 472 of file PtexSeparableKernel.h.

Referenced by apply().

## ◆ kmax

const int PtexSeparableKernel::kmax = 10
| static

Definition at line 55 of file PtexSeparableKernel.h.

Referenced by PtexSeparableFilter::eval(), and set().

## ◆ ku

float* PtexSeparableKernel::ku

Definition at line 53 of file PtexSeparableKernel.h.

Referenced by PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresU(), flipU(), makeSymmetric(), mergeL(), mergeR(), operator=(), PtexSeparableKernel(), set(), splitB(), splitL(), splitR(), splitT(), stripZeros(), swapUV(), upresU(), and weight().

## ◆ kubuff

float PtexSeparableKernel::kubuff[kmax]

Definition at line 56 of file PtexSeparableKernel.h.

Referenced by PtexSeparableKernel(), and set().

## ◆ kv

float* PtexSeparableKernel::kv

Definition at line 54 of file PtexSeparableKernel.h.

Referenced by PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresV(), flipV(), makeSymmetric(), mergeB(), mergeT(), operator=(), PtexSeparableKernel(), set(), splitB(), splitL(), splitR(), splitT(), stripZeros(), swapUV(), upresV(), and weight().

## ◆ kvbuff

float PtexSeparableKernel::kvbuff[kmax]

Definition at line 57 of file PtexSeparableKernel.h.

Referenced by PtexSeparableKernel(), and set().

## ◆ res

Res PtexSeparableKernel::res

Definition at line 50 of file PtexSeparableKernel.h.

Referenced by adjustMainToSubface(), adjustSubfaceToMain(), PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresU(), downresV(), PtexSeparableFilter::eval(), flipU(), flipV(), makeSymmetric(), mergeR(), mergeT(), operator=(), PtexSeparableKernel(), set(), PtexSeparableFilter::splitAndApply(), splitB(), splitL(), splitR(), splitT(), swapUV(), upresU(), and upresV().

## ◆ rot

int PtexSeparableKernel::rot

Definition at line 58 of file PtexSeparableKernel.h.

Referenced by PtexSeparableFilter::apply(), operator=(), PtexSeparableKernel(), rotate(), and set().

## ◆ u

int PtexSeparableKernel::u

Definition at line 51 of file PtexSeparableKernel.h.

Referenced by adjustMainToSubface(), adjustSubfaceToMain(), PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresU(), flipU(), makeSymmetric(), mergeL(), mergeR(), operator=(), PtexSeparableKernel(), set(), PtexSeparableFilter::splitAndApply(), splitB(), splitL(), splitR(), splitT(), stripZeros(), swapUV(), and upresU().

## ◆ uw

int PtexSeparableKernel::uw

Definition at line 52 of file PtexSeparableKernel.h.

Referenced by PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresU(), PtexSeparableFilter::eval(), flipU(), makeSymmetric(), mergeL(), mergeR(), operator=(), PtexSeparableKernel(), set(), PtexSeparableFilter::splitAndApply(), splitB(), splitL(), splitR(), splitT(), stripZeros(), swapUV(), upresU(), and weight().

## ◆ v

int PtexSeparableKernel::v

Definition at line 51 of file PtexSeparableKernel.h.

Referenced by adjustMainToSubface(), adjustSubfaceToMain(), PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresV(), flipV(), makeSymmetric(), mergeB(), mergeT(), operator=(), PtexSeparableKernel(), set(), PtexSeparableFilter::splitAndApply(), splitB(), splitL(), splitR(), splitT(), stripZeros(), swapUV(), and upresV().

## ◆ vw

int PtexSeparableKernel::vw

Definition at line 52 of file PtexSeparableKernel.h.

Referenced by PTEX_NAMESPACE_BEGIN::Apply(), PtexSeparableFilter::apply(), PTEX_NAMESPACE_BEGIN::ApplyN(), PTEX_NAMESPACE_BEGIN::ApplyS(), PtexWidth4Filter::buildKernel(), PtexBoxFilter::buildKernel(), PtexBilinearFilter::buildKernel(), downresV(), PtexSeparableFilter::eval(), flipV(), makeSymmetric(), mergeB(), mergeT(), operator=(), PtexSeparableKernel(), set(), PtexSeparableFilter::splitAndApply(), splitB(), splitL(), splitR(), splitT(), stripZeros(), swapUV(), upresV(), and weight().

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

- PtexSeparableKernel.h
- PtexSeparableKernel.cpp