Defines an annotation redaction object.
public class AnnRedactionObject : AnnRectangleObject Public Class AnnRedactionObjectInherits Leadtools.Windows.Annotations.AnnRectangleObjectImplements Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle
public ref class AnnRedactionObject : public Leadtools.Windows.Annotations.AnnRectangleObject, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle The redaction annotation object is a rectangle with default properties that are appropriate for blacking out an area. The Realize method lets you block the area on the image with the current object brush value. The Restore method lets you restore the area back. For more information about the redaction annotation object refer to AnnRedactionObject for WPF. For more information about the automated redaction annotation object, refer to WPF Annotation Objects - Automated Features.
If you are interested in locking an object, refer to Implementing WPF Annotation Security.
This example creates a new redaction object, and then addes it to the container.
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnRedactionObject_AnnRedactionObject(ImageViewer viewer, AnnContainer container){AnnRedactionObject redaction = new AnnRedactionObject();redaction.Rect = new Rect(100, 100, 300, 300);container.Children.Add(redaction);MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// realize the redaction objectredaction.Realize(viewer);MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// remove the redaction object from the containercontainer.Children.Remove(redaction);MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count));// add the redaction object backcontainer.Children.Add(redaction);MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// restore the redaction objectredaction.Restore(viewer);MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// remove the redaction again from the containercontainer.Children.Remove(redaction);MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count));}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnRedactionObject_AnnRedactionObject(ByVal viewer As ImageViewer, ByVal container As AnnContainer)Dim redaction As AnnRedactionObject = New AnnRedactionObject()redaction.Rect = New Rect(100, 100, 300, 300)container.Children.Add(redaction)MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' realize the redaction objectredaction.Realize(viewer)MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' remove the redaction object from the containercontainer.Children.Remove(redaction)MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count))' add the redaction object backcontainer.Children.Add(redaction)MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' restore the redaction objectredaction.Restore(viewer)MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' remove the redaction again from the containercontainer.Children.Remove(redaction)MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count))End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;//using Leadtools.Help;private void AnnRedactionObject_AnnRedactionObject(ImageViewer viewer, AnnContainer container){AnnRedactionObject redaction = new AnnRedactionObject();redaction.Rect = new Rect(100, 100, 300, 300);container.Children.Add(redaction);MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// realize the redaction objectredaction.Realize(viewer);MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// remove the redaction object from the containercontainer.Children.Remove(redaction);MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count));// add the redaction object backcontainer.Children.Add(redaction);MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// restore the redaction objectredaction.Restore(viewer);MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count));// remove the redaction again from the containercontainer.Children.Remove(redaction);MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count));}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnRedactionObject_AnnRedactionObject(ByVal viewer As ImageViewer, ByVal container As AnnContainer)Dim redaction As AnnRedactionObject = New AnnRedactionObject()redaction.Rect = New Rect(100, 100, 300, 300)container.Children.Add(redaction)MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' realize the redaction objectredaction.Realize(viewer)MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' remove the redaction object from the containercontainer.Children.Remove(redaction)MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count))' add the redaction object backcontainer.Children.Add(redaction)MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' restore the redaction objectredaction.Restore(viewer)MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count))' remove the redaction again from the containercontainer.Children.Remove(redaction)MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count))End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
