/// <summary> /// Sets the spatial transform parameters of the scan head in order to properly /// transform the data from a camera based coordinate system to one based on /// mill placement. Parameters are applied to all cameras. /// </summary> /// <param name="p">The p.</param> internal void SetAlignment(AlignmentParameters p) { if (IsConnected) { throw new Exception("Can not set alignment while connected."); } Alignment[Camera.Camera0] = new AlignmentParameters(p); Alignment[Camera.Camera1] = new AlignmentParameters(p); }
/// <summary> /// Sets the spatial transform parameters of the <see cref="ScanHead"/> in order to properly /// transform the data from a scan head based coordinate system to one based on /// mill placement. Parameters are applied only to specified <see cref="Camera"/>. This method /// should not be used in most cases as all cameras should be aligned to each other by factory /// calibration. In most cases <see cref="SetAlignment(double,double,double,ScanHeadOrientation)"/> should be /// used instead. /// </summary> /// <param name="camera">The <see cref="Camera"/> which to set the alignment of.</param> /// <param name="rollDegrees">The rotation around the Z axis in the mill coordinate system in degrees.</param> /// <param name="shiftX">The shift along the X axis in the mill coordinate system in inches.</param> /// <param name="shiftY">The shift along the Y axis in the mill coordinate system in inches.</param> /// <param name="orientation">The <see cref="ScanHeadOrientation"/>.</param> /// <exception cref="Exception"> /// <see cref="IsConnected"/> is `true`. /// </exception> public void SetAlignment(Camera camera, double rollDegrees, double shiftX, double shiftY, ScanHeadOrientation orientation) { if (IsConnected) { throw new Exception("Can not set alignment while connected."); } Alignment[camera] = new AlignmentParameters(rollDegrees, shiftX, shiftY, orientation); }