/////////////////////////////////////////////////////////////////////// // Override some typical settings and acquire an spe file with a // specific name. /////////////////////////////////////////////////////////////////////// private void control__Click(object sender, RoutedEventArgs e) { // Are we in a state where we can do this? if (!ValidateAcquisition()) { return; } // Get the experiment object IExperiment experiment = LightFieldApplication.Experiment; if (experiment != null) { // Not All Systems Have an Exposure Setting, if they do get the minimum and set it if (experiment.Exists(CameraSettings.ShutterTimingExposureTime)) { ISettingRange currentRange = experiment.GetCurrentRange(CameraSettings.ShutterTimingExposureTime); experiment.SetValue(CameraSettings.ShutterTimingExposureTime, currentRange.Minimum); } // Don't Attach Date/Time experiment.SetValue(ExperimentSettings.FileNameGenerationAttachDate, false); experiment.SetValue(ExperimentSettings.FileNameGenerationAttachTime, false); // Save file as Specific.Spe to the default directory experiment.SetValue(ExperimentSettings.FileNameGenerationBaseFileName, "Specific"); // Connnect the event handler acquireCompletedEventHandler_ = new EventHandler <ExperimentCompletedEventArgs>(exp_AcquisitionComplete); experiment.ExperimentCompleted += acquireCompletedEventHandler_; // Begin the acquisition experiment.Acquire(); } }
private void testAquire(int index) { // application.Experiment.Acquire(); // Are we in a state where we can do this? // if (!ValidateAcquisition()) // return; // Get the experiment object IExperiment experiment = application.Experiment; if (experiment != null) { // Not All Systems Have an Exposure Setting, if they do get the minimum and set it if (experiment.Exists(CameraSettings.ShutterTimingExposureTime)) { // ISettingRange currentRange = experiment.GetCurrentRange(CameraSettings.ShutterTimingExposureTime); // experiment.SetValue(CameraSettings.ShutterTimingExposureTime, currentRange.Minimum); } // Attach Date/Time to filename experiment.SetValue(ExperimentSettings.FileNameGenerationAttachDate, true); experiment.SetValue(ExperimentSettings.FileNameGenerationAttachTime, true); // Save file as Specific.Spe to the default directory experiment.SetValue(ExperimentSettings.FileNameGenerationBaseFileName, "SpecificZ"); // Connnect the event handler acquireCompletedEventHandler_ = new EventHandler <ExperimentCompletedEventArgs>(exp_AcquisitionComplete); experiment.ExperimentCompleted += acquireCompletedEventHandler_; // Begin the acquisition experiment.Acquire(); } }