Operators |
polar_trans_region_inv — Transform a region in polar coordinates back to cartesian coordinates.
polar_trans_region_inv(PolarRegion : XYTransRegion : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, WidthIn, HeightIn, Width, Height, Interpolation : )
polar_trans_region_inv transforms the polar coordinate representation of a region, stored in PolarRegion, back onto an annular arc in cartesian coordinates, described by the radii RadiusStart and RadiusEnd and the angles AngleStart and AngleEnd with the center point located at (Row, Column). All of these values can be chosen as real numbers. In addition, the dimensions of the virtual image containing the region PolarRegion must be given in WidthIn and HeightIn. WidthIn-1 is the column coordinate corresponding to AngleEnd and HeightIn-1 is the row coordinate corresponding to RadiusEnd. AngleStart and RadiusStart correspond to column and row coordinate 0. Furthermore, the dimensions Width and Height of the virtual output image containing the transformed region XYTransRegion are required.
The angles and radii are inclusive, which means that the row coordinate 0 in PolarRegion will be mapped onto a a circle with a distance of RadiusStart pixels from the specified center and the row with the coordinate HeightIn-1 will be mapped onto a circle of radius RadiusEnd. This applies to AngleStart, AngleEnd, and WidthIn in an analogous way. If the width of the input region PolarRegion corresponds to an angle interval greater than 2pi, the region is cropped such that length of this interval is 2pi.
The parameter Interpolation is used to select the interpolation method 'bilinear' or 'nearest_neighbor' . Setting Interpolation to 'bilinear' leads to smoother region boundaries, especially if regions are enlarged. However, the runtime increases significantly.
polar_trans_region_inv is the inverse function of polar_trans_region.
The call sequence:
polar_trans_region(Region, PolarRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, 'nearest_neighbor') polar_trans_region_inv(PolarRegion, XYTransRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, Width, Height, 'nearest_neighbor')returns the region Region, restricted to the circle around (Row, Column) with radius Radius, as its output region XYTransRegion.
If more than one region is passed in PolarRegion, their cartesian transformations are computed individually and stored as a tuple in XYTransRegion. Please note that the indices of an input region and its transformation only correspond if the system variable 'store_empty_regions' is set to 'false' (see set_system). Otherwise empty output regions are discarded and the length of the input tuple PolarRegion is most likely not equal to the length of the output tuple XYTransRegion.
If Width or Height are chosen greater than the dimensions of the current image, the system variable 'clip_region' should be set to 'false' (see set_system). Otherwise, an output region that does not lie within the dimensions of the current image can produce an error message.
Input region.
Output region.
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 ≤ 32767
Restriction: Row >= -131068 && Row <= 131068
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 ≤ 32767
Restriction: Column >= -131068 && Column <= 131068
Angle of the ray to map the column coordinate 0 of PolarRegion to.
Default value: 0.0
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853
Typical range of values: -6.2831853 ≤ AngleStart ≤ 6.2831853
Angle of the ray to map the column coordinate WidthIn-1 of PolarRegion to.
Default value: 6.2831853
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853
Typical range of values: -6.2831853 ≤ AngleEnd ≤ 6.2831853
Radius of the circle to map the row coordinate 0 of PolarRegion to.
Default value: 0
Suggested values: 0, 16, 32, 64, 100, 128, 256, 512
Typical range of values: 0 ≤ RadiusStart ≤ 32767
Radius of the circle to map the row coordinate HeightIn-1 of PolarRegion to.
Default value: 100
Suggested values: 0, 16, 32, 64, 100, 128, 256, 512
Typical range of values: 0 ≤ RadiusEnd ≤ 32767
Width of the virtual input image.
Default value: 512
Suggested values: 256, 320, 512, 640, 800, 1024
Typical range of values: 2 ≤ WidthIn ≤ 32767
Height of the virtual input image.
Default value: 512
Suggested values: 240, 256, 480, 512, 600, 1024
Typical range of values: 2 ≤ HeightIn ≤ 32767
Width of the virtual output image.
Default value: 512
Suggested values: 256, 320, 512, 640, 800, 1024
Typical range of values: 1 ≤ Width ≤ 32767
Height of the virtual output image.
Default value: 512
Suggested values: 240, 256, 480, 512, 600, 1024
Typical range of values: 1 ≤ Height ≤ 32767
Interpolation method for the transformation.
Default value: 'nearest_neighbor'
List of values: 'bilinear' , 'nearest_neighbor'
polar_trans_image_ext, polar_trans_image_inv, polar_trans_region, polar_trans_contour_xld, polar_trans_contour_xld_inv
Foundation
Operators |