예제 #1
0
        public MedicalStateController(ImageRenderer imageRenderer, MedicalController medicalController)
        {
            this.imageRenderer = imageRenderer;

            imageProperties        = new ImageRendererProperties();
            imageProperties.Width  = 100;
            imageProperties.Height = 100;
            imageProperties.UseWindowBackgroundColor  = false;
            imageProperties.CustomBackgroundColor     = BACK_COLOR;
            imageProperties.AntiAliasingMode          = 2;
            imageProperties.UseActiveViewportLocation = true;
            imageProperties.OverrideLayers            = false;
            imageProperties.TransparentBackground     = true;
            imageProperties.ShowBackground            = false;
            imageProperties.ShowWatermark             = false;
            imageProperties.ShowUIUpdates             = false;

            this.medicalController = medicalController;
        }
예제 #2
0
        public void initializeControllers(BackgroundScene background, LicenseManager licenseManager)
        {
            //Background
            this.background     = background;
            this.LicenseManager = licenseManager;
            atlasPluginManager  = new AtlasPluginManager(this);
            atlasPluginManager.PluginLoadError += new Medical.AtlasPluginManager.PluginMessageDelegate(atlasPluginManager_PluginLoadError);
            atlasPluginManager.manageInstalledPlugins();

            clipboard = new SaveableClipboard();

            //Documents
            DocumentController = new DocumentController();

            //MDI Layout
            mdiLayout = new MDILayoutManager();

            //SceneView
            MyGUIInterface myGUI = MyGUIInterface.Instance;

            sceneViewController = new SceneViewController(mdiLayout, medicalController.EventManager, medicalController.MainTimer, medicalController.PluginManager.RendererPlugin.PrimaryWindow, myGUI.OgrePlatform.RenderManager, background);
            sceneViewController.WindowCreated         += sceneViewController_WindowCreated;
            sceneViewController.WindowDestroyed       += sceneViewController_WindowDestroyed;
            sceneViewController.DefaultBackgroundColor = new Color(0.274f, 0.274f, 0.274f);
            sceneStatsDisplayManager = new SceneStatsDisplayManager(sceneViewController, OgreInterface.Instance.OgrePrimaryWindow.OgreRenderTarget);
            sceneStatsDisplayManager.StatsVisible        = MedicalConfig.EngineConfig.ShowStatistics;
            MedicalConfig.EngineConfig.ShowStatsToggled += engineConfig => sceneStatsDisplayManager.StatsVisible = engineConfig.ShowStatistics;
            lightManager = PluginManager.Instance.RendererPlugin.createSceneViewLightManager();

            //Measurement grid
            measurementGrid = new MeasurementGrid("MeasurementGrid", sceneViewController);
            SceneUnloading += measurementGrid.sceneUnloading;
            SceneLoaded    += measurementGrid.sceneLoaded;

            //Image Renderer
            imageRenderer                       = new ImageRenderer(medicalController, sceneViewController, idleHandler);
            imageRenderer.Background            = background;
            imageRenderer.ImageRenderStarted   += measurementGrid.ScreenshotRenderStarted;
            imageRenderer.ImageRenderCompleted += measurementGrid.ScreenshotRenderCompleted;

            //Anatomy Controller
            anatomyController = new AnatomyController();

            //Medical states
            medicalStateController = new MedicalStateController(imageRenderer, medicalController);
            SceneLoaded           += medicalStateController.sceneLoaded;
            SceneUnloading        += medicalStateController.sceneUnloading;

            //Movement sequences
            movementSequenceController = new MovementSequenceController(medicalController);
            this.SceneLoaded          += movementSequenceController.sceneLoaded;
            musclePositionController   = new MusclePositionController(medicalController.MainTimer, this);

            SceneLoaded    += SleepyActorRepository.SceneLoaded;
            SceneUnloading += SleepyActorRepository.SceneUnloading;

            //Props
            propFactory = new PropFactory(this);

            //Timeline
            timelineController = new TimelineController(this);

            viewHostFactory = new MyGUIViewHostFactory(mdiLayout);
            mvcCore         = new AnomalousMvcCore(this, viewHostFactory);

            //Patient data
            patientDataController = new PatientDataController(this);

            //Tasks
            taskController = new TaskController();

            anatomyTaskManager = new AnatomyTaskManager(taskController, guiManager);

            //Coroutine
            Coroutine.SetTimer(medicalController.MainTimer);

            //Notifications
            notificationManager = new NotificationGUIManager();

            layerController = new LayerController();

            //Create virtual texture manager
            virtualTextureSceneViewLink = new VirtualTextureSceneViewLink(this);
        }