예제 #1
0
        public override void Initialize()
        {
            base.Initialize();

            _coordinator = SynchronizationToolCoordinator.Get(base.ImageViewer);
            _coordinator.SetSpatialLocatorTool(this);
        }
예제 #2
0
        public override void Initialize()
        {
            base.Initialize();

            _coordinator = SynchronizationToolCoordinator.Get(base.ImageViewer);
            _coordinator.SetReferenceLineTool(this);

            base.ImageViewer.EventBroker.ImageDrawing += OnImageDrawing;
        }
예제 #3
0
        protected override void Dispose(bool disposing)
        {
            base.ImageViewer.EventBroker.ImageDrawing -= OnImageDrawing;

            _coordinator.Release();
            _coordinator = null;
            _currentReferenceImagePlane = null;

            base.Dispose(disposing);
        }
예제 #4
0
        public override void Initialize()
        {
            base.Initialize();

            base.ImageViewer.EventBroker.DisplaySetChanging           += OnDisplaySetChanging;
            base.ImageViewer.EventBroker.DisplaySetChanged            += OnDisplaySetChanged;
            base.ImageViewer.PhysicalWorkspace.LayoutCompleted        += OnLayoutCompleted;
            SynchronizationToolSettingsHelper.Default.PropertyChanged += OnSynchronizationToolSettingsPropertyChanged;

            _coordinator = SynchronizationToolCoordinator.Get(base.ImageViewer);
            _coordinator.SetStackingSynchronizationTool(this);
        }
        public override void Initialize()
        {
            base.Initialize();

            _coordinator = SynchronizationToolCoordinator.Get(base.ImageViewer);
            _coordinator.SetReferenceLineTool(this);

            Context.Viewer.EventBroker.ImageBoxSelected   += OnImageBoxSelected;
            Context.Viewer.EventBroker.DisplaySetSelected += OnDisplaySetSelected;

            base.ImageViewer.EventBroker.ImageDrawing += OnImageDrawing;
        }
        public static SynchronizationToolCoordinator Get(IImageViewer viewer)
        {
            var coordinator = viewer.ExtensionData[typeof(ExtensionDataKey)] as SynchronizationToolCoordinator;

            if (coordinator == null)
            {
                viewer.ExtensionData[typeof(ExtensionDataKey)] = coordinator = new SynchronizationToolCoordinator(viewer);

                viewer.EventBroker.PresentationImageSelected += coordinator.OnPresentationImageSelected;
                viewer.EventBroker.TileSelected += coordinator.OnTileSelected;
            }

            ++coordinator._referenceCount;
            return(coordinator);
        }
        public static SynchronizationToolCoordinator Get(IImageViewer viewer)
        {
            if (!Coordinators.ContainsKey(viewer))
            {
                SynchronizationToolCoordinator coordinator = new SynchronizationToolCoordinator(viewer);

                viewer.EventBroker.PresentationImageSelected += coordinator.OnPresentationImageSelected;
                viewer.EventBroker.TileSelected += coordinator.OnTileSelected;

                Coordinators.Add(viewer, coordinator);
            }

            DicomImagePlane.InitializeCache();

            ++Coordinators[viewer]._referenceCount;
            return(Coordinators[viewer]);
        }