Class ImageGenerator
Generates an image feature out of a binary raster. Optionally, saves the image to a png file. Useful for debugging pipeline steps.
Pipeline Input type: bool[,]
Default Pipeline Output: (bool[,]) Input, (Image{Rgba32}) InputImage
Inherited Members
Namespace: SigStat.Common.Transforms
Assembly: SigStat.Common.dll
Syntax
public class ImageGenerator : PipelineBase, ILoggerObject, IProgress, ITransformation, IPipelineIO
Constructors
| Improve this Doc View SourceImageGenerator()
Initializes a new instance of the ImageGenerator class with default settings: skip file writing, Blue ink on white paper.
Declaration
public ImageGenerator()
ImageGenerator(Boolean)
Initializes a new instance of the ImageGenerator class with default settings.
Declaration
public ImageGenerator(bool writeToFile)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | writeToFile | Whether to save the generated image into a png file. |
ImageGenerator(Boolean, Rgba32, Rgba32)
Initializes a new instance of the ImageGenerator class with specified settings.
Declaration
public ImageGenerator(bool writeToFile, Rgba32 foregroundColor, Rgba32 backgroundColor)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | writeToFile | Whether to save the generated image into a png file. |
Rgba32 | foregroundColor | Ink color. |
Rgba32 | backgroundColor | Paper color. |
Properties
| Improve this Doc View SourceBackgroundColor
Gets or sets the color of the backgroung used to render the signature
Declaration
public Rgba32 BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Rgba32 |
ForegroundColor
Gets or sets the color of the foreground used to render the signature
Declaration
public Rgba32 ForegroundColor { get; set; }
Property Value
Type | Description |
---|---|
Rgba32 |
Input
Input FeatureDescriptor for the binary image of a signature
Declaration
public FeatureDescriptor<bool[, ]> Input { get; set; }
Property Value
Type | Description |
---|---|
FeatureDescriptor<System.Boolean[,]> |
OutputImage
Input FeatureDescriptor for the binary image of a signature
Declaration
public FeatureDescriptor<Image<Rgba32>> OutputImage { get; set; }
Property Value
Type | Description |
---|---|
FeatureDescriptor<Image<Rgba32>> |
WriteToFile
Gets or sets a value indicating whether the results should be saved to a file or not.
Declaration
public bool WriteToFile { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
| Improve this Doc View SourceTransform(Signature)
Executes the transform on the signature
parameter.
This function gets called by the pipeline.
Declaration
public void Transform(Signature signature)
Parameters
Type | Name | Description |
---|---|---|
Signature | signature | The Signature with a set of features to be transformed. |