image = | genericMultiplyImgImg (inImg1,inImg2) |
Multiply images with different dimensions.
Multiplication of 2 images with different dimensions (volume with plan, volume color with volume...). The image with the highest dimensions is always have to be the first one.
The output image values are given by:
See Addition between images with different dimensions for an illustrated example.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm
Code Example
inGeometry = PyIPSDK.geometry2d(PyIPSDK.eImageBufferType.eIBT_UInt8, 510, 509)
inImg1 = PyIPSDK.loadTiffImageFile(inputImg1Path)
inImg2 = PyIPSDK.loadTiffImageFile(inputImg2Path)
outImg = arithm.genericMultiplyImgImg(inImg1, inImg2)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/GenericMultiplyImgImg/GenericMultiplyImgImg.h>
Code Example
ImagePtr pOutImgAuto = genericMultiplyImgImg(pInImg1, pInImg2);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
genericMultiplyImgImg(pInImg1, pInImg2, pOutImg);