Woolz Image Processing
Version 1.8.3
|
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 |
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.
WlzObjectType _WlzTiledValues::type |
From WlzCoreValues: built from WLZ_GREY_TAB_TILED and the grey value type.
Referenced by WlzEndGreyScan(), WlzFreeTiledValues(), WlzMakeTiledValueBuffer(), WlzMakeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), WlzTiledValuesCopyLine(), and WlzTiledValuesMode().
int _WlzTiledValues::linkcount |
From WlzCoreValues.
Referenced by WlzFreeTiledValues().
void* _WlzTiledValues::freeptr |
From WlzCoreValues, although this won't free the values themselves.
WlzValues _WlzTiledValues::original_table |
If non-NULL, the values table which owns the raw values we are using.
Referenced by WlzFreeTiledValues(), WlzGetSubSectionFromObject(), and WlzNewTiledValues().
int _WlzTiledValues::dim |
The dimension of the value table, ie 2 or 3D.
Referenced by WlzDGTensorFeatures(), WlzGreyInterval(), WlzMakeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzTiledValueBufferFill(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::kol1 |
First column.
Referenced by WlzGreyInterval(), WlzMakeTiledValueBuffer(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzShiftValues(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::lastkl |
Last column.
Referenced by WlzMakeTiledValueBuffer(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzShiftValues(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::line1 |
First line.
Referenced by WlzGreyInterval(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzShiftValues(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::lastln |
Last line.
Referenced by WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzShiftValues(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::plane1 |
First plane.
Referenced by WlzGreyInterval(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzShiftValues(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::lastpl |
Last plane.
Referenced by WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzShiftValues(), and WlzTiledValuesCopyLine().
WlzPixelV _WlzTiledValues::bckgrnd |
Background value.
Referenced by WlzGetBackground(), WlzGreyValueMakeWSp(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), and WlzTiledValueBufferFill().
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().
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().
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().
size_t _WlzTiledValues::tileSz |
The number of elements in each tile which may be less than the number of bytes.
Referenced by WlzFreeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), WlzTiledValueBufferFill(), WlzTiledValueBufferFlush(), and WlzTiledValuesCopyLine().
size_t _WlzTiledValues::tileWidth |
Width of the tiles ( \(w\)).
Referenced by WlzGetSubSectionFromObject(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzTiledValueBufferFill(), WlzTiledValueBufferFlush(), and WlzTiledValuesCopyLine().
size_t _WlzTiledValues::numTiles |
The total number of tiles.
Referenced by WlzFreeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), and WlzTiledValuesCopyLine().
int* _WlzTiledValues::nIdx |
Number of index columns, lines, ....
Referenced by WlzFreeTiledValues(), WlzMakeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzTiledValueBufferFill(), and WlzTiledValuesCopyLine().
unsigned int* _WlzTiledValues::indices |
Table of tile indices.
Referenced by WlzFreeTiledValues(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewTiledValues(), WlzTiledValueBufferFill(), WlzTiledValueBufferFlush(), and WlzTiledValuesCopyLine().
int _WlzTiledValues::fd |
File descriptor if tiles are memory mapped else -1.
Referenced by WlzFreeTiledValues(), WlzMakeTiledValues(), WlzMakeTiledValuesTiles(), WlzNewTiledValues(), and WlzTiledValuesMode().
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().
WlzGreyP _WlzTiledValues::tiles |