Пример #1
0
        public void InitializeSOM()
        {
            pictureSOMWindow = new PictureSOMWindow.MainWindow();
            pictureSOMWindow.ShowDialog();
            _som = pictureSOMWindow.som;
            _somVisual = new SOMVisual(SOMVisualType.COMPETITION_LAYER_MAP, _som.Size,
                (int)canvas_CompetitionLayer.Width, (int)canvas_CompetitionLayer.Height, _som);
            canvas_CompetitionLayer.Children.Add(_somVisual);

            if (_som == null)
            {
                MessageBox.Show("SOM is null");
            }
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();
            // Initialize application setting for SOM and its visual
            _appSettings = new AppSettings();
            UpdateAppSettings();

            // Initialize SOM
            _som = new SOM(_appSettings);

            // Initialize visual for competition layer
            visualHost_CompetitionLayer = new SOMVisual(SOMVisualType.COMPETITION_LAYER_MAP, SOMConstants.NUM_NODES_ACROSS,
                (int)_appSettings.width, (int)_appSettings.height, _som);
            canvas_CompetitionLayer.Children.Add(visualHost_CompetitionLayer);

            // Initialize visual for error map
            visualHost_ErrorMap = new SOMVisual(SOMVisualType.ERROR_MAP, SOMConstants.NUM_NODES_ACROSS,
                (int)_appSettings.width, (int)_appSettings.height, _som);
            canvas_ErrorMap.Children.Add(visualHost_ErrorMap);

            // Initialize histograms
            for (int i = 0; i < SOMConstants.NUM_WEIGHTS; i++)
            {
                NeuronHistogram.DataItems.Add(new ColumnDataPoint());
                FeatureHistogram.DataItems.Add(new ColumnDataPoint());
            }

            CompositionTarget.Rendering += CompositionTarget_Rendering;
        }