IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Enumerations | Functions

Promote unary output Image Initializer. More...

Classes

class  ipsdk::imaproc::PromoteUnaryImageInitializer< InputAttributeType, OutputAttributeType >
 Class allowing to initialize an output image from an other image deducing output image buffer type from input image buffer type and a promote unary operation type. More...
 

Enumerations

enum  ipsdk::imaproc::ePromoteUnaryType {
  ipsdk::imaproc::ePUT_Unsigned, ipsdk::imaproc::ePUT_Signed, ipsdk::imaproc::ePUT_Upper, ipsdk::imaproc::ePUT_UpperUnsigned,
  ipsdk::imaproc::ePUT_UpperSigned
}
 Enumerate describing promote unary output image initializer type. More...
 

Functions

IPSDKIMAGEPROCESSING_API const image::eImageBufferTypeipsdk::imaproc::getDefaultOutputBufferType (const image::eImageBufferType &inputImageBufferType, const ePromoteUnaryType &promoteUnaryType)
 method allowing to retrieve expected output buffer type for a given input buffer type and a promote unary operation type More...
 
template<typename InputAttributeType , typename OutputAttributeType >
processor::OutputInitializerPtr ipsdk::imaproc::promoteUnary (const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const ePromoteUnaryType &promoteUnaryType)
 functions allowing to deduce output image buffer type promotion from an input image buffer type
 
template<typename InputAttributeType , typename OutputAttributeType >
processor::OutputInitializerPtr ipsdk::imaproc::promoteUnary (const boost::shared_ptr< OutputAttributeType > &pOutputAttribute, const boost::shared_ptr< InputAttributeType > &pInputAttribute, const ePromoteUnaryType &promoteUnaryType)
 functions allowing to deduce output image buffer type promotion from an input image buffer type
 

Detailed Description

Promote unary output Image Initializer.

This type of output image initializer is used to promote an input image buffer type to output attribute using an operator associated to ipsdk::imaproc::ePromoteUnaryType.

Example

In the following processor class declaration example output image size will be the same as input one. Output image buffer type will be the unsigned version of input one.

// declare processor class
IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC1, UT_IPSDKImageProcessing, TestPromoteUnary,
ipsdk::imaproc::matchSize(_pInImg, _pOutImg),
(((test))(InImg))
// methods
public:
// attributes
protected:
};

For example, if input image buffer type is equal to ipsdk::image::eImageBufferType::eIBT_Int8, output image buffer type will be equal to ipsdk::image::eImageBufferType::eIBT_UInt8 (refers to following promotion tables).

List of available promotion operations

Case of ipsdk::imaproc::ePromoteUnaryType::ePUT_Unsigned

In this case, output image buffer type is the unsigned version of input buffer type. Type promotion is defined by the following table :

InputType OutputType
eIBT_Int8 eIBT_UInt8
eIBT_UInt8 eIBT_UInt8
eIBT_Int16 eIBT_UInt16
eIBT_UInt16 eIBT_UInt16
eIBT_Int32 eIBT_UInt32
eIBT_UInt32 eIBT_UInt32
eIBT_Real32 eIBT_Real32
eIBT_Binary eIBT_Binary
eIBT_Label16 eIBT_Label16
eIBT_Label32 eIBT_Label32
eIBT_Label8 eIBT_Label8

Case of ipsdk::imaproc::ePromoteUnaryType::ePUT_Signed

In this case, output image buffer type is the signed version of input buffer type. Type promotion is defined by the following table :

InputType OutputType
eIBT_Int8 eIBT_Int8
eIBT_UInt8 eIBT_Int8
eIBT_Int16 eIBT_Int16
eIBT_UInt16 eIBT_Int16
eIBT_Int32 eIBT_Int32
eIBT_UInt32 eIBT_Int32
eIBT_Real32 eIBT_Real32
eIBT_Binary eIBT_Int8
eIBT_Label16 eIBT_Int16
eIBT_Label32 eIBT_Int32
eIBT_Label8 eIBT_Int8

Case of ipsdk::imaproc::ePromoteUnaryType::ePUT_Upper

In this case, output image buffer type is the upper (when possible) version of input buffer type. Type promotion is defined by the following table :

InputType OutputType
eIBT_Int8 eIBT_Int16
eIBT_UInt8 eIBT_UInt16
eIBT_Int16 eIBT_Int32
eIBT_UInt16 eIBT_UInt32
eIBT_Int32 eIBT_Int32
eIBT_UInt32 eIBT_UInt32
eIBT_Real32 eIBT_Real32
eIBT_Binary eIBT_UInt8
eIBT_Label16 eIBT_UInt32
eIBT_Label32 eIBT_UInt32
eIBT_Label8 eIBT_UInt16

Case of ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperUnsigned

In this case, output image buffer type is the upper (when possible) unsigned version of input buffer type. Type promotion is defined by the following table :

InputType OutputType
eIBT_Int8 eIBT_UInt16
eIBT_UInt8 eIBT_UInt16
eIBT_Int16 eIBT_UInt32
eIBT_UInt16 eIBT_UInt32
eIBT_Int32 eIBT_UInt32
eIBT_UInt32 eIBT_UInt32
eIBT_Real32 eIBT_Real32
eIBT_Binary eIBT_UInt8
eIBT_Label16 eIBT_UInt32
eIBT_Label32 eIBT_UInt32
eIBT_Label8 eIBT_UInt16

Case of ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned

In this case, output image buffer type is the upper (when possible) signed version of input buffer type. Type promotion is defined by the following table :

InputType OutputType
eIBT_Int8 eIBT_Int16
eIBT_UInt8 eIBT_Int16
eIBT_Int16 eIBT_Int32
eIBT_UInt16 eIBT_Int32
eIBT_Int32 eIBT_Int32
eIBT_UInt32 eIBT_Int32
eIBT_Real32 eIBT_Real32
eIBT_Binary eIBT_Int8
eIBT_Label16 eIBT_Int32
eIBT_Label32 eIBT_Int32
eIBT_Label8 eIBT_Int16

Enumeration Type Documentation

◆ ePromoteUnaryType

Enumerate describing promote unary output image initializer type.

Note
This object is associated to a strong enumerate definition
See also
IPSDK_Enum
Enumerator
ePUT_Unsigned 

Retrieve unsigned image buffer type from input image buffer type.

ePUT_Signed 

Retrieve signed image buffer type from input image buffer type.

ePUT_Upper 

Retrieve upper image buffer type from input image buffer type.

ePUT_UpperUnsigned 

Retrieve upper unsigned image buffer type from input image buffer type.

ePUT_UpperSigned 

Retrieve upper signed image buffer type from input image buffer type.

Function Documentation

◆ getDefaultOutputBufferType()

IPSDKIMAGEPROCESSING_API const image::eImageBufferType& ipsdk::imaproc::getDefaultOutputBufferType ( const image::eImageBufferType inputImageBufferType,
const ePromoteUnaryType promoteUnaryType 
)

method allowing to retrieve expected output buffer type for a given input buffer type and a promote unary operation type

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionif inputImageBufferType == image::eImageBufferType::eIBT_None