Image Interpolation with Geometric Contour Stencils
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Fields
stencilentry Struct Reference

A single contour stencil $\mathcal{S}$. More...

Data Fields

double * Alpha
 Alpha[k] is the x-component of the stencil in the kth cell. More...
 
double * Beta
 Beta[k] is the y-component of the stencil in the kth cell. More...
 
double(* Phi )(double, double, const void *)
 Function pointer to the stencil's distance function $\varphi$. More...
 
double PhiTrans [2]
 Cosine and sine values of the stencil rotation. More...
 
const void * PhiParam
 User-specified parameters to pass to stencilentry::Phi. More...
 
int(* DrawFun )(pen *Pen, const void *Param)
 Function to draw the stencil. More...
 
const void * DrawParam
 Parameter for DrawFun. More...
 
const float * DrawColor
 Line drawing color. More...
 

Detailed Description

A single contour stencil $\mathcal{S}$.

This data structure represents a single contour stencil $\mathcal{S}$. It comprises a list of vectors (Alpha[k],Beta[k]) = $(\alpha_k, \beta_k),$ indicating the value of $\mathcal{S}$ in the kth cell $\Omega_k$, a function pointer Phi (and supporting parameters) for the distance function $\varphi$ from which the stencil was discretized, and "glyph" data used by DrawContours() for a graphical representation of the stencil.

The cell locations are stored in ssetstruct::Cell.

Definition at line 44 of file sset.c.

Field Documentation

double* stencilentry::Alpha

Alpha[k] is the x-component of the stencil in the kth cell.

Definition at line 47 of file sset.c.

double* stencilentry::Beta

Beta[k] is the y-component of the stencil in the kth cell.

Definition at line 49 of file sset.c.

const float* stencilentry::DrawColor

Line drawing color.

(DrawColor[0], DrawColor[1], DrawColor[2]) is the RGB color to use for drawing the stencil.

Definition at line 98 of file sset.c.

int(* stencilentry::DrawFun)(pen *Pen, const void *Param)

Function to draw the stencil.

This function should draw a representation of the stencil using the graphical commands in pen.h. The given pen object is transformed such that the origin is the center of the stencil and rotated according to stencilentry::PhiTrans.

Definition at line 89 of file sset.c.

const void* stencilentry::DrawParam

Parameter for DrawFun.

Definition at line 91 of file sset.c.

double(* stencilentry::Phi)(double, double, const void *)

Function pointer to the stencil's distance function $\varphi$.

Phi is a function with the syntax Phi(x,y,PhiParam), where stencilentry::PhiParam may be used to pass additional parameters to Phi. The function is rotated by stencilentry::PhiTrans.

Definition at line 58 of file sset.c.

const void* stencilentry::PhiParam

User-specified parameters to pass to stencilentry::Phi.

PhiParam is passed as the third argument to Phi. PhiParam should be used to point to a data structure containing whatever additional parameters are needed for evaluating Phi. For example, CurveDist() uses PhiParam to specify the curviness parameter "a" of the parabola.

Definition at line 79 of file sset.c.

double stencilentry::PhiTrans[2]

Cosine and sine values of the stencil rotation.

The values PhiTrans[0] = cos(Rotation), PhiTrans[1] = sin(Rotation) are computed once and reused for all rotation calculations. The rotation is performed as

\[ \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} \mathtt{PhiTrans}[0] & \mathtt{PhiTrans}[1] \\ -\mathtt{PhiTrans}[1] & \mathtt{PhiTrans}[0] \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} \]

Definition at line 70 of file sset.c.


The documentation for this struct was generated from the following file: