public ViewerNetworkDesirability(CnnNet network) : base(network.Width, network.Height, true) { Contract.Requires<ArgumentNullException>(network != null); _network = network; }
public ViewerManagerNetwork(CnnNet network) : base(network.Width, network.Height) { Contract.Requires<ArgumentNullException>(network != null); _network = network; _neuronIconDestRect = new Rect(0, 0, Resources.NeuronIdle.PixelWidth, Resources.NeuronIdle.PixelHeight); _neuronIconSourceRect = new Rect(0, 0, Resources.NeuronIdle.PixelWidth, Resources.NeuronIdle.PixelHeight); }
private void OnWindowLoaded(object sender, RoutedEventArgs e) { Network = new CnnNet(Constants.NetworkWidth, Constants.NetworkHeight); #region Viewer Network InitializeViewer(_viewerManager = new ViewerManagerNetwork(Network), new ViewerBase[] { _viewerDesirability = new ViewerNetworkDesirability(Network), _viewerUndesirability = new ViewerNetworkUndesirability(Network) }, ImageNetwork); _viewerManager.NeuronSelectedChanged += OnViewerManagerNeuronSelectedChanged; #endregion #region Viewer Axon Terminal Guidance Forces InitializeViewer (_viewerManagerAxonTerminal = new ViewerManager (Constants.AxonGuidanceForcesImageWidth, Constants.AxonGuidanceForcesImageHeight, true), new ViewerBase[] { _viewerAxonTerminalGuidanceForces = new ViewerGuidanceForce(Network.AxonGuidanceForces.ElementAt(0), ColorIndex.Green) }, ImageAxonTerminalGuidanceForces); #endregion #region Viewer Soma Guidance Forces InitializeViewer (_viewerManagerSoma = new ViewerManager (Constants.SomaGuidanceForcesImageWidth, Constants.SomaGuidanceForcesImageHeight, true), new ViewerBase[] { _viewerSomaDesirabilityMapGuidanceForce = new ViewerGuidanceForce(Network.SomaGuidanceForces.ElementAt(0), ColorIndex.Green) }, ImageSomaDesirabilityMapGuidanceForce); #endregion Network.ActiveNeuronGenerator = cboxGenerateInput.IsChecked.Value ? Network.NormalActiveNeuronGenerator : Network.BindedActiveNeuronGenerator; CompositionTarget.Rendering += OnCompositionTargetRendering; }