image = | roundImg (inRealImg,inConvertImageBufferType) |
Round values of a floating point image algorithm.
This algorithm allows to round values of a floating point image to an integer target type.
Output image values are given by :
- Note
- In case of a floating point output image, input image is simply copied without modification.
- See also
- http://en.wikipedia.org/wiki/Floor_and_ceiling_functions
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = arithm.roundImg(inImg, PyIPSDK.eImageBufferType.eIBT_UInt8)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/RoundImg/RoundImg.h>
Code Example
boost::shared_ptr<MemoryImage> pInImg(boost::make_shared<MemoryImage>());
pInImg->init(*pGeometry);
ImagePtr pOutImg = roundImg(pInImg, eImageBufferType::eIBT_UInt8);