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; } }
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; } }