Click or drag to resize

ThreadedCommand Class

ThreadedCommand is a proxy command that will induce ImageCommands that support multithreading to run in on multiple threads.
Inheritance Hierarchy

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

The ThreadedCommand type exposes the following members.

Public methodThreadedCommand
Initializes a new instance of the ThreadedCommand class
Public methodThreadedCommand(ImageCommand)
Initializes a new instance of the ThreadedCommand class
Public methodThreadedCommand(ImageCommand, Int32)
Initializes a new instance of the ThreadedCommand class
Public propertyApplyToAnyPixelFormat
Sets or gets the value of AppyToAnyPixelFormat in the underlying command.
(Overrides ImageCommandApplyToAnyPixelFormat.)
Public propertyCanApplyToAnyPixelFormat
Returns the value of CanApplyToAnyPixelFormat in the underlying command.
(Overrides ImageCommandCanApplyToAnyPixelFormat.)
Public propertyCommand
Sets or gets the underlying command that will be multithreaded.
Public propertyInPlaceProcessing
Returns the InPlaceProcessing value of the underlying command.
(Overrides ImageCommandInPlaceProcessing.)
Public propertyStatic memberOptimalThreadCount
Returns the best number of threads to use for the current system.
Public propertyProgress
Gets or sets the ProgressEventHandler delegate which can be used to view or cancel the progress of the current process.
(Inherited from ImageCommand.)
Public propertyStripSize
Gets or sets the size of strips that will be processed by individual threads.
Public propertySupportedPixelFormats
Returns the value of SupportedPixelFormats of the underlying command.
(Overrides ImageCommandSupportedPixelFormats.)
Public propertyThreadCount
The total number of threads that will be used for this command.
Public methodApply
Apply the command to the given image.
(Inherited from ImageCommand.)
Public methodApplyToImage Obsolete.
Applies the command to the source AtalaImage.
(Inherited from ImageCommand.)
Protected methodConstructChangedSourceImage
The method is called by the default implementation of Apply. It determines if it is necessary to create a copy of the source image in a different pixel format and if so, determines the best new pixel format and allocates that image.
(Overrides ImageCommandConstructChangedSourceImage(AtalaImage).)
Protected methodConstructFinalImage
Called by the default implementation of Apply, ConstructFinalImage constructs the image that will be used as the destination image for the command.
(Overrides ImageCommandConstructFinalImage(AtalaImage).)
Protected methodConstructImageResults
Constructs the results object for this command.
(Overrides ImageCommandConstructImageResults.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from 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.)
Protected methodGetChangedPixelFormat
This method is called to change the pixel format of the source image.
(Overrides ImageCommandGetChangedPixelFormat(AtalaImage, PixelFormat).)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodImageCommandGetObjectData
Aggregates ImageCommand data into the supplied SerializationInfo object.
(Inherited from ImageCommand.)
Public methodIsPixelFormatSupported
Returns a value indicating if the specified pixel format is supported.
(Overrides ImageCommandIsPixelFormatSupported(PixelFormat).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodPerformActualCommand
PerformActualCommand does the actual work of the image processing command.
(Overrides ImageCommandPerformActualCommand(AtalaImage, AtalaImage, Rectangle, ImageResults).)
Protected methodSelectBestAlternatePixelFormat
Choose the best pixel format to use for this command when the supplied source image's pixel format is unacceptable.
(Overrides ImageCommandSelectBestAlternatePixelFormat(AtalaImage, PixelFormat, PixelFormat).)
Protected methodSelectPreferredPixelFormat
Chooses a pixel format that is preferred for this command.
(Overrides ImageCommandSelectPreferredPixelFormat(AtalaImage, PixelFormat, PixelFormat).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyImage
Verify the integrity of an AtalaImage.
(Inherited from ImageCommand.)
Protected methodVerifyProperties
Verify the integrity of properties in the command before processing an image.
(Overrides ImageCommandVerifyProperties(AtalaImage).)
Protected fieldMinimumStripSizeInBytes
The minimum strip size in bytes

Only ImageCommands that implement the IThreadableCommand and ICloneable interfaces can be used with ThreadedCommand. ThreadedCommand manages all thread creation and synchronization, proxy management of ImageCommand operations and so on.

Once a ThreadedCommand has been created and given a valid ImageCommand, it can be used any place that ImageCommand can be used.

See Also