Woolz Image Processing  Version 1.8.3
_WlzTiledValues Struct Reference

A tiled value table for both 2 an 3D domain objects. Typedef: WlzTiledValues. More...

Data Fields

WlzObjectType type
 
int linkcount
 
void * freeptr
 
WlzValues original_table
 
int dim
 
int kol1
 
int lastkl
 
int line1
 
int lastln
 
int plane1
 
int lastpl
 
WlzPixelV bckgrnd
 
unsigned int vRank
 
unsigned int * vDim
 
unsigned int vpe
 
size_t tileSz
 
size_t tileWidth
 
size_t numTiles
 
int * nIdx
 
unsigned int * indices
 
int fd
 
long tileOffset
 
WlzGreyP tiles
 

Detailed Description

A tiled value table for both 2 an 3D domain objects. Typedef: WlzTiledValues.

Individual pixel/voxel values may contain a single (scalar) value of a multidimensional array of values. When an array of values is used the values are held contiguously.

The grey values are stored in square or cubic tiles with tileSz being the number of values in each tile irrespective of the grey value type. An index to the tiles is stored as a simple one dimensional array.

To access a grey value at some position \((x,y,z)\) which is known to be within the tiled value table: First the position relative to the first column ( \(x_0\)), line ( \(y_0\)) and plane ( \(z_0\))of the value table is computed: \(x_r = x - x_0, y_r = y - y_0, z_r = z - z_0\). The tile index ( \(i\)) and within tile offset ( \(o\)) are then computed:

\begin{eqnarray*} i_x = x_r / w \\ i_y = y_r / w \\ i_z = z_r / w \\ o_x = x_r - (w i_x) \\ o_y = y_r - (w i_y) \\ o_z = z_r - (w i_z) \\ i = (((i_z ni_y) + i_y) ni_x) + i_x \\ o = (((o_z nt_y) + o_y) nt_x) + o_x \\ g = T \left[ ( I \left[ i \right] t_s) + o \right] \end{eqnarray*}

Where \(I\) is the index table and \(T\) the start of the tile data.

    The tile data may be memory mapped instead of read into
    memory in which case the file descriptor will have a
    non-negative value. This can be used to close the file.

    A memory mapped tiled values object can only have it's
    grey values changed if the file was opened for writing
    attempting to change the grey values of an object only
    opened for read will lead to a memory fault. The read/write
    status is respected by the interval scanning access function
    WlzNextGreyInterval(), but code which uses random access
    via WlzGreyValueGet() or sequential access via WlzIterate()
    should check this. Attempting to write to the memory mapped
    values of an object only opened for reading will give a
    segmentation fault. A tiled values object can be written
    to only if the file descriptor is invalid (< 0) or if
    the file was opened in write or append mode. The function
    WlzTiledValuesMode() may also be used to determine the
    appropriate access mode(s) for the values table.

Field Documentation

◆ type

◆ linkcount

int _WlzTiledValues::linkcount

From WlzCoreValues.

Referenced by WlzFreeTiledValues().

◆ freeptr

void* _WlzTiledValues::freeptr

From WlzCoreValues, although this won't free the values themselves.

◆ original_table

WlzValues _WlzTiledValues::original_table

If non-NULL, the values table which owns the raw values we are using.

Referenced by WlzFreeTiledValues(), WlzGetSubSectionFromObject(), and WlzNewTiledValues().

◆ dim

◆ kol1

◆ lastkl

◆ line1

◆ lastln

◆ plane1

int _WlzTiledValues::plane1

◆ lastpl

int _WlzTiledValues::lastpl

◆ bckgrnd

◆ vRank

unsigned int _WlzTiledValues::vRank

The rank of the individual values. Here the rank for a scalar is 0, for a 1D array it is 1 and for and for individual values that are nD arrays the rank is n. The rank will only ever be > 0 when the grey table type is composed using rank > 0.

Referenced by WlzDGTensorFeatures(), WlzFreeTiledValues(), WlzMakeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), and WlzTiledValuesValPerElm().

◆ vDim

unsigned int* _WlzTiledValues::vDim

The dimensions of individual values. The dimensions are a 1D array with the number of entries equal to the rank. A dimension array is only allocated if the rank > 0, for rank == 0 dim is NULL.

Referenced by WlzDGTensorFeatures(), WlzFreeTiledValues(), WlzFromArray1D(), WlzMakeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), and WlzTiledValuesValPerElm().

◆ vpe

unsigned int _WlzTiledValues::vpe

Values per element which has the value \( \prod_i^\textrm{vRank}{\textrm{vDim}[i]} \) as compulted by WlzTiledValuesValPerElm() (value 1 when vRank = 0) is included since it is frequently used.

Referenced by WlzFreeTiledValues(), WlzMakeTiledValueBuffer(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), WlzTensorGetComponent(), WlzTensorSetComponent(), WlzTensorSmooth(), WlzTiledValueBufferFill(), WlzTiledValueBufferFlush(), and WlzTiledValuesCopyLine().

◆ tileSz

size_t _WlzTiledValues::tileSz

◆ tileWidth

◆ numTiles

◆ nIdx

◆ indices

◆ fd

int _WlzTiledValues::fd

File descriptor if tiles are memory mapped else -1.

Referenced by WlzFreeTiledValues(), WlzMakeTiledValues(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), and WlzTiledValuesMode().

◆ tileOffset

long _WlzTiledValues::tileOffset

Offset from the start of the file to the tiles. This may be set even if not memory mapped.

Referenced by WlzNewTiledValues().

◆ tiles


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