diplib/regions.h file

Functions to label connected components and process labeled images. See Labeled regions.

Contents

Functions

auto dip::Label(dip::Image const& binary, dip::Image& out, dip::uint connectivity = 0, dip::uint minSize = 0, dip::uint maxSize = 0, dip::StringArray boundaryCondition = {}, dip::String const& mode = S::ALL) -> dip::uint
Labels the connected components in a binary image
auto dip::ListObjectLabels(dip::Image const& label, dip::Image const& mask = {}, dip::String const& background = S::EXCLUDE, dip::String const& region = "") -> std::vector<LabelType>
Gets a list of object labels in the labeled image. A labeled image must be of an unsigned type.
void dip::Relabel(dip::Image const& label, dip::Image& out)
Re-assigns labels to objects in a labeled image, such that all labels are consecutive.
void dip::Relabel(dip::Image const& label, dip::Image& out, dip::Graph const& graph)
Re-assigns labels to objects in a labeled image, such that regions joined by an edge in graph obtain the same label.
void dip::SmallObjectsRemove(dip::Image const& in, dip::Image& out, dip::uint threshold, dip::uint connectivity = 0)
Removes small objects from a labeled or binary image.
void dip::GrowRegions(dip::Image const& label, dip::Image const& mask, dip::Image& out, dip::sint connectivity = -1, dip::uint iterations = 0)
Grow (dilate) labeled regions uniformly.
void dip::GrowRegionsWeighted(dip::Image const& label, dip::Image const& grey, dip::Image const& mask, dip::Image& out, dip::dfloat distance = infinity)
Grow labeled regions with a speed function given by a grey-value image.
void dip::SplitRegions(dip::Image const& label, dip::Image& out, dip::uint connectivity = 0)
Ensures a gap between regions with unequal labels.
void dip::MakeRegionsConvex2D(dip::Image const& label, dip::Image& out, dip::String const& mode = S::FILLED)
Make each object a single, convex shape.
auto dip::GetLabelBoundingBox(dip::Image const& label, dip::LabelType objectID) -> dip::RangeArray
Returns the bounding box for all pixels with label objectID in the labeled or binary image label.
auto dip::RegionAdjacencyGraph(dip::Image const& labels, dip::String const& mode = "touching") -> dip::Graph
Construct a graph for the given labeled image.
auto dip::RegionAdjacencyGraph(dip::Image const& labels, dip::Measurement::IteratorFeature const& featureValues, dip::String const& mode = "touching") -> dip::Graph
Construct a graph for the given labeled image.