Difference between revisions of "Image Calculator"
(Created page with '== Image Calculator == <div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-deco...') |
(→Background) |
||
Line 7: | Line 7: | ||
Image Calculator performs arithmetic and logical operations between two images selected from popup menus. | Image Calculator performs arithmetic and logical operations between two images selected from popup menus. | ||
− | The commands in the main Image Calculator dialog box take the pixel values of Image A, and then add, subtract, multiply, etc. them to the pixel values of Image B. For 2D and 3D images the specified operation is performed on all image slices. Refer to | + | The commands in the main Image Calculator dialog box take the pixel values of Image A, and then add, subtract, multiply, etc. them to the pixel values of Image B. For 2D and 3D images the specified operation is performed on all image slices. Refer to Figure 35. |
− | The advanced dialog options | + | The advanced dialog options allow performing advanced math operations on both images and also performing math operations on the selected image using the specified constant, e.g. <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">Image A*C</font>''</span>, where <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">C</font>''</span> is a constant. |
==== clip mode ==== | ==== clip mode ==== | ||
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> When clip mode is selected and the result value is greater than the maximum value of Image A's data type, the value is clamped at the maximum value of Image A's data type. When clip mode is selected and the result value is less than the minimum value of Image A's data type, then the value is clamped at the minimum value of Image A's data type. See | + | <div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> When clip mode is selected and the result value is greater than the maximum value of Image A's data type, the value is clamped at the maximum value of Image A's data type. When clip mode is selected and the result value is less than the minimum value of Image A's data type, then the value is clamped at the minimum value of Image A's data type. See Figure 35.<br /></font></div> |
==== promotion mode ==== | ==== promotion mode ==== |
Revision as of 17:56, 15 February 2012
Contents
Image Calculator
Background
Image Calculator performs arithmetic and logical operations between two images selected from popup menus.
The commands in the main Image Calculator dialog box take the pixel values of Image A, and then add, subtract, multiply, etc. them to the pixel values of Image B. For 2D and 3D images the specified operation is performed on all image slices. Refer to Figure 35.
The advanced dialog options allow performing advanced math operations on both images and also performing math operations on the selected image using the specified constant, e.g. Image A*C, where C is a constant.
clip mode
promotion mode
Promotion sequence:
image types
Image calculator options
Add
Adds the pixel values of Image A to the pixel values of Image B. Basically, this operation adds the colors of the overlay to the background causing the two images ether overflow, or saturate. However, if the added colors excess the color limits, the color will be capped (or clamped) and the result will not necessarily be as you expect.
|
|
|- |
|
|
|}
AND
Does AND of the Image A and the specified Image B. For each pixel in Image A, the Image A pixel value is set to zero, if either the Image A pixel value equals zero, or corresponding Image B pixel value equals zero. Otherwise, the Image A pixel value is left unchanged.
|
|
|- |
|
|
|}
Average
Average of two images is calculated as (Image A Image B)/2.
|
|
|- |
|
|
|}