IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
High-pass 3d
imagehighPass3dImg (inImg3d,inHalfKnlSize)

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

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

Header file

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

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);