コード例 #1
0
        public void TestImage()
        {
            if (ImageViewer.SelectedImageBox == null)
            {
                return;
            }

            try
            {
                var sphere = new EllipsoidPrimitive {
                    FrontTopLeft = new Vector3D(85, 85, 85), BackBottomRight = new Vector3D(115, 115, 115), Color = Color.Yellow
                };

                var image = new VtkTestPresentationImage();
                image.OverlayGraphics3D.Add(sphere);

                var dset = new DisplaySet {
                    Description = "blah", Name = "blah", Uid = Guid.NewGuid().ToString()
                };
                dset.PresentationImages.Add(image);

                ImageViewer.SelectedImageBox.DisplaySet = dset;
                ImageViewer.SelectedImageBox.Draw();
            }
            catch (Exception ex)
            {
                ExceptionHandler.Report(ex, Context.DesktopWindow);
            }
        }
コード例 #2
0
        /// <summary>
        /// Cloning constructor.
        /// </summary>
        /// <param name="source">The source object from which to clone.</param>
        /// <param name="context">The cloning context object.</param>
        protected VtkTestPresentationImage(VtkTestPresentationImage source, ICloningContext context)
            : base(source, context)
        {
            context.CloneFields(source, this);

            _frameReference = source._frameReference.Clone();
        }