DigiFlow
User Guide
Version
3.0, June 2008
©
Dalziel Research Partners
2000 – 2008
Contents
2.2.2
Encapsulated PostScript configuration.
2.3
Installation with framegrabber
2.3.1
Framegrabber installation
2.3.4 Video
capture configuration
4.4.1
Setting output stream colour
4.4.7
Encapsulated PostScript streams
5.6.6
Particle Tracking Velocimetry
9.1 Basic
mathematical functions
9.4 Type
manipulation functions
9.8 Reading
and writing images
9.12 Image
processing functions
9.25
Configuration and licence functions
10.1.2
Control of input streams
10.1.3
Control of output streams
10.1.5
Multiple output streams
11.2 The
DigiFlow Drawing format
12.1 Windows
bitmap files (.bmp)
12.4
Enhanced metafiles (.emf)
12.6
Encapsulated PostScript (.eps)
12.7
DigiFlow floating point image format (.dfi)
12.7.3 8 bit
image (DataType = #1001)
12.7.4 8 bit
multi-plane image (DataType = #11001)
12.7.5
Compressed 8 bit image (DataType = #12001)
12.7.6 32
bit image (DataType = #1004)
12.7.7 32
bit multi-plane image (DataType = #11004)
12.7.8
Compressed 32 bit image (DataType = #12004)
12.7.9 64
bit image (DataType = #1008)
12.7.10 64 bit
multi-plane image (DataType = #11008)
12.7.11
Compressed 64 bit image (DataType = #12008)
12.7.12 32
bit range (DataType = #1014)
12.7.13 64
bit range (DataType = #1018)
12.7.14
Rescale image (DataType = #1100)
12.7.15
Rescale image rectangle (DataType = #1101)
12.7.16
Colour scheme (DataType = #2000)
12.7.17
Colour scheme name (DataType = #2001)
12.7.18 Colour scheme name variable (DataType =
#2002)
12.7.19
Description (DataType = #3000)
12.7.20 User
comments (DataType = #3001)
12.7.21
Creating process (DataType = #3002)
12.7.22
Creator details (DataType = #3003)
12.7.23
Image time (DataType = #3018)
12.7.24
Image coordinates (DataType = #4008)
12.7.25
Image plane details (DataType = #4108)
12.8
DigiFlow Particle tracking format
12.9
DigiFlow pixel data format (.dfp)
12.10
DigiFlow drawing format (.dfd)
12.11
DigImage raw format (.pic)
12.12
DigImage compressed format (.pic)
12.13
DigImage movie format(.mov or .dfm)
DigiFlow provides a range of image processing features designed specifically for analysing fluid flows. The package is designed to be easy to use, yet flexible and efficient, and includes a powerful yet flexible macro language. Whereas most image processing systems are intended for analysing or processing single images, DigiFlow is designed from the start for dealing with sequences or collections of images in a straightforward manner.
Before installing or using DigiFlow, please read the Licence Agreement (see §15) and ensure you have completed the registration requirements.
The origins of DigiFlow lie in an earlier system by the same author: DigImage. This earlier system, with its origins in 1988 and first released commercially in 1992, pioneered many uses of image processing in fluid dynamics. Utilising its own DOS-extender technology, DigImage existed in the base 640kB of DOS memory (and later from the command prompt under Windows 3.x and 9x), accessing around 12MB of extended memory for image storage and interface with the framegrabber hardware.
To obtain the necessary performance in these early days of image processing on desktop computers, DigImage required a framegrabber card to be installed to provide not only image capture, but also image display and some of the processing. While this close coupling allowed efficient real-time processing and frame-accurate control of a video recorder, it ultimately restricted the development and deployment of the technology. The original ISA bus based Data Translation DT2861 and DT2862 frame grabber cards remained available until 2001, but by that time suitable motherboards had become difficult to source. At time of writing (2007) and despite its reliance on outdated technology, DigImage is still used in many laboratories around the world.
The development of DigiFlow began in 1994, although the project had a number of false starts and development put on hold a number of times due to other commitments. The code of this version has its origins in 1997 as part of the development of synthetic schlieren (see §5.6.4). The computational and resolution requirements for synthetic schlieren could not be accommodated efficiently within the framework of DigImage.
Despite sharing many approaches, algorithms and techniques, DigiFlow does not re-use any of DigImage’s 8Mbytes Fortran 77 and 2MB Assembler source code. The design goals for power, flexibility and efficiency in DigiFlow could only be achieved by starting again from scratch.
DigiFlow builds on experience with DigImage from the user view point to provide a more powerful, more flexible, but simpler interface. It also builds on the programming experience to provide a more flexible, powerful and maintainable code base (now in excess of 13MB of source).
A central feature of DigiFlow is a powerful macro language (dfc) and interpreter. This provides users with an efficient and flexible environment in which to automate and customise processing, as well as proving to be a very useful general computational and plotting tool.
Versions of DigiFlow have been in use in
DigiFlow has been designed from the outset to provide a powerful yet efficient environment for acquiring and processing a broad range of experimental flows to obtain both accurate quantitative and qualitative output.
Central to design philosophy is the idea that an image stream may be processed as simply as a single image. Image streams may consist of a sequence of images (e.g. from a ‘movie’), or a collection of images related in some other manner.
Efficiency is obtained through the use of advanced algorithms (many of them unique to DigiFlow/DigImage) for built in processing options.
Power and flexibility are obtained through an advanced fully integrated macro interpreter (using DigiFlow’s dfc macro language) providing a similar level of functionality to industry standard applications such as MatLab. This interpreter is available to the user either to directly run macros, or as part of the various DigiFlow tools to allow more flexible and creative use. Commercial versions of DigiFlow include additional features such as partial compilation to further improve performance.
Although not an essential component, DigiFlow retains the potential DigImage released by the control of a framegrabber. Not only does this greatly simplify the process of running experiments, acquiring images, processing them, extracting and plotting data, but it also enables real-time processing of particle streaks and synthetic schlieren, for example.
This User Guide is designed to provide the primary reference for DigiFlow. The User Guide is supplied in both .html and .pdf formats and is linked to the help system within DigiFlow. Pressing the F1 function key within DigiFlow will start a web browser and take you to the most appropriate point in the .html version of the User Guide.
The User Guide is not in itself complete: detailed descriptions of the many functions provided by the macro interpreter may be found in the interactive help system (Help: dfc Functions). The User Guide is also supplemented by a variety of scientific publications that expand on some of the underlying technologies.
The typographical convention used in the User Guide is described below:
|
Typography |
Description |
|
Analyse |
Windows elements such as prompts, menu items and dialogs. |
|
Expt_A.dfi |
File names, etc. |
|
read_image() |
Interpreter commands and functions. |
|
:= |
Interpreter operators and syntax. |
|
"string" |
Interpreter operators and syntax. |
|
# comment |
Formal argument names for interpreter functions. |
|
my_image |
Variables, numbers, etc., for the interpreter. |
|
file0 |
Formal argument names for interpreter functions. |
DigiFlow is a typical Windows application with a graphical user interface, menus, dialog boxes and toolbars. However, unlike many applications, DigiFlow does not require a special installation procedure, but can simply be copied to the desired directory. In most cases DigiFlow will be delivered in a .zip or self-extracting (.exe) archive file, downloaded from the web. This should simply be unzipped into your selected directory. As such, DigiFlow does not require administrative access to install.
The installed part of DigiFlow consists of DigiFlow.exe, which contains the core functionality, and a range of DLL files that handle specific menu options. DigiFlow also makes use of various global start-up files stored in the same directory.
During use, DigiFlow generates two status files in the directory in which it is started. These are DigiFlow_Status.dfs (§13.5), which contains a range of information describing the settings, and DigiFlow_Dialogs.dfs (§13.4), which records your last responses to many of the prompts, etc. By storing this information in the directory in which DigiFlow is started, DigiFlow is able to keep a separate set of information for each user, or for each specific task, without polluting the registry. Additionally, these status files can be deleted or moved as the user wishes. In some circumstances, DigiFlow_Status.dfs may become corrupted. If DigiFlow fails to start, or exhibits unexpected behaviour, you should try removing (or renaming) DigiFlow_Status.dfs to see if this cures the problem.
It is recommended that you use a new directory for each new set of experiments and for each new project. In this way the DigiFlow strategy of storing localised status files will facilitate use of DigiFlow in the various different contexts. In such an environment it is frequently most convenient to start DigiFlow from the command prompt within the appropriate directory structure, although other strategies such as multiple shortcuts or setting up associations for Windows Explorer are also possible.
If you wish to run DigiFlow from a command prompt (strongly recommended), it is worth putting this directory on the path so that DigiFlow may be started by simply typing DigiFlow at the prompt. If you prefer to start DigiFlow from the desktop or start menu, you will need to create a shortcut at that point and set the Start in directory appropriately. It is strongly recommended that you do not run DigiFlow from the directory in which the program resides.
Specification of the file extension for file names within DigiFlow is mandatory in most circumstances as DigiFlow utilises this extension to determine the file type. However, by default, Windows XP hides the extensions to files of known types, a feature that causes problems with DigiFlow. We recommend, therefore, that you turn off this feature. DigiFlow will attempt to do this for itself, but this may not work on some systems. If DigiFlow does not make all extensions visible automatically, then you may achieve this manually through the View tab of Tools: Folder Options under Windows Explorer. Simply remove the check mark from Hide extensions for known file types. Note that this will need to be done for each DigiFlow user.
By default, DigiFlow will not be associated with any file types or extensions. If you wish to make such an association (and thus allow DigiFlow to be started by double-clicking on a file of that type within Explorer), then you should open Explorer and select View, Folder Options then select the File Types tab. We recommend that the following extensions are associated with DigiFlow on all installations: .dfc, .dfd, .dfi, .dft and .dfs. You may also wish to set up associations for other standard image formats such as .bmp, .tif, .png and .jpg.
DigiFlow can create Encapsulated PostScript (.eps) files from image and graphical output for incorporation into documents in packages such as LaTeX and Word. This can be achieved either through DigiFlow’s inbuilt .eps facility, or using a Windows printer driver. The former is restricted to bit images (or a rasterised version of graphics), whereas the latter can produce both bit image and vector graphics.
By default, DigiFlow searches for a printer named EPS to use to create the .eps files. Creation of this printer is relatively straight forwards. Start the Add Printer Wizard from the Printers and faxes window, selecting Local printer attached to this computer and using the File: (print to file) port. Select a PostScript printer driver (e.g. the HP C LaserJet 4500-PS) and name the printer “EPS”. (You do not want to make this the default printer, you may, however, wish to share the printer to simplify the setting up of further machines.) For Windows Vista, it is recommended that you download an Adobe PostScript driver from www.adobe.com as some of the drivers distributed with Windows Vista format their PostScript in a manner that inhibits the use of LaTeX packages such as psfrag.
Once the wizard has finished, right-click on the new EPS printer and select Printing preferences. Click on the Advanced button expand Document Options and PostScript Options within it. Under PostScript Output Option select Encapsulated PostScript (EPS), as indicated in figure 1.