コード例 #1
0
        public void MatrixCoordsToImageCoords(double mtxX, double mtxY, out double imgX, out double imgY, CoordinateReference coorRef)
        {
            if (coorRef == CoordinateReference.TopLeftCorner)
            {
                double mtxDX = (mtxX - m_Matrix.CenterXMatrix);
                double mtxDY = (mtxY - m_Matrix.CenterYMatrix);

                imgX = CenterXImage + mtxDX * m_MatrixToImageScaleX;
                imgY = CenterYImage + mtxDY * m_MatrixToImageScaleY;
            }
            else
            {
                imgX = mtxX * m_MatrixToImageScaleX;
                imgY = mtxY * m_MatrixToImageScaleY;
            }
        }
コード例 #2
0
ファイル: AstroPlate.cs プロジェクト: hpavlov/tangra3
        public void MatrixCoordsToImageCoords(double mtxX, double mtxY, out double imgX, out double imgY, CoordinateReference coorRef)
        {
            if (coorRef == CoordinateReference.TopLeftCorner)
            {
                double mtxDX = (mtxX - m_Matrix.CenterXMatrix);
                double mtxDY = (mtxY - m_Matrix.CenterYMatrix);

                imgX = CenterXImage + mtxDX * m_MatrixToImageScaleX;
                imgY = CenterYImage + mtxDY * m_MatrixToImageScaleY;
            }
            else
            {
                imgX = mtxX * m_MatrixToImageScaleX;
                imgY = mtxY * m_MatrixToImageScaleY;
            }
        }
コード例 #3
0
        public void ImageCoordsToMatrixCoords(double imgX, double imgY, out double mtxX, out double mtxY, CoordinateReference coorRef)
        {
            if (coorRef == CoordinateReference.TopLeftCorner)
            {
                double imgDX = (imgX - CenterXImage);
                double imgDY = (imgY - CenterYImage);

                mtxX = m_Matrix.CenterXMatrix + imgDX / m_MatrixToImageScaleX;
                mtxY = m_Matrix.CenterYMatrix + imgDY / m_MatrixToImageScaleY;
            }
            else
            {
                mtxX = imgX / m_MatrixToImageScaleX;
                mtxY = imgY / m_MatrixToImageScaleY;
            }
        }
コード例 #4
0
ファイル: AstroPlate.cs プロジェクト: hpavlov/tangra3
        public void ImageCoordsToMatrixCoords(double imgX, double imgY, out double mtxX, out double mtxY, CoordinateReference coorRef)
        {
            if (coorRef == CoordinateReference.TopLeftCorner)
            {
                double imgDX = (imgX - CenterXImage);
                double imgDY = (imgY - CenterYImage);

                mtxX = m_Matrix.CenterXMatrix + imgDX / m_MatrixToImageScaleX;
                mtxY = m_Matrix.CenterYMatrix + imgDY / m_MatrixToImageScaleY;
            }
            else
            {
                mtxX = imgX / m_MatrixToImageScaleX;
                mtxY = imgY / m_MatrixToImageScaleY;
            }
        }