eBUS SDK .NET API
  • Getting Started
    • Getting started with the eBUS SDK .NET API
    • Configuring Your IDE
    • Receiving Data from a GigE Vision or USB3 Vision Transmitter
    • Sample Applications
    • GigE Vision Device Communication Parameters
    • USB3 Vision Device Communication Parameters
    • PvStream USB3 Vision Parameters
    • PvStream GigE Vision Parameters
  • eBUS SDK .NET API Reference
    • API Overview
    • eBUSDotNet
    • eBUSDotNetReceive
    • eBUSDotNetEdge
Search Results for

    Show / Hide Table of Contents
      • IPvDeviceAdapter
      • IPvDeviceAdapterSwigInterface
      • IUpdaterObserver
      • OnAcquisitionStateChanged
      • OnBufferCreated
      • OnBufferDeleted
      • OnBufferDisplay
      • OnBufferDone
      • OnBufferLog
      • OnBufferRetrieved
      • OnBufferTextOverlay
      • OnBufferTooSmall
      • OnCmdLinkRead
      • OnCmdLinkReadSafe
      • OnCmdLinkWrite
      • OnCmdLinkWriteSafe
      • OnEvent
      • OnEventGenICam
      • OnEventSafe
      • OnLinkDisconnectedHandler
      • OnLinkReconnectedHandler
      • OnReset
      • OnStart
      • OnStop
      • PvAccessType
      • PvAcquisitionState
      • PvAcquisitionStateEventSink
      • PvAcquisitionStateManager
      • PvActionAckStatusEnum
      • PvBayerFilterType
      • PvBiColorFilterType
      • PvBufferConverter
      • PvBufferConverterRGBFilter
      • PvBufferFormatType
      • PvBufferWriter
      • PvCameraBridge
      • PvCameraBridgeEventSink
      • PvCameraBridgeType
      • PvConfigurationReader
      • PvConfigurationWriter
      • PvDataReceiverType
      • PvDevice
      • PvDeviceAdapter
      • PvDeviceEventSink
      • PvDeviceEventSinkSwigInterface
      • PvDeviceGEV
      • PvDeviceI2CBus
      • PvDevicePleoraProtocol
      • PvDeviceSPIBus
      • PvDeviceSerial
      • PvDeviceSerialPort
      • PvDeviceSerialPortEchoSink
      • PvDeviceU3V
      • PvDisplayThread
      • PvGenFUUpdater
      • PvParity
      • PvPipeline
      • PvPipelineEventSink
      • PvProperty
      • PvPropertyList
      • PvSerialPortConfiguration
      • PvStream
      • PvStreamEventSink
      • PvStreamGEV
      • PvStreamInfo
      • PvStreamRTP
      • PvStreamType
      • PvStreamU3V
      • PvThreadPriority
      • PvTruesenseConverter
      • SWIGTYPE_p_IPvDeviceEventSink
      • SWIGTYPE_p_PvDeinterlacingType
      • SWIGTYPE_p_PvSessionInfoSDP
      • SWIGTYPE_p_PvStringList
      • SWIGTYPE_p_PvTapGeometryEnum
      • SWIGTYPE_p_bool
      • SWIGTYPE_p_double
      • eBUSDotNetReceive

    Class PvBufferConverter

    Used to convert a #PvBuffer to another pixel type.

    Inheritance
    object
    PvBufferConverter
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: eBUSDotNetReceive
    Assembly: eBUSDotNetReceive.dll
    Syntax
    public class PvBufferConverter : IDisposable
    Remarks

    To change an image's format:

        - Acquire an image. See PvStream::RetrieveBuffer.
        - Create an image-format converter (PvBufferConverter object). Use PvBufferConverter::PvBufferConverter.
        - Test if you can convert your image to your preferred pixel type. Use IsConversionSupported.
            For your source pixel type, use PvImage::GetPixelType; for your destination, select an enumeration from
            PvPixelType.h.
        - Create a destination buffer. See PvBuffer (you define the destination image's pixel type during this step).
        - Optionally, configure options like Bayer filtering and BiColor filtering, use SetBayerFilter, SetBiColorFilter.
        - Convert the image to the new pixel type. Use Convert.
    
    Consult the #PvPixelType documentation in order to find which pixel types are supported as conversion destinations.
    

    Constructors

    View Source

    PvBufferConverter()

    Constructor.

    Declaration
    public PvBufferConverter()
    View Source

    PvBufferConverter(int)

    Constructor.

    Declaration
    public PvBufferConverter(int aMaxNumberOfThreads)
    Parameters
    Type Name Description
    int aMaxNumberOfThreads

    Maximum number of threads the buffer converter is allowed to use in order to speed up conversion. If 0 or smaller than 0, one thread per processor is assumed. Threads have no specific processor affinity.

    Fields

    View Source

    swigCMemOwn

    Determines who is responsible for deleting the underlying C++ object.

    Declaration
    protected bool swigCMemOwn
    Field Value
    Type Description
    bool

    Properties

    View Source

    BayerFilter

    Gets or sets the optional Bayer filtering for this converter.

    Declaration
    public PvBayerFilterType BayerFilter { get; set; }
    Property Value
    Type Description
    PvBayerFilterType
    View Source

    ConversionThreadsPriority

    Gets or sets the priority of the threads doing the conversion.

    Declaration
    public int ConversionThreadsPriority { get; set; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Convert(IPvImage, ref PvBuffer)

    Convert a buffer from one format to another.

    Declaration
    public PvResult Convert(IPvImage aSource, ref PvBuffer aDestination)
    Parameters
    Type Name Description
    IPvImage aSource

    The original image.

    PvBuffer aDestination

    The new image/buffer.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_DATA_FORMAT
    • #PvResult::Code::GENERIC_ERROR
    View Source

    Convert(IPvImage, ref PvBuffer, bool)

    Convert a buffer from one format to another.

    Declaration
    public PvResult Convert(IPvImage aSource, ref PvBuffer aDestination, bool aReallocIfNeeded)
    Parameters
    Type Name Description
    IPvImage aSource

    The original image.

    PvBuffer aDestination

    The new image/buffer.

    bool aReallocIfNeeded

    Depending on the conversion, the memory footprint of the new image may be greater than aDestination current size. By setting this parameter to true, the buffer is re-allocated if aDestination is too small. If aDestination memory buffer is not owned by the #PvBuffer and is too small, #Convert fails.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_DATA_FORMAT
    • #PvResult::Code::GENERIC_ERROR
    View Source

    Convert(IPvImage, ref PvBuffer, bool, bool)

    Convert a buffer from one format to another.

    Declaration
    public PvResult Convert(IPvImage aSource, ref PvBuffer aDestination, bool aReallocIfNeeded, bool aFlipY)
    Parameters
    Type Name Description
    IPvImage aSource

    The original image.

    PvBuffer aDestination

    The new image/buffer.

    bool aReallocIfNeeded

    Depending on the conversion, the memory footprint of the new image may be greater than aDestination current size. By setting this parameter to true, the buffer is re-allocated if aDestination is too small. If aDestination memory buffer is not owned by the #PvBuffer and is too small, #Convert fails.

    bool aFlipY

    When performing the conversion, flips the image on its Y axis.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_DATA_FORMAT
    • #PvResult::Code::GENERIC_ERROR
    View Source

    Convert(PvBuffer, ref PvBuffer)

    Convert a buffer from one format to another.

    Declaration
    public PvResult Convert(PvBuffer aSource, ref PvBuffer aDestination)
    Parameters
    Type Name Description
    PvBuffer aSource

    The original image/buffer.

    PvBuffer aDestination

    The new image/buffer.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_DATA_FORMAT
    • #PvResult::Code::GENERIC_ERROR
    View Source

    Convert(PvBuffer, ref PvBuffer, bool)

    Convert a buffer from one format to another.

    Declaration
    public PvResult Convert(PvBuffer aSource, ref PvBuffer aDestination, bool aReallocIfNeeded)
    Parameters
    Type Name Description
    PvBuffer aSource

    The original image/buffer.

    PvBuffer aDestination

    The new image/buffer.

    bool aReallocIfNeeded

    Depending on the conversion, the memory footprint of the new image may be greater than aDestination current size. By setting this parameter to true, the buffer is re-allocated if aDestination is too small. If aDestination memory buffer is not owned by the #PvBuffer and is too small, #Convert fails.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_DATA_FORMAT
    • #PvResult::Code::GENERIC_ERROR
    View Source

    Convert(PvBuffer, ref PvBuffer, bool, bool)

    Convert a buffer from one format to another.

    Declaration
    public PvResult Convert(PvBuffer aSource, ref PvBuffer aDestination, bool aReallocIfNeeded, bool aFlipY)
    Parameters
    Type Name Description
    PvBuffer aSource

    The original image/buffer.

    PvBuffer aDestination

    The new image/buffer.

    bool aReallocIfNeeded

    Depending on the conversion, the memory footprint of the new image may be greater than aDestination current size. By setting this parameter to true, the buffer is re-allocated if aDestination is too small. If aDestination memory buffer is not owned by the #PvBuffer and is too small, #Convert fails.

    bool aFlipY

    When performing the conversion, flips the image on its Y axis.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_DATA_FORMAT
    • #PvResult::Code::GENERIC_ERROR
    View Source

    Dispose()

    Dispose.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Dispose

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    View Source

    ~PvBufferConverter()

    Destructor.

    Declaration
    protected ~PvBufferConverter()
    View Source

    GetBiColorFilter()

    Retrieves current optional BiColor filtering.

    Declaration
    public PvBiColorFilterType GetBiColorFilter()
    Returns
    Type Description
    PvBiColorFilterType

    The BiColor filter's type; a #PvBiColorFilterType enumeration.

    View Source

    IsConversionSupported(PvPixelType, PvPixelType)

    Test if a pixel type can be converted to another type.

    Declaration
    public static bool IsConversionSupported(PvPixelType aSource, PvPixelType aDestination)
    Parameters
    Type Name Description
    PvPixelType aSource

    The original pixel type. For available pixel types, see PvPixelType.h.

    PvPixelType aDestination

    The new pixel type. See aSource.

    Returns
    Type Description
    bool

    True if #Convert has an available conversion algorithm; otherwise, false.

    View Source

    ResetRGBFilter()

    Resets the RGB filter used for conversion (if any)

    Declaration
    public PvResult ResetRGBFilter()
    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    View Source

    SetBiColorFilter(PvBiColorFilterType)

    Set the optional BiColor filtering for this converter.

    Declaration
    public PvResult SetBiColorFilter(PvBiColorFilterType aFilter)
    Parameters
    Type Name Description
    PvBiColorFilterType aFilter

    The new filter settings; a #PvBiColorFilterType enumeration.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::INVALID_PARAMETER
    View Source

    SetRGBFilter(PvBufferConverterRGBFilter)

    Assigns a RGB filter to be used during conversion

    Declaration
    public PvResult SetRGBFilter(PvBufferConverterRGBFilter aFilter)
    Parameters
    Type Name Description
    PvBufferConverterRGBFilter aFilter

    The RGB filter to be used during conversion.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK

    Implements

    IDisposable
    • View Source
    In this article
    Back to top Generated by DocFX