How to make color-coded size distributions in CTVol Method note

How to make color-coded size
distributions in CTVol
Method note
Page 1 of 16
2
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Introduction
When running a 3D analysis for particle or pore size, one can calculate the structure
thickness or separation distribution from the 3D analysis plug-in in CTAn, and plot
these data in a histogram. This, however, does not provide any visual representation
of how for example particle or pore size is distributed throughout the sample. One
solution to that is to create a 3D illustration in CTVol in which the particle/pore size is
indicated with a color code.
This method note will illustrate step by step how to create such a color-coded 3D
model for the particle or pore size distribution in CTVol. The sample used in this
method note is a plastic cylinder containing several air inclusions of different sizes
(see image below). It was scanned at the SkyScan 1173 with a pixel size of 30
micron.
Picture of the plastic sample containing air
bubbles.
3D surface rendering of the plastic
sample with the air inclusions colored
blue. The plastic was colored grey and set
transparent.
Page 2 of 16
3
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Part 1: Regions of interest page
As usual, the analysis starts with setting an appropriate region of interest. By clicking
the ‘Open dataset’ button in CTAn, one can 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.
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 was
selected completely within the plastic sample. If required, also limit the top and
bottom of the region of interest (in the Z-direction) by right clicking the corresponding
slices and selecting ‘Set top of selection’ or ‘Set bottom of selection’.
Page 3 of 16
4
Bruker microCT method note: Color-coded 3D size distribution in CTVol
This region of interest can be saved by clicking the ‘save ROI’ button. This
option is required to process multiple datasets in batch as is referred to later
on in this application note.
Of note, reopening the new VOI dataset greatly reduces the data volume to process,
and will thus speed up the analysis and generation of the 3D models. Do not forget to
also reload the region of interest (automatically saved by CTAn) from the dataset
folder to delineate the dataset.
Page 4 of 16
5
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Part 2: Binary images page
Once an appropriate region of interest (in 3D called volume of interest) is
selected, one can proceed to the ‘Binary images’ page. In the ‘Binary
images’ page, a threshold has to be chosen to select certain grey values in the
image. In this case, a color-coded 3D model will be created for the pore size
distribution. Therefore the air is selected by putting a threshold (in this specific case)
from 0 to 90. In case one wants to make a color-coded 3D model for particle size,
select the right threshold values to select the particles of interest.
Raw image view
Binary image view
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.
Page 5 of 16
6
Bruker microCT method note: Color-coded 3D size distribution in CTVol
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 buttons are on the right side of the plugins 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 air bubbles, run the thresholding plug-in (global) using the
selected values (0-90 in this case) (step 1). Note that when you select the ‘default’
option, CTAn will upload the values that you have selected last in the binary page.
Page 6 of 16
7
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Image view
Image inside ROI view
ROI view
At this point, the image inside ROI view shows a selection of all air inclusions within
the sample. If required, one can still clean up the image and remove some noise by
applying a small despeckling function removing white or black speckles.
To make a color-coded 3D model of the pore size, one has to decide now how to
subdivide the pore (or particle) sizes into classes. In this case, 3 classes were
chosen: small pores with a volume of up to 10000 voxels, medium size pores with a
volume between 10000 and 50000 voxels, and large pores with a volume larger than
50000 voxels. The idea behind this protocol is that different 3D models will be
created, one for each class. It will start by selecting and making a 3D model for the
largest pores by removing all medium and small sized pores. Run a despeckling
function to remove white speckles in 3D smaller than 50000 voxels (the lower limit of
the large pore class) (step 2).
Page 7 of 16
8
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Image view
Image inside ROI view
ROI view
.
Now the image inside ROI view only contains a selection of the pores larger than
50000 voxels. The next step is to make a surface rendered 3D model of these pores
by running the ‘3D model’ plug-in (step 3). 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.
Page 8 of 16
9
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Next, we will make a 3D model of the medium sized pores. To do so, we need to
remove all white speckles larger than 50000 voxels and smaller than 10000 voxels.
However, one can only specify the lower limit when running a despeckling function.
To get around this, we will remove the large pores, which are already selected in the
image view, from the region of interest by running a bitwise operation ‘Region of
interest = region of interest SUB Image’ (step 4).
Image view
Image inside ROI view
ROI view
If now the image is loaded again (step 5) and the pores selected again by
thresholding (step 6), the image inside ROI view will only display the small and
medium sized pores. Note than when initially a despeckling function was applied to
remove noise, this step has to be repeated here as well.
Page 9 of 16
10
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Image view
Image inside ROI view
ROI view
To select the medium sized pores only, run a despeckling function to remove all
small sized pores (remove white speckles smaller than 10000 voxels) (step 7) and
make a second 3D model from the image inside ROI (step 8).
Page 10 of 16
11
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Image view
Image inside ROI view
ROI view
Finally, a 3D model will be created from the small pores. Similar to what has been
done before, the medium sized pixels will be removed from the region of inetrest by
running the bitwise operation ‘Region if interest = region of interest SUB image’ (step
9).
Page 11 of 16
12
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Image view
Image inside ROI view
ROI view
Reloading the image (step 10) and selecting the pores again (thresholding and
eventually despeckling to remove noise) (step 11) will now result in an image inside
ROI that only displays the small pores from which a third 3D model can be created
(step 12).
Page 12 of 16
13
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Image view
Image inside ROI view
Page 13 of 16
ROI view
14
Bruker microCT method note: Color-coded 3D size distribution in CTVol
As mentioned before, one can make 3D models for multiple samples by a
specific protocol 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 14 of 16
15
Bruker microCT method note: Color-coded 3D size distribution in CTVol
Note:
One can subdivide the pore/particles sizes in as many classes as wanted by
repeating step 5 up to and including step 9 as many times as required.
Note:
From (future at time of writing) CTAn version 1.13.0.0 onwards, the despeckle plug-in
from the custom processing menu will allow to set both a lower and upper limit. In
other words, one will be able to remove or keep speckles within a certain range, for
example with a volume between 100 and 200 voxels. This will simplify and shorten
the above described protocol a lot, and will come down to simply
(1) threshold the particles or pores
(2) select first the particle/pore size range of interest
(3) make a 3D model of that selection
(4) reload the image
(5) repeat steps 1-4 as many times as wanted with different size ranges
Page 15 of 16
16
Bruker microCT method note: Color-coded 3D size distribution in CTVol
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’. Open the 3 model that were generated and assign a different color to them. In
this case, the large size particles were colored green, the medium sized class
colored green and the small pores red. The final result is show below.
Page 16 of 16