Object to interact with the Arithmetic Operator when it is active.
More...
#include <ArithmeticOperator.h>
|
Index | addScalar (Index idx, float scalar, bool newImg=false) |
| Function to add scalar value to image.
|
|
Index | multScalar (Index idx, float scalar, bool newImg=false) |
| Function to multiply image by a scalar value.
|
|
Index | multScalarSlices (Index idx, QList< Variant > scalars, bool newImg=false) |
| Function to apply slice-by-slice scalar multiplication to an image.
|
|
Index | addImage (Index idx, Index img, bool newImg=false) |
| Function to add two images together.
|
|
Index | multImage (Index idx, Index img, bool newImg=false) |
| Function to multiply two images together.
|
|
Index | subtractImage (Index idx, Index img, bool newImg=false) |
| Function to subtract one image from another image.
|
|
Index | divideImage (Index idx, Index img, bool newImg=false) |
| Function to divide a selected image by another image.
|
|
Index | powImage (Index idx, float exponent, bool newImg=false) |
| Function to raise voxel values of image by an exponential value.
|
|
Index | averageImages (Index idx, Array< Index > list) |
| Function to average images together.
|
|
Index | mergeImages (Index idx, Array< Index > list) |
| Function to merge multiple images, where all signal is conserved and compiled into one image.
|
|
Index | averageImages (Array< Index > list) |
| Function to average a list of images into one new image.
|
|
Index | mergeImages (Array< Index > list) |
| Function to merge a list of images into one new image.
|
|
Object to interact with the Arithmetic Operator when it is active.
This object can be used to apply arithmetic operations on loaded images when the Arithmetics Operator is loaded.
Images are loaded in the data manager starting with the reference at 0 See also ScriptMaster::currentOp() to obtain this object and MainWin::setViewMode() to enter the Arithmetics Operator.
◆ addImage
Index addImage |
( |
Index |
idx, |
|
|
Index |
img, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to add two images together.
- Parameters
-
id | First image (see ScriptMaster::index()); this image will be augmented by adding the second image selected to it upon execution of function |
img | Second image; this will be added to the first image and remain unchanged |
newImg | If true will create a new resultant image, leaving the two selected images unchanged |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if /p newImg was specified)
◆ addScalar
Index addScalar |
( |
Index |
idx, |
|
|
float |
scalar, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to add scalar value to image.
- Parameters
-
id | Image that is selected to add scalar value to |
scalar | Value of that is added to the image |
newImg | If true will create a new resultant image |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if newImg was specified)
◆ averageImages [1/2]
Index averageImages |
( |
Array< Index > |
list | ) |
|
|
slot |
Function to average a list of images into one new image.
- Parameters
-
Array<Index> | list of images that will be averaged together to make a new resultant image |
- Returns
- The id of the newly created image
◆ averageImages [2/2]
Index averageImages |
( |
Index |
idx, |
|
|
Array< Index > |
list |
|
) |
| |
|
slot |
Function to average images together.
- Parameters
-
idx | Index of the first image (see ScriptMaster::index()); image will be averaged with list of images designated, and subsequently replaced by a resultant averaged image |
Array<Index> | List of images that will be averaged with the first image designated by 'id'; these images will remain unchanged after execution of function |
- Returns
- The id of the image to which the average was computed
◆ divideImage
Index divideImage |
( |
Index |
idx, |
|
|
Index |
img, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to divide a selected image by another image.
- Parameters
-
id | First image index (see ScriptMaster::index()); this image will be augmented by dividing it by a second image selected upon execution of function |
img | Second image; this image will be dividing the first image and remain unchanged |
newImg | If true will create a new resultant image, leaving the two selected images unchanged |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if /p newImg was specified)
◆ mergeImages [1/2]
Index mergeImages |
( |
Array< Index > |
list | ) |
|
|
slot |
Function to merge a list of images into one new image.
- Parameters
-
Array<Index> | list of images that will be merged together and compiled into a new resultant image |
- Returns
- The id of the newly created image
◆ mergeImages [2/2]
Index mergeImages |
( |
Index |
idx, |
|
|
Array< Index > |
list |
|
) |
| |
|
slot |
Function to merge multiple images, where all signal is conserved and compiled into one image.
- Parameters
-
idx | First image; image will be merged with list of images designated, and subsequently replaced by a resultant merged image |
Array<Index> | list of images that will be merged with the first image designated by 'id'; these images will remain unchanged after execution of function |
- Returns
- The id of the image to which the merge was computed
◆ multImage
Index multImage |
( |
Index |
idx, |
|
|
Index |
img, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to multiply two images together.
- Parameters
-
id | First image (see ScriptMaster::index()); this image will be augmented by multiplying it by the second image selected upon execution of function |
img | Second image; this image will be multiplied with the first image and remain unchanged |
newImg | If true will create a new resultant image, leaving the two selected images unchanged |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if /p newImg was specified)
◆ multScalar
Index multScalar |
( |
Index |
idx, |
|
|
float |
scalar, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to multiply image by a scalar value.
- Parameters
-
id | Image selected to multiply by scalar value |
scalar | Value that image selected will be muliplied by |
newImg | If true will create a new resultant image |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if newImg was specified)
◆ multScalarSlices
Index multScalarSlices |
( |
Index |
idx, |
|
|
QList< Variant > |
scalars, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to apply slice-by-slice scalar multiplication to an image.
- Parameters
-
Index | Image index |
QList<Variant> | List of scalars, one for each slice |
newImg | If true will create a new resultant image, leaving the selected image unchanged |
- Returns
- The id of the newly created image
◆ powImage
Index powImage |
( |
Index |
idx, |
|
|
float |
exponent, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to raise voxel values of image by an exponential value.
- Parameters
-
id | image index (see ScriptMaster::index()) to be raised by designated exponential value |
exponent | value of exponent |
newImg | If true will create a new resultant image, leaving the selected image unchanged |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if /p newImg was specified)
◆ subtractImage
Index subtractImage |
( |
Index |
idx, |
|
|
Index |
img, |
|
|
bool |
newImg = false |
|
) |
| |
|
slot |
Function to subtract one image from another image.
- Parameters
-
id | First image (see ScriptMaster::index()); this image will be augmented by subtracting it by a second image selected upon execution of function |
img | Second image; this image will be subtracted from the first image and remain unchanged |
newImg | If true will create a new resultant image, leaving the two selected images unchanged |
- Returns
- The id of the image to which the power was computed (will return the id of the new image if /p newImg was specified)