Data File

ImageTank uses a system to store multiple named variables and multiple time values into a single binary file. Typically this is done using a .dtbin file format but it can also use a .mat file that can read and written by MatLab. The .dtbin file format has better support for three dimensional arrays and can be signifcantly faster.

There are multiple ways to use this file format:

  • You can save a data file from within ImageTank and read it back into ImageTank. This is useful when you want to convert a collection of data that is stored in a format that does not have a fast input method. For example text files, a lot of different files, tiff files, files that need a conversion routine.
  • You can use the support in DTSource to write the data file directly to a disk rather than coming up with your own format or using a format that is not as easy or fast to import.
  • The external program mechanism in ImageTank uses this format to send data back and forth and you might want to read those files directly.

One way to think of this is that a data file has two components. One component breaks a variable type in ImageTank into a collection of numbers, text, lists and arrays. Each one is has a name that is embeds the hiararchy of name+time+component. This is typically what is referred to as key-value pair where the key encodes the position in the hieararchy and the value is a number, text or an array of numbers.

The second component is the way that this list of key-value pairs is stored. This is where the .dtbin and .mat binary file formats come in. And the .dtbin format in particular is designed for the key lookup to be quick and the value to stay on disk until it is needed. This leads to a much faster I/O performance.

To explain this, consider a few examples where the data is created in ImageTank, written to a file and then read back in.

Example

In the following example four objects from the workspace are saved. Three of them have multiple time values. Export by clicking on the Save button.

The second object is the object created from from the toolbar. The input file can be typed in or selected through the standard open dialog by clicking on the folder icon next to the name. Note that if you save the file in ImageTank and another object, even in a different file uses it the file is automatically loaded in.

The key here is that the file is self documenting. You did not have to specify the structure of the entries you are reading in. That structure is read from the file even though none of the data is read in. The file is only 49MB, and is only limited by the size of your disk. Hundreds of GB are perfectly fine since only the table of contents is read in.