IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

high pass filter on 3d image More...

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::highPass3dImg (const image::ImageConstPtr &pInImg3d, const ipUInt32 inHalfKnlSize)
 wrapper function for high pass filter on 3d image More...
 
IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::highPass3dImg (const image::ImageConstPtr &pInImg3d, const ipUInt32 inHalfKnlSize, const image::ImagePtr &pOutImg)
 wrapper function for high pass filter on 3d image More...
 

Detailed Description

high pass filter on 3d image

High-pass filters keep high frequencies of the input image and reduce low frequencies. They are usually used to make the image appear sharper. This current implementation of high-pass filter is equivalent to a 3d convolution, using a cubic kernel of given half size ( $halfKnlSize$), whose all elements equal to -1, except the central element, whose value equals to $(2*halfKnlSize+1)^3$.

A mirror policy is used to apply filter to borders. Input and output images must have same size (see Border policy for more details).

See High-pass 2d for an illustration of high-pass filter on a 2d image

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InHalfKnlSize [Input] half kernel size (square or cubic kernel) X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation promoteUnary (_pOutImg, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg3d,_pOutImg)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# high pass filter 3d computation
outImg = filter.highPass3dImg(inImg, 5)

Example of C++ code :

Example informations

Associated library

IPSDKIPLFiltering

Header file

Code Example

// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// definition of a custom output geometry
ImageGeometryPtr pOutImageGeometry = geometry3d(
outImgBufferType,
pInImg->getSizeX(),
pInImg->getSizeY(),
pInImg->getSizeZ());
// creation of output image
boost::shared_ptr<MemoryImage> pOutImg = boost::make_shared<MemoryImage>();
pOutImg->init(*pOutImageGeometry);
// compute high pass filter on input image
highPass3dImg(pInImg, inHalfKnlSize, pOutImg);
See also
HighPass3dImgLvl1
HighPass3dImgLvl2
HighPass3dImgLvl3

Function Documentation

◆ highPass3dImg() [1/2]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::highPass3dImg ( const image::ImageConstPtr pInImg3d,
const ipUInt32  inHalfKnlSize 
)

wrapper function for high pass filter on 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ highPass3dImg() [2/2]

IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::highPass3dImg ( const image::ImageConstPtr pInImg3d,
const ipUInt32  inHalfKnlSize,
const image::ImagePtr pOutImg 
)

wrapper function for high pass filter on 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure