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

                IsValidPrior     = false;
                _uiThreadContext = uiThreadContext;
                _viewer          = viewer;
                LoadOnlineOnly   = false;
            }
        private void Select()
        {
            if (!this.Selected)
            {
                //Platform.CheckMemberIsSet(this.DisplaySet, "ImageBox.DisplaySet");
                Platform.CheckMemberIsSet(this.ParentPhysicalWorkspace, "ImageBox.ParentPhysicalWorkspace");
                Platform.CheckMemberIsSet(this.ImageViewer, "ImageBox.ImageViewer");

                this.Selected = true;
                _parentPhysicalWorkspace.SelectedImageBox = this;
                this.ImageViewer.EventBroker.OnImageBoxSelected(new ImageBoxSelectedEventArgs(this));

                if (_displaySet != null)
                {
                    _displaySet.Selected = true;
                }
            }
            try
            {
                ImageViewerComponent view = this.ImageViewer as ImageViewerComponent;

                ActionModelNode node = view.ToolbarModel;

                ActionModelNode tempNode = null;
                IAction[]       action   = null;
                foreach (ActionModelNode tempnode in node.ChildNodes)
                {
                    if (tempnode.PathSegment.ResourceKey == "ToolbarSynchronizeStacking")
                    {
                        tempNode = tempnode;
                        break;
                    }
                }
                if (tempNode != null)
                {
                    action = tempNode.GetActionsInOrder();
                }
                if ((action != null) && (action.Count() > 0))
                {
                    ButtonAction ac  = action[0] as ButtonAction;
                    ImageSop     sop = ((IImageSopProvider)this.TopLeftPresentationImage).ImageSop;
                    if (sop.Modality == "DX" || sop.Modality == "CR" || sop.Modality == "RF")
                    {
                        ac.Checked = false;
                    }
                    else
                    {
                        ac.Checked = true;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
        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;
            }
        }
Exemple #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);

            imageViewer.ParentDesktopObject = workspace;
            try
            {
                imageViewer.Layout();
            }
            catch (Exception)
            {
                workspace.Close();
                throw;
            }
        }
Exemple #6
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;
            }
        }
 /// <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);
 }
 public ViewerShortcutManager(ImageViewerComponent viewer)
 {
     _tools  = new Dictionary <ITool, ITool>();
     _viewer = viewer;
 }
 /// <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;
 }
Exemple #10
0
 public static void LaunchInSeparateWindow(ImageViewerComponent imageViewer)
 {
     Launch(imageViewer, new LaunchImageViewerArgs(WindowBehaviour.Separate));
 }
Exemple #11
0
 public static void LaunchInActiveWindow(ImageViewerComponent imageViewer)
 {
     Launch(imageViewer, new LaunchImageViewerArgs(WindowBehaviour.Single));
 }
Exemple #12
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);
        }
 public SingleStudyLoader(SynchronizationContext uiThreadContext, ImageViewerComponent viewer, StudyItem studyItem)
     : this(uiThreadContext, viewer)
 {
     _studyItem = studyItem;
 }
 public SingleStudyLoader(SynchronizationContext uiThreadContext, ImageViewerComponent viewer, LoadStudyArgs args)
     : this(uiThreadContext, viewer)
 {
     _args = args;
 }
 public MyStudyLoader(ImageViewerComponent view)
 {
     this._viewer = view;
 }