IPSDK 0.2
IPSDK : Image Processing Software Development Kit
imageconvertImg (inImg,inConvertImageBufferType)

Detailed Description

Algorithm allowing to convert an image to a given type.

This algorithm allows to convert an image.
Output image size is the same as input.
On output image value are given by :

\[ OutImg[i] = cast<OutType>(InImg[i]) \]

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLUtility as util

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# image convertion
outImg = util.convertImg(inImg, PyIPSDK.eImageBufferType.eIBT_UInt16)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLUtility/Processor/ConvertImg/ConvertImg.h>

Code Example

// opening input image
ImageGeometryPtr pInputImageGeometry = geometry2d(inputImageBufferType, sizeX, sizeY);
ImagePtr pInImg = loadRawImageFile(inputImgPath, *pInputImageGeometry);
// conversion of image
ImagePtr pOutImg = convertImg(pInImg, outputImageBufferType);