IPSDK 0.2
IPSDK : Image Processing Software Development Kit
LUT Transformation 3dSee full documentation
imagelutTransform3dImg (inImg3d,lut)
imagelutTransform3dImg (inImg3d,pILut)

Detailed Description

application of a look-up table on each 3d volume of an input image algorithm

If the image is made of one single volume (single 3d grey levels image), the algorithm applies the look-up table provided by the user to the intensities of the image. If the image is multi-sliced (made of several volumes, like a single 3d RGB image, for instance, or a sequence 3d image, etc.), a collection of look-up tables (one table per plan) is applied to the intensities of the image.

The look-up table is defined using the ipsdk::imaproc::attr::IntensityLUT data item, that is composed of the following parameters:

Considering, for instance, a single 3d grey levels input image InImg and the lookup table LUT to apply, output image OutImg pixels will equal to:

\[ OutImg(x, y, z) = \begin{cases} LUT.lookupTable[0], \text{if } InImg(x, y, z) < LUT.min \\ LUT.lookupTable[(InImg(x, y, z) - LUT.min) / LUT.binWidth], \text{if } LUT.min \leq InImg(x, y, z) < LUT.min + len(LUT.lookupTable) \times LUT.binWidth \\ LUT.lookupTable[len(LUT.lookupTable)-1] , \text{if } InImg(x, y, z) > LUT.min + len(LUT.lookupTable) \times LUT.binWidth \end{cases} \]

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLGeometricTransform as gtrans
import PyIPSDK.IPSDKIPLIntensityTransform as itrans
import PyIPSDK.IPSDKIPLGlobalMeasure as glbmsr

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
lut = PyIPSDK.createIntensityLUT(0, 50, [255-i*50 for i in range(256)])
autoOutImg = itrans.lutTransform3dImg(inImg, lut)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLIntensityTransform/Processor/LUTTransform3dImg/LUTTransform3dImg.h>

Code Example

// Sample with a generated output image
// ------------------------------------
ImagePtr pAutoOutImg = lutTransform3dImg(pInImg, pLut);
// Sample with a provided output image
// -----------------------------------
lutTransform3dImg(pInImg, pLut, pOutImg);