VintaSoft Imaging .NET SDK 11.0
Vintasoft.Imaging.Annotation Namespace / AnnotationDataController Class
Members Example



In This Topic
    AnnotationDataController Class
    In This Topic
    Object Model
    AnnotationDataController ClassImageCollection ClassVintasoftImage ClassAnnotationDataCollection ClassAnnotationData Class
    Syntax
    'Declaration
     
    <DefaultMemberAttribute("Item")>
    Public NotInheritable Class AnnotationDataController 
       Inherits AnnotationDataControllerBase
    [DefaultMember("Item")]
    public sealed class AnnotationDataController : AnnotationDataControllerBase 
    [DefaultMember("Item")]
    public __gc __sealed class AnnotationDataController : public AnnotationDataControllerBase 
    [DefaultMember("Item")]
    public ref class AnnotationDataController sealed : public AnnotationDataControllerBase 
    Example
    Here is an example that shows how to annotate images and save to a TIFF file:
    ' Create the image collection and add images to collection.
    Dim imageCollection As New Vintasoft.Imaging.ImageCollection()
    imageCollection.Add("D:\Images\AutoContrast.jpg")
    imageCollection.Add("D:\Images\AutoColors.jpg")
                
    ' Create annotation controller associated with image collection.
    Dim annotationDataController As New Vintasoft.Imaging.Annotation.AnnotationDataController(imageCollection)
                
    ' Create a rectangle annotation.
    Dim rectangleAnnotationData As New Vintasoft.Imaging.Annotation.RectangleAnnotationData()
    rectangleAnnotationData.Location = New System.Drawing.PointF(340, 150)
    rectangleAnnotationData.Size = New System.Drawing.SizeF(220, 150)
                
    ' Add the rectangle annotation to the annotation controller.
    annotationDataController(0).Add(rectangleAnnotationData)
                
    ' Save image collection to TIFF file.
    imageCollection.SaveSync("D:\ImageCollection.tif", True)
    // Create the image collection and add images to collection.
    Vintasoft.Imaging.ImageCollection imageCollection = 
        new Vintasoft.Imaging.ImageCollection();
    imageCollection.Add(@"D:\Images\AutoContrast.jpg");
    imageCollection.Add(@"D:\Images\AutoColors.jpg");
                
    // Create annotation controller associated with image collection.
    Vintasoft.Imaging.Annotation.AnnotationDataController annotationDataController = 
        new Vintasoft.Imaging.Annotation.AnnotationDataController(imageCollection);
                
    // Create a rectangle annotation.
    Vintasoft.Imaging.Annotation.RectangleAnnotationData rectangleAnnotationData = 
        new Vintasoft.Imaging.Annotation.RectangleAnnotationData();
    rectangleAnnotationData.Location = new System.Drawing.PointF(340, 150);
    rectangleAnnotationData.Size = new System.Drawing.SizeF(220, 150);
                
    // Add the rectangle annotation to the annotation controller.
    annotationDataController[0].Add(rectangleAnnotationData);
                
    // Save image collection to TIFF file.
    imageCollection.SaveSync(@"D:\ImageCollection.tif", true);
    Inheritance Hierarchy

    System.Object
       Vintasoft.Imaging.Annotation.AnnotationDataControllerBase
          Vintasoft.Imaging.Annotation.AnnotationDataController

    Requirements

    Target Platforms: .NET 6; .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also