# Expression

Class: NodeImageExpression

Create a custom expression which applies to the elements of the input image. The user can specify an arbitrary number of input images, numbers and bits which are assigned a variable name, starting with $$a$$. Atleast one image is mandatory. The variable names can then be used to create an expression to be calculated. As an example, to create a node that takes an input image $$a$$, ads it to a second input image $$b$$, and multiplies the result with $$e$$ raised to the power of an input number $$c$$, you would write:

(a+b)*e^c


Special Variables:

e: The natural logarithmic base.
pi: The ratio of the circumference of a circle to its diameter.
vpx, vpy, vpz: The x, y, and z coordinate of the current voxel.
vix, viy, viz: The x, y, and z index of the current voxel.
vsx, vsy, vsz: The x, y, and z size of one voxel.
vcx, vcy, vcz: The x, y, and z voxel count of the image.
ipx, ipy, ipz: The x, y, and z position of the image.

Some Functions:

abs(x), acos(x), asin(x), atan(x), atan2(x, y), ceiling(x), cos(x), cosh(x), floor(x), log(x), log(x, b), log10(x), max(x, y), min(x, y), rand(x), rande(x), randg(o, s), randn(m, sd), round(x), sign(x), sin(x), sinh(x), sqrt(x), tan(x), tanh(x), truncate(x)

## Inputs

#### a

The default image input.

Type: Image4DFloat, Required, Single

## Outputs

#### Result

The resulting image.

Type: Image4DFloat

## Settings

### Display

#### Show Expression Boolean

If checked, the expression will be displayed beneath the node name in the process window.

#### Node Name Text

The display name of the node in the process window.

### Expression

#### Expression Text

The expression which should be calculated.

### Inputs

#### Images Integer

The number of input images.

#### Numbers Integer

The number of input numbers.

#### Bits Integer

The number of input bits.

### Result

#### Set Infinity To Number

What value should Infity be set to.

#### Set Undefined Numbers To Number

What value should Undifined numbers be set to.

#### Resulting Image Name Text

The name of the resulting image.