Пример #1
0
 public RefractoCalibration()
 {
     InitializeComponent();
     mycamera = Tricam.createTricam();
     f        = Facade.getInstance();
     f.Subscribe(f.REFRACTO_CALCULATIONS_COMPLETE, new NotificationHandler(onRefractoCalculationsComplete)); //To save calibration file
     f.Subscribe(f.REFRACTO_SPOTS_DETECTED, new NotificationHandler(onSpotsDetected));                       //For autoCapture
     f.Subscribe(f.REFRACTO_FOCUSKNOB_STATUS, new NotificationHandler(onFocusKnobChanged));                  //to display proximity status
     f.Subscribe(f.SetRefractoCalibrationMode, new NotificationHandler(GetValuesFromNvram));
     //IsZeroPoint.Enabled = false;
     SaveCalib_btn.Enabled = false;
     if (!Globals.IsR1R2Mode)
     {
         mycamera.initLL(); //initialize Liquid lens
     }
     if (Globals.CameraInitialized)
     {
         Globals.nvramHelper.SetNvramValue(Nvram.NvramHelper.RoyalSettings.RefractoGain, (int)Refracto_Gain_Updown.Value);
         Globals.nvramHelper.SetNvramValue(Nvram.NvramHelper.RoyalSettings.DisplayCentreX, (int)DisplayCenter_X_UpDown.Value);
         Globals.nvramHelper.SetNvramValue(Nvram.NvramHelper.RoyalSettings.DisplayCentreY, (int)DisplayCenter_Y_UpDown.Value);
         Globals.currentSettings.royalSettings.DisplayCenter_X = (int)DisplayCenter_X_UpDown.Value;
         Globals.currentSettings.royalSettings.DisplayCenter_Y = (int)DisplayCenter_Y_UpDown.Value;
         Globals.currentSettings.royalSettings.AOI_X           = (int)AOI_X_UPDOWN.Value;
         Globals.currentSettings.royalSettings.AOI_Y           = (int)AOI_Y_UPDOWN.Value;
         Globals.currentSettings.royalSettings.Refracto_Gain   = (int)Refracto_Gain_Updown.Value;
     }
 }
Пример #2
0
 public Alignment()
 {
     tricam = Tricam.createTricam();
     f      = Facade.getInstance();
     f.Subscribe(f.Alignment_Image_Metrics, new NotificationHandler(CalculateImageMetrics));
     f.Subscribe(f.ApplyMask, new NotificationHandler(ApplyMask));
     ImageMetrics_Init();
 }
Пример #3
0
 public CameraAlignment()
 {
     InitializeComponent();
     tricam = Tricam.createTricam();
     f      = Facade.getInstance();
     gridValues_pbx.Image = Image.FromFile(@"Resources\CameraAlignment.png");
     f.Subscribe(f.CameraAlignmentMode, new NotificationHandler(SetCameraAlignmentMode));
     f.Subscribe(f.CameraAlignmentSaveReport, new NotificationHandler(saveReportCA));
 }
Пример #4
0
        public LensArtifactUI()
        {
            InitializeComponent();
            f = Facade.getInstance();
            f.Subscribe(f.GradingLive, new NotificationHandler(gradingLive));
            f.Subscribe(f.GradingStill, new NotificationHandler(gradingStill));
            f.Subscribe(f.LASaveReport, new NotificationHandler(saveReportLA));
            f.Subscribe(f.LensArtifactMeasurementMode, new NotificationHandler(LensArtifactMeasurementMode));
            f.Subscribe(f.LAchangeCoordinates, new NotificationHandler(LAchangeCoordinates));
            f.Subscribe("ManageControlsAfterSaveReport", new NotificationHandler(manageControlsAfterSaveReport));

            tricam             = Tricam.createTricam();
            LaCord_gbx.Enabled = false;
        }
Пример #5
0
        //for refracto table
        public DisplayArea()
        {
            InitializeComponent();
            tricam                  = Tricam.createTricam();
            facade                  = Facade.getInstance();
            overLay_pbx.Parent      = displayWindow_pbx;
            overLay_pbx.Dock        = DockStyle.Fill;
            overLay_pbx.BackColor   = Color.Transparent;
            ODoverlay_pbx.Parent    = overLay_pbx;
            ODoverlay_pbx.Dock      = DockStyle.Fill;
            ODoverlay_pbx.BackColor = Color.Transparent;
            facade.Subscribe(facade.SET_DISPLAY_AREA, new NotificationHandler(setDisplayArea));
            facade.Subscribe(facade.displayImage, new NotificationHandler(displayImage));
            facade.Subscribe(facade.DisplayCorrectedImage, new NotificationHandler(DisplayLACorrectedImage));
            facade.Subscribe(facade.REFRACTO_CAPTURE_START, new NotificationHandler(onRefractoCaptureStart));
            facade.Subscribe(facade.REFRACTO_CAPTURE_COMPLETE, new NotificationHandler(onRefractoCaptureComplete));
            facade.Subscribe(facade.GO_STANDBY, new NotificationHandler(standBy));
            facade.Subscribe(facade.REFRACTO_CALCULATIONS_COMPLETE, new NotificationHandler(onRefractionCalculation));//To display power after capture and calculation
            //facade.Subscribe(facade.REFRACTO_FOCUSKNOB_STATUS, new NotificationHandler(onFocusKnobChanged));
            facade.Subscribe(facade.REFRACTO_NO_OF_SPOTS, new NotificationHandler(onSpotsDetection));
            facade.Subscribe(facade.REFRACTO_CAPTURE_COMPLETE_INLIVE, new NotificationHandler(onRefractoCaptureCompleteInLive));
            facade.Subscribe(facade.Refracto_Retake, new NotificationHandler(RefractoRetake));//To display retake message on display area.
            facade.Subscribe(facade.SET_LACoordinates, new NotificationHandler(DrawCoordinates));
            facade.Subscribe(facade.Update_IlluminationGrid, new NotificationHandler(updateIlluminationGrid));
            facade.Subscribe(facade.RefreshGridLabels, new NotificationHandler(refreshGridLabels));
            //refracto table.
            bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);

            if (designMode == false)
            {
                initializeLang();
            }
            populateReadings();
            facade.Subscribe(facade.REFRACTO_CALCULATIONS_COMPLETE, new NotificationHandler(onRingCalculations));//To save power in datagridview

            //
            facade.Subscribe(facade.SetAoiLensArtifactMeasurement, new NotificationHandler(SetAOILensArtifact));
            if (Globals.isHighResolution)
            {
                Globals.WLRoiRect = new Rectangle(950, 450, 300, 500);
                prevroiRect       = new Rectangle(950, 450, 300, 500);
            }
            else
            {
                Globals.IRroiRect = new Rectangle(425, 225, 150, 250);;
                prevroiRect       = new Rectangle(425, 225, 150, 250);;
            }
            pbWidth  = displayWindow_pbx.Width;
            pbHeight = displayWindow_pbx.Height;
        }
        public MemoryLightTriggerTestUI()
        {
            InitializeComponent();
            tricam = Tricam.createTricam();
            f      = Facade.getInstance();
            cameraConnectedImage           = new Bitmap(@"Resources\GREENLED.png");
            cameraDisconnectedImage        = new Bitmap(@"Resources\redLED.png");
            TriggerImage                   = new Bitmap(@"Resources\GOLDLED.png");
            BlackLEDImage                  = new Bitmap(@"Resources\BLACKLED.png");
            FlashLightLUXValue_tbx.Enabled = false;

            f.Subscribe(f.SET_LATERALITY, new NotificationHandler(SetLaterality));
            f.Subscribe(f.SET_Trigger, new NotificationHandler(SetTrigger));
            f.Subscribe(f.SetMemoryTestMode, new NotificationHandler(SetMemoryTestMode));
            f.Subscribe(f.ManageLightOnOff, new NotificationHandler(lightOnOff));
        }
Пример #7
0
 public AlignmentUI()
 {
     InitializeComponent();
     tricam = Tricam.createTricam();
     f      = Facade.getInstance();
     f.Subscribe("Update_Image_Metrics_UI", new NotificationHandler(Update_Image_Metrics_UI));
     f.Subscribe("AlignmentSaveReport", new NotificationHandler(saveReportAlignment));
     f.Subscribe("FundusAlignmentMode", new NotificationHandler(FundusAlignmentMode));
     f.Subscribe("ManageControlsAfterSaveReport", new NotificationHandler(manageControlsAfterSaveReport));
     //f.Subscribe("ManageIlluminationGrid", new NotificationHandler(manageIlluminationGrid));
     if (alignment == null)
     {
         alignment = new Alignment();
     }
     covRange_lbl.Text = "(Recommended Value < 0.25)";
     peripheryToInnerRange_lbl.Text         = "(Recommended Value > 0.81)";
     SaveImage_IlluminationGrid_btn.Enabled = false;
     resume_btn.Enabled = false;
 }
Пример #8
0
        public void CalculateAvgBrightness(bool isIR)
        {
            Tricam tricam = Tricam.createTricam();

            if (isIR)
            {
                Globals.currentSettings.imageMetrics.Average_IR_Light_Intensity = imageMetrics.AverageIntensity;
                if (Globals.currentSettings.imageMetrics.Average_IR_Light_Intensity >= 70 && Globals.currentSettings.imageMetrics.Average_IR_Light_Intensity <= 73)
                {
                    Globals.currentSettings.imageMetrics.averageIntensityLabelColor_IR = Color.Green;
                }
                else
                {
                    Globals.currentSettings.imageMetrics.averageIntensityLabelColor_IR = Color.FromArgb(254, 0, 0);
                }
            }
            else
            {
                Globals.currentSettings.imageMetrics.Average_White_Light_Intensity = imageMetrics.AverageIntensity;
                if (tricam.isLiveMode())
                {
                    if (Globals.currentSettings.imageMetrics.Average_White_Light_Intensity >= 190 && Globals.currentSettings.imageMetrics.Average_White_Light_Intensity <= 200)
                    {
                        Globals.currentSettings.imageMetrics.averageIntensityLabelColor_WL = Color.Green;
                    }
                    else
                    {
                        Globals.currentSettings.imageMetrics.averageIntensityLabelColor_WL = Color.FromArgb(254, 0, 0);
                    }
                }
                else
                {
                    if (Globals.currentSettings.imageMetrics.Average_White_Light_Intensity >= 220 && Globals.currentSettings.imageMetrics.Average_White_Light_Intensity <= 230)
                    {
                        Globals.currentSettings.imageMetrics.averageIntensityLabelColor_WL = Color.Green;
                    }
                    else
                    {
                        Globals.currentSettings.imageMetrics.averageIntensityLabelColor_WL = Color.FromArgb(254, 0, 0);
                    }
                }
            }
        }
 public RefractoRingCalculation()
 {
     InitializeComponent();
     f      = Facade.getInstance();
     tricam = Tricam.createTricam();
 }