Variable Types

There are a number of variables defined in ImageTank. Some of them can be objects in the variable list, but some can only be member variables in a Group variable.

Stand-alone variable types

Space – 2D

Image: One or more channels. The data is defined on a grid in space, where the x and y spacing can be different, the origin does not have to be (0,0), but every channel is defined on the same grid. Each channel can have different depths, such as 8 bit, 16 bit, 32 bit.

Mask in 2D: Binary image on the same type of grid as the Image and Bitmap variables use. Every value is either on (1) or off (0).

Bitmap: A pixelated image, either grascale or color.

Unstructured Image: Similar to the standard image, except on a triangulated grid.  Has multiple channels, with a value for each vertex.

Path in 2D: A polygon in space.  Can contain multiple disconnected components.

Region in 2D: A rectangular region [xmin,xmax]x[ymin,ymax] in space. You typically use this to specify a region of interest.

Transform in 2D: This is a variable that represents an affine transformation.  It is represented as a transformation matrix.  

Space – 3D

Image Stack: This is a three dimensional image, where values are defined on a grid in space. The grid spacing can be different in x,y,z. Just like the Image variable you can have multiple channels and the resolution can be different for each channel.

Mask in 3D: This is a binary image.  There are not multiple channels for a mask, and essentially the values are either 1 (true) or 0 (false).  The primary use for this variable is to restrict the computation to a particular set of values.  For example you can tell an iso-surface finder to only find the iso-surface in a particular region of space, or only compute statistics for a portion of the image.

The most common way to create a mask is to use a threshold and include values either greater or less than a given value.  You the gear menu for the image stack variable to do that.

Surface in 3D: Represents a surface in 3D by using a collection of triangles.  Each triangle has three vertices, and each vertex has an associated normal.  Adjoining triangles might share vertices and normals, but at corners the normals are sometimes different so the point is repeated and the normal is different for each point

Surface Values: A surface object is a collection of triangles.  The Surface Values variable type uses a single surface and allows you to define a scalar field on the surface.  This is represented by associating a value for each vertex of the triangle.  The variable type also allows you to specify multiple channels.

Path in 3D: A polygon in 3D. One or more connected components.

Region in 3D: This is just a region [xmin,xmax]x[ymin,ymax],[zmin,zmax] in space.  The primary purpose of this variable is to focus in on a region of interest in other variables.  For example you can use the same region to crop multiple variables and then draw the cropped variables in a drawing window.  As you vary the region the graphic updates.  Use the Specify module to specify the region and change by dragging the limits around with the mouse.

Coordinate Plane: A plane parallel to the XY, XZ or YZ planes. Typically used to slice a three dimensional object to get a 2D object.

Plane in 3D: The coordinate plane is restricted to a plane parallel to the xy, yz or xz plane.  If you want to slice with an arbitrary plane you need this variable type. More info…

Transform in 3D: Allows rotation, shift, scale. Essentially a 3×3 matrix for rotation and a shift.


Data File: ImageTank defines a method to save one or more variables into a single file. You can store multiple time values for each variable. DTSource includes methods to read and write such files.

Output: Technically not a variable, since it can’t be used as input for anything. These entries are used to save entries to disk, either automatically or when you initiate the save action.

File: Represents a file on disk.

Table: In some environments called a data frame. One way to look at this is as a collection of columns with unique names. The columns will have different type entries. Another is to look at is as a list of records, where each record is essentially a group of variables. There are several different types allowed. The most common are number and text, but you can also have two and three dimensional points, polygons etc.

Dictionary: A key-value dictionary. The key is a text label and each value is a number, text, list of numbers or a dictionary. This is in some ways similar to a JSON object. This is in some ways a simple Group (see the next entry) but the key difference is that the structure is dynamic. This is typically used to send data between external programs and to handle meta data or information that will vary more than the Group. One example is input arguments to a function where some arguments might be optional.

Group: A collection of variables, with unique names. The variables that can be included include most of the variables defined on this page. The main exception is that you can not include a File or Data File. In particular you can include groups in groups. This is essentially what is called a struct in C type languages. Some variables can only appear inside groups, and not as top level objects in the ImageTank object list. They are listed in the next section. The reason for that is that entries like a number don’t typically

Variable types only in Groups

Number: Single number.

Function of one argument: f(x), analytical.

Point in 2D: Point (x,y)

Text: Text label

Related Articles