Difference between revisions of "Image Calculator"
(→Background) |
(→Add) |
||
Line 36: | Line 36: | ||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure | + | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 23. Adding Image A and Image B<br /></font>'''</div> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:ImageAPixelValues1.jpg]] | [[Image:ImageAPixelValues1.jpg]] | ||
− | |||
− | |||
− | |||
| | | | ||
[[Image:ImageBPixelValues1.jpg]] | [[Image:ImageBPixelValues1.jpg]] | ||
− | |||
− | |||
− | |||
| | | | ||
[[Image:ImageAIMageBPixelValuesAdd1.jpg]] | [[Image:ImageAIMageBPixelValuesAdd1.jpg]] | ||
− | |||
|- | |- | ||
| | | | ||
Line 61: | Line 52: | ||
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; 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"> <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">Result= Image A Image B (255.0,12.0,255.0)</font></span><br /></font></div> | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; 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"> <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">Result= Image A Image B (255.0,12.0,255.0)</font></span><br /></font></div> | ||
|} | |} | ||
− | |||
− | |||
==== AND ==== | ==== AND ==== |
Revision as of 17:57, 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.
Image A sample point (255.0,0.0,255.0)
|
Image B (0.0,12.0,255.0)
|
Result= Image A Image B (255.0,12.0,255.0)
|
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.
|
|
|- |
|
|
|}
Maximum
RGB values for pixels in the Image A and the corresponding RGB values for the Image B are compared, and then replaced with the greater RGB values. As shown in [MIPAV_Utilities.html#1176618 Figure 246] below, for a chosen point, it took MAX R=12.0 from Image B, MAX G=30.0 from Image A, and MAX B=243.0 from Image A.
|
|
|- |
|
|
|}
Minimum
RGB values for pixels in the Image A and the corresponding RGB values for the Image B are compared, and then replaced with the minimum RGB values. As shown in [MIPAV_Utilities.html#1176653 Figure 247] below, for a chosen point, it took MIN R=0.0 from Image A, MIN G=00.0 from Image B, and MIN B=44.0 from Image B.
|
|
|- |
|
|
|}