Click or drag to resize

RegionOfInterest Class

This object can be passed into most ImageCommands to indicate a region of the image to process. Any shaped region can be used by specifying a Region object or a simple Rectangle.
Inheritance Hierarchy

Namespace:  Atalasoft.Imaging.ImageProcessing
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: (.NET 4.5.2, x86)
public class RegionOfInterest : ISerializable

The RegionOfInterest type exposes the following members.

Public methodRegionOfInterest(Rectangle)
Initializes a new instance of %RegionOfInterest% specifying a simple rectangle to use as the region.
Public methodRegionOfInterest(Region)
Initializes a new instance of %RegionOfInterest% specifying a .NET Region object to use as the region.
Protected methodRegionOfInterest(SerializationInfo, StreamingContext)
Initializes a new instance of %RegionOfInterest%.
Public propertyRegion
Gets or sets the System.Drawing.Region used to specify the portion of an image to process.
Public propertySmoothingLevel
Gets or sets the smoothing level of the region.
Public methodEquals
Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.)
Public methodGetObjectData
Populates a SerializationInfo with the data needed to serialize the target object.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsSimpleRegion

Returns true if the Region is a simple rectangle.

Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Mosaic (C#)
// Load the image to work with.
AtalaImage image = new AtalaImage(@"D:\Test Images\1save.jpg");

// Apply a mosaic effect to the middle of the image.
Rectangle rc = new Rectangle(20, 20, image.Width - 40, image.Height - 40);
MosaicCommand mos = new MosaicCommand(10);
mos.RegionOfInterest = new RegionOfInterest(rc);
MosaicVB (Visual Basic)
' Load the image to work with.
Dim image As AtalaImage =  New AtalaImage("D:\Test Images\1save.jpg") 

' Apply a mosaic effect to the middle of the image.
Dim rc As Rectangle =  New Rectangle(20,20,image.Width - 40,image.Height - 40) 
Dim mos As MosaicCommand =  New MosaicCommand(10) 
mos.RegionOfInterest = New RegionOfInterest(rc)
See Also