ClassesClassesClassesClasses | | | | Operators

polar_trans_regionpolar_trans_regionPolarTransRegionpolar_trans_regionPolarTransRegionPolarTransRegion (Operator)

Name

polar_trans_regionpolar_trans_regionPolarTransRegionpolar_trans_regionPolarTransRegionPolarTransRegion — Transform a region within an annular arc to polar coordinates.

Signature

polar_trans_region(Region : PolarTransRegion : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height, Interpolation : )

Herror polar_trans_region(const Hobject Region, Hobject* PolarTransRegion, double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, const Hlong Width, const Hlong Height, const char* Interpolation)

Herror T_polar_trans_region(const Hobject Region, Hobject* PolarTransRegion, const Htuple Row, const Htuple Column, const Htuple AngleStart, const Htuple AngleEnd, const Htuple RadiusStart, const Htuple RadiusEnd, const Htuple Width, const Htuple Height, const Htuple Interpolation)

Herror polar_trans_region(Hobject Region, Hobject* PolarTransRegion, const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation)

HRegion HRegion::PolarTransRegion(const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation) const

HRegionArray HRegionArray::PolarTransRegion(const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation) const

void PolarTransRegion(const HObject& Region, HObject* PolarTransRegion, const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation)

HRegion HRegion::PolarTransRegion(const HTuple& Row, const HTuple& Column, double AngleStart, double AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, Hlong Width, Hlong Height, const HString& Interpolation) const

HRegion HRegion::PolarTransRegion(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height, const HString& Interpolation) const

HRegion HRegion::PolarTransRegion(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height, const char* Interpolation) const

void HOperatorSetX.PolarTransRegion(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*PolarTransRegion, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT AngleStart, [in] VARIANT AngleEnd, [in] VARIANT RadiusStart, [in] VARIANT RadiusEnd, [in] VARIANT Width, [in] VARIANT Height, [in] VARIANT Interpolation)

IHRegionX* HRegionX.PolarTransRegion(
[in] VARIANT Row, [in] VARIANT Column, [in] double AngleStart, [in] double AngleEnd, [in] VARIANT RadiusStart, [in] VARIANT RadiusEnd, [in] Hlong Width, [in] Hlong Height, [in] BSTR Interpolation)

static void HOperatorSet.PolarTransRegion(HObject region, out HObject polarTransRegion, HTuple row, HTuple column, HTuple angleStart, HTuple angleEnd, HTuple radiusStart, HTuple radiusEnd, HTuple width, HTuple height, HTuple interpolation)

HRegion HRegion.PolarTransRegion(HTuple row, HTuple column, double angleStart, double angleEnd, HTuple radiusStart, HTuple radiusEnd, int width, int height, string interpolation)

HRegion HRegion.PolarTransRegion(double row, double column, double angleStart, double angleEnd, double radiusStart, double radiusEnd, int width, int height, string interpolation)

Description

polar_trans_regionpolar_trans_regionPolarTransRegionpolar_trans_regionPolarTransRegionPolarTransRegion transforms a RegionRegionRegionRegionRegionregion within the annular arc specified by the center point (RowRowRowRowRowrow, ColumnColumnColumnColumnColumncolumn), the radii RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart and RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd and the angles AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleEndAngleEndAngleEndAngleEndAngleEndangleEnd to its polar coordinate version in a virtual image of the dimensions WidthWidthWidthWidthWidthwidth x HeightHeightHeightHeightHeightheight.

The polar transformation is a change of the coordinate system. Instead of a row and a column coordinate, each point's position is expressed by its radius r (i.e. the distance to the center point RowRowRowRowRowrow, ColumnColumnColumnColumnColumncolumn) and the angle phi between the column axis (through the center point) and the line from the center point towards the point. Note that this transformation is not affine.

The coordinate (0,0) in the output region always corresponds to the point in the input region that is specified by RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart and AngleStartAngleStartAngleStartAngleStartAngleStartangleStart. Analogously, the coordinate (HeightHeightHeightHeightHeightheight-1, WidthWidthWidthWidthWidthwidth-1) corresponds to the point in the input region that is specified by RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd and AngleEndAngleEndAngleEndAngleEndAngleEndangleEnd. In the usual mode (AngleStartAngleStartAngleStartAngleStartAngleStartangleStart < AngleEndAngleEndAngleEndAngleEndAngleEndangleEnd and RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart < RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd), the polar transformation is performed in the mathematically positive orientation (counterclockwise). Furthermore, points with smaller radii lie in the upper part of the output region. By suitably exchanging the values of these parameters (e.g., AngleStartAngleStartAngleStartAngleStartAngleStartangleStart > AngleEndAngleEndAngleEndAngleEndAngleEndangleEnd or RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart > RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd), any desired orientation of the output region can be achieved.

The angles can be chosen from all real numbers. Center point and radii can be real as well. However, if they are both integers and the difference of RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd and RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart equals HeightHeightHeightHeightHeightheight-1, calculation will be sped up through an optimized routine.

The radii and angles are inclusive, which means that the first row of the virtual target image contains the circle with radius RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart and the last row contains the circle with radius RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd. For complete circles, where the difference between AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleEndAngleEndAngleEndAngleEndAngleEndangleEnd equals (360 degrees), this also means that the first column of the target image will be the same as the last.

To avoid this, do not make this difference , but degrees instead.

The parameter InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation is used to select the interpolation method 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" or 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor". Setting InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation to 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" leads to smoother region boundaries, especially if regions are enlarged. However, the runtime increases significantly.

If more than one region is passed in RegionRegionRegionRegionRegionregion, their polar transformations are computed individually and stored as a tuple in PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion. Please note that the indices of an input region and its transformation only correspond if the system variable 'store_empty_regions'"store_empty_regions""store_empty_regions""store_empty_regions""store_empty_regions""store_empty_regions" is set to 'true'"true""true""true""true""true" (see set_systemset_systemSetSystemset_systemSetSystemSetSystem). Otherwise empty output regions are discarded and the length of the input tuple RegionRegionRegionRegionRegionregion is most likely not equal to the length of the output tuple PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion.

Attention

If WidthWidthWidthWidthWidthwidth or HeightHeightHeightHeightHeightheight are chosen greater than the dimensions of the current image, the system variable 'clip_region'"clip_region""clip_region""clip_region""clip_region""clip_region" should be set to 'false'"false""false""false""false""false" (see set_systemset_systemSetSystemset_systemSetSystemSetSystem). Otherwise, an output region that does not lie within the dimensions of the current image can produce an error message.

Parallelization

Parameters

RegionRegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Input region.

PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Output region.

RowRowRowRowRowrow (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Row coordinate of the center of the arc.

Default value: 256

Suggested values: 0, 16, 32, 64, 128, 240, 256, 480, 512

Typical range of values: 0 ≤ Row Row Row Row Row row ≤ 32767

Restriction: Row >= -131068 && Row <= 131068

ColumnColumnColumnColumnColumncolumn (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Column coordinate of the center of the arc.

Default value: 256

Suggested values: 0, 16, 32, 64, 128, 256, 320, 512, 640

Typical range of values: 0 ≤ Column Column Column Column Column column ≤ 32767

Restriction: Column >= -131068 && Column <= 131068

AngleStartAngleStartAngleStartAngleStartAngleStartangleStart (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Angle of the ray to be mapped to column coordinate 0 of PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion.

Default value: 0.0

Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.566370616

Typical range of values: -6.2831853 ≤ AngleStart AngleStart AngleStart AngleStart AngleStart angleStart ≤ 6.2831853

AngleEndAngleEndAngleEndAngleEndAngleEndangleEnd (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Angle of the ray to be mapped to column coordinate WidthWidthWidthWidthWidthwidth-1 of PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion.

Default value: 6.2831853

Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.566370616

Typical range of values: -6.2831853 ≤ AngleEnd AngleEnd AngleEnd AngleEnd AngleEnd angleEnd ≤ 6.2831853

RadiusStartRadiusStartRadiusStartRadiusStartRadiusStartradiusStart (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Radius of the circle to be mapped to row coordinate 0 of PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion.

Default value: 0

Suggested values: 0, 16, 32, 64, 100, 128, 256, 512

Typical range of values: 0 ≤ RadiusStart RadiusStart RadiusStart RadiusStart RadiusStart radiusStart ≤ 32767

RadiusEndRadiusEndRadiusEndRadiusEndRadiusEndradiusEnd (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Radius of the circle to be mapped to row coordinate HeightHeightHeightHeightHeightheight-1 of PolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionPolarTransRegionpolarTransRegion.

Default value: 100

Suggested values: 0, 16, 32, 64, 100, 128, 256, 512

Typical range of values: 0 ≤ RadiusEnd RadiusEnd RadiusEnd RadiusEnd RadiusEnd radiusEnd ≤ 32767

WidthWidthWidthWidthWidthwidth (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Width of the virtual output image.

Default value: 512

Suggested values: 256, 320, 512, 640, 800, 1024

Typical range of values: 2 ≤ Width Width Width Width Width width ≤ 32767

HeightHeightHeightHeightHeightheight (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Height of the virtual output image.

Default value: 512

Suggested values: 240, 256, 480, 512, 600, 1024

Typical range of values: 2 ≤ Height Height Height Height Height height ≤ 32767

InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Interpolation method for the transformation.

Default value: 'nearest_neighbor' "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor"

List of values: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

See also

polar_trans_image_extpolar_trans_image_extPolarTransImageExtpolar_trans_image_extPolarTransImageExtPolarTransImageExt, polar_trans_image_invpolar_trans_image_invPolarTransImageInvpolar_trans_image_invPolarTransImageInvPolarTransImageInv, polar_trans_region_invpolar_trans_region_invPolarTransRegionInvpolar_trans_region_invPolarTransRegionInvPolarTransRegionInv, polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXld, polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInv

Module

Foundation


ClassesClassesClassesClasses | | | | Operators