IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Pearson colocalization mapping 3d

builds the Pearson's colocalization map computing the Pearson correlation coefficient on each voxel More...

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::pearsonColocalization3dImg (const image::ImageConstPtr &pInImg3d1, const image::ImageConstPtr &pInImg3d2)
 wrapper function for builds the Pearson's colocalization map computing the Pearson correlation coefficient on each voxel More...
 
IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::pearsonColocalization3dImg (const image::ImageConstPtr &pInImg3d1, const image::ImageConstPtr &pInImg3d2, const image::ImagePtr &pOutRealImg)
 wrapper function for builds the Pearson's colocalization map computing the Pearson correlation coefficient on each voxel More...
 

Detailed Description

builds the Pearson's colocalization map computing the Pearson correlation coefficient on each voxel

The Pearson colocalization, also known as Pearson correlation coefficient, is a linear correlation measure between the two input images InImg3d1 and InImg3d2. The result is a Real32 image where intensities belong to the range $ \left[ -1, 1 \right] $.

The Pearson correlation coefficient at each voxel is calculated with the following formula :

\[ OutRealImg[\textbf{x}] = \frac{ \left( InImg3d1[\textbf{x}] - \mu_1\right) \left( InImg3d2[\textbf{x}] - \mu_2\right)}{\sigma_1 \sigma_2} \]

Where $ \textbf{x} = \left[ x, y, z \right] $ is the voxel coordinate vector, $ \mu_i, i \in [1, 2]$ is the mean intensity of $InImg3d_i$ and $\sigma_i$ is its standard deviation.

See Pearson colocalization mapping 2d for an illustration of Pearson colocalization mapping in two dimensions.

See also
https://en.wikipedia.org/wiki/Pearson_correlation_coefficient

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d1 [Input] First 3d image for operation X
ipsdk::imaproc::attr::InImg3d2 [Input] Second 3d image for operation X
ipsdk::imaproc::attr::OutRealImg [Output] image for processing operation (data contained in image buffer are reals) ipsdk::imaproc::duplicateInOut (_pOutRealImg, _pInImg3d1, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg3d1,_pInImg3d2) && 
ipsdk::imaproc::matchSize (_pInImg3d1,_pOutRealImg)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# Sample with a generated output image
outAutoImg = filter.pearsonColocalization3dImg(inImg1, inImg2)
# Sample with a provided output image
outImg = PyIPSDK.createImage(PyIPSDK.eImageBufferType.eIBT_Real32, inImg1.getSizeX(), inImg1.getSizeY(), inImg1.getSizeZ())
filter.pearsonColocalization3dImg(inImg1, inImg2, outImg)

Example of C++ code :

Example informations

Associated library

IPSDKIPLFiltering

Header file

#include <IPSDKIPL/IPSDKIPLFiltering/Processor/PearsonColocalization3dImg/PearsonColocalization3dImg.h>

Code Example

// Sample with a generated output image
// ------------------------------------
// compute the pearson colocalization
ImagePtr pAutoOutImg = pearsonColocalization3dImg(pInImg1, pInImg2);
// Sample with a provided output image
// -----------------------------------
// create output image
ImageGeometryPtr pOutputImageGeometry = geometry3d(eImageBufferType::eIBT_Real32, sizeX, sizeY, sizeZ);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
// compute addition of input images
pearsonColocalization3dImg(pInImg1, pInImg2, pOutImg);
See also
PearsonColocalization3dImgLvl1
PearsonColocalization3dImgLvl2
PearsonColocalization3dImgLvl3

Function Documentation

◆ pearsonColocalization3dImg() [1/2]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::pearsonColocalization3dImg ( const image::ImageConstPtr pInImg3d1,
const image::ImageConstPtr pInImg3d2 
)

wrapper function for builds the Pearson's colocalization map computing the Pearson correlation coefficient on each voxel

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ pearsonColocalization3dImg() [2/2]

IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::pearsonColocalization3dImg ( const image::ImageConstPtr pInImg3d1,
const image::ImageConstPtr pInImg3d2,
const image::ImagePtr pOutRealImg 
)

wrapper function for builds the Pearson's colocalization map computing the Pearson correlation coefficient on each voxel

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure