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

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

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

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

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

            base.Dispose(disposing);
        }
Beispiel #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]);
        }