Operator Reference

gen_disc_segen_disc_seGenDiscSeGenDiscSegen_disc_se (Operator)

gen_disc_segen_disc_seGenDiscSeGenDiscSegen_disc_se — Generate ellipsoidal structuring elements for gray morphology.

Signature

gen_disc_se( : SE : Type, Width, Height, Smax : )

Herror gen_disc_se(Hobject* SE, const char* Type, const Hlong Width, const Hlong Height, double Smax)

Herror T_gen_disc_se(Hobject* SE, const Htuple Type, const Htuple Width, const Htuple Height, const Htuple Smax)

void GenDiscSe(HObject* SE, const HTuple& Type, const HTuple& Width, const HTuple& Height, const HTuple& Smax)

void HImage::GenDiscSe(const HString& Type, Hlong Width, Hlong Height, const HTuple& Smax)

void HImage::GenDiscSe(const HString& Type, Hlong Width, Hlong Height, double Smax)

void HImage::GenDiscSe(const char* Type, Hlong Width, Hlong Height, double Smax)

void HImage::GenDiscSe(const wchar_t* Type, Hlong Width, Hlong Height, double Smax)   ( Windows only)

static void HOperatorSet.GenDiscSe(out HObject SE, HTuple type, HTuple width, HTuple height, HTuple smax)

void HImage.GenDiscSe(string type, int width, int height, HTuple smax)

void HImage.GenDiscSe(string type, int width, int height, double smax)

def gen_disc_se(type: str, width: int, height: int, smax: Union[int, float]) -> HObject

Description

gen_disc_segen_disc_seGenDiscSeGenDiscSegen_disc_se generates an ellipsoidal structuring element (SESESESEse) for gray morphology of images. The parameter TypeTypeTypetypetype determines the image type. It must match the image type of the image to be processed in subsequent operator calls using this structuring element. The parameters WidthWidthWidthwidthwidth and HeightHeightHeightheightheight determine the length of the two major axes of the ellipse. The value of SmaxSmaxSmaxsmaxsmax determines the maximum gray value of the structuring element. For the generation of arbitrary structuring elements, see read_gray_seread_gray_seReadGraySeReadGraySeread_gray_se. The structuring element can be saved as image with the help of the operator write_imagewrite_imageWriteImageWriteImagewrite_image. However, take care to use an image format that supports alpha channels to save the shape of the structuring element such as 'tiff', 'jp2' or 'png'. These files can then be loaded again with the operator read_imageread_imageReadImageReadImageread_image.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

SESESESEse (output_object)  image objectHImageHObjectHObjectHobject * (byte / uint2 / real)

Generated structuring element.

TypeTypeTypetypetype (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Pixel type.

Default: 'byte' "byte" "byte" "byte" "byte"

List of values: 'byte'"byte""byte""byte""byte", 'real'"real""real""real""real", 'uint2'"uint2""uint2""uint2""uint2"

WidthWidthWidthwidthwidth (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the structuring element.

Default: 5

Suggested values: 0, 1, 2, 3, 4, 5, 10, 15, 20

Value range: 0 ≤ Width Width Width width width ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

HeightHeightHeightheightheight (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the structuring element.

Default: 5

Suggested values: 0, 1, 2, 3, 4, 5, 10, 15, 20

Value range: 0 ≤ Height Height Height height height ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

SmaxSmaxSmaxsmaxsmax (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Maximum gray value of the structuring element.

Default: 0

Suggested values: 0, 1, 2, 5, 10, 20, 30, 40

Result

gen_disc_segen_disc_seGenDiscSeGenDiscSegen_disc_se returns 2 ( H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Successors

gray_erosiongray_erosionGrayErosionGrayErosiongray_erosion, gray_dilationgray_dilationGrayDilationGrayDilationgray_dilation, gray_openinggray_openingGrayOpeningGrayOpeninggray_opening, gray_closinggray_closingGrayClosingGrayClosinggray_closing, gray_tophatgray_tophatGrayTophatGrayTophatgray_tophat, gray_bothatgray_bothatGrayBothatGrayBothatgray_bothat, write_imagewrite_imageWriteImageWriteImagewrite_image

Alternatives

read_gray_seread_gray_seReadGraySeReadGraySeread_gray_se, read_imageread_imageReadImageReadImageread_image

See also

paint_regionpaint_regionPaintRegionPaintRegionpaint_region, paint_graypaint_grayPaintGrayPaintGraypaint_gray, crop_partcrop_partCropPartCropPartcrop_part

Module

Foundation