IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

application of a color map on each 2D plan of an input grey-levels image More...

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::SmoothRgbColorMapConstPtr &pColorMap)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::CyclicRgbColorMapConstPtr &pColorMap)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedSmoothRgbColorMapConstPtr &pPIColorMap)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedCyclicRgbColorMapConstPtr &pPIColorMap)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::SmoothRgbColorMapConstPtr &pColorMap, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::CyclicRgbColorMapConstPtr &pColorMap, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedSmoothRgbColorMapConstPtr &pPIColorMap, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for application of a color map on an input grey image More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedCyclicRgbColorMapConstPtr &pPIColorMap, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for application of a color map on an input grey image More...
 

Detailed Description

application of a color map on each 2D plan of an input grey-levels image

This algorithm applies a given color map to each 2D plan of an input grey-levels image with voxels values encoded with unsigned integers, in order to make the visualization of the input image easier for the user.

There are mainly two types of color maps that can be used by the algorithm: the cyclic color maps and the smooth color maps.

The user can specify its own customized color map, but IPSDK also provides some predefined color maps, for both types of maps:

Here are different examples of predefined cyclic color maps applied to a label image:

colorMapping2dImg_example_cyclic.png

And here are different examples of predefined smooth color maps applied to Lena grey levels image:

colorMapping2dImg_example_smooth.png

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InGreyUIntImg [Input] grey levels image (data contained in image buffer are unsigned integers) X
ipsdk::imaproc::attr::InOptPISmoothRgbColorMap [In Optional] Plan indexed collection of smooth RGB color maps X
ipsdk::imaproc::attr::InOptPICyclicRgbColorMap [In Optional] Plan indexed collection of cyclic RGB color maps X
ipsdk::imaproc::attr::OutRgbUInt8Img [Output] Rgb color uint8 image for processing operation ipsdk::imaproc::duplicateRgbInOut (_pOutRgbUInt8Img, _pInGreyUIntImg, ipsdk::image::eImageBufferType::eIBT_UInt8)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (eMatchImageSizeType::eMIST_XYZT,_pInGreyUIntImg,_pOutRgbUInt8Img) && 
((ipsdk::processor::isSet (_pInOptPISmoothRgbColorMap) && 
  ipsdk::processor::Not (
   ipsdk::processor::isSet (_pInOptPICyclicRgbColorMap))) || 
 (ipsdk::processor::isSet (_pInOptPICyclicRgbColorMap) && 
  ipsdk::processor::Not (
   ipsdk::processor::isSet (_pInOptPISmoothRgbColorMap)))) && 
ipsdk::processor::If (
 ipsdk::processor::isSet (_pInOptPISmoothRgbColorMap),
 ipsdk::imaproc::isGrey (_pInOptPISmoothRgbColorMap) && 
 ((ipsdk::imaproc::is2d (_pInOptPISmoothRgbColorMap) && 
   ipsdk::imaproc::isSingle (_pInOptPISmoothRgbColorMap)) || 
  ipsdk::imaproc::matchImagePlans (_pInOptPISmoothRgbColorMap,_pInGreyUIntImg,eImagePlansMatchPolicy::eIPMP_ZT)),
 ipsdk::imaproc::isGrey (_pInOptPICyclicRgbColorMap) && 
 ((ipsdk::imaproc::is2d (_pInOptPICyclicRgbColorMap) && 
   ipsdk::imaproc::isSingle (_pInOptPICyclicRgbColorMap)) || 
  ipsdk::imaproc::matchImagePlans (_pInOptPICyclicRgbColorMap,_pInGreyUIntImg,eImagePlansMatchPolicy::eIPMP_ZT)))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLIntensityTransform as itrans

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inImgPath)
# application of color map on input image (1st signature test)
outImg = itrans.colorMapping2dImg(inImg, colorMap)

Example of C++ code :

Example informations

Associated library

IPSDKIPLIntensityTransform

Header file

Code Example

ImagePtr pInImg = loadTiffImageFile(inImgFilePath, eTiffDirectoryMode::eTDM_Volume);
const CyclicRgbColorMapPtr pColorMap =
ImagePtr pOutImg = colorMapping2dImg(pInImg, pColorMap);
See also
ColorMapping2dImgLvl1
ColorMapping2dImgLvl2

Function Documentation

◆ colorMapping2dImg() [1/8]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::SmoothRgbColorMapConstPtr pColorMap 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [2/8]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::CyclicRgbColorMapConstPtr pColorMap 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [3/8]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedSmoothRgbColorMapConstPtr pPIColorMap 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [4/8]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedCyclicRgbColorMapConstPtr pPIColorMap 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [5/8]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::SmoothRgbColorMapConstPtr pColorMap,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [6/8]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::CyclicRgbColorMapConstPtr pColorMap,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [7/8]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedSmoothRgbColorMapConstPtr pPIColorMap,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ colorMapping2dImg() [8/8]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::colorMapping2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedCyclicRgbColorMapConstPtr pPIColorMap,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for application of a color map on an input grey image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure