ImageTank is structured around a list of variables and figures. Each variable has a specific type and you can tell the type from the icon for the variable. There are however several classes of variable types.
Roughly speaking variables fit into the following categories
- File on disk. This file can be computed, link directly to disk or come from a URL.
- Data File. A certain type of file on disk, but this is the native data store for ImageTank. ImageTank can write these files, there is a C++ library included with ImageTank so you can write that file and external programs communicate data using this mechanism.
- Slicers and transformers: Variables that are used to zoom in on detail, cut down a three dimensional object into a two dimensional object etc.
- Data Objects: What you would typically think of as variables. This means a photograph, polygon, surface in 3D. Some of these have multiple named components such as an image with multiple channels, a table with multiple columns.
- The Group object: One or more data objects or slicers/transformers. If a computation n entry needs to return multiple entries at the same time it will return a Group. This is also where you will find small data structures such as a single number, single point in 2D, range, text label, analytical function etc. These variables are too small to be considered a Data Object on their own. The group can however contain bigger data objects such as a surface and even other groups that contain groups etc.
The following goes through these different variable.
Stand-alone Data Objects
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. The bitmap has an origin and step size. Different from Image in that this is a better match for photographs and movies. Can be converted to an Image
Unstructured Image: Similar to the standard image, except on a triangulated grid. Has multiple channels, with a value for each vertex.
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. This is the natural extension of the 2D path to 3D.
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.
Transform in 3D: Allows rotation, shift, scale. Essentially a 3×3 matrix for rotation and a shift.
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. This might be a file that has a path name that has a standard file location but it can also be a file that is managed by ImageTank.
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