Skip to content

transpose_regionTransposeRegionTransposeRegiontranspose_regiontranspose_region🔗

Short description🔗

transpose_regionTransposeRegionTransposeRegiontranspose_regiontranspose_region — Reflect a region about a point.

Signature🔗

transpose_region( region Region, out region Transposed, point.y Row, point.x Column )void TransposeRegion( const HObject& Region, HObject* Transposed, const HTuple& Row, const HTuple& Column )static void HOperatorSet.TransposeRegion( HObject region, out HObject transposed, HTuple row, HTuple column )def transpose_region( region: HObject, row: int, column: int ) -> HObject

Herror transpose_region( const Hobject Region, Hobject* Transposed, const Hlong Row, const Hlong Column )

Herror T_transpose_region( const Hobject Region, Hobject* Transposed, const Htuple Row, const Htuple Column )

HRegion HRegion::TransposeRegion( Hlong Row, Hlong Column ) const

HRegion HRegion.TransposeRegion( int row, int column )

Description🔗

transpose_regionTransposeRegion reflects a region about a point. The fixed point is given by Columncolumncolumn and Rowrowrow. The image \(P'\) of a point \(P\) is determined by the following requirement:

If \(P = S\), then \(P' = S\), i.e., the point \(S\) is the fixed point of the mapping. If \(P \not= S\), \(S\) is the center point of a line segment connecting \(P\) and \(P'\). Therefore, the following equations result:

\[\begin{eqnarray*} \textrm{Column} & = & \frac{x + x'}{2} \\ \textrm{Row} & = & \frac{y + y'}{2}. \end{eqnarray*}\]

If Rowrowrow and Columncolumncolumn are set to the origin, the in morphology often used transposition results. Hence transpose_regionTransposeRegion is often used to reflect (transpose) a structuring element.

Execution information🔗

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🔗

Regionregionregion (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Region to be reflected.

Transposedtransposedtransposed (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

Transposed region.

Rowrowrow (input_control) point.y → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Row coordinate of the reference point.

Default: 00
Suggested values: 0, 64, 128, 256, 5120, 64, 128, 256, 512
Value range: 0 ≤ Row ≤ 511 (lin)
Minimum increment: 1
Recommended increment: 1

Columncolumncolumn (input_control) point.x → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Column coordinate of the reference point.

Default: 00
Suggested values: 0, 64, 128, 256, 5120, 64, 128, 256, 512
Value range: 0 ≤ Column ≤ 511 (lin)
Minimum increment: 1
Recommended increment: 1

Complexity🔗

Let \(F\) be the area of the input region. Then the runtime complexity for one region is

\[\begin{eqnarray*} O(\sqrt{F}) \enspace . \end{eqnarray*}\]

Result🔗

transpose_regionTransposeRegion 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>)

  • empty region: set_system('empty_region_result',<RegionResult>)

Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

reduce_domainReduceDomain, select_shapeSelectShape, area_centerAreaCenter, connectionConnection

See also

dilation1Dilation1, openingOpening, closingClosing

Module🔗

Foundation