public StatisticsInformationCommand(
RasterColorChannel channel,
int start,
int end
)
Public Function New( _
ByVal channel As RasterColorChannel, _
ByVal start As Integer, _
ByVal end As Integer _
)
- (instancetype)initWithChannel:(LTRasterColorChannel)channel
start:(NSInteger)start
end:(NSInteger)end
public:
StatisticsInformationCommand(
RasterColorChannel channel,
int start,
int end
)
channel
The channel for which to get the information. This value is ignored if the image is 12 or 16-bit grayscale.
start
Indicates the beginning color value of the range for the evaluation. This property only accepts positive values.
end
Indicates the ending color value of the range for the evaluation. This property only accepts positive values.
Run the StatisticsInformationCommand on an image.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Effects;
public void StatisticsInformationConstructorExample()
{
// Load an image
RasterCodecs codecs = new RasterCodecs();
codecs.ThrowExceptionsOnInvalidImages = true;
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"));
// Prepare the command
StatisticsInformationCommand command = new StatisticsInformationCommand(RasterColorChannel.Master, 0, 255);
// Get statistical image information.
command.Run(image);
MessageBox.Show("Minimum = " + command.Minimum + "\n" +
"Maximum = " + command.Maximum + "\n" +
"Mean = " + command.Mean + "\n" +
"Median = " + command.Median + "\n" +
"Percent = " + command.Percent + "\n" +
"PixelCount = " + command.PixelCount + "\n" +
"StandardDeviation = " + command.StandardDeviation + "\n" +
"TotalPixelCount = " + command.TotalPixelCount);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS21\Resources\Images";
}
Imports Leadtools
Imports Leadtools.ImageProcessing
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Effects
Public Sub StatisticsInformationConstructorExample()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"))
' Prepare the command
Dim command As StatisticsInformationCommand = New StatisticsInformationCommand(RasterColorChannel.Master, 0, 255)
' Get statistical image information.
command.Run(leadImage)
MessageBox.Show("Minimum = " + command.Minimum.ToString + Chr(13) +
"Maximum = " + command.Maximum.ToString + Chr(13) +
"Mean = " + command.Mean.ToString + Chr(13) +
"Median = " + command.Median.ToString + Chr(13) +
"Percent = " + command.Percent.ToString + Chr(13) +
"PixelCount = " + command.PixelCount.ToString + Chr(13) +
"StandardDeviation = " + command.StandardDeviation.ToString + Chr(13) +
"TotalPixelCount = " + command.TotalPixelCount.ToString)
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\LEADTOOLS21\Resources\Images"
End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.