示例#1
0
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            if (_final == null)
            {
                return;
            }
            if (HSIChoose.SelectedIndex == -1)
            {
                return;
            }
            if (HSIChoose.SelectedIndex == 3)
            {
                return;
            }

            _loading.Start();
            byte[,,] img = new byte[1, _final.GetLength(1), _final.GetLength(2)];

            RS_Lib.Stretch sth = new RS_Lib.Stretch(_final, HSIChoose.SelectedIndex);

            for (int j = 0; j < img.GetLength(1); j++)
            {
                for (int k = 0; k < img.GetLength(2); k++)
                {
                    img[0, j, k] = sth.StretchedBandData[j, k];
                }
            }

            MakeSingleImage(img, 0);
            _loading.Abort();
        }
示例#2
0
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            if (_final == null)
            {
                return;
            }

            _loading.Start();
            byte[,,] img = new byte[3, _final.GetLength(1), _final.GetLength(2)];

            for (int i = 0; i < 3; i++)
            {
                RS_Lib.Stretch sth = new RS_Lib.Stretch(_final, i);

                for (int j = 0; j < img.GetLength(1); j++)
                {
                    for (int k = 0; k < img.GetLength(2); k++)
                    {
                        img[i, j, k] = sth.StretchedBandData[j, k];
                    }
                }
            }

            MakeImage(img);
            _loading.Abort();
        }
示例#3
0
        // 2%拉伸
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            int[] mBands = { red.SelectedIndex, green.SelectedIndex, blue.SelectedIndex };
            _loading.Start();
            byte[,,] img = new byte[3, _img.GetLength(1), _img.GetLength(2)];

            for (int i = 0; i < 3; i++)
            {
                RS_Lib.Stretch sth = new RS_Lib.Stretch(_img, mBands[i]);

                for (int j = 0; j < img.GetLength(1); j++)
                {
                    for (int k = 0; k < img.GetLength(2); k++)
                    {
                        img[i, j, k] = sth.StretchedBandData[j, k];
                    }
                }
            }

            MakeImage(new[] { 0, 1, 2 }, img);
            _loading.Abort();
        }
示例#4
0
        // 2%拉伸
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            if (_final == null)
            {
                return;
            }

            _loading.Start();
            byte[,] img = new byte[_img.GetLength(1), _img.GetLength(2)];

            RS_Lib.Stretch sth = new RS_Lib.Stretch(_final[LayerChoice.SelectedIndex]);

            for (int j = 0; j < img.GetLength(0); j++)
            {
                for (int k = 0; k < img.GetLength(1); k++)
                {
                    img[j, k] = sth.StretchedBandData[j, k];
                }
            }

            MakeImage(img);
            _loading.Abort();
        }
示例#5
0
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            if (_final == null) return;
            if (HSIChoose.SelectedIndex == -1) return;
            if (HSIChoose.SelectedIndex == 3) return; 

            _loading.Start();
            byte[,,] img = new byte[1, _final.GetLength(1), _final.GetLength(2)];
            
            RS_Lib.Stretch sth = new RS_Lib.Stretch(_final, HSIChoose.SelectedIndex);

            for (int j = 0; j < img.GetLength(1); j++)
            {
                for (int k = 0; k < img.GetLength(2); k++)
                {
                    img[0, j, k] = sth.StretchedBandData[j, k];
                }
            }

            MakeSingleImage(img, 0);
            _loading.Abort();
        }
示例#6
0
        // 2%拉伸
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            int[] mBands = { red.SelectedIndex, green.SelectedIndex, blue.SelectedIndex };
            _loading.Start();
            byte[,,] img = new byte[3, _img.GetLength(1), _img.GetLength(2)];

            for (int i = 0; i < 3; i++)
            {
                RS_Lib.Stretch sth = new RS_Lib.Stretch(_img, mBands[i]);

                for (int j = 0; j < img.GetLength(1); j++)
                {
                    for (int k = 0; k < img.GetLength(2); k++)
                    {
                        img[i, j, k] = sth.StretchedBandData[j, k];
                    }
                }
            }

            MakeImage(new[] {0, 1, 2}, img);
            _loading.Abort();
        }
示例#7
0
文件: HSI.xaml.cs 项目: XXZZQQ/XZQ
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            if (_final == null) return;

            _loading.Start();
            byte[,,] img = new byte[3, _final.GetLength(1), _final.GetLength(2)];

            for (int i = 0; i < 3; i++)
            {
                RS_Lib.Stretch sth = new RS_Lib.Stretch(_final, i);

                for (int j = 0; j < img.GetLength(1); j++)
                {
                    for (int k = 0; k < img.GetLength(2); k++)
                    {
                        img[i, j, k] = sth.StretchedBandData[j, k];
                    }
                }
            }

            MakeImage(img);
            _loading.Abort();
        }
示例#8
0
        // 2%拉伸
        private void P2S_Click(object sender, RoutedEventArgs e)
        {
            if (_final == null) return;

            _loading.Start();
            byte[,] img = new byte[_img.GetLength(1), _img.GetLength(2)];

            RS_Lib.Stretch sth = new RS_Lib.Stretch(_final[LayerChoice.SelectedIndex]);

            for (int j = 0; j < img.GetLength(0); j++)
            {
                for (int k = 0; k < img.GetLength(1); k++)
                {
                    img[j, k] = sth.StretchedBandData[j, k];
                }
            }
            
            MakeImage(img);
            _loading.Abort();
        }