예제 #1
0
        //Constructs the document and places it in the provided state
        public NuGenDocument(DigitizeState state)
        {
            listeners = new List <NuGenImageListener>();

            pointSets     = new NuGenPointSetCollection();
            segments      = new NuGenSegmentCollection();
            transform     = new NuGenScreenTranslate(this);
            gridDisplay   = new List <GridlineScreen>();
            digitizeState = state;
            matchSet      = new NuGenMatchSet(pointMatchSettings);

            //load all of the settings
            NuGenDefaultSettings rSettings = NuGenDefaultSettings.GetInstance();

            coordSettings      = rSettings.CoordSettings;
            exportSettings     = rSettings.ExportSettings;
            segmentSettings    = rSettings.SegmentSettings;
            pointMatchSettings = rSettings.PointMatchSettings;

            gridRemovalSettings             = rSettings.GridRemovalSettings;
            gridDisplaySettings.initialized = false;
            gridDisplaySettings.gridSetX    = rSettings.GridDisplayGridSetX;
            gridDisplaySettings.gridSetY    = rSettings.GridDisplayGridSetY;

            discretizeSettings  = rSettings.DiscretizeSettings;
            backgroundSelection = rSettings.BackgroundSelection;
        }
 void Start()
 {
     _backgroundSelection = FindObjectOfType <BackgroundSelection>();
     deathScreen          = deathScreen.GetComponent <Canvas>();
     retry = retry.GetComponent <Button>();
     deathScreen.enabled = false;
 }
예제 #3
0
        public void SetBackgroundView(BackgroundSelection sel)
        {
            ribbonButton9.IsPressed  = false;
            ribbonButton11.IsPressed = false;
            ribbonButton12.IsPressed = false;

            switch (sel)
            {
            case BackgroundSelection.BlankBackground:
                ribbonButton9.IsPressed = true; break;

            case BackgroundSelection.OriginalImage:
                ribbonButton12.IsPressed = true; break;

            case BackgroundSelection.ProcessedImage:
                ribbonButton11.IsPressed = true; break;
            }

            Refresh();
        }
예제 #4
0
 public void CheckedBackgroundOption(BackgroundSelection sel)
 {
     viewMenu.SetBackgroundView(sel);
 }
예제 #5
0
 public void CheckedBackgroundOption(BackgroundSelection sel)
 {
     menu.CheckedBackgroundOption(sel);
 }
예제 #6
0
 public void CheckedBackgroundOption(BackgroundSelection sel)
 {
     viewMenu.SetBackgroundView(sel);
 }
        public void LoadSettings()
        {
            sessionsSettings.initialDigitizeState = Settings.Default.SESSIONS_INITIALDIGITZESTATE;

            coordSettings.frame = Settings.Default.COORD_FRAME;
            coordSettings.xThetaScale = Settings.Default.COORD_XTHETASCALE;
            coordSettings.yRScale = Settings.Default.COORD_YRSCALE;
            coordSettings.thetaUnits = Settings.Default.COORD_THETAUNITS;

            exportSettings.pointsSelection = Settings.Default.EXPORT_POINTSSELECTION;
            exportSettings.layout = Settings.Default.EXPORT_LAYOUT;
            exportSettings.delimiters = Settings.Default.EXPORT_DELIMITERS;
            exportSettings.header = Settings.Default.EXPORT_HEADER;

            viewFileToolbar = Settings.Default.VIEW_FILETOOLBAR;
            viewSelectToolbar = Settings.Default.VIEW_SELECTTOOLBAR;
            viewImageScaleToolbar = Settings.Default.VIEW_IMAGESCALETOOLBAR;
            viewDigitizeCurvePointsToolbar = Settings.Default.VIEW_DIGITIZECURVEPOINTSTOOLBAR;
            viewDigitizeMeasurePointsToolbar = Settings.Default.VIEW_DIGITIZEMEASUREPOINTSTOOLBAR;
            viewZoomToolbar = Settings.Default.VIEW_ZOOMTOOLBAR;
            viewStatusBar = Settings.Default.VIEW_STATUSBAR;
            viewPoints = Settings.Default.VIEW_POINTS;
            viewBackground = Settings.Default.VIEW_BACKGROUND;
            viewCurveGeometry = Settings.Default.VIEW_CURVEGEOMETRY;
            viewMeasureGeometry = Settings.Default.VIEW_MEASUREGEOMETRY;

            powerMostSigMax = Settings.Default.MATH_POWERMOSTSIGMAX;
            powerMostSigMin = Settings.Default.MATH_POWERMOSTSIGMIN;
            doubleMin = Settings.Default.MATH_DOUBLEMIN;
            maxCommands = Settings.Default.MATH_MAXCOMMANDS;

            windowCurveSize.Width = Settings.Default.WINDOW_CURVE_WIDTH;
            windowCurveSize.Height = Settings.Default.WINDOW_CURVE_HEIGHT;
            windowCurvePosition.X = Settings.Default.WINDOW_CURVE_X;
            windowCurvePosition.Y = Settings.Default.WINDOW_CURVE_Y;

            windowMainSize.Width = Settings.Default.WINDOW_MAIN_WIDTH;
            windowMainSize.Height = Settings.Default.WINDOW_MAIN_HEIGHT;
            windowMainPosition.X = Settings.Default.WINDOW_MAIN_X;
            windowMainPosition.Y = Settings.Default.WINDOW_MAIN_Y;
            windowMainFontOverride = Settings.Default.WINDOW_MAIN_FONT_OVERRIDE;
            windowMainFontName = Settings.Default.WINDOW_MAIN_FONT_NAME;
            windowMainFontSize = Settings.Default.WINDOW_MAIN_FONT_SIZE;

            windowMeasureSize.Width = Settings.Default.WINDOW_MEASURE_WIDTH;
            windowMeasureSize.Height = Settings.Default.WINDOW_MEASURE_HEIGHT;
            windowMeasurePosition.X = Settings.Default.WINDOW_MEASURE_X;
            windowMeasurePosition.Y = Settings.Default.WINDOW_MEASURE_Y;

            segmentPointMinSeparation = Settings.Default.SEGMENT_POINTMINSEPARATION;
            segmentSettings.minPoints = Settings.Default.SEGMENT_MINPOINTS;
            segmentSettings.pointSeparation = Settings.Default.SEGMENT_POINTDEFAULTSEPARATION;
            segmentSettings.fillCorners = Settings.Default.SEGMENT_FILLCORNERS;
            segmentSettings.lineSize = Settings.Default.SEGMENT_LINESIZE;
            segmentSettings.lineColor = Settings.Default.SEGMENT_LINECOLOR;

            gridRemovalSettings.gridMesh.gridSetX = Settings.Default.GRID_REMOVAL_GRIDSETX;
            gridRemovalSettings.gridMesh.gridSetY = Settings.Default.GRID_REMOVAL_GRIDSETY;
            gridRemovalSettings.thinThickness = Settings.Default.GRID_REMOVAL_THINTHICKNESS;
            gridRemovalSettings.gridDistance = Settings.Default.GRID_REMOVAL_GRIDDISTANCE;
            gridRemovalSettings.color = Settings.Default.GRID_REMOVAL_COLOR;
            gridRemovalSettings.gapSeparation = Settings.Default.GRID_REMOVAL_GAPSEPARATION;
            gridRemovalSettings.foregroundThresholdLow = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDLOW;
            gridRemovalSettings.foregroundThresholdHigh = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDHIGH;

            gridDisplayGridSetX = Settings.Default.GRID_DISPLAY_GRIDSETX;
            gridDisplayGridSetY = Settings.Default.GRID_DISPLAY_GRIDSETY;

            pointMatchHighlightDiameter = Settings.Default.POINTMATCH_HIGHLIGHTDIAMETER;
            pointMatchHighlightLineSize = Settings.Default.POINTMATCH_HIGHLIGHTLINESIZE;
            pointMatchSettings.pointSeparation = Settings.Default.POINTMATCH_SEPARATIONDEFAULT;
            pointMatchSettings.pointSize = Settings.Default.POINTMATCH_SIZEDEFAULT;
            pointMatchSettings.acceptedColor = Settings.Default.POINTMATCH_ACCEPTEDCOLOR;
            pointMatchSettings.rejectedColor = Settings.Default.POINTMATCH_REJECTEDCOLOR;

            discretizeSettings.discretizeMethod = Settings.Default.DISCRETIZE_METHODDEFAULT;
            discretizeSettings.intensityThresholdLow = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDLOW;
            discretizeSettings.intensityThresholdHigh = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDHIGH;
            discretizeSettings.foregroundThresholdLow = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDLOW;
            discretizeSettings.foregroundThresholdHigh = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDHIGH;
            discretizeSettings.hueThresholdLow = Settings.Default.DISCRETIZE_HUE_THRESHOLDLOW;
            discretizeSettings.hueThresholdHigh = Settings.Default.DISCRETIZE_HUE_THRESHOLDHIGH;
            discretizeSettings.saturationThresholdLow = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDLOW;
            discretizeSettings.saturationThresholdHigh = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDHIGH;
            discretizeSettings.valueThresholdLow = Settings.Default.DISCRETIZE_VALUE_THRESHOLDLOW;
            discretizeSettings.valueThresholdHigh = Settings.Default.DISCRETIZE_VALUE_THRESHOLDHIGH;

            axesStyle.pointShape = Settings.Default.POINTSET_AXES_POINTSHAPE;
            axesStyle.pointSize = Settings.Default.POINTSET_AXES_POINTSIZE;
            axesStyle.pointLineSize = Settings.Default.POINTSET_AXES_POINTLINESIZE;
            axesStyle.pointLineColor = Settings.Default.POINTSET_AXES_POINTLINECOLOR;
            axesStyle.pointInColor = Settings.Default.POINTSET_AXES_POINTINCOLOR;
            axesStyle.lineSize = Settings.Default.POINTSET_AXES_LINESIZE;
            axesStyle.lineColor = Settings.Default.POINTSET_AXES_LINECOLOR;
            axesStyle.lineConnectAs = Settings.Default.POINTSET_AXES_LINECONNECTAS;

            scaleStyle.pointShape = Settings.Default.POINTSET_SCALE_POINTSHAPE;
            scaleStyle.pointSize = Settings.Default.POINTSET_SCALE_POINTSIZE;
            scaleStyle.pointLineSize = Settings.Default.POINTSET_SCALE_POINTLINESIZE;
            scaleStyle.pointLineColor = Settings.Default.POINTSET_SCALE_POINTLINECOLOR;
            scaleStyle.pointInColor = Settings.Default.POINTSET_SCALE_POINTINCOLOR;
            scaleStyle.lineSize = Settings.Default.POINTSET_SCALE_LINESIZE;
            scaleStyle.lineColor = Settings.Default.POINTSET_SCALE_LINECOLOR;
            scaleStyle.lineConnectAs = Settings.Default.POINTSET_SCALE_LINECONNECTAS;

            try
            {
                foreach (PointSetStyle style in Settings.Default.POINTSET_CURVES)
                {
                    curveStyles.Add(style);
                }

                foreach (PointSetStyle style in Settings.Default.POINTSET_MEASURES)
                {
                    measureStyles.Add(style);
                }
            }
            catch (InvalidCastException e)
            {
                //There were no default pointsets loaded.
            }
        }
예제 #8
0
        public void LoadSettings()
        {
            sessionsSettings.initialDigitizeState = Settings.Default.SESSIONS_INITIALDIGITZESTATE;

            coordSettings.frame       = Settings.Default.COORD_FRAME;
            coordSettings.xThetaScale = Settings.Default.COORD_XTHETASCALE;
            coordSettings.yRScale     = Settings.Default.COORD_YRSCALE;
            coordSettings.thetaUnits  = Settings.Default.COORD_THETAUNITS;

            exportSettings.pointsSelection = Settings.Default.EXPORT_POINTSSELECTION;
            exportSettings.layout          = Settings.Default.EXPORT_LAYOUT;
            exportSettings.delimiters      = Settings.Default.EXPORT_DELIMITERS;
            exportSettings.header          = Settings.Default.EXPORT_HEADER;

            viewFileToolbar                  = Settings.Default.VIEW_FILETOOLBAR;
            viewSelectToolbar                = Settings.Default.VIEW_SELECTTOOLBAR;
            viewImageScaleToolbar            = Settings.Default.VIEW_IMAGESCALETOOLBAR;
            viewDigitizeCurvePointsToolbar   = Settings.Default.VIEW_DIGITIZECURVEPOINTSTOOLBAR;
            viewDigitizeMeasurePointsToolbar = Settings.Default.VIEW_DIGITIZEMEASUREPOINTSTOOLBAR;
            viewZoomToolbar                  = Settings.Default.VIEW_ZOOMTOOLBAR;
            viewStatusBar       = Settings.Default.VIEW_STATUSBAR;
            viewPoints          = Settings.Default.VIEW_POINTS;
            viewBackground      = Settings.Default.VIEW_BACKGROUND;
            viewCurveGeometry   = Settings.Default.VIEW_CURVEGEOMETRY;
            viewMeasureGeometry = Settings.Default.VIEW_MEASUREGEOMETRY;

            powerMostSigMax = Settings.Default.MATH_POWERMOSTSIGMAX;
            powerMostSigMin = Settings.Default.MATH_POWERMOSTSIGMIN;
            doubleMin       = Settings.Default.MATH_DOUBLEMIN;
            maxCommands     = Settings.Default.MATH_MAXCOMMANDS;

            windowCurveSize.Width  = Settings.Default.WINDOW_CURVE_WIDTH;
            windowCurveSize.Height = Settings.Default.WINDOW_CURVE_HEIGHT;
            windowCurvePosition.X  = Settings.Default.WINDOW_CURVE_X;
            windowCurvePosition.Y  = Settings.Default.WINDOW_CURVE_Y;

            windowMainSize.Width   = Settings.Default.WINDOW_MAIN_WIDTH;
            windowMainSize.Height  = Settings.Default.WINDOW_MAIN_HEIGHT;
            windowMainPosition.X   = Settings.Default.WINDOW_MAIN_X;
            windowMainPosition.Y   = Settings.Default.WINDOW_MAIN_Y;
            windowMainFontOverride = Settings.Default.WINDOW_MAIN_FONT_OVERRIDE;
            windowMainFontName     = Settings.Default.WINDOW_MAIN_FONT_NAME;
            windowMainFontSize     = Settings.Default.WINDOW_MAIN_FONT_SIZE;

            windowMeasureSize.Width  = Settings.Default.WINDOW_MEASURE_WIDTH;
            windowMeasureSize.Height = Settings.Default.WINDOW_MEASURE_HEIGHT;
            windowMeasurePosition.X  = Settings.Default.WINDOW_MEASURE_X;
            windowMeasurePosition.Y  = Settings.Default.WINDOW_MEASURE_Y;

            segmentPointMinSeparation       = Settings.Default.SEGMENT_POINTMINSEPARATION;
            segmentSettings.minPoints       = Settings.Default.SEGMENT_MINPOINTS;
            segmentSettings.pointSeparation = Settings.Default.SEGMENT_POINTDEFAULTSEPARATION;
            segmentSettings.fillCorners     = Settings.Default.SEGMENT_FILLCORNERS;
            segmentSettings.lineSize        = Settings.Default.SEGMENT_LINESIZE;
            segmentSettings.lineColor       = Settings.Default.SEGMENT_LINECOLOR;

            gridRemovalSettings.gridMesh.gridSetX       = Settings.Default.GRID_REMOVAL_GRIDSETX;
            gridRemovalSettings.gridMesh.gridSetY       = Settings.Default.GRID_REMOVAL_GRIDSETY;
            gridRemovalSettings.thinThickness           = Settings.Default.GRID_REMOVAL_THINTHICKNESS;
            gridRemovalSettings.gridDistance            = Settings.Default.GRID_REMOVAL_GRIDDISTANCE;
            gridRemovalSettings.color                   = Settings.Default.GRID_REMOVAL_COLOR;
            gridRemovalSettings.gapSeparation           = Settings.Default.GRID_REMOVAL_GAPSEPARATION;
            gridRemovalSettings.foregroundThresholdLow  = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDLOW;
            gridRemovalSettings.foregroundThresholdHigh = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDHIGH;

            gridDisplayGridSetX = Settings.Default.GRID_DISPLAY_GRIDSETX;
            gridDisplayGridSetY = Settings.Default.GRID_DISPLAY_GRIDSETY;

            pointMatchHighlightDiameter        = Settings.Default.POINTMATCH_HIGHLIGHTDIAMETER;
            pointMatchHighlightLineSize        = Settings.Default.POINTMATCH_HIGHLIGHTLINESIZE;
            pointMatchSettings.pointSeparation = Settings.Default.POINTMATCH_SEPARATIONDEFAULT;
            pointMatchSettings.pointSize       = Settings.Default.POINTMATCH_SIZEDEFAULT;
            pointMatchSettings.acceptedColor   = Settings.Default.POINTMATCH_ACCEPTEDCOLOR;
            pointMatchSettings.rejectedColor   = Settings.Default.POINTMATCH_REJECTEDCOLOR;

            discretizeSettings.discretizeMethod        = Settings.Default.DISCRETIZE_METHODDEFAULT;
            discretizeSettings.intensityThresholdLow   = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDLOW;
            discretizeSettings.intensityThresholdHigh  = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDHIGH;
            discretizeSettings.foregroundThresholdLow  = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDLOW;
            discretizeSettings.foregroundThresholdHigh = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDHIGH;
            discretizeSettings.hueThresholdLow         = Settings.Default.DISCRETIZE_HUE_THRESHOLDLOW;
            discretizeSettings.hueThresholdHigh        = Settings.Default.DISCRETIZE_HUE_THRESHOLDHIGH;
            discretizeSettings.saturationThresholdLow  = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDLOW;
            discretizeSettings.saturationThresholdHigh = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDHIGH;
            discretizeSettings.valueThresholdLow       = Settings.Default.DISCRETIZE_VALUE_THRESHOLDLOW;
            discretizeSettings.valueThresholdHigh      = Settings.Default.DISCRETIZE_VALUE_THRESHOLDHIGH;

            axesStyle.pointShape     = Settings.Default.POINTSET_AXES_POINTSHAPE;
            axesStyle.pointSize      = Settings.Default.POINTSET_AXES_POINTSIZE;
            axesStyle.pointLineSize  = Settings.Default.POINTSET_AXES_POINTLINESIZE;
            axesStyle.pointLineColor = Settings.Default.POINTSET_AXES_POINTLINECOLOR;
            axesStyle.pointInColor   = Settings.Default.POINTSET_AXES_POINTINCOLOR;
            axesStyle.lineSize       = Settings.Default.POINTSET_AXES_LINESIZE;
            axesStyle.lineColor      = Settings.Default.POINTSET_AXES_LINECOLOR;
            axesStyle.lineConnectAs  = Settings.Default.POINTSET_AXES_LINECONNECTAS;

            scaleStyle.pointShape     = Settings.Default.POINTSET_SCALE_POINTSHAPE;
            scaleStyle.pointSize      = Settings.Default.POINTSET_SCALE_POINTSIZE;
            scaleStyle.pointLineSize  = Settings.Default.POINTSET_SCALE_POINTLINESIZE;
            scaleStyle.pointLineColor = Settings.Default.POINTSET_SCALE_POINTLINECOLOR;
            scaleStyle.pointInColor   = Settings.Default.POINTSET_SCALE_POINTINCOLOR;
            scaleStyle.lineSize       = Settings.Default.POINTSET_SCALE_LINESIZE;
            scaleStyle.lineColor      = Settings.Default.POINTSET_SCALE_LINECOLOR;
            scaleStyle.lineConnectAs  = Settings.Default.POINTSET_SCALE_LINECONNECTAS;

            try
            {
                foreach (PointSetStyle style in Settings.Default.POINTSET_CURVES)
                {
                    curveStyles.Add(style);
                }

                foreach (PointSetStyle style in Settings.Default.POINTSET_MEASURES)
                {
                    measureStyles.Add(style);
                }
            }
            catch (InvalidCastException e)
            {
                //There were no default pointsets loaded.
            }
        }
예제 #9
0
 public void CheckedBackgroundOption(BackgroundSelection sel)
 {
     menu.CheckedBackgroundOption(sel);
 }
예제 #10
0
        //Deserialization constructor.
        public NuGenDocument(SerializationInfo info, StreamingContext ctxt)
        {
            backgroundSelection = (BackgroundSelection)info.GetValue("backgroundSelection", typeof(BackgroundSelection));
            originalImage       = (Image)info.GetValue("originalImage", typeof(Image));

            title = (string)info.GetValue("title", typeof(string));

            digitizeState = (DigitizeState)info.GetValue("digitizeState", typeof(DigitizeState));

            currentCurveName   = (string)info.GetValue("curveCmbText", typeof(string));
            currentMeasureName = (string)info.GetValue("measureCmbText", typeof(string));

            coordSettings.frame       = (ReferenceFrame)info.GetValue("coordSettings.frame", typeof(ReferenceFrame));
            coordSettings.thetaUnits  = (ThetaUnits)info.GetValue("coordSettings.thetaUnits", typeof(ThetaUnits));
            coordSettings.xThetaScale = (Scale)info.GetValue("coordSettings.xThetaScale", typeof(Scale));
            coordSettings.yRScale     = (Scale)info.GetValue("coordSettings.yRScale", typeof(Scale));

            exportSettings.delimiters      = (ExportDelimiters)info.GetValue("exportSettings.delimiters", typeof(ExportDelimiters));
            exportSettings.layout          = (ExportLayout)info.GetValue("exportSettings.layout", typeof(ExportLayout));
            exportSettings.pointsSelection = (ExportPointsSelection)info.GetValue("exportSettings.pointsSelection", typeof(ExportPointsSelection));
            exportSettings.header          = (ExportHeader)info.GetValue("exportSettings.header", typeof(ExportHeader));

            gridRemovalSettings.removeThinLines      = (bool)info.GetValue("gridRemovalSettings.removeThinLines", typeof(bool));
            gridRemovalSettings.thinThickness        = (double)info.GetValue("gridRemovalSettings.thinThickness", typeof(double));
            gridRemovalSettings.removeGridlines      = (bool)info.GetValue("gridRemovalSettings.removeGridlines", typeof(bool));
            gridRemovalSettings.gridMesh.initialized = (bool)info.GetValue("gridRemovalSettings.gridMesh.initialized", typeof(bool));
            gridRemovalSettings.gridMesh.countX      = (int)info.GetValue("gridRemovalSettings.gridMesh.countX", typeof(int));
            gridRemovalSettings.gridMesh.countY      = (int)info.GetValue("gridRemovalSettings.gridMesh.countY", typeof(int));
            gridRemovalSettings.gridMesh.gridSetX    = (GridSet)info.GetValue("gridRemovalSettings.gridMesh.gridSetX", typeof(GridSet));
            gridRemovalSettings.gridMesh.gridSetY    = (GridSet)info.GetValue("gridRemovalSettings.gridMesh.gridSetY", typeof(GridSet));
            gridRemovalSettings.gridMesh.startX      = (double)info.GetValue("gridRemovalSettings.gridMesh.startX", typeof(double));
            gridRemovalSettings.gridMesh.startY      = (double)info.GetValue("gridRemovalSettings.gridMesh.startY", typeof(double));
            gridRemovalSettings.gridMesh.stepX       = (double)info.GetValue("gridRemovalSettings.gridMesh.stepX", typeof(double));
            gridRemovalSettings.gridMesh.stepY       = (double)info.GetValue("gridRemovalSettings.gridMesh.stepY", typeof(double));
            gridRemovalSettings.gridMesh.stopX       = (double)info.GetValue("gridRemovalSettings.gridMesh.stopX", typeof(double));
            gridRemovalSettings.gridMesh.stopY       = (double)info.GetValue("gridRemovalSettings.gridMesh.stopY", typeof(double));
            gridRemovalSettings.gridDistance         = (double)info.GetValue("gridRemovalSettings.gridDistance", typeof(double));
            gridRemovalSettings.removeColor          = (bool)info.GetValue("gridRemovalSettings.removeColor", typeof(bool));
            gridRemovalSettings.color = (Color)info.GetValue("gridRemovalSettings.color", typeof(Color));
            gridRemovalSettings.foregroundThresholdLow  = (int)info.GetValue("gridRemovalSettings.foregroundThresholdLow", typeof(int));
            gridRemovalSettings.foregroundThresholdHigh = (int)info.GetValue("gridRemovalSettings.foregroundThresholdHigh", typeof(int));
            gridRemovalSettings.gapSeparation           = (double)info.GetValue("gridRemovalSettings.gapSeparation", typeof(double));

            gridDisplaySettings.initialized = (bool)info.GetValue("gridDisplaySettings.initialized", typeof(bool));
            gridDisplaySettings.countX      = (int)info.GetValue("gridDisplaySettings.countX", typeof(int));
            gridDisplaySettings.countY      = (int)info.GetValue("gridDisplaySettings.countY", typeof(int));
            gridDisplaySettings.gridSetX    = (GridSet)info.GetValue("gridDisplaySettings.gridSetX", typeof(GridSet));
            gridDisplaySettings.gridSetY    = (GridSet)info.GetValue("gridDisplaySettings.gridSetY", typeof(GridSet));
            gridDisplaySettings.startX      = (double)info.GetValue("gridDisplaySettings.startX", typeof(double));
            gridDisplaySettings.startY      = (double)info.GetValue("gridDisplaySettings.startY", typeof(double));
            gridDisplaySettings.stepX       = (double)info.GetValue("gridDisplaySettings.stepX", typeof(double));
            gridDisplaySettings.stepY       = (double)info.GetValue("gridDisplaySettings.stepY", typeof(double));
            gridDisplaySettings.stopX       = (double)info.GetValue("gridDisplaySettings.stopX", typeof(double));
            gridDisplaySettings.stopY       = (double)info.GetValue("gridDisplaySettings.stopY", typeof(double));

            segmentSettings.minPoints       = (int)info.GetValue("segmentSettings.minPoints", typeof(int));
            segmentSettings.pointSeparation = (int)info.GetValue("segmentSettings.pointSeparation", typeof(int));
            segmentSettings.lineSize        = (LineSize)info.GetValue("segmentSettings.lineSize", typeof(LineSize));
            segmentSettings.lineColor       = (Color)info.GetValue("segmentSettings.lineColor", typeof(Color));

            pointMatchSettings.pointSeparation = (int)info.GetValue("pointMatchSettings.pointSeparation", typeof(int));
            pointMatchSettings.pointSize       = (int)info.GetValue("pointMatchSettings.pointSize", typeof(int));
            pointMatchSettings.acceptedColor   = (Color)info.GetValue("pointMatchSettings.acceptedColor", typeof(Color));
            pointMatchSettings.rejectedColor   = (Color)info.GetValue("pointMatchSettings.rejectedColor", typeof(Color));

            discretizeSettings.discretizeMethod        = (DiscretizeMethod)info.GetValue("discretizeSettings.discretizeMethod", typeof(DiscretizeMethod));
            discretizeSettings.intensityThresholdLow   = (int)info.GetValue("discretizeSettings.intensityThresholdLow", typeof(int));
            discretizeSettings.intensityThresholdHigh  = (int)info.GetValue("discretizeSettings.intensityThresholdHigh", typeof(int));
            discretizeSettings.foregroundThresholdLow  = (int)info.GetValue("discretizeSettings.foregroundThresholdLow", typeof(int));
            discretizeSettings.foregroundThresholdHigh = (int)info.GetValue("discretizeSettings.foregroundThresholdHigh", typeof(int));
            discretizeSettings.hueThresholdLow         = (int)info.GetValue("discretizeSettings.hueThresholdLow", typeof(int));
            discretizeSettings.hueThresholdHigh        = (int)info.GetValue("discretizeSettings.hueThresholdHigh", typeof(int));
            discretizeSettings.saturationThresholdLow  = (int)info.GetValue("discretizeSettings.saturationThresholdLow", typeof(int));
            discretizeSettings.saturationThresholdHigh = (int)info.GetValue("discretizeSettings.saturationThresholdHigh", typeof(int));
            discretizeSettings.valueThresholdLow       = (int)info.GetValue("discretizeSettings.valueThresholdLow", typeof(int));
            discretizeSettings.valueThresholdHigh      = (int)info.GetValue("discretizeSettings.valueThresholdHigh", typeof(int));

            pointSets = new NuGenPointSetCollection();

            PointSets.SerializeRead(info);

            saveFileExists           = true;
            dirtyAxesTransformation  = true;
            dirtyScaleTransformation = true;

            listeners = new List <NuGenImageListener>();

            segments    = new NuGenSegmentCollection();
            transform   = new NuGenScreenTranslate(this);
            gridDisplay = new List <GridlineScreen>();
            matchSet    = new NuGenMatchSet(pointMatchSettings);

            ProcessOriginialImage();
        }
예제 #11
0
        public void SetBackgroundView(BackgroundSelection sel)
        {
            ribbonButton9.IsPressed = false;
            ribbonButton11.IsPressed = false;
            ribbonButton12.IsPressed = false;

            switch (sel)
            {
                case BackgroundSelection.BlankBackground:
                    ribbonButton9.IsPressed = true; break;
                case BackgroundSelection.OriginalImage:
                    ribbonButton12.IsPressed = true; break;
                case BackgroundSelection.ProcessedImage:
                    ribbonButton11.IsPressed = true; break;
            }

            Refresh();
        }