SS Lab Project Write Up

18
SS Geology Lab Project 3d Modelling Technique Development Using Estonian Bio-Eroded Ordovician Bryozoa Michael O’Hanrahan – 12306206 February 2016

Transcript of SS Lab Project Write Up

Page 1: SS Lab Project Write Up

SS Geology Lab Project

3d Modelling Technique Development Using Estonian Bio-Eroded

Ordovician Bryozoa

Michael O’Hanrahan – 12306206

February 2016

Page 2: SS Lab Project Write Up
Page 3: SS Lab Project Write Up

TABLE OF CONTENTS

1. Abstract .................................................................................................................1

2. Introduction .........................................................................................................2

3. Methodology ........................................................................................................3

3.1. Sample Preparation ........................................................................................3

3.2. Imaging ..............................................................................................................4

3.3. Stacking and Alignment..................................................................................5

3.4. Importing To OsiriX ........................................................................................7

3.5. Model Rendering..............................................................................................8

3.6. Exporting Models .............................................................................................9

4. Results ................................................................................................................ 11

5. Discussion.......................................................................................................... 13

6. References ......................................................................................................... 14

Page 4: SS Lab Project Write Up
Page 5: SS Lab Project Write Up

1

1. ABSTRACT

The concept of this Senior Sophister lab project was to sequentially slice ordovician Bryozoa in an

attempt to create a three dimensional model highlighting interior bio erosion within the specimens. It

was aimed to create a model of sufficient detail that the interior features could be quantitatively

analysed to create a diagnostic report on the morphologies of these organic, parasitic marks and

possibly identify the species that created these features. The project was approached using modest

equipment and mostly free, open source software to ensure easy replication of methodologies. The

methodologies detailed herein achieved volumetrically accurate three dimensional models using the

medical software OsiriX. Some issues arose due to low sampling rate and a revised methodology is

detailed in the discussion in an attempt to maximise efficiency and resolution of results.

Page 6: SS Lab Project Write Up

2

2. INTRO DUCTIO N

This Senior Sophister lab project was undertaken in October 2015 with the aim of developing three-

dimensional digital models of bioerosion within Ordovician bryozoa samples collected in Estonia.

These models were intended to be used in the quantitative analysis of the bioerosion and possible

diagnosis of the boring species based the volumetric analysis on the apparent morphology of the

borings.

Using only equipment available at the time of this project in the Museum Building geology

laboratory of Trinity College it was decided that the best method to approach this modelling was to

employ a technique based on slice based tomography. Several challenges and questions were apparent

from the idea’s conception. It was not known whether the spatial resolution would be adequate between

slices to create a seamless model. The saw used was also an anticipated issue, using the saw available it

was speculated that the width of the cutting edge would cause a detrimental loss of spatial information.

Another notable challenge was that there were few documented cases available of three dimensional

palaeontological models being produced with non-specialised equipment or free software so the

techniques employed herein are the result of many trial and error approaches.

Page 7: SS Lab Project Write Up

3

3. METHO DO LO GY

3.1. SAMPLE PREPARATIO N

Samples for modelling were chosen upon the potential prominence of the bioerosion within. The more

bioerosion present in the sample, the easier it would have been to visually detect in the sample and

software detection stages. Two different sets of sample preparation were available, one was devised for

this project and another from a previous, unsuccessful attempt at bioeroson analysis.

The latter group of samples were available as slices of ordovician bryozoa. Several layers of

lacquer were applied to these samples, named ‘Estonia specimen 2’, ‘Estonia specimen 3’ and ‘Estonia

specimen 4’ respectively, in an attempt to increase the contrast between the bryozoan and the internal

sediment that infilled the bioeroded cavity. These samples were scanned on both sides in a flat bed

scanner on the highest resolution setting available (1200dpi) with a 10mm scale bar for later software

calibration. The samples were cut with no guide in a rock saw with a 2mm cutting edge diameter. The

resulting slices varied in thickness were averaged to 4mm with an accurate calliper. It is worth noting

that not all slices were parallel so some inaccuracies were expected in later stages.

Fig 3.1.1 Lacquered and scanned samples of the Estonia specimens 2,3 and 4 with a 10mm scale bar.

Lighter coloured, elongate shapes within the samples are the areas of interest created by a variety of

organisms boring the bryozoa as it grew concentrically outward from the center of the flat base.

The problems recognised above in the available Estonia specimen slices were expected to

cause an issue with the accuracy in later modelling. To overcome the issues of parallel slicing and in an

attempt at making slices more consistently spaced it was necessary to devise a guiding mechanism for

the sawing stage of preparation. With this in mind it was decided to mount the somewhat round sample

(named ‘Ristna Cliff specimen’) in a semi transluscent resin block with straight edges to allow the

Page 8: SS Lab Project Write Up

4

block to be fed into the saw blade and ensure slices were consistently orthogonal to the straight edge. It

is worth noting that the resin mouting also benefits the later digital alignment stage. Feeding the sample

into the saw was done by hand to the smallest increment possible while still retaining a rigid slice, this

thickness proved to average at approximately 3mm which is an important parameter to later digital

reconstruction. It was then necessary to label all the slices clearly and methodically with an indelible

marker making sure to denote the number of the slice and also the face. In this example each face was

denoted as either ‘a’ or ‘b’ to ensure the slices could be assembled in their original orientation relative

to each other.

Fig 3.1.2 Illustrates the pre-slicing preparation for the ‘Ristna Cliff specimen’ Image 1 shows the foil

casing into which the resin was poured and hardened, Image 2 illustrates the resin block with the edges

shaved off in preparation for slicing, Image 3 shows the first slice (1a) from the block (not lacquered)

with a scale bar for later software calibration.

3.2. IMAGING

Imaging in this project was approached in two different ways , both of which posed no apparent issues.

The first approach was to use a flatbed scanner with a high resolution setting. The second imaging

technique incorporated the use of a Canon Eos 70d DSLR 20.2 effective megapixel sensor camera

coupled with a Canon EF 100mm f/2.8 Macro USM lens. Both techniques yielded results with

negligible differences in image quality and resolution.

The Estonia specimens 2-4 were all scanned in the flatbed scanner as well as a later lacquered

sample of the Ristna Cliff specimen. All slices were scanned on both sides with a scale bar, as seen in

Fig 3.1.1, and exported to a 1200dpi .tiff file to ensure that maximum resolution would be achieved.

To photograph the Ristna Cliff specimen after the resinous mounting block had been sliced ,

the 70d DSLR was set up on a table with two fluorescent bulbs to the left and right of the sample space

and a white sheet of paper as a background. A corner mark was drawn on the paper to aid alignment

between sequential photographs and a scale bar was included in the first image as seen in ‘image 3’ of

Fig3.1.2. Photographed in sequence, the images were captured at an aperture value of f/10 to en sure

maximum depth of field and sharpness in focus. The images captured were recorded as uncompressed

camera raw image file (.cr2) to ensure the maximum amount of information was captured in the

interest of later sharpening. The camera raw files were imported to a raw processing software (in this

Page 9: SS Lab Project Write Up

5

case ‘Adobe Lightroom 6’) for white balancing, contrast adjustment and sharpening before exporting

as high resolution .jpeg files which were individually named with their respective slice numbers.

3.3. STACKING AND ALIGNMENT

All recorded images were stacked and aligned in Adobe Photoshop CS6 and exported as high

resolution .jpeg files. The scanned images necessitated a slightly different workflow to achieve a

coherent, aligned stack of 2d images. The workflow that follows is what proved to be the most

effective for the imaging approaches detailed above and is specific to the Adobe Photoshop CS6

program but similar results can be achieved in other (free) imaging softwares that allow for images to

be layered and those layers to be exported as individual .jpeg images such as GIMP (‘GNU image

manipulation program’).

In order to obtain the required aligned stack of images from the scanned files it is first

necessary to open the scanned .tif in Photoshop. The image will appear as the Estonia specimens are

shown in Fig 3.1.1 as one layer in the right hand panel. Using the ‘magic wand’ selection tool the first

slice must be selected and cut or copied to a new layer. The the automatic selection will be sufficiently

accurate but it is suggested that the edges are refined to ensure that the resulting layer contains as much

edge detail as possible. Using the ‘refine edge’ tool a more accurate selection can be achieved with

parameters suggested below in Fig 3.3.1. It is imperative to include the original scale bar from the scan

in the stack of layers.

Fig 3.3.1 This figure shows a selection of the area of interest that will output to a mask, making any

areas not in the selection transparent. The radius, smoothing, feather and cont rast values are chosen for

the best possible selection.

Once the selection is output to a new layer with a layer mask it is recommended that it is

named according to the relevant slice number. This will ensure that with later exporting the layers will

be appropriately labeled and in sequence. This process needs to be repeated for all layers such that a

Page 10: SS Lab Project Write Up

6

stack of layers is generated with only the relevant areas are visible. Upon completing this step it is then

necessary to align the images to their original orientation.

To align the scanned images it is best to drag all layers in their correct order to a central point

using the ‘move’ tool. To ensure that the inner features, in this case the bioerosion caused by

polychaete worms and boring bivalva, line up appropriately. It is necessary to flip one of the groups of

faces (i.e. all ‘a’ or ‘b’ faces) horizontally (use Edit Transform Flip horizontal). After this step is

completed it is necessary to align all of the 2D slices into their original orientation. Using the move

tool and directional keys the layers must be moved to align with eachother, it is recommend ed that the

alignment should begin with the first slice and worked through to the end linking the corresponding ‘a’

and ‘b’ faces together. The final stack will be similar to that shown in Fig 3.3.2, below.

Fig 3.3.2 Is an 2D end view profile of Estonia specimen 2 layered and aligned in Photoshop.

The photographed specimens follow a similar procedure once imported. Layers must be

generated in the manner detailed above, however, with the Ristna Cliff samples the resinous mount

makes the alignment stage much more accurate. Using the edges of the resin block, the layers can be

aligned as they were originally i.e. before slicing, this greatly reduces the margin for human error in

this stage of the process (see: Fig 3.3.3 overleaf)

Page 11: SS Lab Project Write Up

7

Fig 3.3.3 This figure represents a stacked and aligned 2D end view profile of the Ristna Cliff specimen

with a 10mm scale bar.

3.4. IMPO RTING TO OSIRIX

Using a slice based approach to 3D rendering these specimens was deemed the most appropriate

solution to be able to capture the internal bioerosion of interest. Medical professionals have used

similar slice-based approaches for magnetic resonance imaging (MRI) and computed tomographic

(CT) studies from which there are often 3D quantitative models made for diagnostic purposes. A

common program for such rendering is OsiriX which allows the user to visualise multidimensional

images and build them from 2D images. OsiriX offers a free version of software for demontration

purposes which limits the maximum mount of images that can be loaded into one model The OsiriX

software is designed to work with DICOM (.dcm) file formats which are produced by medical imaging

equipment to contain all image files as well as spatial imaging information and patient details.

The Estonian specimen images recorded would have to be converted from .jpg file format to

.dcm file format to overcome a compatability issue. In this situation it was found that a plug-in on the

OsiriX ‘plugins manager’ named ‘JPEG to DICOM’ was necessary for this conversion. Using the plug -

in simply required creating patient information to be able to import stacked .jpg images of specimens.

The specimen appeared as a patient file and the 2D viewer tool allows the user to view a dynamic

video scrolling through the layers of a file which is reminiscent of the videos output by MRI imaging

equipment. A DVD-R is attached with this project containing sample image files and rendered video s

of panning models , a sample 2D video of Estonia Specimen 2 is attached with the file name ‘Estonia

Specimen 2 2D scroll’ within the folder ‘Estonia Specimen 2 2D Scroll.mov’.

Page 12: SS Lab Project Write Up

8

3.5. MO DEL RENDERING

Once imported into OsiriX and loaded in the ‘2D Viewer’ panel was then possible to begin rendering

the three dimensional models. Calibration of the dataset proved to the most critical step to rendering,

which makes the inclusion of a scale bar from the outset imperative to having a spatially accurate

model. Two types of rendering are possible with these datasets, 3D volume rendering and 3D MIP

(maximum intensity projection).

To first calibrate the software it was necessary to find a frame of the ‘2d scroll through’ in the

‘2D Viewer’ panel. Once the frame was found a straight line ROI (region of interest tool) was used to

measure the length of the line, initially it was represented in pixel values as the .jpg files do not, by

their nature, contain spatial information other than pixels. By clicking ROI ROI info…

Recalibrate and inputting the length of the measured scale bar it is possible for the software to now

actively convert the pixel values to centimeters. With the dataset then calibrated to centimeters the

spatial information of the 3D slice thickness correlates to the width of the 2D scale bar in the .jpg

image.

3D volume rendering using these datasets proves to be useful for the visualisation of external

shape of the model. Using a certain values of pixel X and Y resolution (0.3 in these sets) coupled with

a slice interval (determined from averaging the thickness of each physical slice of the sample after the

slicing stage of sample preparation) a model can be rendered in full colour.

Fig 3.5.1 This figure shows a 3D volume rendering of Estonia Specimen 2 in full colour, left is a

corner view, middle is an end view profile, right is 90° horizontal to left. A video rendering of this

panning is supplied on accompanying disk, the file is named ‘Estonia Specimen 2 Volume Rendered’.

3D MIP allows the user to highlight areas of interest through a multitude of colour look-up

tables. The technique creates a colour profile based on colour wavelength which can be varied by the

user in order to make certain colour wavelengths stand out while others become transluscent. The

standard colouring of the fossil as it exists naturally rendered a model that can be seen in Fig 3.5.2.

Page 13: SS Lab Project Write Up

9

Fig 3.5.2 This figure shows three separate orientations of a 3D MIP rendering of Estonia Specimen 2,

left and right are 180° to each other. Interior bio erosion is not apparent. A 360° pan of the model is

attached in the accompanying DVD in a file named ‘Estonia Specimen 2 3D MIP 360° Pan.mov’

In an attempt at isolating the bio erosion within the sample using 3D MIP a colour lookup

table (CLUT) is applied to the rendered model. The most effective CLUT for this example proved to be

‘NIH’ where the bio eroded areas appear a ‘hot white’ colour within the model.

Fig 3.5.3 This figure illustrates the isolation of areas of interest within the internal strucure of the

specimen using the ‘NIH’ CLUT in 3D MIP rendering. In the attached DVD there are three related

.mov files: ‘Estonia Specimen 2 CLUT 2D Scroll Through .mov’, ‘Estonia Specimen 2 CLUT 3D MIP

Vertical Pan’ and ‘Estonia Specimen 2 CLUT Horizontal Pan’.

3.6. EXPO RTING MO DELS

Page 14: SS Lab Project Write Up

10

The models created were exported as .mov files for illustrative purposes. Once the stacks of images

were rendered as 3D volume renders or 3D MIP it was possible to export the models at a chosen

rotation speed and angle by clicking file export export to movie… Similarly it was possible to

export high resolution TIFF, JPEG and RAW images.

Page 15: SS Lab Project Write Up

11

4. RESULTS

Several models were successfully produced from the sequential slice based imaging approach that is

detailed above. The results show that volumetrically accurate 3D models can be made with relativ ely

modest equipment provided that measurements are taken and translated into the dataset calibration

stage of the rendering process.

3D volume rendering was effective in producing a digital representation of the exterior of the

specimens chosen but the shape is directly effected by the number and spacing of the samples. It is

quite apparent in Fig 3.5.1 that the exterior surface in the final model is not as well rounded, smooth

and continuous as the original, physical specimen. It is also quite clear that while the end of each

specimen was scanned and/ or photographed the profile of this slice has rendered as a flat shape in it’s

three dimensional representation.

Fig 4.1 This figure shows the use of an ROI tool as a straight line measuring tool in OsiriX where the

diameter of the slice 1a of Estonia Specimen 2 is 3.45cm which is consistent with the original, physical

specimen.

Page 16: SS Lab Project Write Up

12

3D MIP rendering appears to hold similar issues with exterior representation being relatively

rough in shape and flat on each end. The interior bio erosion, while successfully highlighted on the

external face of each layer, dos not appear as continuous from one slice to another. Instead of

appearing continuous the prominent internal features of the specimens, displayed for example in Fig

3.1.1, remain only on the plane of slicing and are not interpolated from point -of-entry to point-of-exit.

While the models were successfully rendered from 2D into 3D using Photoshop and OsiriX

the original aim to digitally diagnose the morphology of the bio erosion is still not possible. Further

attempts to do so with these samples will realistically yield the same results with no viable way of

reliably measuring the interior features. More accurate sample preparation would be reccomended with

a higher sampling rate (i.e. more accurate slicing, with closer spacing and more precise machinery).

Page 17: SS Lab Project Write Up

13

5. DISCUSSION

While the results show that three dimensional models of volumetric, quantitative merit are possible to

create using modest equipment, there are some significant disadvantages.

The most obvious disadvantage with the above approach is that the volume rendered in the

models is not extremely detailed. The edge detail of each slice, while sharp in 2D, renders as soft and

stretched in 3D. This is likely a result of the relatively low sampling rate over the diameter of the

specimen. If possible, it is recommeded that in order to create a highly detailed rendering of the

external surface of a specimen that the sample rate (or slice interval) be much higher. In the case of

these samples the average slice interval proves to be around 3mm, the smaller the interval the more

smooth the transition between slices would be and the higher the spatial resolution would become. A

practical solution to this issue would be to use a serial grinding technique where, instead of slicing, the

sample is effectively shaved down slightly on one edge and polished by different abrasive plates. While

this suggested method might be destructive of the sample the slice interval could be reduced to a

micron scale. This method is well detailed in a study by (Pascaul-Cebrian et al. 2012) where the

sequential grinding of a block incorporates an automatic scanning mechanism once a layer several

microns thick is removed allowing for an extremely continuous sampling rate and results in an

extremely smooth 3D volume rendering. The saw used to slice the specimens in this project was a very

coarse approach in comparison and the width of the saw blade (2mm diameter) would have caused

2mm of information loss between each slice.

The approach of selecting and layer masking each slice in Photoshop is extremely time

consuming. Selecting each image and customising each mask for the ideal edge selection proved to be

very laborious and has potential for further automation. Photographing the specimens was presumed to

allow better resolution images to use for modelling but it does not appear to provide any significant

advantages and the associated extra steps in editing add to the hands-on, laborious nature of the

imaging aspect of the sample preparation stage. Scanning of the images provides adequate image

resolution and saves considerable time on digital image preparation.

To revise all techniques used above and to acknowledge the ideal workflow to achieve the

best results while maximising efficiency may be of value to conclude with. Ideally the sample would

be mounted in a guiding block similar to that of the Ristna Cliff sample, this proved to aid in the

accuracy of slice angles and alignment. The saw used would need a far smaller diameter blade to

minimise the amount of information lost with each cut. A guiding mechanism that would feed the

sample in to the saw blade at a definite interval would be highly recommended and would ideally be

able to achieve an advancement of the sample into the saw on the scale of at least one millimeter

depending on the scale of the sample and size of areas of interest. The imaging is is quickly and

efficiently achieved with a flatbed scanner so there is little need for DSLR type camera imaging. With

a well made mounting block and a continuous edge across all slices, alignment could be automated in

Photoshop using the ‘auto-align’ tool, further reducing time expended in preparation. There is no

obvious way, however, to reduce time spent creating layer masks to digitally extract the specimens

from their mounting, which is certainly an area for further experimentation.

Page 18: SS Lab Project Write Up

14

6. REFERENCES

1. Pascual-Cebrian, E., Hennhöfer, D.K. & Götz, S., 2012 3D morphometry of polyconitid rudist

bivalves based on grinding tomography Facies April 2013, Volume 59, Issue 2, pp 347-358