Пример #1
0
        /// <summary>
        /// The SimpleDatum constructor.
        /// </summary>
        /// <param name="data">Specifies the valuse data to fill the SimpleDatum with.</param>
        public SimpleDatum(Valuemap data)
        {
            m_nChannels      = data.Channels;
            m_nWidth         = data.Width;
            m_nHeight        = data.Height;
            m_nOriginalLabel = -1;
            m_nLabel         = -1;
            m_bIsRealData    = true;

            m_rgRealData = data.Values;
        }
Пример #2
0
        /// <summary>
        /// The constructorl
        /// </summary>
        /// <param name="data">Specifies another Realmap to copy.</param>
        public Valuemap(Valuemap data)
        {
            int nChannels = data.Channels;
            int nHeight   = data.Height;
            int nWidth    = data.Width;

            int nSize = nChannels * nHeight * nWidth;

            m_rgData         = new double[nSize];
            m_nChannels      = nChannels;
            m_nHeight        = nHeight;
            m_nWidth         = nWidth;
            m_nChannelOffset = nHeight * nWidth;

            Array.Copy(data.Values, m_rgData, nSize);
        }