SlideShare a Scribd company logo
1 of 9
Download to read offline
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
HOW TO MAKE A MANUAL BINARY SEGMENTATION FOR AN XCT
RECONSTRUCTED VOLUME WITH IMAGEJ
Javier García Molleja
IMDEA Materials Institute – X-Ray Laboratory
First of all, open ImageJ software.
File -> Import -> Raw… (and use the browser in order to select your volume). Click Open.
A dialog window is shown. Please, identify the image bit type, the width (in pixels), the height (in
pixels) and the number of slices. Normally, these values are written at the end of the filename (or
they are automatically loaded). It is supposed that you will perform the segmentation from an
equalized, concatenated and aligned volume, so the file is saved as raw (then do not click Little-endian
byte order). Click OK.
The volume is loaded in the TOP-BOTTOM view. It is important that you make, from the same volume,
a proper mask. We will use it later.
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
Make sure which regions will be segmented. For example, in the present case we need to identify the
internal pores from the rest (material, air…). Thus, pores will be detected in black colour (grey level 0)
and the rest will be presented in white colour (grey level 255).
Furthermore, volume must be in 8 bits, so Image -> Type -> 8-bit. Save this new volume, just in case.
Image -> Adjust ->Auto Local Threshold… will show a window with different options.
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
This dialog window enables several local thresholds. Sauvola is the most used method in our
laboratory, followed by the Niblack method. Indeed, Sauvola method is an evolution from the Niblack
one and its formula is the following one:
> ∙ 1 + ∙ − 1
It is worth mentioning that pixel is the pixel to be segmented (one by one in all slices). MEAN is the
grey mean of the nearest pixels to the one to be segmented. In the dialog window, “Radius” is the
option to tell to the software the size of the neighbourhood. k is the “Parameter1” in the dialog
window. STDEV is the standard deviation of the mean calculated with the grey levels from the pixels
of the neighbourhood. Finally, r is the “Parameter2” in the dialog window. So, if the grey level of the
present pixel is higher than the calculated value it will be labelled as Foreground, i.e., white colour. On
the other hand, if the grey level of the present pixel is lower than the calculated value it will be
labelled as Background, i.e., black colour.
But, how to select the best parameters? It is important that you do several trials in order to optimize
all parameters. Image -> Duplicate… several times of one random slice. In the present case, slice
number 1292 is duplicated many times. Furthermore, if you want to compare the grey level slice with
another segmented slice the following command will help you:
Analyze -> Tools -> Synchronize Windows and select the ones you are interested in. Thus, all
operations will be replicated in all synchronized windows.
First, try to optimize the value of the Radius. If you have big pores, a low Radius produces a
segmentation where the centre of the pore is not in black colour. On the other hand, if a high Radius
is selected, pores will be more rounded than the expected.
GREY LEVEL
RADIUS = 60 RADIUS = 80 RADIUS = 100
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
Second, try to optimize the Parameter1 (k in the Sauvola formula). If you use a low value, the Sauvola
method is more aggressive, i.e., pores are bigger than expected (pixels with higher grey values near
the pore border are not considered as foreground but they are considered as background) and noise
in the material can be labelled as background. On the other hand, using a high parameters make
Sauvola method less aggressive, so pores will be thinner than expected (pixels with lower grey values
near the pore border are considered as foreground).
GREY LEVEL
PARAMETER1 = 0.4
PARAMETER1 = 0.6
PARAMETER1 = 0.8
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
Don’t ask me why, but in our laboratory we use Parameter2 (r in the Sauvola formula) with a fixed
value, namely, 128. This parameter does have not much effect when the value is low but if it is high, it
will remove noise in the material and pores will be rounded.
GREY LEVEL
PARAMETER2 = 0
PARAMETER2 = 128
PARAMETER2 = 256
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
Finally, after a good parameter choice, go back to the complete volume and select Sauvola method
and use the best parameters achieved. In this case we used Radius = 80, Parameter1 = 0.6 and
Parameter2 = 128. Please, check White objects on black background and check Stack. Click OK.
You can save this new volume. In order to check the goodness of the parameter choice you can make
a projection of all defects in the grey level volume and in the segmented one and compare (note this
is possible when you have a low amount of defects!):
Image -> Stacks -> Z-Project… (Start slice: the most convenient one for your purposes, Stop slice: the
most convenient one for your purposes, Projection type: Min Intensity). Click OK.
Now, we can improve the output with the mask previously done (please, check the other manuals).
Local thresholds can have problems with the segmentation of air, i.e., air next to the sample surface
will be black (background) but air far from the sample tends to be white (foreground). How to solve
this? One quick solution is try to use a higher Radius but if your pores are compromised with this new
choice try to open now the mask.
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
With the mask, we are sure that the air is always black, so we need to combine the segmented
volume with the mask.
Process -> Image Calculator… (Image1: Sauvola volume, Operation: Multiply, Image2: mask volume,
check Create new window and uncheck 32-bit (float) result). Click OK and then Yes.
You can save this new volume!
In the present case you won’t see much difference (pay attention to the sample surface) but in some
cases this step is very important. Now, if you use this volume to extract information of the pores (the
objects we are interested in) you must ignore the air in the quantification process.
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
Yes, we can do a couple of extra steps in order to avoid the air and keep the pores.
Edit -> Invert and click Yes. Now pores and air are white (grey level 255) and the material is black (grey
level 0).
Go to the mask and try to reduce the size of the white region. Remember this region of grey level 255
includes material and inner pores without discrimination. Here the point is that the surface of the
segmented volume does not perfectly match with the surface of the mask volume because we
smoothed it with several dilate and erode binary operations. Then, in order to avoid the inclusion of
noise very near to the surface we need to reduce this white region:
Process -> Binary -> Dilate and click Yes. Please, check that this operation is performed in black pixels.
Do this operation few times (less than 5). If noise is still present try to make another mask with better
performance.
Process -> Image Calculator… (Image1: inverted Sauvola×Mask, Operation: Multiply, Image2: dilated
mask, check Create new window and uncheck 32-bit (float) result). Click OK and then Yes to apply this
operation to all slices.
Madrid institute for advanced studies ofmaterials
Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain
Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org
Edit -> Invert and click Yes in order to keep pores in black colour.
Of course, save this new volume with the name of the sample, the operation you did, the bit type and
the stack size. The extension, as usual, will be .raw:
06-MB3_17_381_P02_8b_OnlyPores_2120x950x1672.raw
(Thanks to Jonathan Espinoza for his critical review of the process and his valuable comments about
the process)

More Related Content

Similar to How to make a manual binary segmentation for an XCT reconstructed volume with ImageJ

Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...
Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...
Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...Ricardo Guerrero Gómez-Olmedo
 
OR-I_Lecture_Note_01.pptx
OR-I_Lecture_Note_01.pptxOR-I_Lecture_Note_01.pptx
OR-I_Lecture_Note_01.pptxssuserf19f3e
 
19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdfGOWTHAMR721887
 
Lecture - Linear Programming.pdf
Lecture - Linear Programming.pdfLecture - Linear Programming.pdf
Lecture - Linear Programming.pdflucky141651
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialpotaters
 
Analysis of Algorithm II Unit version .pptx
Analysis of Algorithm  II Unit version .pptxAnalysis of Algorithm  II Unit version .pptx
Analysis of Algorithm II Unit version .pptxrajesshs31r
 
Audio tagging system using densely connected convolutional networks (DCASE201...
Audio tagging system using densely connected convolutional networks (DCASE201...Audio tagging system using densely connected convolutional networks (DCASE201...
Audio tagging system using densely connected convolutional networks (DCASE201...Hyun-gui Lim
 
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
AI optimizing HPC simulations (presentation from  6th EULAG Workshop)AI optimizing HPC simulations (presentation from  6th EULAG Workshop)
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)byteLAKE
 
Algorithm Using Divide And Conquer
Algorithm Using Divide And ConquerAlgorithm Using Divide And Conquer
Algorithm Using Divide And ConquerUrviBhalani2
 
Anomaly detection, part 1
Anomaly detection, part 1Anomaly detection, part 1
Anomaly detection, part 1David Khosid
 
Data-Driven Recommender Systems
Data-Driven Recommender SystemsData-Driven Recommender Systems
Data-Driven Recommender Systemsrecsysfr
 
Cn mx3000 p_20120808e
Cn mx3000 p_20120808eCn mx3000 p_20120808e
Cn mx3000 p_20120808eElsa von Licy
 
An expert system for diagnosing children s multiplication errors.pdf
An expert system for diagnosing children s multiplication errors.pdfAn expert system for diagnosing children s multiplication errors.pdf
An expert system for diagnosing children s multiplication errors.pdfLaurie Smith
 
CMU Lecture on Hadoop Performance
CMU Lecture on Hadoop PerformanceCMU Lecture on Hadoop Performance
CMU Lecture on Hadoop PerformanceMapR Technologies
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018Robert Geofroy
 
Introductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT RoorkeeIntroductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT RoorkeeVinayak Sahai
 
Design & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxDesign & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxJeevaMCSEKIOT
 
The super resolution technology 2016
The super resolution technology 2016The super resolution technology 2016
The super resolution technology 2016Testo Viet Nam
 

Similar to How to make a manual binary segmentation for an XCT reconstructed volume with ImageJ (20)

Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...
Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...
Meetup Python Madrid 2018: ¿Segmentación semántica? ¿Pero de qué me estás hab...
 
OR-I_Lecture_Note_01.pptx
OR-I_Lecture_Note_01.pptxOR-I_Lecture_Note_01.pptx
OR-I_Lecture_Note_01.pptx
 
19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf
 
Lecture - Linear Programming.pdf
Lecture - Linear Programming.pdfLecture - Linear Programming.pdf
Lecture - Linear Programming.pdf
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorial
 
Analysis of Algorithm II Unit version .pptx
Analysis of Algorithm  II Unit version .pptxAnalysis of Algorithm  II Unit version .pptx
Analysis of Algorithm II Unit version .pptx
 
Audio tagging system using densely connected convolutional networks (DCASE201...
Audio tagging system using densely connected convolutional networks (DCASE201...Audio tagging system using densely connected convolutional networks (DCASE201...
Audio tagging system using densely connected convolutional networks (DCASE201...
 
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
AI optimizing HPC simulations (presentation from  6th EULAG Workshop)AI optimizing HPC simulations (presentation from  6th EULAG Workshop)
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
 
Algorithm Using Divide And Conquer
Algorithm Using Divide And ConquerAlgorithm Using Divide And Conquer
Algorithm Using Divide And Conquer
 
Daa unit 2
Daa unit 2Daa unit 2
Daa unit 2
 
Daa unit 2
Daa unit 2Daa unit 2
Daa unit 2
 
Anomaly detection, part 1
Anomaly detection, part 1Anomaly detection, part 1
Anomaly detection, part 1
 
Data-Driven Recommender Systems
Data-Driven Recommender SystemsData-Driven Recommender Systems
Data-Driven Recommender Systems
 
Cn mx3000 p_20120808e
Cn mx3000 p_20120808eCn mx3000 p_20120808e
Cn mx3000 p_20120808e
 
An expert system for diagnosing children s multiplication errors.pdf
An expert system for diagnosing children s multiplication errors.pdfAn expert system for diagnosing children s multiplication errors.pdf
An expert system for diagnosing children s multiplication errors.pdf
 
CMU Lecture on Hadoop Performance
CMU Lecture on Hadoop PerformanceCMU Lecture on Hadoop Performance
CMU Lecture on Hadoop Performance
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018
 
Introductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT RoorkeeIntroductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT Roorkee
 
Design & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxDesign & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptx
 
The super resolution technology 2016
The super resolution technology 2016The super resolution technology 2016
The super resolution technology 2016
 

More from Javier García Molleja

Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated PEG-based ...
Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated  PEG-based ...Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated  PEG-based ...
Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated PEG-based ...Javier García Molleja
 
PLA aerogel as a universal support for the typical organic phase change ener...
PLA aerogel as a universal support for the typical organic phase change  ener...PLA aerogel as a universal support for the typical organic phase change  ener...
PLA aerogel as a universal support for the typical organic phase change ener...Javier García Molleja
 
Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...
Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...
Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...Javier García Molleja
 
Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...
Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...
Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...Javier García Molleja
 
El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...
El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...
El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...Javier García Molleja
 
Una introducción a la Tomografía Computarizada de Rayos X
Una introducción a la Tomografía Computarizada de Rayos XUna introducción a la Tomografía Computarizada de Rayos X
Una introducción a la Tomografía Computarizada de Rayos XJavier García Molleja
 
Unidad 5: impulso y cantidad de movimiento
Unidad 5: impulso y cantidad de movimientoUnidad 5: impulso y cantidad de movimiento
Unidad 5: impulso y cantidad de movimientoJavier García Molleja
 
Unidad 4: trabajo, energía y potencia
Unidad 4: trabajo, energía y potenciaUnidad 4: trabajo, energía y potencia
Unidad 4: trabajo, energía y potenciaJavier García Molleja
 
Unidad 1: descripción del mundo físico
Unidad 1: descripción del mundo físicoUnidad 1: descripción del mundo físico
Unidad 1: descripción del mundo físicoJavier García Molleja
 
Unit 1: Description of the physical world
Unit 1: Description of the physical worldUnit 1: Description of the physical world
Unit 1: Description of the physical worldJavier García Molleja
 
Laboratorio de Rayos X: caracterización de materiales
Laboratorio de Rayos X: caracterización de materialesLaboratorio de Rayos X: caracterización de materiales
Laboratorio de Rayos X: caracterización de materialesJavier García Molleja
 
Directrices para la realización del informe de las prácticas de laboratorio
Directrices para la realización del informe de las prácticas de laboratorioDirectrices para la realización del informe de las prácticas de laboratorio
Directrices para la realización del informe de las prácticas de laboratorioJavier García Molleja
 
Guía rápida para regresiones lineales
Guía rápida para regresiones linealesGuía rápida para regresiones lineales
Guía rápida para regresiones linealesJavier García Molleja
 

More from Javier García Molleja (20)

Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated PEG-based ...
Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated  PEG-based ...Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated  PEG-based ...
Highly thermal conductive Boron Nitride/Polyrotaxane encapsulated PEG-based ...
 
PLA aerogel as a universal support for the typical organic phase change ener...
PLA aerogel as a universal support for the typical organic phase change  ener...PLA aerogel as a universal support for the typical organic phase change  ener...
PLA aerogel as a universal support for the typical organic phase change ener...
 
Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...
Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...
Graphene Functionalization of Polyrotaxane-Encapsulated PEG-Based PCMs: Fabri...
 
Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...
Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...
Unveiling the structure, chemistry, and formation mechanism of an in-situ pho...
 
El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...
El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...
El rol de la tomografía en la industria: aplicaciones aeronáuticas y en el se...
 
Una introducción a la Tomografía Computarizada de Rayos X
Una introducción a la Tomografía Computarizada de Rayos XUna introducción a la Tomografía Computarizada de Rayos X
Una introducción a la Tomografía Computarizada de Rayos X
 
Unidad 8: física cuántica
Unidad 8: física cuánticaUnidad 8: física cuántica
Unidad 8: física cuántica
 
Unidad 7: fuerzas a distancia
Unidad 7: fuerzas a distanciaUnidad 7: fuerzas a distancia
Unidad 7: fuerzas a distancia
 
Unidad 6: movimiento rotacional
Unidad 6: movimiento rotacionalUnidad 6: movimiento rotacional
Unidad 6: movimiento rotacional
 
Unit 5: Impulse and momentum
Unit 5: Impulse and momentumUnit 5: Impulse and momentum
Unit 5: Impulse and momentum
 
Unidad 5: impulso y cantidad de movimiento
Unidad 5: impulso y cantidad de movimientoUnidad 5: impulso y cantidad de movimiento
Unidad 5: impulso y cantidad de movimiento
 
Unidad 4: trabajo, energía y potencia
Unidad 4: trabajo, energía y potenciaUnidad 4: trabajo, energía y potencia
Unidad 4: trabajo, energía y potencia
 
Unidad 3: dinámica
Unidad 3: dinámicaUnidad 3: dinámica
Unidad 3: dinámica
 
Unidad 2: cinemática
Unidad 2: cinemáticaUnidad 2: cinemática
Unidad 2: cinemática
 
Unidad 1: descripción del mundo físico
Unidad 1: descripción del mundo físicoUnidad 1: descripción del mundo físico
Unidad 1: descripción del mundo físico
 
Unit 1: Description of the physical world
Unit 1: Description of the physical worldUnit 1: Description of the physical world
Unit 1: Description of the physical world
 
Laboratorio de Rayos X: caracterización de materiales
Laboratorio de Rayos X: caracterización de materialesLaboratorio de Rayos X: caracterización de materiales
Laboratorio de Rayos X: caracterización de materiales
 
Directrices para la realización del informe de las prácticas de laboratorio
Directrices para la realización del informe de las prácticas de laboratorioDirectrices para la realización del informe de las prácticas de laboratorio
Directrices para la realización del informe de las prácticas de laboratorio
 
Sesiones de Laboratorio Física I
Sesiones de Laboratorio Física ISesiones de Laboratorio Física I
Sesiones de Laboratorio Física I
 
Guía rápida para regresiones lineales
Guía rápida para regresiones linealesGuía rápida para regresiones lineales
Guía rápida para regresiones lineales
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

How to make a manual binary segmentation for an XCT reconstructed volume with ImageJ

  • 1. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org HOW TO MAKE A MANUAL BINARY SEGMENTATION FOR AN XCT RECONSTRUCTED VOLUME WITH IMAGEJ Javier García Molleja IMDEA Materials Institute – X-Ray Laboratory First of all, open ImageJ software. File -> Import -> Raw… (and use the browser in order to select your volume). Click Open. A dialog window is shown. Please, identify the image bit type, the width (in pixels), the height (in pixels) and the number of slices. Normally, these values are written at the end of the filename (or they are automatically loaded). It is supposed that you will perform the segmentation from an equalized, concatenated and aligned volume, so the file is saved as raw (then do not click Little-endian byte order). Click OK. The volume is loaded in the TOP-BOTTOM view. It is important that you make, from the same volume, a proper mask. We will use it later.
  • 2. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org Make sure which regions will be segmented. For example, in the present case we need to identify the internal pores from the rest (material, air…). Thus, pores will be detected in black colour (grey level 0) and the rest will be presented in white colour (grey level 255). Furthermore, volume must be in 8 bits, so Image -> Type -> 8-bit. Save this new volume, just in case. Image -> Adjust ->Auto Local Threshold… will show a window with different options.
  • 3. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org This dialog window enables several local thresholds. Sauvola is the most used method in our laboratory, followed by the Niblack method. Indeed, Sauvola method is an evolution from the Niblack one and its formula is the following one: > ∙ 1 + ∙ − 1 It is worth mentioning that pixel is the pixel to be segmented (one by one in all slices). MEAN is the grey mean of the nearest pixels to the one to be segmented. In the dialog window, “Radius” is the option to tell to the software the size of the neighbourhood. k is the “Parameter1” in the dialog window. STDEV is the standard deviation of the mean calculated with the grey levels from the pixels of the neighbourhood. Finally, r is the “Parameter2” in the dialog window. So, if the grey level of the present pixel is higher than the calculated value it will be labelled as Foreground, i.e., white colour. On the other hand, if the grey level of the present pixel is lower than the calculated value it will be labelled as Background, i.e., black colour. But, how to select the best parameters? It is important that you do several trials in order to optimize all parameters. Image -> Duplicate… several times of one random slice. In the present case, slice number 1292 is duplicated many times. Furthermore, if you want to compare the grey level slice with another segmented slice the following command will help you: Analyze -> Tools -> Synchronize Windows and select the ones you are interested in. Thus, all operations will be replicated in all synchronized windows. First, try to optimize the value of the Radius. If you have big pores, a low Radius produces a segmentation where the centre of the pore is not in black colour. On the other hand, if a high Radius is selected, pores will be more rounded than the expected. GREY LEVEL RADIUS = 60 RADIUS = 80 RADIUS = 100
  • 4. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org Second, try to optimize the Parameter1 (k in the Sauvola formula). If you use a low value, the Sauvola method is more aggressive, i.e., pores are bigger than expected (pixels with higher grey values near the pore border are not considered as foreground but they are considered as background) and noise in the material can be labelled as background. On the other hand, using a high parameters make Sauvola method less aggressive, so pores will be thinner than expected (pixels with lower grey values near the pore border are considered as foreground). GREY LEVEL PARAMETER1 = 0.4 PARAMETER1 = 0.6 PARAMETER1 = 0.8
  • 5. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org Don’t ask me why, but in our laboratory we use Parameter2 (r in the Sauvola formula) with a fixed value, namely, 128. This parameter does have not much effect when the value is low but if it is high, it will remove noise in the material and pores will be rounded. GREY LEVEL PARAMETER2 = 0 PARAMETER2 = 128 PARAMETER2 = 256
  • 6. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org Finally, after a good parameter choice, go back to the complete volume and select Sauvola method and use the best parameters achieved. In this case we used Radius = 80, Parameter1 = 0.6 and Parameter2 = 128. Please, check White objects on black background and check Stack. Click OK. You can save this new volume. In order to check the goodness of the parameter choice you can make a projection of all defects in the grey level volume and in the segmented one and compare (note this is possible when you have a low amount of defects!): Image -> Stacks -> Z-Project… (Start slice: the most convenient one for your purposes, Stop slice: the most convenient one for your purposes, Projection type: Min Intensity). Click OK. Now, we can improve the output with the mask previously done (please, check the other manuals). Local thresholds can have problems with the segmentation of air, i.e., air next to the sample surface will be black (background) but air far from the sample tends to be white (foreground). How to solve this? One quick solution is try to use a higher Radius but if your pores are compromised with this new choice try to open now the mask.
  • 7. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org With the mask, we are sure that the air is always black, so we need to combine the segmented volume with the mask. Process -> Image Calculator… (Image1: Sauvola volume, Operation: Multiply, Image2: mask volume, check Create new window and uncheck 32-bit (float) result). Click OK and then Yes. You can save this new volume! In the present case you won’t see much difference (pay attention to the sample surface) but in some cases this step is very important. Now, if you use this volume to extract information of the pores (the objects we are interested in) you must ignore the air in the quantification process.
  • 8. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org Yes, we can do a couple of extra steps in order to avoid the air and keep the pores. Edit -> Invert and click Yes. Now pores and air are white (grey level 255) and the material is black (grey level 0). Go to the mask and try to reduce the size of the white region. Remember this region of grey level 255 includes material and inner pores without discrimination. Here the point is that the surface of the segmented volume does not perfectly match with the surface of the mask volume because we smoothed it with several dilate and erode binary operations. Then, in order to avoid the inclusion of noise very near to the surface we need to reduce this white region: Process -> Binary -> Dilate and click Yes. Please, check that this operation is performed in black pixels. Do this operation few times (less than 5). If noise is still present try to make another mask with better performance. Process -> Image Calculator… (Image1: inverted Sauvola×Mask, Operation: Multiply, Image2: dilated mask, check Create new window and uncheck 32-bit (float) result). Click OK and then Yes to apply this operation to all slices.
  • 9. Madrid institute for advanced studies ofmaterials Parque tecnológico Tecnogetafe· Calle Eric Kandel, 2 · 28906 Getafe, Madrid · Spain Telephone: +34 91 549 34 22 · Fax: +34 91 550 30 47 · E-mail: contact.materials@imdea.org Edit -> Invert and click Yes in order to keep pores in black colour. Of course, save this new volume with the name of the sample, the operation you did, the bit type and the stack size. The extension, as usual, will be .raw: 06-MB3_17_381_P02_8b_OnlyPores_2120x950x1672.raw (Thanks to Jonathan Espinoza for his critical review of the process and his valuable comments about the process)