Beispiel #1
0
 public AsynchronousPriorStudyLoader(ImageViewerComponent imageViewer, IPriorStudyFinder priorStudyFinder)
 {
     _imageViewer        = imageViewer;
     _singleStudyLoaders = new List <SingleStudyLoader>();
     _priorStudyFinder   = priorStudyFinder ?? PriorStudyFinder.Null;
     _priorStudyFinder.SetImageViewer(_imageViewer);
 }
Beispiel #2
0
            private SingleStudyLoader(SynchronizationContext uiThreadContext, ImageViewerComponent viewer)
            {
                Platform.CheckForNullReference(uiThreadContext, "uiThreadContext");

                IsValidPrior     = false;
                _uiThreadContext = uiThreadContext;
                _viewer          = viewer;
                LoadOnlineOnly   = false;
            }
Beispiel #3
0
        private static Macro.ImageViewer.IImageViewer CastToImageViewer(Workspace workspace)
        {
            Macro.ImageViewer.IImageViewer viewer = null;
            if (workspace != null)
            {
                viewer = ImageViewerComponent.GetAsImageViewer(workspace);
            }

            return(viewer);
        }
        private void OnWorkspaceActivated(object sender, ItemEventArgs <Workspace> e)
        {
            Workspace activeWorkspace = _desktopWindow.ActiveWorkspace;

            if (activeWorkspace == null)
            {
                this.ImageViewer = null;
            }
            else
            {
                IImageViewer imageViewer = ImageViewerComponent.GetAsImageViewer(activeWorkspace);
                this.ImageViewer = imageViewer;
            }
        }
Beispiel #5
0
        /// <summary>
        /// Launches the specified <see cref="ImageViewerComponent"/> using the <paramref name="window"/> parameter.
        /// </summary>
        public static void Launch(ImageViewerComponent imageViewer, IDesktopWindow window, string title)
        {
            IWorkspace workspace = LaunchAsWorkspace(window, imageViewer, title);

            workspace.Closed += delegate {
                imageViewer.Dispose();
            };
            try
            {
                imageViewer.Layout();
            }
            catch (Exception)
            {
                workspace.Close();
                throw;
            }
        }
Beispiel #6
0
 public SingleStudyLoader(SynchronizationContext uiThreadContext, ImageViewerComponent viewer, StudyItem studyItem)
     : this(uiThreadContext, viewer)
 {
     _studyItem = studyItem;
 }
Beispiel #7
0
 public SingleStudyLoader(SynchronizationContext uiThreadContext, ImageViewerComponent viewer, LoadStudyArgs args)
     : this(uiThreadContext, viewer)
 {
     _args = args;
 }
 public ViewerShortcutManager(ImageViewerComponent viewer)
 {
     _tools  = new Dictionary <ITool, ITool>();
     _viewer = viewer;
 }
 /// <summary>
 /// Initializes a new instance of <see cref="ImageViewerToolComponent"/>.
 /// </summary>
 protected ImageViewerToolComponent(IDesktopWindow desktopWindow)
 {
     Platform.CheckForNullReference(desktopWindow, "desktopWindow");
     _desktopWindow = desktopWindow;
     ImageViewer    = ImageViewerComponent.GetAsImageViewer(_desktopWindow.ActiveWorkspace);
 }
Beispiel #10
0
 /// <summary>
 /// Constructs a new <see cref="ImageViewerToolContext"/>.
 /// </summary>
 /// <param name="component">The <see cref="ImageViewerComponent"/> that owns the tools.</param>
 public ImageViewerToolContext(ImageViewerComponent component)
 {
     _component = component;
 }
Beispiel #11
0
 public static void LaunchInSeparateWindow(ImageViewerComponent imageViewer)
 {
     Launch(imageViewer, new LaunchImageViewerArgs(WindowBehaviour.Separate));
 }
Beispiel #12
0
 public static void LaunchInActiveWindow(ImageViewerComponent imageViewer)
 {
     Launch(imageViewer, new LaunchImageViewerArgs(WindowBehaviour.Single));
 }
Beispiel #13
0
        /// <summary>
        /// Launches the specified <see cref="ImageViewerComponent"/> using the parameters specified in <paramref name="launchArgs"/>.
        /// </summary>
        public static void Launch(ImageViewerComponent imageViewer, LaunchImageViewerArgs launchArgs)
        {
            IDesktopWindow window = GetLaunchWindow(launchArgs.WindowBehaviour);

            Launch(imageViewer, window, launchArgs.Title ?? imageViewer.PatientsLoadedLabel);
        }