Пример #1
0
 private void radioButton1_Checked(object sender, RoutedEventArgs e)
 {
     if (CameraExist)
     {
         experiment_.SetFullSensorRegion();
     }
 }
Пример #2
0
        ///////////////////////////////////////////////////////////////////////
        // Synchronous Full Frame Acquire
        ///////////////////////////////////////////////////////////////////////
        private void AcquireFullFrameSync(object sender, RoutedEventArgs e)
        {
            // Are we in a state we can do this?
            if (!ValidateAcquisition())
            {
                return;
            }

            // Get the experiment object
            IExperiment experiment = application_.Experiment;

            // Full Frame
            experiment.SetFullSensorRegion();

            int images = 3;
            int frames = 1;

            experiment.SetValue(ExperimentSettings.AcquisitionFramesToStore, frames);

            for (int i = 1; i <= images; i++)
            {
                // Capture 1 Frame
                IImageDataSet set = experiment.Capture(frames);

                // Stop processing if we do not have all frames
                if (set.Frames != frames)
                {
                    // Clean up the image data set
                    set.Dispose();

                    throw new ArgumentException("Frames are not equal");
                }

                // Get the data from the current frame
                Array imageData = set.GetFrame(0, frames - 1).GetData();

                //  Cache the frame
                IImageData imageFrame = set.GetFrame(0, frames - 1);

                PrintData(imageData, imageFrame, i, images);
            }
        }