ddd_pylib.morphology.

BaseMorphologicalOperator#

class ddd_pylib.morphology.BaseMorphologicalOperator[source]#

Bases: ImageOperator

Provides more precise functions for morphology operation, mainly for kernel, with a kernel_radius attribute and a shape attribute for the kernel shape, Circle, Square or Diamond for a 2D kernel, and Sphere, Cube or Diamond for a 3D one.

Parameters:
  • kernel_radius – The radius of the wanted kernel

  • shape – The shape of the kernel

Methods

static defaultKernelRadius()[source]#
Return type:

int

static defaultKernelShape()[source]#
Return type:

str

getKernel()[source]#
Return type:

ndarray

setKernelRadius(radius)[source]#

Set the kernel radius

Parameters:

radius (int) – the radius of the kernel that will be created

setKernelShape(shape)[source]#

Set the shape of the kernel, depending of the number of dimensions

Parameters:

shape (str) – The shape of the kernel, picked in shape_2d or shape_3d depending of the need