DIPlib Documentation - ©1995-2011 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 type | Name | Description
`dip_PixelTable` | `table` | Pixel table
`dip_Image` | `image` | Grey-value image
`dip_FloatArray *` | `ptgreyvalues` | Array to which to write pixel grey values
`dip_Resources` | `resources` | Resources tracking structure. See `ResourcesNew`

## SEE ALSO

Description of DIPlib's pixel tables

`BinaryImageToPixelTable`, `PixelTableCreateFilter`