PixelTypeExtensions Class#
Inheritance Hierarchy#
System.Object
Basler.Pylon.PixelTypeExtensions
Syntax#
C#
VB
The PixelTypeExtensions type exposes the following members.
Methods#
Name | Description | |
---|---|---|
BitDepth | Returns the bit depth of a pixel value in bits. | |
BitPerPixel | Returns the bits needed to store a pixel. | |
ComputeBufferSize | Computes the buffer size in byte. | |
HasAlpha | Returns true when an the image using the given pixel type has an alpha channel. | |
IsBayer | Returns true when the pixel type represents a Bayer format. | |
IsBayerPacked | Returns true if the pixel type is Bayer and the pixel values are not byte aligned. | |
IsBGR | Returns true when the pixel type represents a BGR or BGRA format. | |
IsBGRA | Returns true when the pixel type represents a BGRA format. | |
IsBGRPacked | Returns true if the pixel type is BGR and the pixel values are not byte aligned. | |
IsColorImage | Returns true when an image using the given pixel type is a color image (RGB/BGR/RGBA/BGRA etc.) or Bayer. | |
IsFloatingPoint | Returns true if a given pixel type represents a floating point number. | |
IsMono | Returns true when a given pixel is monochrome, e.g. Mono8 or BayerGR8. | |
IsMonoImage | Returns true when an image using the given pixel type is monochrome, e.g. Mono8. | |
IsMonoPacked | Returns true if the pixel type is Mono and the pixel values are not byte aligned. | |
IsPacked | Returns true if the pixels of the given pixel type are not byte aligned. | |
IsPackedInLsbFormat | Returns true if the pixel type is packed in lsb packed format. | |
IsPlanar | Returns true if images of the pixel type are divided into multiple planes. | |
IsRGB | Returns true when the pixel type represents an RGB or RGBA format. | |
IsRGBA | Returns true when the pixel type represents an RGBA format. | |
IsRGBPacked | Returns true if the pixel type is RGB and the pixel values are not byte aligned. | |
IsYUV | Returns true when the pixel type represents a YUV format. | |
PixelColorFilterValue | Returns the Bayer color filter type. | |
PixelIncrementX | Returns the minimum step size expressed in pixels for extracting an AOI. | |
PixelIncrementY | Returns the minimum step size expressed in pixels for extracting an AOI. | |
PlaneCount | Returns number of planes in the image composed of the pixel type. | |
PlanePixelType | Returns the pixel type of a plane. | |
SamplesPerPixel | Returns the number of values measured per pixel. | |
ToPixelType | Converts a String to a PixelType using pylons CPixelTypeMapper. |
PixelTypeExtensions.BitDepth Method#
Returns the bit depth of a pixel value in bits.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: UInt32
Returns the bit depth of a pixel value in bits.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.BitPerPixel Method#
Returns the bits needed to store a pixel.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: UInt32
Returns the bits needed to store a pixel.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.ComputeBufferSize Method#
Computes the buffer size in byte.
Syntax#
C#
public static ulong ComputeBufferSize(
this PixelType pixelType,
int width,
int height,
int paddingX
)
VB
<ExtensionAttribute>
Public Shared Function ComputeBufferSize (
pixelType As PixelType,
width As Integer,
height As Integer,
paddingX As Integer
) As ULong
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested. - width
- Type: System.Int32
The width of the image in pixel. - height
- Type: System.Int32
The height of the image in pixel. - paddingX
- Type: System.Int32
The line end padding in byte.
Return Value#
Type: UInt64
the buffer size in bytes needed by the given image dimensions.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks#
Preconditions for calculating the buffer size:
- The pixelType is not PixelType.Undefined.
- The width is positive.
- The height is positive.
- The paddingX is positive.
PixelTypeExtensions.HasAlpha Method#
Returns true when an the image using the given pixel type has an alpha channel.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when an the image using the given pixel type has an alpha channel.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsBayer Method#
Returns true when the pixel type represents a Bayer format.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when the pixel type represents a Bayer format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsBayerPacked Method#
Returns true if the pixel type is Bayer and the pixel values are not byte aligned.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if the pixel type is Bayer and the pixel values are not byte aligned.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsBGR Method#
Returns true when the pixel type represents a BGR or BGRA format.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when the pixel type represents a BGR or BGRA format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsBGRA Method#
Returns true when the pixel type represents a BGRA format.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when the pixel type represents a BGRA format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsBGRPacked Method#
Returns true if the pixel type is BGR and the pixel values are not byte aligned.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if the pixel type is BGR and the pixel values are not byte aligned.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsColorImage Method#
Returns true when an image using the given pixel type is a color image (RGB/BGR/RGBA/BGRA etc.) or Bayer.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when an image using the given pixel type is a color image (RGB/BGR/RGBA/BGRA etc.) or Bayer.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsFloatingPoint Method#
Returns true if a given pixel type represents a floating point number.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if a given pixel type represents a floating point number.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsMono Method#
Returns true when a given pixel is monochrome, e.g. Mono8 or BayerGR8.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when a given pixel is monochrome, e.g. Mono8 or BayerGR8.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsMonoImage Method#
Returns true when an image using the given pixel type is monochrome, e.g. Mono8.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when an image using the given pixel type is monochrome, e.g. Mono8.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsMonoPacked Method#
Returns true if the pixel type is Mono and the pixel values are not byte aligned.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if the pixel type is Mono and the pixel values are not byte aligned.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsPacked Method#
Returns true if the pixels of the given pixel type are not byte aligned.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if the pixels of the given pixel type are not byte aligned.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsPackedInLsbFormat Method#
Returns true if the pixel type is packed in lsb packed format.
Syntax#
C#
VB
<ExtensionAttribute>
Public Shared Function IsPackedInLsbFormat (
pixelType As PixelType
) As Boolean
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if the pixel type is packed in lsb packed format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsPlanar Method#
Returns true if images of the pixel type are divided into multiple planes.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if images of the pixel type are divided into multiple planes.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsRGB Method#
Returns true when the pixel type represents an RGB or RGBA format.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when the pixel type represents an RGB or RGBA format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsRGBA Method#
Returns true when the pixel type represents an RGBA format.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when the pixel type represents an RGBA format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsRGBPacked Method#
Returns true if the pixel type is RGB and the pixel values are not byte aligned.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true if the pixel type is RGB and the pixel values are not byte aligned.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.IsYUV Method#
Returns true when the pixel type represents a YUV format.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: Boolean
Returns true when the pixel type represents a YUV format.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.PixelColorFilterValue Method#
Returns the Bayer color filter type.
Syntax#
C#
VB
<ExtensionAttribute>
Public Shared Function PixelColorFilterValue (
pixelType As PixelType
) As PixelColorFilter
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: PixelColorFilter
Returns the Bayer color filter type.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.PixelIncrementX Method#
Returns the minimum step size expressed in pixels for extracting an AOI.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: UInt32
Returns the minimum step size expressed in pixels for extracting an AOI.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.PixelIncrementY Method#
Returns the minimum step size expressed in pixels for extracting an AOI.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: UInt32
Returns the minimum step size expressed in pixels for extracting an AOI.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.PlaneCount Method#
Returns number of planes in the image composed of the pixel type.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: UInt32
Returns number of planes in the image composed of the pixel type.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.PlanePixelType Method#
Returns the pixel type of a plane.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: PixelType
Returns the pixel type of a plane.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.SamplesPerPixel Method#
Returns the number of values measured per pixel.
Syntax#
C#
VB
Parameters#
- pixelType
- Type: Basler.Pylon.PixelType
The pixel type tested.
Return Value#
Type: UInt32
Returns the number of values measured per pixel.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type PixelType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
PixelTypeExtensions.ToPixelType Method#
Converts a String to a PixelType using pylons CPixelTypeMapper.
Syntax#
C#
VB
Parameters#
- value
- Type: System.String
The value to be converted.
Return Value#
Type: PixelType
Returns the converted pixel type.
Usage Note#
In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).