Woolz Image Processing  Version 1.7.5
_WlzTiledValues Struct Reference

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

## Data Fields

WlzObjectType type

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
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

 WlzObjectType _WlzTiledValues::type

From WlzCoreValues: built from WLZ_GREY_TAB_TILED and the grey value type.

From WlzCoreValues.

Referenced by WlzFreeTiledValues(), WlzReadObj(), and WlzWriteMeshTransform3D().

 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.

 int _WlzTiledValues::kol1
 int _WlzTiledValues::lastkl

Last column.

 int _WlzTiledValues::line1
 int _WlzTiledValues::lastln

Last line.

 int _WlzTiledValues::plane1
 int _WlzTiledValues::lastpl

Last plane.

 WlzPixelV _WlzTiledValues::bckgrnd

Background value.

 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.

 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.

 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.

 size_t _WlzTiledValues::tileSz

The number of elements in each tile which may be less than the number of bytes.

 size_t _WlzTiledValues::tileWidth

Width of the tiles ( $$w$$).

 size_t _WlzTiledValues::numTiles

The total number of tiles.

 int* _WlzTiledValues::nIdx

Number of index columns, lines, ....

 unsigned int* _WlzTiledValues::indices
 int _WlzTiledValues::fd

File descriptor if tiles are memory mapped else -1.

 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(), WlzObjectFacts(), WlzReadObj(), and WlzWriteMeshTransform3D().

 WlzGreyP _WlzTiledValues::tiles

The documentation for this struct was generated from the following file:
• /export/data0/bill/MouseAtlas/Build/src/Woolz/libWlz/WlzType.h