Getting Started

First Run

The first time you start NDIToolbox, it will create a local folder under your $HOME folder (e.g. c:\users\chris in Windows 7/8 or /home/chris under Linux) to store data files, plugins, POD models, and other user-generated files. As of this writing the local folder is by default called nditoolbox (or a7117 in earlier builds, named after the internal TRI/Austin project number), but you can choose any location you like. So after the first run of NDIToolbox you’ll have a local data folder that looks like this:

A configuration file will also be stored under your $HOME folder as nditoolbox.cfg. The configuration file stores basic information about how you’re using NDIToolbox, such as how to plot 2D data and where to find your user files. You may also encounter a file nditoolbox.log in the same folder as nditoolbox.cfg, which is a log file used to record errors that occur while using NDIToolbox. The log file is viewable from within NDIToolbox by selecting Display Application Log… from the Help menu. If you run into difficulties with NDIToolbox, you can copy-paste the contents of this log (or add as an attachment of course) to any correspondence with TRI.

Using NDIToolbox

NDIToolbox is designed around the idea of managing data. You have multiple data files organized in a particular way, and you’d like to use NDIToolbox to plot, preview, and manipulate the data. How you organize your data is up to you but one suggestion would be to organize by structure and inspection. For example, you can create a subfolder Pennybacker Bridge under your data folder to house all the inspections of the Pennybacker Bridge; under this subfolder place additional subfolders Bridge Deck and Steel Cables to house inspections of the bridge’s substructures, subfolders under these for particular inspections of the substructure, and so on.

  • c:\users\chris\nditoolbox\data\Pennybacker Bridge
  • c:\users\chris\nditoolbox\data\Pennybacker Bridge\Bridge Deck
  • c:\users\chris\nditoolbox\data\Pennybacker Bridge\Bridge Deck\GPR April 21 2012
  • c:\users\chris\nditoolbox\data\Pennybacker Bridge\Steel Cables
  • c:\users\chris\nditoolbox\data\Pennybacker Bridge\Steel Cables\UT Nov 3 2010

If you don’t want or need this level of organization, you can of course just use c:\users\chris\nditoolbox\data as-is, it’s up to you.

When the user interface is shown you’ll see two panels. The NDE Data panel at the top lists all the files currently in the local data folder.


To refresh the list of data files, press the Refresh Data button in the toolbar; you can also add and remove data from this folder by pressing the + and buttons in the toolbar respectively. Adding a data file prompts you to browse to an existing data file, which will be converted to HDF5 if necessary and copied to the local data folder. Removing a data file removes the file from the local data folder; the original data file isn’t affected.

The Plot panel at the bottom displays thumbnail images of your data as an easy way to browse large sets of data. When you select a data file in the NDE Data panel, NDIToolbox will show the thumbnail plot of this file. The first time you select a file there will be a slight delay in displaying the thumbnail as NDIToolbox is generating it in the background, but after this initial generation it will continue to use this same thumbnail until you Refresh Data or the file’s path changes. If you’d rather not use thumbnails, disable them by toggling the Enable/Disable Thumbnails button.

Working With Data

Importing Data

NDIToolbox uses the Hierarchical Data Format to store data. To import data in other formats (DICOM, DICONDE, delimited text, bitmap images, etc.), select the appropriate menu item from the Import submenu under the File menu, click the Import Data button in the toolbar, or use the keyboard shortcuts CTRL-A or CTRL-+. The file will be read and converted to HDF5 before it is copied to the local data folder. Depending on the type of file being imported, you may be asked to provide additional details – for example, importing an ASCII delimited-text file such as a CSV will bring up a dialog that asks you what character is used as the delimiter, whether lines at the top or bottom should be skipped, whether you’d like to import all or a select number of columns, and so on. If the file contains more than one dataset (for example, an amplitude and a full waveform dataset), NDIToolbox will import each as separate HDF5 files.


The current version of NDIToolbox can import data from the following file types.

Exporting Data

You can also export HDF5 files in the local data folder to a text (CSV) file by selecting the file in the NDE Data panel and selecting the Export Data button (looks like a disk) in the toolbar.

Plots And Previews

Previewing Data

To preview a data file, select it from the NDE Data panel and press the Data button in the toolbar (looks like a table). After loading the data you’ll be presented with a spreadsheet showing the contents.


Working With Three Dimensional Data

NDIToolbox supports previews and plots of three-dimensional data. Throughout this document and in NDIToolbox we refer to X, Y, and Z axes. The following figure illustrates the coordinate system used: Y is the row number, X is the column number, and Z is the third dimension into your data.

For three-dimensional data, you’ll be asked how to take a two-dimensional “slice” for preview. This slice is a plane through the 3D data that’s defined by its orientation and an index. The orientation of the slice specifies which plane your slice will be parallel to: X-Y, X-Z, or Y-Z. The index of the slice specifies how far into the other dimension your slice will be. For example, specifying an orientation of Parallel To X-Y means that your slice will be somewhere in the Z axis, while Parallel to Y-Z will mean your slice will be taken somewhere in the X axis.

If you’re familiar with NumPy, here’s how the slicing works. For a three-dimensional data set A, a point P at position (x0, y0, z0) is given by P = A[y0, x0, z0] (notice that the Y index is first – NumPy indexes data beginning with row and then column). A planar slice in A is one of the following.

  • A slice S in Z (parallel to the X-Y plane) at index z0 is given by S = A[:, :, z0] (S is every point in A for which Z=z0)
  • A slice S in Y (parallel to the X-Z plane) at index y0 is given by S = A[y0, :, :] (S is every point in A for which Y=y0)
  • A slice S in X (parallel to the Y-Z plane) at index x0 is given by S = A[:, x0, :] (S is every point in A for which X=x0)

Plotting Data

To plot a data file, select it from the NDE Data panel and press either the X-Y Plot button (looks like a line chart) or the Image Plot button, depending on whether you want to plot a simple line chart or an image plot. After reading the data NDIToolbox will open a new window with the plot. You can also add/edit plot and axis titles and toggle the grid; image plots additionally allow choosing different color scales and applying labels to the colorbar.

To pan around the plot press the Pan button in the tool palette at the bottom of the plot window, and drag the plot with the left mouse button. You can also zoom in/out in horizontal and vertical scale by dragging with the right mouse button. To zoom in to a particular region, press the Zoom button and select a region in the plot. To reset the plot to its original bounds, press the Home button.

Exporting Plots

If you’d like to export the plot as a static image, press the Save button and choose a destination filename. NDIToolbox currently supports the following formats for exporting plots:

  • Encapsulated Postscript (EPS)
  • Enhanced Metafile (EMF)
  • JPEG
  • PDF
  • Portable Network Graphics (PNG)
  • Postscript (PS)
  • Raw RGBA Bitmap (RAW/RGBA)
  • Scalable Vector Graphics (SVG/SVGZ)
  • Tagged Image File Format (TIFF)

For general distribution a bitmap format such as PNG or JPEG can be used, however if you require higher-quality presentations (e.g., for publication) consider a vector format such as EPS or SVG.

You can also save the data as an HDF5 file by choosing Save Current Data from the File menu.

Plots have various operations such as rectification, window functions, etc., depending on what type of plot is shown. NDIToolbox also supports plugins that can alter the data in a plot. To get back to the original dataset after running any of these operations, choose Revert To Original from the plot window’s Operations menu. This will discard all the changes you’ve made to the data, and replot the original dataset. You can also save a modified dataset by selecting Save Current Data from the plot window’s File menu.


As mentioned above, image plots (and Megaplots, see below) support the use of different color scales (“colormaps”) to aid in making the most of the presentation of your data. NDIToolbox’s plotting library includes 138 colormaps, but also supports creating your own customized colormaps. To create a new colormap, select the Create Colormap… menu item from the Colormaps submenu in the Plot menu in an image plot or Megaplot presentation. The Create Colormap window shown below will open. Colormaps are created and edited using the controls on the left side of this window; a preview of the current colormap is shown in the image plot on the right. A sample three-color colormap (black, gray, white) is loaded to get you started; you can add/delete/reorder these colors or load your own colormap (more detail below).

A colormap consists of a list of one or more colors defined by their Red, Green, and Blue components and a type. Two types of colormap are supported. A linear gradient colormap linearly interpolates colors between the colors defined in the colormap to create a smooth gradient of 256 colors. A straight list colormap does not interpolate colors and creates a simple list of the colors defined in the colormap.

The following screen shot illustrates the difference between the two types of colormap: on the left, a dataset is shown using the ‘cool_blue’ colormap that ships with NDIToolbox as a linear gradient. On the right, the same colormap as a simple list. Both colormaps use the same four colors, but the colormap on the left creates gradients between the four defined colors to generate a final colormap with 256 colors. The colormap on the right uses only the four colors defined in the colormap itself.

Most data presentation applications use a linear gradient colormap, however for edge detection and similar “go/no-go” use cases you may find a simple list colormap more useful.

Colors in a colormap are defined as a triplet of 3 numbers that set their Red, Green, and Blue components respectively; and are expressed as a decimal between 0 and 1. The color black is thus defined as 0,0,0; white is 1,1,1; and all other colors are in between these ranges.

To add a new color, click the New Itembutton in the Colors list and the standard color dialog for your operating system will be displayed. Modify the color as desired and click OK; the color’s components are added to the colormap. Colors are listed in the colormap from low end of scale to high so that the first color in the list is used to represent the smallest values in the data. To reorder the colors, select a color in the list and press the up or down arrow buttons in the color list to move it up or down in the colormap respectively. To delete a color, select the color and press the delete button in the color list.

To preview the current colormap, press the Preview Colormap button at the top of the Preview pane. The sample data are replotted using your current colormap. Once you’re satisfied with your colormap you can save it for future use by selecting the Save Colormap… item from the File menu. By default NDIToolbox will store the colormap in its colormaps folder but you can select any location (note that NDIToolbox will only look in the default folder for colormaps to use, however). Colormaps are saved as ASCII text in JSON and can be edited with a conventional text editor if desired. The filename you choose for the new colormap is used to name the colormap for subsequent plots; as a result you’ll likely want to use filenames like “cool blue”, “Modified_Spectral,” etc. NDIToolbox copies several sample colormaps to your colormaps folder on its first run, we recommend having a look at them to get you started.

Once you’ve saved your colormap to your colormaps folder, NDIToolbox will now include it in the list of available colormaps. To use your colormap in a plot, select it from the list presented when you select the Select Colormap… menu item from the Colormaps submenu under the Plot menu.


NDIToolbox also has a “MegaPlot” that plots three-dimensional data directly using a common presentation style for NDE data shown below.

In this type of plot, a C-scan plot in the lower-right indicates your position in the Z Axis in the 3D data. To zoom and pan in each plot, make sure the Use Plot Navigation Tools checkbox at the bottom of the screen is checked to enable the tool palette. When this checkbox is unchecked, the tool palette is disabled and the Megaplot presentation responds to clicks inside the plot. For example, when you click on a position (x0, y0) inside the C-scan, the plot will update the other three panels:

  • The A-scan (upper-left) is a plot of the data through Z at position (x=x0, y=y0).
  • The Vertical B-scan (upper-right) is a vertical slice of the current C-scan plot (x=x0, y), or a 2D slice of the data at (x=x0).
  • The Horizontal B-scan (lower-left) is a horizontal slice of the current C-scan plot (x, y=y0), or a 2D slice of the data at (y=y0).

By default the Megaplot uses 1D linear slices through the current Cscan for displaying horizontal and vertical B-scans. To use the more conventional 2D planar slices for B-scans, check the Plot Conventional B-scans item from the Plot menu. NDIToolbox will now plot standard 2D B-scans in Megaplot presentations until you uncheck this menu item.

Frequently in ultrasonics NDE you’d like to define a subset of the 3D data to generate a C-scan rather than simply taking a slice in Z. From the Operations menu, choose the Define C Scan menu item. You’ll be asked to specify the range over which you’ll be generating the C-scan, e.g. if you specify 222-444 the C-scan data will be generated using the subset of data between Z=222 and Z=444. Next, you choose the function used to generate the C-scan. Several options are available including min, max, and average. Choose the function and click Ok, and the C-scan data will now be the results of applying this function against the specified subset of data. For example, the following screenshot shows the results of applying the min function against Z=222:444 in the ultrasonic immersion tank data shown above in the MegaPlot screenshot.

Notice that when you generate a C-scan plot in this fashion that the linear B-scan plots are now taking data from this C-scan and not the original data. The A-scan continues to take data from the original data set, as will conventional B-scans.

One thing to note about MegaPlots is that although your data is presented in one or two dimensions, the underlying 3D data is unchanged. Plugins that don’t expect a 3D data set can behave strangely or run slowly. If you need to use a plugin and you’re not sure if it supports 3D data, consider plotting a slice of the 3D data instead of using the MegaPlot and running your plugin against this plot.

Although the MegaPlot offers one way to present 3D data by showing A, B, and C scans simultaneously, you can generate each of these plots by itself in its own window. To produce a B-scan plot from a 3D dataset for example, choose the Image Plot function in NDIToolbox and as usual with 3D data, specify a plane. Going back to the immersion tank ultrasonic data shown in the MegaPlot figure, the following screenshot shows two B-scans taken from this data by slicing in the X and Y axes.

Similarly, if you’d like to generate an A-scan of a 3D data set, choose the X-Y Plot function. You’ll be asked to specify a slice similar to the slicing done for image plots, but in this case you specify two indices. A typical A-scan representation in NDIToolbox is performed by specifying a point in X and Y and plotting the Z values at that point, as shown in the following A-scan plot taken from the immersion tank scan data at position P(267, 152).

Next Steps

The best way to learn your way around NDIToolbox is to experiment. Try importing your data and test out an organization scheme. Plot, preview, slice. When you’re familiar with the basics, the next step will be to write your own plugins