Class CartToPolar
Represents an operator that computes the magnitude and angle of each array of 2D vectors in the sequence.
public class CartToPolar : ArrayTransform
- Inheritance
-
CartToPolar
- Inherited Members
Properties
AngleInDegrees
Gets or sets a value specifying whether vector angle values are measured in degrees.
public bool AngleInDegrees { get; set; }
Property Value
Methods
Process(IObservable<Point2d>)
Computes the magnitude and angle for each pair of 2D points in the sequence.
public IObservable<Point2d> Process(IObservable<Point2d> source)
Parameters
source
IObservable<Point2d>A sequence of 2D points with double-precision cartesian coordinates, for which to compute the corresponding polar coordinates.
Returns
- IObservable<Point2d>
A sequence of points specifying the corresponding double-precision polar coordinates for each 2D vector in the
source
sequence.
Process(IObservable<Point2f>)
Computes the magnitude and angle for each pair of 2D points in the sequence.
public IObservable<Point2f> Process(IObservable<Point2f> source)
Parameters
source
IObservable<Point2f>A sequence of 2D points with single-precision cartesian coordinates, for which to compute the corresponding polar coordinates.
Returns
- IObservable<Point2f>
A sequence of points specifying the corresponding single-precision polar coordinates for each 2D vector in the
source
sequence.
Process(IObservable<Tuple<double, double>>)
Computes the polar coordinates for each pair of cartesian coordinates in the sequence.
public IObservable<Tuple<double, double>> Process(IObservable<Tuple<double, double>> source)
Parameters
source
IObservable<Tuple<double, double>>A sequence of pairs specifying double-precision cartesian coordinates, where the first item stores the x-coordinate, and the second item the y-coordinate of a 2D vector for which to compute the polar coordinates.
Returns
- IObservable<Tuple<double, double>>
A sequence of pairs specifying double-precision polar coordinates, where the first item stores the magnitude, and the second item the angle of a 2D vector.
Process(IObservable<Tuple<float, float>>)
Computes the polar coordinates for each pair of cartesian coordinates in the sequence.
public IObservable<Tuple<float, float>> Process(IObservable<Tuple<float, float>> source)
Parameters
source
IObservable<Tuple<float, float>>A sequence of pairs specifying single-precision cartesian coordinates, where the first item stores the x-coordinate, and the second item the y-coordinate of a 2D vector for which to compute the polar coordinates.
Returns
- IObservable<Tuple<float, float>>
A sequence of pairs specifying single-precision polar coordinates, where the first item stores the magnitude, and the second item the angle of a 2D vector.
Process<TArray>(IObservable<Tuple<TArray, TArray>>)
Computes the magnitude and angle for each pair of cartesian coordinates in the sequence.
public IObservable<Tuple<TArray, TArray>> Process<TArray>(IObservable<Tuple<TArray, TArray>> source) where TArray : Arr
Parameters
source
IObservable<Tuple<TArray, TArray>>A sequence of pairs of arrays, where the first array stores the x-coordinates, and the second array the y-coordinates of a 2D vector field for which to compute the magnitude and angle.
Returns
- IObservable<Tuple<TArray, TArray>>
A sequence of pairs of arrays, where the first array stores the magnitude, and the second array stores the angle of a 2D vector.
Type Parameters
TArray
The type of the array-like objects in the
source
sequence.
Process<TArray>(IObservable<TArray>)
Computes the magnitude and angle of each array of 2D vectors in the sequence.
public override IObservable<TArray> Process<TArray>(IObservable<TArray> source) where TArray : Arr
Parameters
source
IObservable<TArray>A sequence of 2D vector fields represented by a 2-channel array or image, for which to compute the magnitude and angle.
Returns
- IObservable<TArray>
A sequence of 2-channel arrays or images, where the first channel of each element stores the magnitude and the second channel the angle of a 2D vector.
Type Parameters
TArray
The type of the array-like objects in the
source
sequence.