Difference between revisions of "Image Calculator: Advanced image calculator options"

From MIPAV
Jump to: navigation, search
(Enter Advanced Operator dialog box)
(Image Calculator-Bulk Images)
Line 56: Line 56:
 
== Image Calculator-Bulk Images ==
 
== Image Calculator-Bulk Images ==
  
<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"> As for now, the Image Calculator-Bulk Images utility adds the pixel values of selected images. 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 might be capped (or clamped) and the result might not necessarily be as you expect. See also Image Calculator, [MIPAV_Utilities.html#1176469 "clip mode" ]and [MIPAV_Utilities.html#1176475 "promotion mode" on page 438].<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"> <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">
+
<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"> As for now, the Image Calculator-Bulk Images utility adds the pixel values of selected images. 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 might be capped (or clamped) and the result might not necessarily be as you expect. See also Image Calculator, "clip mode" and "promotion mode"].<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"> <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">
  
 
{| 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 257. Adding images using the Image Calculator-Bulk Images utility <br /></font>'''</div>
+
|+ <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 37. Adding images using the Image Calculator-Bulk Images utility <br /></font>'''</div>
 
|-
 
|-
|
 
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
 
 
|
 
|
 
[[Image:Image1.jpg]]
 
[[Image:Image1.jpg]]
|}<br clear="all" /><br /></font></div> <div class="CellBody">Image 1</div>
+
<br /></font></div> <div class="CellBody">Image 1</div>
|
+
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
+
 
|
 
|
 
[[Image:Image2.jpg]]
 
[[Image:Image2.jpg]]
|}<br clear="all" /><br /></font></div> <div class="CellBody">Image 2</div>
+
<br /></font></div> <div class="CellBody">Image 2</div>
 
|-
 
|-
|
 
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
 
 
|
 
|
 
[[Image:Image3.jpg]]
 
[[Image:Image3.jpg]]
|}<br clear="all" /><br /></font></div> <div class="CellBody">Image 3</div>
+
<br /></font></div> <div class="CellBody">Image 3</div>
|
+
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
+
 
|
 
|
 
[[Image:Image43.jpg]]
 
[[Image:Image43.jpg]]
|}<br clear="all" /><br /></font></div> <div class="CellBody">Image 4</div>
+
<br /></font></div> <div class="CellBody">Image 4</div>
 
|-
 
|-
|
 
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
 
 
|
 
|
 
[[Image:Image5.jpg]]
 
[[Image:Image5.jpg]]
|}<br clear="all" /><br /></font></div> <div class="CellBody">Image 5</div>
+
<br /></font></div> <div class="CellBody">Image 5</div>
 
|
 
|
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
 
 
|
 
|
 
[[Image:Result.jpg]]
 
[[Image:Result.jpg]]
|}<br clear="all" /><br /></font></div> <div class="CellBody">Result</div>
+
<br /></font></div> <div class="CellBody">Result</div>
 
|}
 
|}
  
<br /></font></div>
 
  
 
==== image types ====
 
==== image types ====
Line 105: Line 93:
 
To run the utility, complete the following steps:
 
To run the utility, complete the following steps:
  
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Open images which you would like to add. The images must have the same dimensions.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Select Utilities &gt;Image Calculator-Bulk Images. The dialog box opens. See [MIPAV_Utilities.html#1297586 Figure 258].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 The list of images appears in the Images window.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  4 If you want to remove a certain image(s), select it, and then press Remove.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  5 If you want to add images to the list press Browse, and then select the image(s) from your disk.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  6 Check the Clip option, if you want to clamp result data to the bounds of the input image type. Check the Promote option to promote image type so that the range of the result fits into the new image type. Refer to [MIPAV_Utilities.html#1176469 "clip mode" on page 438] and [MIPAV_Utilities.html#1176475 "promotion mode" on page 438].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  7 Click OK. The algorithm begins to run. And the result image appears in a new image frame.<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">
+
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Open images which you would like to add. The images must have the same dimensions.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Select Utilities &gt;Image Calculator-Bulk Images. The dialog box opens. See Figure 38.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 The list of images appears in the Images window.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  4 If you want to remove a certain image(s), select it, and then press Remove.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  5 If you want to add images to the list press Browse, and then select the image(s) from your disk.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  6 Check the Clip option, if you want to clamp result data to the bounds of the input image type. Check the Promote option to promote image type so that the range of the result fits into the new image type. Refer to "clip mode" and "promotion mode" .<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  7 Click OK. The algorithm begins to run. And the result image appears in a new image frame.<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">
  
 
{| 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 258. Image Calculator-Bulk Images dialog box<br /></font>'''</div>
+
|+ <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 38. Image Calculator-Bulk Images dialog box<br /></font>'''</div>
 
|-
 
|-
|
 
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
 
 
|
 
|
 
[[Image:ImageCalculatorBulkImagesDialog.jpg]]
 
[[Image:ImageCalculatorBulkImagesDialog.jpg]]
|}<br clear="all" /><br /></font></div>
 
 
|}
 
|}
 
<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"> <br /></font></div>
 
  
 
[[Image Math]]
 
[[Image Math]]

Revision as of 18:29, 15 February 2012

Advanced image calculator options

To use advanced options provided by the Image Calculator dialog box, complete the following steps:

1 Open at least two images. The images must have the same dimensions.
2 Select Utilities >Image Calculator. The dialog box opens.
3 Use the Image B list box to select Image B.
4 Check the Clip option if you want to clamp result data to the bounds of the input image type. Check the Promote option to promote image type so that the range of the result fits into the new image type.
5 Use the Advanced button to call the advanced options. The Enter Advanced Operator dialog box appears.
6 Use the dialog box options to perform any of the standard operations for which you would normally use a handheld calculator. Advanced operator performs on the images basic arithmetic, such as addition and subtraction, as well as functions found on a scientific calculator, such as logarithms and exponent.
Note: that in this dialog box you can combine images and constants in one math operation.
7 Click OK. The algorithm begins to run.
8 Depending on whether you selected New image or Replace Image A, the result appears in a new window or replaces the Image A to which the algorithm was applied.
Enter Advanced Operator dialog box
Figure 36. The Enter Advanced Operator dialog box options

A= [file name]
Image A.

AdvancedMathOptions2.jpg

B=[file name]
Image B.
All available math functions can be entered in the Advanced operator text box manually or using the corresponding buttons.
Numbers also can be entered in the Advanced Operator text box manually or using the calculator buttons.
Backspace
Uses the same function as the Backspace button in the handheld calculator.
CE
Uses the same function as the CE button in the handheld calculator.
OK
Applies the algorithm according to the specifications in this dialog box.
Cancel
Disregards any changes that you made in this dialog box and closes it.
Help
Displays online help for this dialog box.

references

The parsing of the advanced operator expression is largely based on the file Func.java by Leen Ammeraal. The Func.java file appears at ftp://ftp.expa.fnt.hvu.nl/pub/ammeraal and http://home.wxs.nl/~ammeraal
It is also contained in Chapter 8 of Computer Graphics for Java Programmers by Leen Ammeraal, Copyright 1998 by John Wiley & Sons Ltd.

Image Calculator-Bulk Images

As for now, the Image Calculator-Bulk Images utility adds the pixel values of selected images. 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 might be capped (or clamped) and the result might not necessarily be as you expect. See also Image Calculator, "clip mode" and "promotion mode"].

Figure 37. Adding images using the Image Calculator-Bulk Images utility

Image1.jpg


Image 1

Image2.jpg


</font>
Image 2

Image3.jpg


</font></div>
Image 3

Image43.jpg


</font></div>
Image 4

Image5.jpg


</font></div>
Image 5

Result.jpg


</font></div>
Result


image types

You can apply Image Calculator-Bulk Images to all 2D and 3D color and grayscale images. Images must have the same number of dimensions and the length of every dimension in each image must be the same. Also, all images must be color images, or grayscale images. There are no other restrictions on data type.

Applying the Image Calculator - Bulk Images

To run the utility, complete the following steps:

1 Open images which you would like to add. The images must have the same dimensions.
2 Select Utilities >Image Calculator-Bulk Images. The dialog box opens. See Figure 38.
3 The list of images appears in the Images window.
4 If you want to remove a certain image(s), select it, and then press Remove.
5 If you want to add images to the list press Browse, and then select the image(s) from your disk.
6 Check the Clip option, if you want to clamp result data to the bounds of the input image type. Check the Promote option to promote image type so that the range of the result fits into the new image type. Refer to "clip mode" and "promotion mode" .
7 Click OK. The algorithm begins to run. And the result image appears in a new image frame.
Figure 38. Image Calculator-Bulk Images dialog box

ImageCalculatorBulkImagesDialog.jpg

Image Math