DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

GreyValuesInPixelTable

Copy greyvalues from image in pixel table

SYNOPSIS

#include "dip_pixel_table.h"

dip_Error dip_GreyValuesInPixelTable ( table, image, ptgreyvalues, resources )

DATA TYPES

integer, float

FUNCTION

This functions converts a grey-value image to a newly allocated floating-point array, in which each element is the grey value associated to a pixel in the pixel table. The image must have the same size and dimensionality as the pixel table's bounding box. For example:

dip_Image kernel, binkernel;
dip_PixelTable table;
dip_FloatArray values;
...
dip_NotZero( kernel, binkernel );
dip_BinaryImageToPixelTable( binkernel, &table, resources );
dip_GreyValuesInPixelTable( table, kernel, &values, resources );
...
process->filter->array[0].parameters = values;
dip_PixelTableFrameWork( in, out, boundary, process, table );

ARGUMENTS

Data typeNameDescription
dip_PixelTabletablePixel table
dip_ImageimageGrey-value image
dip_FloatArray *ptgreyvaluesArray to which to write pixel grey values
dip_ResourcesresourcesResources tracking structure. See ResourcesNew

SEE ALSO

Description of DIPlib's pixel tables

BinaryImageToPixelTable, PixelTableCreateFilter