aboutsummaryrefslogtreecommitdiff
path: root/pkg/proto/doc/imfunction.hlp
blob: 6b663384786bec5cc75f1dc004e1540dd8bebb9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.help imfunction Aug91 proto
.ih
NAME
imfunction -- Apply a function to the image pixel values
.ih
USAGE	
imfunction input output function
.ih
PARAMETERS
.ls input
The input image list.
.le
.ls output
Output image list. The number of output images must match the number of
input images. If the output image list equals the input image list
the input images are overwritten.
.le
.ls function
Function to be applied to the input pixels. The options are:
.ls log10
Take the logarithm to base 10 of an image. Negative and zero-valued
pixels will be assigned the value -MAX_EXPONENT.
.le
.ls alog10
Taken the antilogarithm to base 10 of the image. Positive out-of-bounds
pixel values will be assigned the value MAX_REAL, negative out-of-bounds
pixel values will be assigned the value 0.0.
.le
.ls ln   
Take the natural logarithm of an image. Negative and zero-valued pixels
will be assigned the value - ln (10.) * MAX_EXPONENT.
.le
.ls aln   
Take the antilogarithm to base e of an image. Positive out-of-bounds pixel
values will be assigned the value MAX_REAL, negative out-of-bounds
pixel values will be assigned the value 0.0
.le
.ls sqrt
Take the square root of an image. Negative pixel values will be assigned
the value 0.0.
.le
.ls square
Take the square of an image.
.le
.ls cbrt
Take the cube root of an image.
.le
.ls cube
Take the cube of an image.
.le
.ls abs  
Take the absolute value of an image.
.le
.ls neg  
Take the negative of an image.
.le
.ls cos  
Take the cosine of an image.
.le
.ls sin  
Take the sine of an image.
.le
.ls tan  
Take the tangent of an image.
.le
.ls acos
Take the arc-cosine of an image. The output pixels will lie between
0.0 and PI.
.le
.ls asin
Take the arc-sine of an image. The output pixels will lie between -PI/2
and +PI/2.
.le
.ls atan
Take the arc-tangent of an image. The output pixels will lie between
-PI/2 and +PI/2.
.le
.ls hcos
Take the hyperbolic cosine of an image. Positive or negative
out-of-bounds pixels will be assigned the value MAX_REAL.
.le
.ls hsin
Take the hyperbolic sine of an image. Positive and negative out-of-bounds
pixel values will be assigned the values MAX_REAL and -MAX_REAL respectively.
.le
.ls htan
Take the hyperbolic tangent of an image.
.le
.ls reciprocal
Take the reciprocal of an image. Zero-valued pixels will be assigned
the output value 0.0
.le
.le
.ls verbose = yes
Print messages about actions taken by the task?
.le

.ih
DESCRIPTION

The selected function \fIfunction\fR is applied to the pixel values of all
the input images \fIinput\fR to create the pixel values of the output
images \fIoutput\fR. The number of output images must equal the number of
input images. If the output image name is the same as the input image name
the input image will be overwritten.

If the input image is type real or double the output image will
be of type real or double respectively. If the input image is type
ushort then the output image will be type real. If the input image is one of
the remaining integer data types, then the output image will be type
real, unless function is "abs" or "neg", in which case the output
data type will be the same as the input data type.

Values of the machine dependent constants MAX_REAL and MAX_EXPONENT can be
found in the file "hlib$mach.h". 

.ih
EXAMPLES

1. Take the logarithm of the pixel values of images in1 and in2 and write
the results to out1 and out2.

.nf
    cl> imfunction in1,in2 out1,out2 log10
.fi

.ih
SEE ALSO
imarith,imreplace
.endhelp