Ejemplo n.º 1
0
        /// <summary>
        /// Invalidates the View model, causing rendering of all rendering contexts
        /// </summary>
        public void Invalidate()
        {
            Stopwatch sw = Stopwatch.StartNew();

            ImageRenderContext?.BeginRender();
            DoseRenderContext?.BeginRender();
            RoiRenderContext?.BeginRender();
            OverlayContext?.BeginRender();

            RenderImages(ImageRenderContext);
            RenderDoses(DoseRenderContext);
            RenderROIs(ImageRenderContext);
            RenderBeams(ImageRenderContext);
            RenderOverlays(OverlayContext);

            /*foreach(var vf in VectorFields)
             * {
             *  VectorRenderer.Render(vf, Camera, ImageRenderContext, new Rectd(0, 0, 1, 1));
             * }*/

            ImageRenderContext?.EndRender();
            DoseRenderContext?.EndRender();
            RoiRenderContext?.EndRender();
            OverlayContext?.EndRender();

            Camera.IsInvalidated = false;
            sw.Stop();

            //sOverlayContext?.DrawString("" + sw.ElapsedMilliseconds + " ms", 0, 0, 12, DicomColors.Yellow);
        }
Ejemplo n.º 2
0
 public void InvalidateOverlays()
 {
     OverlayContext.BeginRender();
     RenderOverlays(OverlayContext);
     OverlayContext.EndRender();
 }