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

PixelTableCreateFilter

Create a pixel table from a filter shape

SYNOPSIS

#include "dip_pixel_table.h"

dip_Error dip_PixelTableCreateFilter ( table, param, shape, se, resources )

FUNCTION

This function allocates and creates a new pixel table data structure. The shape and dimensionality of the pixel table is specified by the param, shape and se parameters.

Only the rectangular, elliptic and diamond filter shapes are supported (DIP_FLT_SHAPE_RECTANGULAR, DIP_FLT_SHAPE_ELLIPTIC and DIP_FLT_SHAPE_DIAMOND). Other filter shapes can be implemented by setting shape to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, and passing a binary image in se. The "on" pixels define the shape of the filter window. Other values of shape are illegal.

If shape is not equal to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, se can be set to zero. When shape is set to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, param is ignored, and can be set to zero.

ARGUMENTS

Data typeNameDescription
dip_PixelTable *tablePointer to a pixel table
dip_FloatArrayparamFilter size
dip_FilterShapeshapeFilter shape
dip_ImageseStructuring element
dip_ResourcesresourcesResources tracking structure. See ResourcesNew

The enumerator dip_FilterShape contains the following constants:

NameDescription
DIP_FLT_SHAPE_DEFAULTDefault filter window, same as DIP_FLT_SHAPE_RECTANGULAR
DIP_FLT_SHAPE_RECTANGULARRectangular filter window, can be even in size
DIP_FLT_SHAPE_ELLIPTICElliptic filter window, always odd in size
DIP_FLT_SHAPE_DIAMONDDiamond-shaped filter window, always odd in size
DIP_FLT_SHAPE_PARABOLICParabolic filter window (morphology only)
DIP_FLT_SHAPE_DISCRETE_LINERotated line structuring element (morphology only)
DIP_FLT_SHAPE_INTERPOLATED_LINERotated line structuring element, through interpolation (morphology only)
DIP_FLT_SHAPE_PERIODIC_LINE(not implemented)
DIP_FLT_SHAPE_STRUCTURING_ELEMENTUse se as filter window, can be any size

SEE ALSO

Description of DIPlib's pixel tables

BinaryImageToPixelTable, GreyValuesInPixelTable, PixelTableToBinaryImage