NMRPipe Processing Functions
IMG: Image Processing Utilities.
IMG provides some simple image processing filters primarily intended for 2D planes. Given a 2D plane Zi,j, a given filter creates a new 2D plane Z'i,j where a given point Z'i=x,j=y is a function F( ) of all points in a rectangular region of the original 2D plane, where the region sizes are specified in terms of +/- points dx and dy:
Z'i=x,j=y = F( Zk,m ) where k = x - dx to x + dx, and m = y - dy to y + dy.
Regions which extend past the edges of the image are wrapped to the opposite sides. The function applied is specified according to the following flags:
|Flag||Function F( )|
|-amin||Minimum Absolute Value.|
|-amax||Maximum Absolute Value.|
This option is used to specify the coefficients Ck,m used in the case where a convolution in applied:
Z'i=x,j=y = Ck,mZi+k-dx,j+m-dy where k = 0 to 2 dx, and m = 0 to 2 dy.
Specifies dx, the +/- X-Axis size of the image processing neighborhood, in points.
Specifies dy, the +/- Y-Axis size of the image processing neighborhood, in points.
If a threshold option is given, only points in the original image which are greater than the specified will be used for computing F().
The following is an example of a convolution filter which corresponds to a simple form of image sharpening. The coefficients of the 3x3 convolution kernel are listed on multiple lines to emphasize their two-dimensional structure, although this is not required:
nmrPipe -in image.dat \ | nmrPipe -fn IMG -dx 1 -dy 1 -conv \ -kern -1 -1 -1 \ -1 9 -1 \ -1 -1 -1 \ -out sharp.dat -ov