how to make and open surface rendered 3d...

13
Page 1 of 13 How to make and open surface rendered 3D models Method note

Upload: buingoc

Post on 06-Sep-2018

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 1 of 13

How to make and open

surface rendered 3D models

Method note

Page 2: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 2 of 13

2 Bruker-MicroCT method note: Surface rendered 3D models

Introduction

The goal of this method note is to illustrate step by step the process of how to set up

a basic custom processing protocol to make (and open) surface rendered 3D models.

More advanced protocols can be found in other method notes, for example on how to

make different models for the open and closed porosity of a sample or color coded

3D models of pore or particle size.

As an illustration, a hydroxyapatite (HA) scaffold is used. Looking at the

reconstructed images, one can see that the scaffold has a porous structure (the

pores being air bubbles), but also contains some high dense particles (see image

below).

Unlike volume rendering, where a dataset of 2D greyscale images is loaded into the

volume rendering software (CTVox), surface rendering is based on thresholding of a

structure or density of interest followed by the generation of a 3D model of these

selected parts.

Page 3: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 3 of 13

3 Bruker-MicroCT method note: Surface rendered 3D models

Part 1: Regions of interest page

Often surface rendered 3D models can be rather large and thus difficult to open or

work with as the computer may run out of memory. Therefore, it is important to select

regions of interest or even resize data upon loading.

By clicking the ‘Open dataset’ button in CTAn, browse to the reconstructed images of

the sample to be analyzed. When the dataset dimensions are too large to be

processed by the computer, the dataset can be resized by ticking the ‘resize by’ box

and specifying an appropriate resizing factor.

When required, one can first select a region of interest for the dataset. To do

so, browse to the ‘Regions of interest’ page upon opening of the dataset in

CTAn. Depending on the sample or application, one has the choice between either

several geometrical shapes or a freehand selection as region of interest. By clicking

the ROI dimensions, one has the possibility to predefine exactly the dimensions of

the ROI if wanted. In this case, a circular region of interest with a diameter of 500

pixels was selected completely within the HA scaffold structure.

Page 4: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 4 of 13

4 Bruker-MicroCT method note: Surface rendered 3D models

In a next step, also the top and bottom of the region of interest (in the Z-direction)

have to be specified. To do so, right click the slices to be determined as the top and

bottom of the region of interest and select ‘Set top of selection’ or ‘Set bottom of

selection’, respectively.

Finally, this region of interest can also be saved by clicking the ‘save ROI’

button. This option is required to process multiple datasets in batch as will be

explained later on in this application note.

Of note, reopening the new VOI dataset greatly reduces the data volume to process,

and will thus greatly speed up the analysis and generation of the 3D models. Do not

forget to reload the region of interest as well (automatically saved by CTAn) from the

dataset folder to delineate the dataset.

Page 5: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 5 of 13

5 Bruker-MicroCT method note: Surface rendered 3D models

Part 2: Binary images page

Once an appropriate region of interest (in 3D called volume of interest) is

selected, proceed to the ‘Binary images’ page.

In the ‘Binary images’ page, a threshold has to be set to select certain structures

based on the grey values. Setting the appropriate threshold can be done either by

shifting between and comparing the raw image (press ALT+1) and the binary image

(press ALT+3), or by setting the threshold using the ‘Toggle halftone view’ function.

In this case, the HA scaffold structure is selected by putting a threshold from 60 to

255. The high density particles inside the HA scaffold are selected by putting the

threshold from 150 to 255.

Low dense matrix selection High dense particle selection

Note that when comparing different samples, the threshold values have to be kept

constant for all samples. Therefore, one has to verify that the selected threshold

values can be applied for all samples, which is only possible when all samples are

scanned and reconstructed with the same settings.

After selecting the structure (density) of interest, a surface rendered 3D

model can be created by clicking the ‘create 3D-model’ button according to

the 3D surface construction algorithm selected in the file-preferences-advanced

menu. Three algorithms can be used to create the 3D model:

Page 6: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 6 of 13

6 Bruker-MicroCT method note: Surface rendered 3D models

Marching Cubes: a surface building algorithm based on an explicit hexahedral

voxel model.

Double Time Cubes: a Marching Cubes type method but with approximately half

the number of facet triangles, with more smoothed surface

detail.

Adaptive Rendering: a sub-voxel smooth rendering method allowing specification

of ‘locality’ and ‘tolerance’ variable parameters.

‘Locality’ defines the distance in pixels to the neighboring point

used for finding the object border. Increasing this value allows

“jumping” through noise on the object border, but small objects

(often created by binarization of noise) with size less than this

parameter will be lost.

‘Tolerance’ defines the sub pixel accuracy with which the

object border is delineated. Reducing this number makes the

model more smooth and accurate, but increases the model file

size.

Additionally, upon saving the 3D model, one can choose between 4 different file

formats:

STL: Stereolithography, an industry standard surface rendered model for inputting

into other software.

P3G: A flexible format allowing smoothing of the surface in the CT-volume viewing

software.

CTM: A general purpose model format with good stability at very large model sizes.

PLY: A computer file format known as the Polygon File Format or the Stanford

Triangle Format.

In practice, one will make surface rendered 3D models only very rarely in the binary

image page as no image processing, for example despeckling functions to remove

noise, is possible in the binary page. One will rather use the custom processing

page, which contains several image processing tools, to make surface rendered 3D

models.

Page 7: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 7 of 13

7 Bruker-MicroCT method note: Surface rendered 3D models

Part 3: Custom processing page

Once the appropriate threshold values are selected, proceed to the ‘Custom

processing’ page.

A copy of the dataset will be loaded. Three important buttons are on the right side of

the plug-ins bar:

image view

image inside ROI view

ROI view

As you have just loaded a copy of the dataset into the custom processing page, the

initial settings are:

Image view Image inside ROI view ROI view

In order to select the HA matrix, run the thresholding plug-in (global) using the

selected values (60-255 in this case). Note that when you select the ‘default’ option,

CTAn will upload the values that you have selected last in the binary page.

Page 8: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 8 of 13

8 Bruker-MicroCT method note: Surface rendered 3D models

Image view Image inside ROI view ROI view

Due to noise, certain pixels can be segmented and appear as white dots or speckles.

Therefore, the next step is to run a despeckling function, removing white speckles in

3D that are smaller than for example 10 voxels in this case. Note that this preset has

to be optimized according to every individual application, based on the size of the

white speckles.

Page 9: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 9 of 13

9 Bruker-MicroCT method note: Surface rendered 3D models

The final step is now to make a surface rendered 3D model of the scaffold matrix by

running the ‘3D model’ plug-in. One can see that the different construction algorithms

and file types can also be specified here, regardless of what is selected in the file-

preferences menu. In this case the ‘double-time cubes’ algorithm was used and a 3D

model was saved from the ‘image inside ROI’ as ‘.ctm’ file.

In the second part, the high dense particles will be selected to make a second 3D

model. However, this requires reloading of the image.

Image view Image inside ROI view ROI view

Run the thresholding plug-in (global) using the selected values for the high dense

particles (150-255 in this case).

Page 10: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 10 of 13

10 Bruker-MicroCT method note: Surface rendered 3D models

Image view Image inside ROI view ROI view

Again, one can choose to apply a despeckling function, removing white speckles in

3D smaller than for example 10 voxels.

Page 11: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 11 of 13

11 Bruker-MicroCT method note: Surface rendered 3D models

Image view Image inside ROI view ROI view

Again, the last step is to make a surface rendered 3D model of the high dense

particles by running the ‘3D model’ plug-in. Again, the ‘double-time cubes’ algorithm

was used and a 3D model was saved from the ‘image inside ROI’ as ‘.ctm’ file.

Page 12: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 12 of 13

12 Bruker-MicroCT method note: Surface rendered 3D models

As mentioned before, one can make 3D models for multiple samples in

batch mode. To do so, select the ‘Batch manager’ icon in the custom

processing tab. The different steps (thresholding, despeckle, bitwise operations, ….)

can be saved in a task list. Therefore each plug-in needs to be added to the task list

by clicking the ‘+’ button (custom processing tab) or ‘add’ button (top level Batch

manager). You can apply the task list to several datasets using the batch manager

(bottom level). In the batch-manager window, one has to add the datasets you want

to analyze, as well as load the ROI for each dataset. Both the analysis protocol and

the sample list can be exported if wanted.

Page 13: How to make and open surface rendered 3D modelsumanitoba.ca/.../MN017_Basic_3D_surface_rendering.pdf · surface rendered 3D models Method note . Page 2 of 13 2 ... More advanced protocols

Page 13 of 13

13 Bruker-MicroCT method note: Surface rendered 3D models

Part 4: Open surface rendered 3D models in CTVol

Surface rendered 3D models can be opened in SkyScan ‘CTVol’ software by clicking

the ‘open 3D model’ button. Note that one has to set the file type to the right format

corresponding to the file format of the models that have been created, in this case

‘.ctm’.

In analogy with the volume rendering software CTVox, CTVol allows 3D

visualisations, but not (3D) calculations. As output, both software programs only

allow to save screenshots and movie animations of the 3D models. In contrast to

CTVox, multiple 3D models can be loaded into CTVol one after the other. As such,

one can change the position, orientation, color, transparency, etc. of each individual

model relative to the others. However, the goal of this method note is not to give an

overview of all possibilities of CTVol as all those are listed in detail in the CTVol

manual, but only a flavor of what is possible.

In this case, the scaffold matrix was turned into grey and set transparent, while the

high dense particles are represented in orange. As such, one can get an impression

of how the high dense particles are distributed along the scaffold matrix and use it to

visually confirm the calculations made in CTAn.