Appendix A
Overview of the software
In this appendix, the software which has been written by me for this research
is described. The software has either been written for use on a PC, or for use
on the Digital Vaxstation 3520 running under VMS, and using X-Windows for
graphical representations and user interfacing. The configuration of these
computers have been described in chapter II.
A.1 The Data-acquisition software
This program interfaces with the AD-converter and allows the acquisition of a
maximum of 64 channels at a rate of 1000 Hz/channel. The data is written
continuously to disk and up to 12 channels are shown on the screen. Fast fourier
transform and conversion to other data-formats is possible from this program.
The program is written in Borland's Turbo Pascal for DOS. The program is
discussed in more detail in chapter II.
A.2 Segmentation of MRI-datasets
A program has been written to segment an MRI dataset according to the methods
described in chapter IV. It is a non-interactive program and can therefore be
run at night, since the segmentation of a complete dataset may take several
hours. The program is written in VAX C, and runs on the Vaxstation. A separate
program has been written to segment one slice, and display its progress on
screen. This program is used to test and improve the segmentation method.
X-Windows is used as the graphical user-interface.
A.3 The Blomagnetic Imaging System
The Biomagnetic Imaging system is a multi-purpose program written in C for
the VAX/VMS Workstation using X-Windows. Through the graphical user interface
which takes its input from mouse-commands, this program allows the user to:
- View and process MRI scans. Scans ran be selected from filename,
slicenumber, from a sagittal view or from a 3D view of the head. Processing
includes filtering, contrast enhancement, viewing of the histogram or the
segmentation, edge detection and indication of a range of voxel values
- Generate a sagittal slice through the middle of the head and store it in a
file. All the slices from the MRI-scanner are, in our case, transversal
slices. This sagittal slice ran be used to select the transversal slice to
be displayed, and to indicate the vertical position of a slice in the head.
- View PET scans. PET scans are selected by filename, and then by frame and
plane number. Different colorscales are available to display the PET scans.
The colors can be changed interactively and the scales can be adjusted to
highlight the highest activity in the scan.
- Estimate the coordinate transformation from PET scans to MRI scans.
- View an MRI-slice with PET data overlaid.
- Generate and view 30-images of the head and brain. Generate 3D-images of
the head where part of the head is cut-away and the original MRI-values are
displayed on the intersecting plane.
- Give the impression of a head or brain in motion by displaying various 3D
images in sequence, thereby enhancing the impression of depth in the image.
- Indicate and identify markers in the MRI scan, so that a proper coordinate
system can be established. The system knows the head coordinate system
according to de Munck, the modified head coordinate system and the reversed
head coordinate system (see chapter V).
- Fit a sphere to the head on the back, left, right, front or top of the
head. Either the radius or the centre of the sphere can be fitted, or both.
It is also possible to enter the sphere parameters directly, in case the fit
has been performed with a different program.
- Enter a dipole in spherical or cartesian coordinates using the sphere
coordinate system, one of the head coordinate systems or the MRI coordinate
system.
- Display dipoles in an MRI slice at the correct position, and optional with
PET data overlaid. The direction of the dipole is also displayed. When the
strength of the dipole is given, the system can optionally try to estimate
and indicate the active part of the cortex.
- Display a 3D view of the head, with a part cut-away to display the dipole
location.
- Display a 3D view of the brain with PET data overlaid on the surface of
the brain as well as the location of the dipoles.
- Generate points on the surface of the scalp or brain, either automatically
or manually. When points are selected automatically, the program can adjust
the number of points on a slice to its circumference, or keep this number
constant. The points are stored in a file and ran be used to generate
realistically shaped head models.
- Display a triangulated head from any angle, either as a wire frame or as
surface-rendered 3D image.
A.4 Non-interactive generation of 3D-Images
Since the generation of 3D images takes quite some time, separate programs
have been written to enable the user to do this non-interactively. Separate
programs exist for the generation of 3D images of the head and of the brain.
Both programs ran generate multiple images over a range of viewing angles, with
a stepsize in the angle. These parameters are given as command line parameters.
A separate program exists for the generation of a 3D view of the head from the
right which can be used in selecting the MRI-slice to be shown. These programs
are written in C.
A.5 Triangulation
The Biomagnetic Imaging System can select points on the surface of the head
and the brain, which are written to file. This program uses these points to
create automatically a triangulated surface description and writes it to file.
The program is written in C, and takes only a few seconds to triangulate a head
with several hundreds of triangles.
(c) MEG, EEG and the integration with Magnetic Resonance
Images, H.J. Wieringa, 1993
[Home][Contents]