Пример #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            FrameRate             = (double)nudFrameRate.Value;
            BitPix                = Convert.ToInt32(cbxBitPix.SelectedItem);
            UseEmbeddedTimeStamps = (SerUseTimeStamp)cbxTimeSource.SelectedIndex;

            TangraConfig.Settings.LastUsed.SerFileLastBitPix    = BitPix;
            TangraConfig.Settings.LastUsed.SerFileLastFrameRate = FrameRate;
            TangraConfig.Settings.Save();

            DialogResult = DialogResult.OK;
            Close();
        }
Пример #2
0
        private SERVideoStream(string fileName, double frameRate, int cameraBitPix, bool grayScaleRGB, SerUseTimeStamp useTimeStamp, Dictionary <int, DateTime> fireCaptureTimeStamps, SerTimeStampReference timeStampReference = SerTimeStampReference.MidFrame)
        {
            m_FileInfo = new SerFileInfo();

            byte[] observer   = new byte[40];
            byte[] instrument = new byte[40];
            byte[] telescope  = new byte[40];

            TangraCore.SEROpenFile(fileName, ref m_FileInfo, observer, instrument, telescope, false, grayScaleRGB);

            m_FileName = fileName;

            BitPix                  = cameraBitPix;
            FrameRate               = frameRate;
            MillisecondsPerFrame    = 1000.0 / frameRate;
            UseTimeStamp            = useTimeStamp;
            TimeStampReference      = timeStampReference;
            m_FireCaptureTimeStamps = fireCaptureTimeStamps;

            Observer   = Encoding.UTF8.GetString(observer).Trim();
            Instrument = Encoding.UTF8.GetString(instrument).Trim();
            Telescope  = Encoding.UTF8.GetString(telescope).Trim();

            HasTimeStamps            = false;
            HasUTCTimeStamps         = false;
            HasFireCaptureTimeStamps = false;

            if (useTimeStamp != SerUseTimeStamp.None)
            {
                HasFireCaptureTimeStamps = useTimeStamp == SerUseTimeStamp.FireCaptureLog;

                if (!HasFireCaptureTimeStamps)
                {
                    HasTimeStamps =
                        m_FileInfo.SequenceStartTimeHi != 0 &&
                        m_FileInfo.SequenceStartTimeHi >> 0x1F == 0;

                    HasUTCTimeStamps =
                        m_FileInfo.SequenceStartTimeUTCHi != 0 &&
                        m_FileInfo.SequenceStartTimeUTCHi >> 0x1F == 0;
                }
            }
        }
Пример #3
0
        private SERVideoStream(string fileName, double frameRate, int cameraBitPix, SerUseTimeStamp useTimeStamp, Dictionary<int, DateTime> fireCaptureTimeStamps)
        {
            m_FileInfo = new SerFileInfo();

            byte[] observer = new byte[40];
            byte[] instrument = new byte[40];
            byte[] telescope = new byte[40];

            TangraCore.SEROpenFile(fileName, ref m_FileInfo, observer, instrument, telescope, false);

            m_FileName = fileName;

            BitPix = cameraBitPix;
            FrameRate = frameRate;
            MillisecondsPerFrame = 1000 / frameRate;
            UseTimeStamp = useTimeStamp;
            m_FireCaptureTimeStamps = fireCaptureTimeStamps;

            Observer = Encoding.UTF8.GetString(observer).Trim();
            Instrument = Encoding.UTF8.GetString(instrument).Trim();
            Telescope = Encoding.UTF8.GetString(telescope).Trim();

            HasTimeStamps = false;
            HasUTCTimeStamps = false;
            HasFireCaptureTimeStamps = false;

            if (useTimeStamp != SerUseTimeStamp.None)
            {
                HasFireCaptureTimeStamps = useTimeStamp == SerUseTimeStamp.FireCaptureLog;

                if (!HasFireCaptureTimeStamps)
                {
                    HasTimeStamps =
                        m_FileInfo.SequenceStartTimeHi != 0 &&
                        m_FileInfo.SequenceStartTimeHi >> 0x1F == 0;

                    HasUTCTimeStamps =
                        m_FileInfo.SequenceStartTimeUTCHi != 0 &&
                        m_FileInfo.SequenceStartTimeUTCHi >> 0x1F == 0;
                }
            }
        }
Пример #4
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            FrameRate = (double) nudFrameRate.Value;
            BitPix = Convert.ToInt32(cbxBitPix.SelectedItem);
            UseEmbeddedTimeStamps = (SerUseTimeStamp) cbxTimeSource.SelectedIndex;

            TangraConfig.Settings.LastUsed.SerFileLastBitPix = BitPix;
            TangraConfig.Settings.LastUsed.SerFileLastFrameRate = FrameRate;
            TangraConfig.Settings.Save();

            DialogResult = DialogResult.OK;
            Close();
        }