示例#1
0
 public AutoFocusing(smbStage stage, smbCCD ccd, frmTIRF frm, ImageDrawer imgdrawer, int selectedchannel)
 {
     m_frm = frm;
     m_stage = stage;
     m_ccd = ccd;
     m_imgdrawer = imgdrawer;
     m_selectedchannel = selectedchannel;
 }
示例#2
0
        public ActiveDriftCorrection(int number_of_piezomirrors, double[] reference_position, ImageDrawer imgdrawer, PictureBox pb1, PictureBox pb2, PictureBox pbo)
        {
            m_refpos = reference_position;

            m_xyzstage = new smbStage(smbStage.StageType.PI_XYZNANOSTAGE);
            m_xyzstage.MoveToDist(29, 1);
            m_xyzstage.MoveToDist(29, 2);
            m_xyzstage.MoveToDist(9, 3);
            for (int i = 0; i < number_of_piezomirrors; i++) // Two piezomirrors
            {
                m_piezomirrors.Add(new smbStage(smbStage.StageType.PI_PIEZOMIRROR));
                m_piezomirrors[i].MoveToDist(1, 1);
                m_piezomirrors[i].MoveToDist(1, 2);
            }
            m_imgdrawer = imgdrawer;
            m_pbs[0] = pb1;
            m_pbs[1] = pb2;
            m_pbs[2] = pbo;
        }
示例#3
0
        public AutoFlow(smbCCD ccd, ImageDrawer imgdrawer, frmTIRF frm)
        {
            m_imgdrawer = imgdrawer;
            m_ccd = ccd;
            m_frm = frm;

            string[] ports = SerialPort.GetPortNames();
            foreach (string port in ports)
            {
                try
                {
                    m_pumps.Add(new smbPump(smbPump.pumpType.CHEMYX_FUSION, port));
                }
                catch
                {
                    try
                    {
                        m_pumps.Add(new smbPump(smbPump.pumpType.HARVARD_2000, port));
                    } catch {}
                }
            }
        }
示例#4
0
 public AutoMove(ImageDrawer imgdrawer, frmTIRF frm)
 {
     m_imgdrawer = imgdrawer;
     m_frm = frm;
     m_amstage = new smbStage(smbStage.StageType.ASI_MS2000);
 }
示例#5
0
文件: frmTIRF.cs 项目: pjb7687/single
        private void LoadAllSettings()
        {
            // Settings Related
            ComboBoxBinSize.SelectedIndex = Properties.Settings.Default.BinSizeIndex;
            ComboBoxZoomMode.SelectedIndex = Properties.Settings.Default.ZoomModeIndex;
            ComboBoxCCDModel.SelectedIndex = Properties.Settings.Default.CCDModelIndex;
            NUDImagingWidth.Value = Properties.Settings.Default.ImagingWidth;
            NUDImagingHeight.Value = Properties.Settings.Default.ImagingHeight;
            NUDCameraIndex.Value = Properties.Settings.Default.CameraIndex;
            ComboBoxImageRotation.SelectedIndex = Properties.Settings.Default.RotateImageIndex;
            TextBoxColortablePath.Text = Properties.Settings.Default.Colortable;

            if (m_ccd != null) m_ccd.Dispose();
            m_ccd = new smbCCD((smbCCD.CCDType)Properties.Settings.Default.CCDModelIndex, Properties.Settings.Default.CameraIndex);
            m_ccd.SetBinSize(Convert.ToInt32(ComboBoxBinSize.Items[Properties.Settings.Default.BinSizeIndex]));
            m_ccd.SetRange((int)NUDImagingWidth.Value, (int)NUDImagingHeight.Value);
            m_ccd.SetRotation(Properties.Settings.Default.RotateImageIndex);
            m_ccd.SetTemp(-85);

            switch (ComboBoxZoomMode.SelectedIndex)
            {
                case 0:
                    CCDWindow.SizeMode = PictureBoxSizeMode.CenterImage;
                    break;
                case 1:
                    CCDWindow.SizeMode = PictureBoxSizeMode.StretchImage;
                    break;
                case 2:
                    CCDWindow.SizeMode = PictureBoxSizeMode.Zoom;
                    break;
            }

            TextBoxPMAHead.Text = Properties.Settings.Default.PMAhead;
            TextBoxPMAPath.Text = Properties.Settings.Default.PMASavePath;

            ListViewLasers.Items.Clear();
            for (int i = 0; i < Properties.Settings.Default.Lasers.Count; i += 2)
                ListViewLasers.Items.Add(new ListViewItem(new string[] { Properties.Settings.Default.Lasers[i], Properties.Settings.Default.Lasers[i + 1] }));

            ListViewCounters.Items.Clear();
            for (int i = 0; i < Properties.Settings.Default.Counters.Count; i += 4)
                ListViewCounters.Items.Add(new ListViewItem(new string[] {Properties.Settings.Default.Counters[i],
                                                                          Properties.Settings.Default.Counters[i + 1],
                                                                          Properties.Settings.Default.Counters[i + 2],
                                                                          Properties.Settings.Default.Counters[i + 3]}));

            LaserCheckedListBox.Items.Clear();
            try
            {
                for (int i = 0; i < Properties.Settings.Default.Lasers.Count; i += 2)
                    AddLaserToListBox(Properties.Settings.Default.Lasers[i], Properties.Settings.Default.Lasers[i + 1]);

                ALEXCheckedListBox.Items.Clear();
                for (int i = 0; i < Properties.Settings.Default.Counters.Count; i += 4)
                    AddCounterBoardToListBox(Properties.Settings.Default.Counters[i],
                                             Properties.Settings.Default.Counters[i + 1],
                                             Properties.Settings.Default.Counters[i + 2],
                                             Properties.Settings.Default.Counters[i + 3]);
            }
            catch { }

            // Drawer Class
            m_imgdrawer = null;
            m_imgdrawer = new ImageDrawer(Properties.Settings.Default.Colortable, this, m_ccd);

            // PMA file path setting
            m_pmafiledir = Properties.Settings.Default.PMASavePath;
            m_pmafilenamehead = Properties.Settings.Default.PMAhead;
        }