top_hattop_hatTopHatTopHattop_hat (算子名称)
名称
top_hattop_hatTopHatTopHattop_hat — Compute the top hat of regions.
参数签名
描述
top_hattop_hatTopHatTopHatTopHattop_hat computes the openingopeningOpeningOpeningOpeningopening of
区域区域区域区域区域区域 with StructElementStructElementStructElementStructElementstructElementstruct_element. The difference
between the original region and the result of the opening is called
the top hat. In contrast to openingopeningOpeningOpeningOpeningopening, which splits
regions under certain circumstances, top_hattop_hatTopHatTopHatTopHattop_hat computes
the regions removed by such a splitting.
The position of StructElementStructElementStructElementStructElementstructElementstruct_element is meaningless, since an
opening operation is invariant with respect to the choice of the
reference point.
Structuring elements (StructElementStructElementStructElementStructElementstructElementstruct_element) can be generated
with operators such as gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1,
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse,
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, etc.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 在元组级别自动并行化。
参数表
区域区域区域区域区域区域 (input_object) region(-array) → objectHRegionHObjectHRegionHobject
Regions to be processed.
StructElementStructElementStructElementStructElementstructElementstruct_element (input_object) region → objectHRegionHObjectHRegionHobject
Structuring element (position independent).
RegionTopHatRegionTopHatRegionTopHatRegionTopHatregionTopHatregion_top_hat (output_object) region(-array) → objectHRegionHObjectHRegionHobject *
Result of the top hat operator.
结果
top_hattop_hatTopHatTopHatTopHattop_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>)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>)SetSystem("empty_region_result",<RegionResult>)set_system("empty_region_result",<RegionResult>)
Otherwise, an exception is raised.
可能的前置算子
thresholdthresholdThresholdThresholdThresholdthreshold,
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing,
connectionconnectionConnectionConnectionConnectionconnection,
union1union1Union1Union1Union1union1,
watershedswatershedsWatershedsWatershedsWatershedswatersheds,
class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm,
gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle,
gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse,
gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1,
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2,
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points,
gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled
可能的后置算子
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape,
area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center,
connectionconnectionConnectionConnectionConnectionconnection
可替代算子
openingopeningOpeningOpeningOpeningopening,
differencedifferenceDifferenceDifferenceDifferencedifference
参考其它
bottom_hatbottom_hatBottomHatBottomHatBottomHatbottom_hat,
gray_tophatgray_tophatGrayTophatGrayTophatGrayTophatgray_tophat,
openingopeningOpeningOpeningOpeningopening
模块
Foundation