top_hattop_hatTopHatTopHattop_hat (Operator)
top_hattop_hatTopHatTopHattop_hat
— Compute the top hat of regions.
Signature
Description
top_hattop_hatTopHatTopHattop_hat
computes the openingopeningOpeningOpeningopening
of
RegionRegionRegionregionregion
with StructElementStructElementStructElementstructElementstruct_element
. The difference
between the original region and the result of the opening is called
the top hat. In contrast to openingopeningOpeningOpeningopening
, which splits
regions under certain circumstances, top_hattop_hatTopHatTopHattop_hat
computes
the regions removed by such a splitting.
The position of StructElementStructElementStructElementstructElementstruct_element
is meaningless, since an
opening operation is invariant with respect to the choice of the
reference point.
Structuring elements (StructElementStructElementStructElementstructElementstruct_element
) can be generated
with operators such as gen_circlegen_circleGenCircleGenCirclegen_circle
, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1
,
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2
, gen_ellipsegen_ellipseGenEllipseGenEllipsegen_ellipse
,
draw_regiondraw_regionDrawRegionDrawRegiondraw_region
, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygongen_region_polygon
,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsgen_region_points
, etc.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
Parameters
RegionRegionRegionregionregion
(input_object) region(-array) →
objectHRegionHObjectHObjectHobject
Regions to be processed.
StructElementStructElementStructElementstructElementstruct_element
(input_object) region →
objectHRegionHObjectHObjectHobject
Structuring element (position independent).
RegionTopHatRegionTopHatRegionTopHatregionTopHatregion_top_hat
(output_object) region(-array) →
objectHRegionHObjectHObjectHobject *
Result of the top hat operator.
Result
top_hattop_hatTopHatTopHattop_hat
returns 2 (
H_MSG_TRUE)
if all parameters are correct.
The behavior in case of empty or no input region can be set via:
-
no region:
set_system('no_object_result',<RegionResult>)set_system("no_object_result",<RegionResult>)SetSystem("no_object_result",<RegionResult>)SetSystem("no_object_result",<RegionResult>)set_system("no_object_result",<RegionResult>)
-
empty region:
set_system('empty_region_result',<RegionResult>)set_system("empty_region_result",<RegionResult>)SetSystem("empty_region_result",<RegionResult>)SetSystem("empty_region_result",<RegionResult>)set_system("empty_region_result",<RegionResult>)
Otherwise, an exception is raised.
Possible Predecessors
thresholdthresholdThresholdThresholdthreshold
,
regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing
,
connectionconnectionConnectionConnectionconnection
,
union1union1Union1Union1union1
,
watershedswatershedsWatershedsWatershedswatersheds
,
class_ndim_normclass_ndim_normClassNdimNormClassNdimNormclass_ndim_norm
,
gen_circlegen_circleGenCircleGenCirclegen_circle
,
gen_ellipsegen_ellipseGenEllipseGenEllipsegen_ellipse
,
gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1
,
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2
,
draw_regiondraw_regionDrawRegionDrawRegiondraw_region
,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsgen_region_points
,
gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled
Possible Successors
reduce_domainreduce_domainReduceDomainReduceDomainreduce_domain
,
select_shapeselect_shapeSelectShapeSelectShapeselect_shape
,
area_centerarea_centerAreaCenterAreaCenterarea_center
,
connectionconnectionConnectionConnectionconnection
Alternatives
openingopeningOpeningOpeningopening
,
differencedifferenceDifferenceDifferencedifference
See also
bottom_hatbottom_hatBottomHatBottomHatbottom_hat
,
gray_tophatgray_tophatGrayTophatGrayTophatgray_tophat
,
openingopeningOpeningOpeningopening
Module
Foundation