3#include "MorphologicalTree.hpp"
4#include "TreeAltitudeAlgorithms.hpp"
5#include "WeightedMorphologicalTree.hpp"
6#include "detail/MorphologicalTreeConstructionTag.hpp"
7#include "sdrt/SelfDualResidualTreeBuilder.hpp"
54 static constexpr detail::MorphologicalTreeConstructionTag tag()
noexcept {
55 return detail::MorphologicalTreeConstructionTag{};
72 template<AltitudeValue T>
92 template<AltitudeValue T>
150 template<AltitudeValue T>
177 template<AltitudeValue T>
181 sdrt::SelfDualResidualTreeBuilder<T>
builder(radius);
182 builder.build(
img, std::move(minTree), std::move(maxTree));
std::shared_ptr< ImageUInt8 > ImageUInt8Ptr
Shared pointer to an 8-bit unsigned image.
Public construction facade for all high-level morphological trees.
static WeightedMorphologicalTree< std::uint8_t > createTreeOfShapes(ImageUInt8Ptr img, ToSInterpolation interpolation=ToSInterpolation::SelfDual, int infinitySeedRow=ToSDefaultInfinityRow, int infinitySeedCol=ToSDefaultInfinityCol)
Builds a weighted tree of shapes from an 8-bit image.
static WeightedMorphologicalTree< T > createMinTree(ImagePtr< T > img, double radius=1.5)
Builds a typed weighted min-tree from an image.
static WeightedMorphologicalTree< T > createMaxTree(ImagePtr< T > img, double radius=1.5)
Builds a typed weighted max-tree from an image.
static WeightedMorphologicalTree< T > createSelfDualResidualTree(ImagePtr< T > img, double radius=1.5)
Builds a typed weighted self-dual residual tree from an image.
static WeightedMorphologicalTree< T > createFromHigraParent(std::span< const NodeId > higraParent, std::span< const T > higraAltitude, int rows, int cols, MorphologicalTreeKind kind, std::optional< AdjacencyRelation > adjacency=std::nullopt)
Imports a static Higra parent/altitude hierarchy.
Mutable morphological tree built directly on proper parts and dense node ids.
static void validateFiniteImageAltitudes(const ImagePtr< T > &image, const char *context)
Rejects non-finite floating-point pixels before using an image as altitude source.
Owning result for one computed scalar attribute layout and buffer.