当前位置: 首页>>代码示例>>C#>>正文


C# RequestInfo.ShowDialog方法代码示例

本文整理汇总了C#中RequestInfo.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# RequestInfo.ShowDialog方法的具体用法?C# RequestInfo.ShowDialog怎么用?C# RequestInfo.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RequestInfo的用法示例。


在下文中一共展示了RequestInfo.ShowDialog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: medianAndDivideToolStripMenuItem_Click

        private void medianAndDivideToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //RequestInfo
            ListView.SelectedIndexCollection indexes = this.listViewHeap.SelectedIndices;
            if (indexes.Count > 1)
            {
                MessageBox.Show("Too many images selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            RequestInfo RQuest = new RequestInfo();

            if (RQuest.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            int StartSigma = (int)RQuest.numericUpDownStartSigmaValue;
            int EndSigma = (int)RQuest.numericUpDownEndSigmaValue;
            float StepSigma = RQuest.numericUpDownSigmaStepValue;
            bool IsDisplayLevels = RQuest.checkBoxDisplayLevelsBool;
            Image3D CurrentIM = ((Image3D)(this.listViewHeap.Items[indexes[0]].Tag));

            Sequence ResSeq = new Sequence();
            int CurrentKernelSize;
            int HistoSize = 256;

            Console.WriteLine("Kernel Size");

            for (float CurrentSigma = StartSigma; CurrentSigma <= EndSigma; CurrentSigma += StepSigma)
            {
                CurrentKernelSize = (int)CurrentSigma;

                Image3D BlurredIM = new Image3D(CurrentIM.Width, CurrentIM.Height, CurrentIM.Depth, CurrentIM.NumBands);
                Image3D ResultIM = new Image3D(CurrentIM.Width, CurrentIM.Height, CurrentIM.Depth, CurrentIM.NumBands);

                for (int Channel = 0; Channel < CurrentIM.NumBands; Channel++)
                {
                    new IM.Library.Filtering.Median().Median2D_Huang(CurrentIM, Channel, BlurredIM, Channel, CurrentKernelSize, HistoSize, true);
                    new IM.Library.Mathematics.MathTools().Divide(ref ResultIM.Data[Channel], CurrentIM.Data[Channel], BlurredIM.Data[Channel]);
                }

                Console.WriteLine(CurrentKernelSize);
                //new IM.Library.Mathematics.MathTools().Multiply(ref ResultIM, ResultIM, 100.0f);

                AddImageToHeap(ResultIM, 0);
                indexes.Clear();
                ResSeq.Add(BlurredIM);
            }

            IMGlobal.AddSequence(ResSeq, "Denoised Images :(" + StartSigma + "..." + EndSigma + ")");
        }
开发者ID:cyrenaique,项目名称:HCSA,代码行数:52,代码来源:MainClassHeap.cs

示例2: gaussianToolStripMenuItem_Click

        private void gaussianToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //RequestInfo
            ListView.SelectedIndexCollection indexes = this.listViewHeap.SelectedIndices;
            if (indexes.Count > 1)
            {
                MessageBox.Show("Too many images selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            RequestInfo RQuest = new RequestInfo();

            if (RQuest.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            float StartSigma = RQuest.numericUpDownStartSigmaValue;
            float EndSigma = RQuest.numericUpDownEndSigmaValue;
            float StepSigma = RQuest.numericUpDownSigmaStepValue;
            Image3D CurrentIM = ((Image3D)(this.listViewHeap.Items[indexes[0]].Tag));

            Sequence ResSeq = new Sequence();

            for (float CurrentSigma = StartSigma; CurrentSigma <= EndSigma; CurrentSigma += StepSigma)
            {
                Image3D BlurredIM = new Image3D(CurrentIM.Width, CurrentIM.Height, CurrentIM.Depth, CurrentIM.NumBands);
                for (int Channel = 0; Channel < CurrentIM.NumBands; Channel++)
                {
                    new Convolution().ConvolveFast(CurrentIM, Channel, BlurredIM, Channel, new IM.Library.Filtering.KernelMaker().MakeGaussianKernel(CurrentSigma),
                        new IM.Library.Filtering.KernelMaker().MakeGaussianKernel(CurrentSigma), IM.Library.BoundaryConditions.Mirror);
                }
                ResSeq.Add(BlurredIM);
            }

            IMGlobal.AddSequence(ResSeq, "Blurred Images :(" + StartSigma + "..." + EndSigma + ")");
        }
开发者ID:cyrenaique,项目名称:HCSA,代码行数:37,代码来源:MainClassHeap.cs


注:本文中的RequestInfo.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。