Esempio n. 1
0
 ///////////////////////////////////////////////////////////////////////
 public void Activate(ILightFieldApplication app)
 {
     // Capture Interface
     LightFieldApplication = app;
     toolBarState_         = null; // Forces it to be a button, true or false
                                   // would make it a checkbox
 }
Esempio n. 2
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;
            experiment_           = app.Experiment;
            menuEnabled_          = CheckSystem();
            processEnabled_       = false;

            // Create transformation object if we have a camera (via menu enabled)
            if (menuEnabled_)
            {
                CreateTransformationObject();
            }

            // Listen to region of interest result changed and re-compute the buffers to match the
            // region
            List <string> settings = new List <string>();

            settings.Add(CameraSettings.ReadoutControlRegionsOfInterestResult);
            experiment_.FilterSettingChanged(settings);
            experiment_.SettingChanged += experiment__SettingChanged;

            // Connect to experiment device changed (when camera is added this add-in is active, and
            // if a camera is removed then this add-in is disabled.
            experiment_.ExperimentUpdated += experiment__ExperimentUpdated;

            // Connect to the data received event
            experiment_.ImageDataSetReceived += experimentDataReady;
        }
Esempio n. 3
0
 ///////////////////////////////////////////////////////////////////////
 public void Activate(ILightFieldApplication app)
 {
     // Capture Interface
     LightFieldApplication = app;
     // Button Style
     toolBarState_ = null;
 }
 ///////////////////////////////////////////////////////////////////////
 // Constructor (Pull the experiment out of the app and store it for
 // use)
 ///////////////////////////////////////////////////////////////////////
 public AsynAcquireSample(ILightFieldApplication app)
 {
     InitializeComponent();
     application_ = app;
     experiment_  = application_.Experiment;
     fileManager_ = application_.FileManager;
 }
Esempio n. 5
0
        ///////////////////////////////////////////////////////////////////////////
        //
        ///////////////////////////////////////////////////////////////////////////
        public ExportSample(ILightFieldApplication application)
        {
            // Store the application for future reference
            application_ = application;

            // Initialize the window
            InitializeComponent();
        }
Esempio n. 6
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            // Build your controls
            control_ = new Acquire_Async_Sample.AsynAcquireSample(LightFieldApplication);
            ExperimentSettingElement = control_;
        }
Esempio n. 7
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            // Build your controls
            control_ = new LightFieldAddInSamples.Metadata_Sample.MetadataSample(LightFieldApplication);
            ExperimentSettingElement = control_;
        }
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            // Build your controls
            control_ = new LightFieldAddInSamples.Regions_Of_Interest_Sample.RegionControl(LightFieldApplication);
            ExperimentSettingElement = control_;
        }
Esempio n. 9
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            // Build your controls
            control_ = new ViewerSample(LightFieldApplication);
            ExperimentViewElement = control_;
        }
Esempio n. 10
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            // Build your controls
            control_                 = new Button();
            control_.Content         = "Acquire";
            control_.Click          += new RoutedEventHandler(control__Click);
            ExperimentSettingElement = control_;
        }
Esempio n. 11
0
        public RegionControl(ILightFieldApplication app)
        {
            application_ = app;
            InitializeComponent();

            // nab the experiment since we need it for everything
            experiment_ = application_.Experiment;

            bool bExist = CameraExist;

            // Set Full Chip
            FullChip.IsChecked = true;
        }
Esempio n. 12
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            ScrollViewer sv = new ScrollViewer();

            // Build your controls
            control_ = new Control_Gallery_Sample.ControlGallerySample();

            sv.Content            = control_;
            ExperimentViewElement = sv;//control_;
        }
Esempio n. 13
0
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Capture Interface
            LightFieldApplication = app;

            // Build your controls
            control_ = new ExperimentView(this);
            ExperimentViewElement = control_;

            // Simple button
            control2_                = new Button();
            control2_.Content        = "Push!";
            ExperimentSettingElement = control2_;
        }
Esempio n. 14
0
        ///////////////////////////////////////////////////////////////////////
        // Make a list of settings and set the filter to them as well
        // as hook the changed event.
        ///////////////////////////////////////////////////////////////////////
        public void Activate(ILightFieldApplication app)
        {
            // Set the add-ins discovery root directory to be the current directory
            string addinRoot = AppDomain.CurrentDomain.BaseDirectory;

            fullName_ = Path.Combine(addinRoot, "SettingSnoopSample.txt");

            theExperiment_ = app.Experiment;

            // Generate a filter with only the valid settings
            List <string> filteredSettings = new List <string>();

            // Load Up The Setting Strings
            IEnumerable <string> CameraSettings       = GetAllNames(typeof(CameraSettings));
            IEnumerable <string> ExperimentSettings   = GetAllNames(typeof(ExperimentSettings));
            IEnumerable <string> FilterSettings       = GetAllNames(typeof(FilterWheelSettings));
            IEnumerable <string> SpectrometerSettings = GetAllNames(typeof(SpectrometerSettings));

            // put them all into the filter
            // camera
            foreach (string str in CameraSettings)
            {
                filteredSettings.Add(str);
            }
            // experiment
            foreach (string str in ExperimentSettings)
            {
                filteredSettings.Add(str);
            }
            // filterWheel
            foreach (string str in FilterSettings)
            {
                filteredSettings.Add(str);
            }
            // spectrometer
            foreach (string str in SpectrometerSettings)
            {
                filteredSettings.Add(str);
            }

            // Connect the setting change handler
            theExperiment_.SettingChanged += new EventHandler <SettingChangedEventArgs>(Experiment_SettingChanged);

            // Apply the filter
            theExperiment_.FilterSettingChanged(filteredSettings);

            // Also Monitor System building events
            theExperiment_.ExperimentUpdating += Experiment_ExperimentUpdating;
            theExperiment_.ExperimentUpdated  += Experiment_ExperimentUpdated;
        }
        public PixisDeviceUserControl(ILightFieldApplication application, PixisAddIn controller)
        {
            controller_ = controller;
            app_        = application;

            InitializeComponent();

            connectButton.IsEnabled    = false;
            disconnectButton.IsEnabled = false;
            triggerCheckBox.IsChecked  = false;
            radioButtonNorth.IsEnabled = true;
            radioButtonEast.IsEnabled  = true;

            statusText = new StatusTextManager(aquireStatusLabel);
            statusText.setStatus(StatusTextManager.Status.Disconnected);
        }
        //////////////////////////////////////////////////////////////////////////////
        // Modal Dialog Constructor
        //////////////////////////////////////////////////////////////////////////////
        public SystemBuildingSampleControl(ILightFieldApplication app)
        {
            application_ = app;
            experiment_  = app.Experiment;

            InitializeComponent();

            // Initial Update
            RefreshListBoxes();

            // Connect to device changed event
            experiment_.AvailableDevicesChanged  += Experiment_DeviceChanged;
            experiment_.ExperimentDevicesChanged += Experiment_DeviceChanged;

            // When the window gets closed
            Closed += SystemBuildingSampleControl_Closed;
        }
Esempio n. 17
0
        public ViewerSample(ILightFieldApplication app)
        {
            application_ = app;
            InitializeComponent();

            // Create a LightField Style Display Viewer
            viewer_ = application_.DisplayManager.CreateDisplayViewerControl();
            ViewerControl.Children.Add(viewer_.Control);

            // Setup some of the properties for the viewer control
            viewer_.IsDisplayTypeSelectable = true;
            viewer_.IsLiveDataAvailable     = true;
            viewer_.SourceAvailability      = ImageDataSourceAvailability.Selectable;

            // Clear old and add live display
            viewer_.DisplayViewer.Clear();
            viewer_.DisplayViewer.Add(viewer_.DisplayViewer.LiveDisplaySource);
        }
Esempio n. 18
0
        ////////////////////////////////////////////////////////////////////////////////////
        // Constructor
        ////////////////////////////////////////////////////////////////////////////////////
        public DisplayControlsSample(ILightFieldApplication app)
        {
            // Cache Some Members
            application_ = app;
            display_     = application_.DisplayManager;

            // Initialize the WPF component
            InitializeComponent();

            // Setup Layout Mode Combo Box
            LayoutCombo.Items.Add(DisplayLayout.One);
            LayoutCombo.Items.Add(DisplayLayout.TwoHorizontal);
            LayoutCombo.Items.Add(DisplayLayout.TwoVertical);
            LayoutCombo.Items.Add(DisplayLayout.ThreeTopFavored);
            LayoutCombo.Items.Add(DisplayLayout.ThreeVertical);
            LayoutCombo.Items.Add(DisplayLayout.FourEven);
            LayoutCombo.Items.Add(DisplayLayout.FourTopFavored);
            LayoutCombo.Items.Add(DisplayLayout.FourVertical);
            LayoutCombo.Items.Add(DisplayLayout.FourLeftFavored);
            LayoutCombo.Items.Add(DisplayLayout.FiveTopFavored);
            LayoutCombo.Items.Add(DisplayLayout.FiveLeftFavored);

            // Defaults from application
            selectedLocation_ = display_.Location;
            selectedLayout_   = display_.ExperimentWorkspaceLayout;

            // Default Combo Boxes
            LayoutCombo.SelectedItem = selectedLayout_;

            // Experiment
            if (selectedLocation_ == DisplayLocation.ExperimentWorkspace)
            {
                LocationCombo.SelectedIndex = 0;
            }
            // Data Workspace
            else
            {
                LocationCombo.SelectedIndex = 1;
            }

            IndexCombo.SelectedIndex = 0;
        }
Esempio n. 19
0
        public MainWindow()
        {
            Cameras           = new List <CameraSetup>();
            OpenLightFields   = new List <OpenLightField>();
            IncrementFileName = 0;

            // Open one invisible instance of LightField
            var openLightField = new OpenLightField(this, visibleLightField: false);

            // return its automation object
            automation_ = openLightField.Auto;

            // return its experiment object
            experiment_ = openLightField.Experiment;

            // return its application object
            application_ = openLightField.Application;

            IsVisibleChanged += MainWindow_IsVisibleChanged;
        }
Esempio n. 20
0
 public MetadataSample(ILightFieldApplication application)
 {
     app_ = application;
     InitializeComponent();
     textBoxFrames.Text = "5";
 }
Esempio n. 21
0
 ///////////////////////////////////////////////////////////////////////
 public void Activate(ILightFieldApplication app)
 {
     // Capture Interface
     LightFieldApplication    = app;
     ExperimentSettingElement = userInterface;
 }
Esempio n. 22
0
 public AcquireSyncSample(ILightFieldApplication app)
 {
     InitializeComponent();
     application_ = app;
 }
Esempio n. 23
0
 public LightFieldController(ILightFieldApplication app, PixisAddIn controller)
 {
     controller_ = controller;
     application = app;
     imageCount  = 0;
 }