예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="proxy"></param>
 public CvMatViewer(CvMatProxy proxy)
     : this()
 {
     this.proxy = proxy;
     data       = new CvScalar[proxy.Rows, proxy.Cols];
     for (int r = 0; r < proxy.Rows; r++)
     {
         for (int c = 0; c < proxy.Cols; c++)
         {
             data[r, c] = proxy.Data[r, c];
         }
     }
 }
예제 #2
0
        /// <summary>
        /// チャンネル数設定のComboBoxの初期化
        /// </summary>
        /// <param name="_proxy"></param>
        private void InitializeComboBox(CvMatProxy proxy)
        {
            ToolStripComboBox cb = toolStripComboBox_NChannels;

            cb.Items.Clear();
            cb.Items.Add("All channels");
            for (int i = 1; i <= proxy.ElemChannels; i++)
            {
                cb.Items.Add(string.Format("Channel {0}", i));
            }

            cb.SelectedIndex = 0;
        }
예제 #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="proxy"></param>
 public CvMatViewer(CvMatProxy proxy)
     : this()
 {
     this.proxy = proxy;
     data = new CvScalar[proxy.Rows, proxy.Cols];
     for (int r = 0; r < proxy.Rows; r++)
     {
         for (int c = 0; c < proxy.Cols; c++)
         {
             data[r, c] = proxy.Data[r, c];
         }
     }
 }
예제 #4
0
        /// <summary>
        /// DataGridViewを初期化
        /// </summary>
        /// <param name="proxy"></param>
        private void InitializeDataGridView(CvMatProxy proxy)
        {
            // 行数、列数の指定
            dataGridView.RowCount    = proxy.Rows;
            dataGridView.ColumnCount = proxy.Cols;

            // ヘッダセルの設定
            for (int i = 0; i < dataGridView.ColumnCount; i++)
            {
                DataGridViewColumn c = dataGridView.Columns[i];
                c.HeaderText = string.Format("Col {0}", i);
                c.SortMode   = DataGridViewColumnSortMode.NotSortable;  // 並び替え禁止
            }
            for (int i = 0; i < dataGridView.RowCount; i++)
            {
                DataGridViewRow r = dataGridView.Rows[i];
                r.HeaderCell.Value = string.Format("Row {0}", i);
            }
            dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);

            // 値の設定
            FillCellValue(0);
        }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 public CvMatViewer()
 {
     InitializeComponent();
     proxy = null;
     data  = null;
 }
예제 #6
0
 /// <summary>
 /// 
 /// </summary>
 public CvMatViewer()
 {
     InitializeComponent();
     proxy = null;
     data = null;
 }
예제 #7
0
        /// <summary>
        /// チャンネル数設定のComboBoxの初期化
        /// </summary>
        /// <param name="_proxy"></param>
        private void InitializeComboBox(CvMatProxy proxy)
        {
            ToolStripComboBox cb = toolStripComboBox_NChannels;
            cb.Items.Clear();
            cb.Items.Add("All channels");
            for (int i = 1; i <= proxy.ElemChannels; i++)
            {
                cb.Items.Add(string.Format("Channel {0}", i));
            }            

            cb.SelectedIndex = 0;
        }
예제 #8
0
        /// <summary>
        /// DataGridViewを初期化
        /// </summary>
        /// <param name="proxy"></param>
        private void InitializeDataGridView(CvMatProxy proxy)
        {
            // 行数、列数の指定
            dataGridView.RowCount = proxy.Rows;
            dataGridView.ColumnCount = proxy.Cols;

            // ヘッダセルの設定
            for (int i = 0; i < dataGridView.ColumnCount; i++)
            {
                DataGridViewColumn c = dataGridView.Columns[i];
                c.HeaderText = string.Format("Col {0}", i);
                c.SortMode = DataGridViewColumnSortMode.NotSortable;    // 並び替え禁止
            }
            for (int i = 0; i < dataGridView.RowCount; i++)
            {
                DataGridViewRow r = dataGridView.Rows[i];
                r.HeaderCell.Value = string.Format("Row {0}", i);
            }
            dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);

            // 値の設定
            FillCellValue(0);
        }