/// <summary>
        /// Gets a <see cref="MicroLensCollection"/> that contains only orthogonally arranged microlenses from the current collection.
        /// </summary>
        /// <returns>a <see cref="MicroLensCollection"/> that contains only orthogonally arranged microlenses from the current collection.</returns>
        /// <remarks>In case the current <see cref="MicroLensCollection"/> is already orthogonal, a reference to the current collection is returned.</remarks>
        public MicroLensCollection GetOrthogonalSubset()
        {
            if (_orthogonal)
            {
                return(this);
            }

            MicroLensCollection orthogonal = new MicroLensCollection();

            orthogonal.Initialize(_metadata, 0.0, 1.0, HexagonalMinorFactor);

            return(orthogonal);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="XYImage"/> class.
        /// </summary>
        /// <param name="rawImage">The raw sensor image.</param>
        /// <param name="mla">The microlens collection to use.</param>
        /// <param name="u">Horizontal offset from the microlens center.</param>
        /// <param name="v">Vertical offset from the microlens center.</param>
        public XYImage(ISampled2D <ColorRgb128Float> rawImage, MicroLensCollection mla, int u, int v)
        {
            if (rawImage == null)
            {
                throw new ArgumentNullException("rawImage");
            }

            if (mla == null)
            {
                throw new ArgumentNullException("mla");
            }

            _rawImage = new InterpolatedImage(rawImage);
            _mla      = mla;
            _u        = u;
            _v        = v;

            _width  = rawImage.Width;
            _height = rawImage.Height;

            int dummy;

            mla.GetBounds(out _xMin, out dummy, out _yMin, out dummy);
        }