Skip to content

feat: functions for maxtree and tree of shapes of 3d images + tests + documentation

vtcheou requested to merge development/ct3d into next

I. Functions were added / modified to compute the maxtree and tos of 3d images

In pylena/morpho/component_tree.py

  • maxtree3d : Compute the maxtree of a 3d uint8 image
  • add_border_median : Add border median to 2d or 3d uint8 array
  • tos3d : Compute the tos of a 3d image

In pylena/morpho/maxtree.cpp

  • maxtree2d -> maxtreend : Compute the maxtree of a 2d or 3d uint8 image
  • tos2d -> tosnd : Compute the tos of a 2d or 3d uint8 image

II. Tests were added

In tests/morpho/test_component_tree.py

  • test_maxtree_c6_uint8 : Test the maxtree3d function with connectivity 6
  • test_exception : Test exception for maxtree3d function called with invalid connectivity

In tests/morpho/test_maxtree.py

  • test_add_median_border3d : Test the add_median_border function with a 3d image
  • test_tos3d_original : Test the tos3d function with a root and subsampling "original" arguments
  • test_tos3d_original_no_root : Test the tos3d function with subsampling "original" argument
  • test_tos3d_full : Test the tos3d function with a root and subsampling "full" arguments
  • test_exception : Test exceptions for maxtree3d function called with invalid root or subsampling arguments

III. Functions were added to the documentation

In the Hierarchical representations of image section

  • pylena.morpho.maxtree3d(img: ndarray, connectivity: int) → ComponentTree
  • pylena.morpho.tos3d(img: ndarray, root: Tuple = None, padding: str = None, subsampling: str = 'original') → ComponentTree
Edited by vtcheou

Merge request reports