Exemplo n.º 1
0
        /// <summary>
        /// Parsing of files has been completed.
        /// </summary>
        private void OnFilesParsed()
        {
            WindowSettingsPanel.Configure(_stack.MinPixelIntensity, _stack.MaxPixelIntensity, _stack.WindowWidthPresets, _stack.WindowCenterPresets);
            WindowSettingsPanel.gameObject.SetActive(true);

            try
            {
                _segmentCache.InitializeSize(_stack.Width, _stack.Height, _stack.Slices);

                SegmentConfiguration.Initialize(_segmentCache, _stack.MinPixelIntensity, _stack.MaxPixelIntensity);

                Slice2DView.Initialize(_stack);

                _workIndicator.FinishedWork();
            }
            catch (Exception e)
            {
                GameObject.FindGameObjectWithTag("DebugText").GetComponent <Text>().text = e.ToString();
            }

            _segmentCache.InitializeTextures();
            SegmentConfiguration.transform.gameObject.SetActive(true);

            PreProcessData();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Removes the Workload at the given index and invokes the callback.
        /// </summary>
        /// <param name="index"></param>
        private void RemoveWorkload(int index)
        {
            var tuple = _currentWorkloads[index];

            tuple.Item3.Invoke(tuple.Item2);

            _currentWorkloads.RemoveAt(index);
            _workIndicator.FinishedWork();
        }