APPENDIX 1:
DETAILS OF COMPUTER-BASED PROCESSING

This represents a step-by-step documentation of the computer-based elements of the reconstruction process used to produce slice videos and isosurface models. For each step we provide both a ‘package-independent’ overview (in bold), followed by ‘package-specific’ details of our method. The latter are intended only as a description of our procedures, not as a set of instructions for those unfamiliar with the software involved, nor indeed as an exclusive recommendation of any specific software package—equivalents of all major packages used are available for most platforms. Details of software packages used in the study are given in Appendix 2, and terminology specific to these packages is placed within inverted commas on first usage.

1) Registration and cropping

Images are first registered (aligned), using the alignment edges in the images as a guide. An image-editing software package is used to shift and rotate the images manually, so that the edges are in exactly the same position. Once registered, the images are cropped to remove extraneous background, including registration edges. All images must be cropped using exactly the same parameters so that alignment is preserved.

One image, normally the first, is chosen as the datum for alignment. This image is loaded into PhotoPaint, and a new ‘object’ is created to lie above the background. Straight lines of a single pixel in width are drawn on this object to correspond to the alignment edges of the image beneath. The ‘Eraser’ tool is then used to remove portions of these lines, so they appear as coarse dashes. Oblique lines are also drawn on the object from edge to edge near each of the four corners of the image; these ensure that the object is exactly the same size as the image, which assists with placement in the next step. Once the alignment object is complete it is placed into the clipboard with a copy command and the file closed.

The registration process now commences, and the following procedure is performed for each image. The image to be aligned is loaded, and the alignment object is inserted with the ‘Paste As New Object’ command—this alignment object is not moved subsequently, but used as a guide for aligning the image. The image itself is converted to an object with the ‘Create From Background’ command. This image object is then shifted manually with the ‘Object Picker’ tool selected, by use of the cursor keys, so that the point where the two alignment edges meet is correctly positioned. The rotational centre of the object is then dragged to that point, and the correct rotation of the image applied by means of trial and error entries of angles in the ‘Tool Settings Roll-up’. When and only when the correct rotation is determined, it is applied with the ‘Transform’ button on the roll-up, and any final single-pixel shifts required for perfect alignment are performed with the cursor keys. Finally, the alignment object is removed from the image which is saved in its original format. This process must be carried out for each image in the dataset and is thus fairly time-consuming. Much of the work can be automated, however, by recording actions as ‘scripts’. We normally make use of one script to create the necessary objects, and another to remove the alignment object after alignment. In practice, we find that it is possible to register up to 60 images per hour.

After registration, the images are cropped to size with the ‘Deskew Crop’ tool. Care must be taken that the crop area set includes all of the fossil on every image. Once the correct crop size is determined, the action is recorded as a script, and then applied to all images with the ‘Batch Playback’ command.

2) Post-processing for preparation of slice videos

Slice videos, if required, can be prepared directly from the registered and cropped image set using a suitable software package. Typically such videos are prepared from a second copy of this dataset, the images of which are colour balanced and/or reduced in size prior to video production. This processing is carried out with image-editing software. Size reduction is necessary only if the resulting video would otherwise be too large to store or play on any given computer.

To prepare for video production, a copy of the registered and cropped image set is made, and the following PhotoPaint operations are applied first to one image, recorded as a script, and then applied to each image by means of the Batch Playback command.

a) Colour is balanced to taste with the ‘Level Equalization’ command.

b) Image size is reduced, if necessary, with the ‘Resample’ command.

Processed images are opened as a file sequence video in Ray Dream, and then saved as an AVI video file in Cinepak format.

3) Post-processing for isosurface reconstruction

To produce a dataset suitable for the isosurface algorithm, the registered and cropped dataset must be converted from colour to monochrome, inverted (so that fossil is light and matrix dark), and reduced in size if the restrictions of the isosurface package so demand. We find that the Herefordshire fossils are usually more clearly distinguished from the matrix if the conversion to monochrome is performed using the red channel only. These operations, which must be identically performed on all images in the dataset, are carried out with an image editing software package.

Any required retouching of images should be carried out at this step, although in most cases we prefer to reconstruct an un-retouched or minimally retouched set of images first, then return to this point in the process to perform any required ‘cleaning’ on a second copy of the dataset. Retouching is carried out manually using an image-editing software package. In most cases it comprises the deletion of objects in the matrix that appear in the reconstruction but are clearly not part of the main fossil, or of structures visible through translucent regions of calcite. Retouching can also include the brightening of structures that are clearly part of the main fossil, but are too dark to appear in the reconstruction (i.e., are falling below the chosen isosurface threshold, usually because of transparency problems). We find it helpful to choose an isosurface threshold during the retouching step, so that these problems can be assessed within the image editing software package.

Post-processing operations are performed on each image using PhotoPaint. As in Step 2, they are first performed on one image, the actions recorded as a script, and then applied to each image by means of the Batch Playback command.

a) The image is converted to monochrome. This can be accomplished with the ‘Convert to Greyscale (8-bit)’ command. If only the red channel is required (see above), the Level Equalization command is used to remove the green and blue signals, the Convert to Greyscale (8-bit) command is then applied, and finally the ‘Brightness-Contrast-Intensity’ command is used to enhance the visual clarity of the image (which will be too dark).

b) The image is inverted using the ‘Invert’ command.

c) If necessary, the image is resampled to a smaller size. AVS (see below) can only accept volumes up to 255 x 255 x 255 voxels in size, so the image size must be reduced to 255 x 255 pixels or smaller before a reconstruction can be attempted. Resampling ideally is carried out with an integral divisor (e.g., at 50% or 33.33%); arbitrary values can introduce an element of blurring, although this is rarely of critical importance. The final image width must also be a multiple of 4 to satisfy AVSCONV. This can be accomplished either by padding with black space using the ‘Paper Size’ command, or by further careful cropping.

Retouching, if required, is also carried out in PhotoPaint, mainly by use of the ‘Eraser’ tool to delete objects, and the ‘Effect’ tool to brighten others. The ‘Threshold’ command can be used to apply the chosen isosurface threshold level and determine what will and what will not appear in the reconstruction. The threshold effect can then simply be removed with the ‘Undo’ command.

4) Isosurface production

The post-processed image set must first be converted into whatever volume format the isosurface software requires, using appropriate software. Once informed of the appropriate threshold level the isosurface software can then generate the surface. The surface may then need to be converted to a format that can be read by the ray-tracing software employed.

We convert the dataset to AVS volume format using the custom AVSCONV program. This requires the images be in Windows BMP format (uncompressed), be consecutively numbered with three digits (i.e., file names of the form Name001.bmp, Name002.bmp), and placed in a single directory. The user selects the first file, clicks the process button, and when requested enters the number of files in the dataset. On completion, the program places the AVS format data file in the same directory, with the name ‘output.dat’.

An AVS ‘network’ is created, as follows. The data file produced in Step 3 is read with the ‘read volume’ module, which feeds the ‘average down’ module. This should be set with relatively high x, y, and z coefficients (2 or more) at this step. The output from the ‘average down’ module is fed to the right hand input port of the ‘isosurface’ module, the output of which is sent to the right hand port of the ‘geometry viewer’ module. The isosurface level should now be set to produce the best possible reconstruction; as noted above we normally find it helpful to choose this level during retouching. When the isosurface appears correct, the coefficients of the ‘average down’ module should be reduced to 1, and the output of the ‘isosurface’ module connected to the ‘write geom’ module, which should be set to produce a ‘DXF’ file. As the processing involved in the network can be time consuming, we find it helpful to disable the flow executive whilst making changes to parameters of these modules.

DXF files produced by the ‘write geom’ module can be very large. We find that files much over 100MB in size are impractical to render in Step 5. In some cases therefore, particularly with datasets containing a large number of images, the final isosurface is produced with x and y settings of 2 rather than 1 in the ‘average down’ module. Although we normally prefer not to average down in the z axis, if alignment errors are producing strong artifacts (lineation parallel with the plane of grinding), a z setting of 2 can help to smooth these out, as well as to reduce output file size.

5) Rendering

Geometry files describing isosurfaces are read into a ray-tracing software package, or any other three-dimensional visualization package. Isosurfaces are stretched to correct for differences in voxel spacing within slices and between slices (this may be done during Step 4 instead, if the software allows). If multiple isosurfaces are to be joined (e.g., Figure 11), they are both imported into one scene, and then manually moved into a contiguous position. The visualization package is then used to generate a video file of the specimen rotating in the desired fashion.

DXF files produced by AVS are read into Ray Dream with the ‘Import’ command. All the default import options are left unaltered, except ‘Scaling Conversion Factor’ which is set to ‘0.5 cm’ rather than ‘1 in.’. Once imported, the isosurface is stretched in the z axis to correct for slice spacing—the z scale property of the isosurface object is set to 100% x (Pixels/mm in resampled images) / (slices/mm). Any other objects are imported and treated in the same way, and carefully moved into position relative to each other. When bringing two objects together, we prefer first to bring a single corresponding point into contact, move the ‘hotpoint of rotation’ to that point, and then rotate the object into position using the ‘virtual trackball’. A ‘shader’ is then applied to the object(s), lights placed in the scene, and an animation set up to rotate the object in the desired fashion over a time period of several seconds. The ‘production frame’ is carefully positioned and sized to the minimum size necessary to contain the object at all steps of the animation. The animation is then rendered within Ray Dream, normally with an image width of 300 to400 pixels and a frame rate of 15 or 18 frames per second. It is saved as an AVI video file in Cinepak format, which forms the final reconstruction.

Go to Next Section