Skip to content

pylon/PylonDataComponent.h#

Contains a class to access one component of a multi-component grab result.

Namespaces#

Name
Pylon
Contains definitions of pylon types.

Classes#

Name
class Pylon::CPylonDataComponent
Provides methods for accessing a single component of CPylonDataContainer.

Source code#

//-----------------------------------------------------------------------------
//  Basler pylon SDK
//  Copyright (c) 2020-2022 Basler AG
//  http://www.baslerweb.com
//  Author:  DV, JS
//-----------------------------------------------------------------------------
#ifndef INCLUDED_PYLONDATACOMPONENT_H
#define INCLUDED_PYLONDATACOMPONENT_H

#include <pylon/Platform.h>

#ifdef _MSC_VER
#   pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */

#include <pylon/PylonBase.h>
#include <pylon/PixelType.h>
#include <pylon/PayloadType.h>
#include <pylon/Image.h>


namespace Pylon
{
    // Forward declaration
    class CGrabResultPtr;
    class GrabResult;

    enum EComponentType
    {
        ComponentType_Undefined = 0x00,     
        ComponentType_Intensity = 0x01,     
        ComponentType_Range = 0x04,         
        ComponentType_Confidence = 0x06     
    };


    class PYLONBASE_API CPylonDataComponent
    {
    public:
        CPylonDataComponent();

        CPylonDataComponent( const CPylonDataComponent& rhs );

        ~CPylonDataComponent( );

        CPylonDataComponent& operator=( const CPylonDataComponent& rhs );

        operator const Pylon::IImage& () const;

        bool IsValid() const;


        EComponentType GetComponentType() const;


        EPixelType GetPixelType() const;


        uint32_t GetWidth() const;


        uint32_t GetHeight() const;


        uint32_t GetOffsetX() const;


        uint32_t GetOffsetY() const;


        size_t GetPaddingX() const;


        const void* GetData() const;


        size_t GetDataSize() const;


        uint64_t GetTimeStamp() const;


        bool GetStride( size_t& strideBytes ) const;

    protected:
        class CPylonDataComponentImpl;
        CPylonDataComponentImpl* m_pImpl;
    };

} // namespace Pylon

#ifdef _MSC_VER
#   pragma pack(pop)
#endif /* _MSC_VER */

#endif // INCLUDED_PYLONDATACOMPONENT_H

Updated on 5 July 2022 at 15:30:01