예제 #1
0
        private ImageViewerComponent CreateViewerComponent(StartViewerApplicationRequest request)
        {
            var keyImagesOnly = request.LoadStudyOptions != null && request.LoadStudyOptions.KeyImagesOnly;
            var excludePriors = request.LoadStudyOptions != null && request.LoadStudyOptions.ExcludePriors;

            if (keyImagesOnly)
            {
                var layoutManager = new ImageViewer.Layout.Basic.LayoutManager()
                {
                    LayoutHook = new KeyImageLayoutHook()
                };
                //override the KO options
                const string ko          = "KO";
                var          realOptions = new KeyImageDisplaySetCreationOptions(layoutManager.DisplaySetCreationOptions[ko]);
                layoutManager.DisplaySetCreationOptions[ko] = realOptions;


                if (excludePriors)
                {
                    return(new ImageViewerComponent(layoutManager, PriorStudyFinder.Null));
                }
                else
                {
                    return(new ImageViewerComponent(layoutManager));
                }
            }
            else
            {
                ImageViewer.Layout.Basic.LayoutManager layoutManager;

                layoutManager = new ImageViewer.Layout.Basic.LayoutManager()
                {
                    LayoutHook = (request.LoadStudyOptions != null && request.LoadStudyOptions.PreferredLayout != null)
                                ? new CustomLayoutHook(request.LoadStudyOptions.PreferredLayout.Rows, request.LoadStudyOptions.PreferredLayout.Columns)
                                : new CustomLayoutHook()
                };

                if (excludePriors)
                {
                    return(new ImageViewerComponent(layoutManager, PriorStudyFinder.Null));
                }
                else
                {
                    return(new ImageViewerComponent(layoutManager));
                }
            }
        }
예제 #2
0
	    private ImageViewerComponent CreateViewerComponent(StartViewerApplicationRequest request)
        {
            var keyImagesOnly = request.LoadStudyOptions != null && request.LoadStudyOptions.KeyImagesOnly;
            var excludePriors = request.LoadStudyOptions != null && request.LoadStudyOptions.ExcludePriors;

            if (keyImagesOnly)
            {
                var layoutManager = new ImageViewer.Layout.Basic.LayoutManager() { LayoutHook = new KeyImageLayoutHook() };
                //override the KO options
                const string ko = "KO";
                var realOptions = new KeyImageDisplaySetCreationOptions(layoutManager.DisplaySetCreationOptions[ko]);
                layoutManager.DisplaySetCreationOptions[ko] = realOptions;


                if (excludePriors)
                {
                    return new ImageViewerComponent(layoutManager, PriorStudyFinder.Null); 
                }
                else
                {
                    return new ImageViewerComponent(layoutManager);
                }
            }
            else
            {
                ImageViewer.Layout.Basic.LayoutManager layoutManager;

                layoutManager = new ImageViewer.Layout.Basic.LayoutManager()
                {
                    LayoutHook = (request.LoadStudyOptions!=null && request.LoadStudyOptions.PreferredLayout != null)
                                ? new CustomLayoutHook(request.LoadStudyOptions.PreferredLayout.Rows, request.LoadStudyOptions.PreferredLayout.Columns)
                                : new CustomLayoutHook()
                };
                
                if (excludePriors) 
                {
                    return new ImageViewerComponent(layoutManager, PriorStudyFinder.Null);
                }
                else
                {
                    return new ImageViewerComponent(layoutManager); 
                } 
            }


        }