image = | getROI3dImg (inImg,xOffset,yOffset,zOffset,xSz,ySz,zSz) |
Algorithm allowing to copy a 3d ROI of an image.
This algorithm allows to copy the region of interest, delimited by a 3d box, of an image.
The box is defined by the 2 attributes InInputImg3dOffset and InOutputImg3dSize.
Output image type is the same as input.
Size of output image is given by the InOutputImg3dSize attribute.
On output image, values are given by :
,
with:
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLUtility as util
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = util.getROI3dImg(inImg, 10, 11, 12, 19, 20, 21)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLUtility/Processor/GetROI3dImg/GetROI3dImg.h>
Code Example
if(pInImg->getBufferType() != imageBufferType)
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutImageGeometry);
getROI3dImg(pInImg, inOffsetX, inOffsetY, inOffsetZ, outSizeX, outSizeY, outSizeZ, pOutImg);