
'Declaration Public Class ImageProcessingTool Inherits RectangularSelectionTool Implements Vintasoft.Imaging.UI.VisualTools.UserInteraction.IInteractiveObject, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IRectangularInteractiveObject
public class ImageProcessingTool : RectangularSelectionTool, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IInteractiveObject, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IRectangularInteractiveObject
public __gc class ImageProcessingTool : public RectangularSelectionTool, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IInteractiveObject, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IRectangularInteractiveObject
public ref class ImageProcessingTool : public RectangularSelectionTool, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IInteractiveObject, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IRectangularInteractiveObject
''' <summary> ''' Adds the visual tool, which applies the image processing command (invert) to an image region in image viewer, ''' to the image viewer. ''' </summary> ''' <param name="viewer">The image viewer.</param> ''' <param name="processSourceImage">Determines that processing command must be applied to the source image.</param> Public Sub AddVisualToolForProcessingImageRegionInImageViewer(imageViewer As Vintasoft.Imaging.UI.ImageViewer, processSourceImage As Boolean) ' create an instance of the ImageProcessingTool class Dim imageProcessingTool As New Vintasoft.Imaging.UI.VisualTools.ImageProcessingTool() ' set the region of interest on the image imageProcessingTool.Rectangle = New System.Drawing.Rectangle(50, 50, 250, 150) ' enable preview of image processing on the image viewer imageProcessingTool.UseViewerZoomForPreviewProcessing = True ' specify that visual tool must apply the image processing command (invert) to the image region in image viewer imageProcessingTool.ProcessingCommand = New Vintasoft.Imaging.ImageProcessing.Color.InvertCommand() ' set the tool as the current tool of the ImageViewer imageViewer.VisualTool = imageProcessingTool ' if source image must be also inverted If processSourceImage Then ' applies the image processing command (invert) to the region of source image imageProcessingTool.ExecuteProcessing() End If End Sub
/// <summary> /// Adds the visual tool, which applies the image processing command (invert) to an image region in image viewer, /// to the image viewer. /// </summary> /// <param name="viewer">The image viewer.</param> /// <param name="processSourceImage">Determines that processing command must be applied to the source image.</param> public void AddVisualToolForProcessingImageRegionInImageViewer( Vintasoft.Imaging.UI.ImageViewer imageViewer, bool processSourceImage) { // create an instance of the ImageProcessingTool class Vintasoft.Imaging.UI.VisualTools.ImageProcessingTool imageProcessingTool = new Vintasoft.Imaging.UI.VisualTools.ImageProcessingTool(); // set the region of interest on the image imageProcessingTool.Rectangle = new System.Drawing.Rectangle(50, 50, 250, 150); // enable preview of image processing on the image viewer imageProcessingTool.UseViewerZoomForPreviewProcessing = true; // specify that visual tool must apply the image processing command (invert) to the image region in image viewer imageProcessingTool.ProcessingCommand = new Vintasoft.Imaging.ImageProcessing.Color.InvertCommand(); // set the tool as the current tool of the ImageViewer imageViewer.VisualTool = imageProcessingTool; // if source image must be also inverted if (processSourceImage) // applies the image processing command (invert) to the region of source image imageProcessingTool.ExecuteProcessing(); }
System.Object
Vintasoft.Imaging.UI.VisualTools.VisualTool
Vintasoft.Imaging.UI.VisualTools.UserInteraction.UserInteractionVisualTool
Vintasoft.Imaging.UI.VisualTools.RectangularSelectionTool
Vintasoft.Imaging.UI.VisualTools.ImageProcessingTool
Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003