Operator Reference

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region (Operator)

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region — Generate a region having a given Hamming distance.

Warning

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region is obsolete and is only provided for reasons of backward compatibility.

Signature

hamming_change_region(InputRegion : OutputRegion : Width, Height, Distance : )

Herror hamming_change_region(const Hobject InputRegion, Hobject* OutputRegion, const Hlong Width, const Hlong Height, const Hlong Distance)

Herror T_hamming_change_region(const Hobject InputRegion, Hobject* OutputRegion, const Htuple Width, const Htuple Height, const Htuple Distance)

void HammingChangeRegion(const HObject& InputRegion, HObject* OutputRegion, const HTuple& Width, const HTuple& Height, const HTuple& Distance)

HRegion HRegion::HammingChangeRegion(Hlong Width, Hlong Height, Hlong Distance) const

static void HOperatorSet.HammingChangeRegion(HObject inputRegion, out HObject outputRegion, HTuple width, HTuple height, HTuple distance)

HRegion HRegion.HammingChangeRegion(int width, int height, int distance)

def hamming_change_region(input_region: HObject, width: int, height: int, distance: int) -> HObject

Description

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region changes the region in the left upper part of the image given by WidthWidthWidthwidthwidth and HeightHeightHeightheightheight such that the resulting regions have a Hamming distance of DistanceDistanceDistancedistancedistance to the input regions. This is done by adding or removing DistanceDistanceDistancedistancedistance points from the input region.

Attention

If WidthWidthWidthwidthwidth and HeightHeightHeightheightheight are chosen too large the resulting region requires a lot of memory.

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

InputRegionInputRegionInputRegioninputRegioninput_region (input_object)  region(-array) objectHRegionHObjectHObjectHobject

Region to be modified.

OutputRegionOutputRegionOutputRegionoutputRegionoutput_region (output_object)  region(-array) objectHRegionHObjectHObjectHobject *

Regions having the required Hamming distance.

WidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the region to be changed.

Default: 100

Suggested values: 64, 128, 256, 512

Value range: 1 ≤ Width Width Width width width ≤ 512 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: Width > 0

HeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the region to be changed.

Default: 100

Suggested values: 64, 128, 256, 512

Value range: 1 ≤ Height Height Height height height ≤ 512 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: Height > 0

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

Hamming distance between the old and new regions.

Default: 1000

Suggested values: 100, 500, 1000, 5000, 10000

Value range: 0 ≤ Distance Distance Distance distance distance ≤ 10000 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: Distance >= 0 && Distance < Width * Height

Complexity

Memory requirement of the generated region (worst case): O(2 * WidthWidthWidthwidthwidth * HeightHeightHeightheightheight).

Result

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region returns 2 ( H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

connectionconnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringpouring, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormclass_ndim_norm

Possible Successors

select_shapeselect_shapeSelectShapeSelectShapeselect_shape

See also

hamming_distancehamming_distanceHammingDistanceHammingDistancehamming_distance

Module

Foundation