Skip to content

move_regionMoveRegionMoveRegionmove_regionmove_region🔗

Short description🔗

move_regionMoveRegionMoveRegionmove_regionmove_region — Translate a region.

Signature🔗

move_region( region Region, out region RegionMoved, point.y Row, point.x Column )void MoveRegion( const HObject& Region, HObject* RegionMoved, const HTuple& Row, const HTuple& Column )static void HOperatorSet.MoveRegion( HObject region, out HObject regionMoved, HTuple row, HTuple column )def move_region( region: HObject, row: int, column: int ) -> HObject

Herror move_region( const Hobject Region, Hobject* RegionMoved, const Hlong Row, const Hlong Column )

Herror T_move_region( const Hobject Region, Hobject* RegionMoved, const Htuple Row, const Htuple Column )

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

HRegion HRegion.MoveRegion( int row, int column )

Description🔗

move_regionMoveRegion translates the input regions by the vector given by (Rowrowrow, Columncolumncolumn). If necessary, the resulting regions are clipped with the current image format.

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(s) to be moved.

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

Translated region(s).

Number of elements: RegionMoved == Region

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

Row coordinate of the vector by which the region is to be moved.

Default: 3030
Suggested values: -128, -64, -32, -16, -10, -8, -4, -2, -1, 0, 1, 2, 4, 5, 8, 10, 16, 32, 64, 128-128, -64, -32, -16, -10, -8, -4, -2, -1, 0, 1, 2, 4, 5, 8, 10, 16, 32, 64, 128
Value range: -512 ≤ Row ≤ 512 (lin)
Minimum increment: 1
Recommended increment: 10

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

Row coordinate of the vector by which the region is to be moved.

Default: 3030
Suggested values: -128, -64, -32, -16, -10, -8, -4, -2, -1, 0, 1, 2, 4, 5, 8, 10, 16, 32, 64, 128-128, -64, -32, -16, -10, -8, -4, -2, -1, 0, 1, 2, 4, 5, 8, 10, 16, 32, 64, 128
Value range: -512 ≤ Column ≤ 512 (lin)
Minimum increment: 1
Recommended increment: 10

Complexity🔗

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

Result🔗

move_regionMoveRegion always returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>), the behavior in case of an empty input region via set_system('empty_region_result',<Result>), and the behavior in case of an empty result region via set_system('store_empty_region',<'true'/'false'>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

thresholdThreshold, connectionConnection, regiongrowingRegiongrowing, pouringPouring

Possible successors

select_shapeSelectShape, disp_regionDispRegion

See also

affine_trans_imageAffineTransImage, mirror_regionMirrorRegion, zoom_regionZoomRegion

Module🔗

Foundation