Exemplo n.º 1
0
        private void btnIntegrationDetection_Click(object sender, EventArgs e)
        {
            nudNumFramesToBin.BackColor = SystemColors.Window;
            nudReferenceFrame.BackColor = SystemColors.Window;

            var provider = new LCFileImagePixelProvider(LCFile);

            var frm = new frmIntegrationDetection(provider, (int)LCFile.Header.MinFrame);
            frm.StartPosition = FormStartPosition.CenterParent;
            if (frm.ShowDialog(this) == DialogResult.OK &&
                frm.IntegratedFrames != null)
            {
                nudNumFramesToBin.Value = frm.IntegratedFrames.Interval;
                nudReferenceFrame.Value = frm.IntegratedFrames.StartingAtFrame;

                nudNumFramesToBin.BackColor = Color.Honeydew;
                nudReferenceFrame.BackColor = Color.Honeydew;
            }
        }
        private void btnDetectIntegration_Click(object sender, EventArgs e)
        {
            frmIntegrationDetection frm = new frmIntegrationDetection(m_VideoController, m_VideoController.CurrentFrameIndex);
            frm.StartPosition = FormStartPosition.CenterParent;
            DialogResult res = frm.ShowDialog(this);

            if (res == DialogResult.OK)
            {
                if (frm.IntegratedFrames != null)
                {
                    m_VideoAstrometry.MovingToFirstIntegratedFrame();
                    cbxInstDelayMode.SelectedIndex = 0; // Set delay type to automatic
                    nudIntegratedFrames.SetNUDValue(frm.IntegratedFrames.Interval);
                    m_VideoController.MoveToFrame(frm.IntegratedFrames.StartingAtFrame);

                    SyncTimeStampControlWithExpectedFrameTime();

                    btnDetectIntegration.Enabled = false;
                }
            }
            else if (res == DialogResult.Cancel)
            {
                if ((MovementExpectation)cbxExpectedMotion.SelectedIndex != MovementExpectation.Slow)
                {
                    MessageBox.Show(
                        this,
                        "When measuring fast moving objects it is absolutely essential to move the video to the first frame of an integration interval " +
                        "before starting the measurements. Press 'Cancel' now and ensure that you have manually positioned to the first frame of the next " +
                        "integration interval before you continue.",
                        "Warning",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Warning);
                }
            }
        }
Exemplo n.º 3
0
 private void miIntegrationDetection_Click(object sender, EventArgs e)
 {
     frmIntegrationDetection frm = new frmIntegrationDetection(m_VideoController, m_VideoController.CurrentFrameIndex);
     frm.StartPosition = FormStartPosition.CenterParent;
     frm.ShowDialog(this);
 }
Exemplo n.º 4
0
        private void btnDetectIntegrationRate_Click(object sender, EventArgs e)
        {
            var frm = new frmIntegrationDetection(m_VideoController, (int)nudFirstFrame.Value);
            frm.StartPosition = FormStartPosition.CenterParent;
            DialogResult res = frm.ShowDialog(this);

            if (res == DialogResult.OK)
            {
                if (frm.IntegratedFrames != null)
                {
                    nudIntegratedFrames.SetNUDValue(frm.IntegratedFrames.Interval);
                    nudStartingAtFrame.SetNUDValue(frm.IntegratedFrames.StartingAtFrame);

                    m_State = AavConfigState.ReadyToConvert;
                    var reinterlacedStream = m_VideoController.FramePlayer.Video as ReInterlacingVideoStream;
                    if (reinterlacedStream != null && (reinterlacedStream.Mode == ReInterlaceMode.ShiftOneField || reinterlacedStream.Mode == ReInterlaceMode.SwapFields))
                        rbFirstFieldBottom.Checked = true;
                    UpdateControlState();
                }
            }
            else if (res == DialogResult.Cancel)
            {
                m_VideoController.ShowMessageBox("This must be an integrated video with consistent and known integration rate in order to convert it to AAV.", "Tangra", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }