<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Augmented Reality Microscopy | Phi - X</title><link>https://biocil.github.io/tag/augmented-reality-microscopy/</link><atom:link href="https://biocil.github.io/tag/augmented-reality-microscopy/index.xml" rel="self" type="application/rss+xml"/><description>Augmented Reality Microscopy</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Fri, 18 Sep 2026 00:00:00 +0000</lastBuildDate><image><url>https://biocil.github.io/media/logo.svg</url><title>Augmented Reality Microscopy</title><link>https://biocil.github.io/tag/augmented-reality-microscopy/</link></image><item><title>All-Optical Selective Target Highlighting for Augmented Reality Microscopy</title><link>https://biocil.github.io/projects/target-highlighting/</link><pubDate>Fri, 18 Sep 2026 00:00:00 +0000</pubDate><guid>https://biocil.github.io/projects/target-highlighting/</guid><description>&lt;style>
/* HIDE HUGO BLOX AUTOMATIC PAGE TITLE*/
html {
scroll-behavior: smooth;
}
.page-body > .universal-wrapper.pt-3 > h1 {
display: none !important;
}
.project-content {
font-size: 15px;
line-height: 1.6;
}
.project-content mjx-container[display="true"] {
font-size: 95% !important;
}
/* PROJECT TITLE */
.project-content h1 {font-size: 1.6rem;line-height: 1.3;margin-top: 0;margin-bottom: 1.5rem;}
.project-content h2 {font-size: 1.2rem;line-height: 1.3;margin-top: 1.5rem;margin-bottom: 0.8rem;}
.project-content h3 {font-size: 1rem;line-height: 1.3;margin-top: 1.2rem;margin-bottom: 0.6rem;}
/* PARAGRAPHS*/
.project-content p {font-size: 15px;line-height: 1.6;}
/* IMAGES */
.project-content img {max-width: 100%;height: auto;}
/* Contents title */
.project-navigation strong {font-size: 15px;}
/* All links */
.project-navigation a {display: block;padding: 4px 6px;border-radius: 5px;
text-decoration: none;color: inherit; transition:
color 0.2s ease,
background-color 0.2s ease,
font-weight 0.2s ease;}
/* Main sections */
.project-navigation .contents-main {
margin-top: 0.8rem;
margin-bottom: 0.35rem;
font-size: 14px;
font-weight: 600;
}
/* First-level subsections */
.project-navigation .contents-subitem { margin: 0.2rem 0;padding-left: 14px;ont-size: 13px;}
/* Second-level subsections */
.project-navigation .contents-subsubitem {margin: 0.15rem 0;padding-left: 28px;font-size: 12px;}
/* Contents links */
/* Navigation spacing */
.project-navigation p {margin: 0.4rem 0;font-size: 14px;}
/* MAIN ARTICLE — */
.project-main {width: 100%; min-width: 0;}
/* SMALL SCREENS */
@media (max-width: 768px) {
.project-navigation {display: none;}
.project-main { width: 100%;}
.project-layout {display: block;}
}
/* RESOURCES*/
.project-resources {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 15px;
margin-bottom: 30px;
}
.project-resources a {
text-decoration: none;
color: inherit;
}
.resource-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border: 1px solid #ddd;
border-radius: 6px;
transition: 0.2s ease;
}
.resource-item:hover {background-color: #f7f7f7;}
.resource-item strong {font-size: 15px;}
.resource-item span {font-size: 14px;color: #2F6DB2;}
/* PROJECT VIDEO */
.project_video {width: 100%; max-width: 1000px;margin: 15px auto 35px auto;}
.project_video video {width: 100%;height: auto;display: block; border-radius: 6px;}
.page-body > .universal-wrapper {
max-width: none !important;
width: auto !important;
margin-left: 20px !important;
margin-right: 250px !important;
padding-left: 0 !important;
padding-right: 0 !important;}
.project-content {width: 100% !important;max-width: none !important;
margin: 0 !important;padding: 0 !important;
font-size: 15px;line-height: 1.6;}
/* MAIN GRID*/
.project-layout {display: grid !important; grid-template-columns: 30% 70% !important;
width: 100% !important;max-width: none !important;
margin: 0 !important;padding: 0 !important;
align-items: start !important;}
/*
LEFT CONTENTS */
.project-navigation {position: fixed !important;
top: 90px;
left: 20px;
width: 25%;
max-height: calc(100vh - 110px);
overflow-y: auto;
overflow-x: hidden;
padding: 0 15px 20px 0 !important;
box-sizing: border-box;
font-size: 14px;
z-index: 1000;
background: transparent;}
/* Contents title */
.project-navigation strong {font-size: 15px;}
/* Contents links */
.project-navigation a {
display: block;
padding: 4px 6px;
margin: 0;
border-radius: 5px;
text-decoration: none;
color: inherit;
transition:
color 0.2s ease,
background-color 0.2s ease;
}
/* Hover */
.project-navigation a:hover {background-color: #f2f2f2;text-decoration: none;}
/* Active section */
/* Main sections */
.project-navigation .contents-main {
margin-top: 0.8rem;
margin-bottom: 0.35rem;
font-size: 14px;
font-weight: 600;
}
/* First level */
.project-navigation .contents-subitem {
margin: 0.2rem 0;
padding-left: 14px;
font-size: 13px;
}
/* Second level */
.project-navigation .contents-subsubitem {
margin: 0.15rem 0;
padding-left: 28px;
font-size: 12px;
}
/* MAIN ARTICLE */
.project-main {
grid-column: 2;
width: 100% !important;
min-width: 0 !important;
margin: 0 !important;
padding: 0 10px !important;
box-sizing: border-box;
overflow-wrap: break-word;
}
.project-main img {max-width: 100%;height: auto;}
.project-main video {max-width: 100%;height: auto;}
.project-main table {max-width: 100%;}
/* HEADINGS — PREVENT THEM FROM HIDING UNDER THE HEADER */
.project-main h1,
.project-main h2,
.project-main h3,
.project-main p[id] {
scroll-margin-top: 110px;
}
/* TABLET */
@media (max-width: 1100px) {
.page-body > .universal-wrapper {
margin-left: 20px !important;
margin-right: 20px !important;
}
.project-layout {
grid-template-columns: 25% 75% !important;
}
.project-navigation {
font-size: 13px;
padding-right: 10px !important;
}
.project-navigation .contents-subitem {
font-size: 12px;
padding-left: 10px;
}
.project-navigation .contents-subsubitem {
font-size: 11px;
padding-left: 18px;
}
.project-content {
font-size: 14px;
}
.project-content p {
font-size: 14px;
line-height: 1.55;
}
}
/* SMALL TABLET / PHONE */
@media (max-width: 900px) {
.project-layout {
display: block !important;
}
.project-navigation {
display: none !important;
}
.project-main {
grid-column: auto;
width: 100% !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
.project-content {
width: 100% !important;
font-size: 15px;
}
.project-content p {
font-size: 15px;
line-height: 1.6;
}
.project-content h1 {
font-size: 1.5rem;
}
.project-content h2 {
font-size: 1.15rem;
}
.project-content h3 {
font-size: 1rem;
}
}
/* VERY SMALL PHONE */
@media (max-width: 600px) {
.page-body > .universal-wrapper {
margin-left: 12px !important;
margin-right: 12px !important;
}
.project-content {
font-size: 14px;
}
.project-content p {
font-size: 14px;
line-height: 1.55;
}
.project-content h1 {
font-size: 1.35rem;
}
.project-content h2 {
font-size: 1.1rem;
}
.project-content h3 {
font-size: 0.95rem;
}
}
/* CONTENTS SCROLL-SPY COLORS */
.project-navigation a {
color: #222222 !important;
text-decoration: none !important;
transition: color 0.25s ease, background-color 0.25s ease;
}
/* Already passed */
.project-navigation a.passed {
color: #999999 !important;
background-color: transparent !important;
font-weight: 400 !important;
}
/* Currently reading */
.project-navigation a.active {
color: #2F6DB2 !important;
background-color: #eef5fb !important;
font-weight: 600 !important;
}
/* Not reached yet */
.project-navigation a.future {
color: #222222 !important;
background-color: transparent !important;
font-weight: 400 !important;
}
&lt;/style>
&lt;div class="project-content">
&lt;div class="project-layout">
&lt;!-- LEFT CONTENTS -->
&lt;div class="project-navigation">
&lt;p>&lt;strong>Contents&lt;/strong>&lt;/p>
&lt;p>
&lt;a href="#video">Video&lt;/a>
&lt;/p>
&lt;p>
&lt;a href="#abstract">Abstract&lt;/a>
&lt;/p>
&lt;!-- METHODS -->
&lt;p class="contents-main">
&lt;a href="#methods">Methods&lt;/a>
&lt;/p>
&lt;p class="contents-subitem">
&lt;a href="#optical-setup">Optical Setup&lt;/a>
&lt;/p>
&lt;p class="contents-subitem">
&lt;a href="#forward-model">Forward Model&lt;/a>
&lt;/p>
&lt;p class="contents-subitem">
&lt;a href="#optimization">Optimization Methods&lt;/a>
&lt;/p>
&lt;p class="contents-subsubitem">
&lt;a href="#method1">Method 1: Single-scene optimization&lt;/a>
&lt;/p>
&lt;p class="contents-subsubitem">
&lt;a href="#method2">Method 2: Individual object presentation&lt;/a>
&lt;/p>
&lt;p class="contents-subsubitem">
&lt;a href="#method3">Method 3: Numerically shifted dataset&lt;/a>
&lt;/p>
&lt;!-- RESULTS -->
&lt;p class="contents-main">
&lt;a href="#results">Results&lt;/a>
&lt;/p>
&lt;p class="contents-subitem">
&lt;a href="#scenario1">Scenario 1: Object highlighting&lt;/a>
&lt;/p>
&lt;p class="contents-subitem">
&lt;a href="#scenario2">Scenario 2: Size-based highlighting&lt;/a>
&lt;/p>
&lt;p class="contents-subitem">
&lt;a href="#scenario3">Scenario 3: Morphology-based highlighting&lt;/a>
&lt;/p>
&lt;p class="contents-main">
&lt;a href="#acknowledgment">Acknowledgment&lt;/a>
&lt;/p>
&lt;/div>
&lt;!-- RIGHT MAIN CONTENT-->
&lt;div class="project-main">
&lt;!-- PROJECT TITLE-->
&lt;h1>
All-Optical Selective Target Highlighting for Augmented Reality Microscopy
&lt;/h1>
&lt;!-- AUTHORS -->
&lt;div style="text-align: center;">
&lt;p>
&lt;strong>
Maha Sahloul&lt;sup>1,2&lt;/sup>, Kaan Akşit&lt;sup>3&lt;/sup>, and M. Fatih Toy&lt;sup>1,2&lt;/sup>
&lt;/strong>
&lt;/p>
&lt;p>
&lt;sup>1&lt;/sup> Istanbul Medipol University
&lt;br>
&lt;sup>2&lt;/sup> Biophotonics and Computational Imaging Laboratory (Phi-X), Research Institute for Health Sciences and Technologies (SABITA)
&lt;br>
&lt;sup>3&lt;/sup> University College London
&lt;/p>
&lt;/div>
&lt;!-- RESOURCES -->
&lt;h2 id="resources">Resources&lt;/h2>
&lt;p>
📄 &lt;a href="https://opg.optica.org/optcon/fulltext.cfm?uri=optcon-5-8-2708" target="_blank" rel="noopener">Manuscript&lt;/a>
&amp;nbsp;&amp;nbsp;&amp;nbsp;
📑 &lt;a href="https://opticapublishing.figshare.com/articles/journal_contribution/Supplementary_document_for_All-Optical_Selective_Target_Highlighting_for_Augmented_Reality_Microscopy_-_7967150_pdf/32886380?file=67315379" target="_blank" rel="noopener">Supplementary Material&lt;/a>
&amp;nbsp;&amp;nbsp;&amp;nbsp;
🖼️ &lt;a href="YOUR_POSTER_LINK" target="_blank" rel="noopener">Poster&lt;/a>
&lt;/p>
&lt;!-- VIDEO -->
&lt;h2 id="video">Video&lt;/h2>
&lt;div class="project_video">
&lt;iframe src="https://widgets.figshare.com/articles/32841446/embed?show_title=0" width="777" height="480" allowfullscreen frameborder="0">&lt;/iframe>
&lt;/div>
&lt;!-- ABSTRACT -->
&lt;h2 id="abstract">Abstract&lt;/h2>
&lt;p>
Augmented Reality (AR) microscopy can enhance microscopic observation by highlighting specific targets, but computational processing can limit its real-time use. We introduce an all-optical solution based on precomputed SLM phase masks that selectively highlight objects according to their shape or size. The approach maintains highlighting as objects move within the field of view, without requiring continuous image processing or tracking.
&lt;/p>
&lt;!-- METHODS -->
&lt;h2 id="methods">Methods&lt;/h2>
&lt;!-- OPTICAL SETUP -->
&lt;h3 id="optical-setup">Optical Setup&lt;/h3>
&lt;p>
We use a 655 nm laser, collimated by L1, to illuminate the sample mounted on a Zeiss Axio Observer 7 microscope. The beam passes through a linear polarizer aligned with the SLM phase-modulation axis and illuminates the sample through a 10×/0.45 NA objective. The transmitted image is relayed through a 4f optical system to an intermediate image plane, followed by a beam splitter and a 300 mm focal-length lens that positions the SLM at the Fourier plane. We suppress the undesired zeroth-order reflection and select the first diffraction order by adding a blazed grating phase to the SLM phase pattern and applying a 1.16° physical SLM tilt. This configuration shifts the desired first diffraction order onto the camera ROI while displacing the zeroth order outside the detection region.
&lt;/p>
&lt;p style="text-align: center;">
&lt;img
src="setup_full.png"
alt="Optical setup"
style="width: 90%; max-width: 1000px; height: auto;">
&lt;/p>
&lt;p>
&lt;strong>Figure 1.&lt;/strong>
a) Schematic presents our optical setup including L1: Collimation lens, P1: Polarizer, MO: Microscope objective, L2: Tube lens, BS: Beam splitter, L3: Fourier lens, SLM: Spatial light modulator, ϕ(x, y): Adaptive phase, ψ(x, y): Blazed grating phase, M(x, y): SLM phase. b) Photograph of the experimental setup.
&lt;/p>
&lt;!-- FORWARD MODEL -->
&lt;h3 id="forward-model">Forward Model&lt;/h3>
&lt;p>
The optical system is numerically modeled as a 4f system, where the input field
\(U_{in}(x,y)\) propagates from the intermediate image plane to the SLM plane
using the Angular Spectrum Method (ASM):
&lt;/p>
&lt;p style="text-align: center;">
\[
U_{p1}(x,y;z)=\mathcal{F}^{-1}
\left\{
\mathcal{F}\left(U_{in}(x,y,0)\right)
H(f_x,f_y;z)
\right\}
\]
&lt;/p>
&lt;p style="text-align: center;">
\[
H(f_x,f_y;z)=
\exp\left[
ikz\sqrt{1-(\lambda f_x)^2-(\lambda f_y)^2}
\right].
\]
&lt;/p>
&lt;p>
The propagated field is modulated by the lens and then reaches the SLM, where
the optimized phase mask is applied:
&lt;/p>
&lt;p style="text-align: center;">
\[
M(x,y)=\exp\left[i\left(\phi(x,y)+\psi(x,y)\right)\right].
\]
&lt;/p>
&lt;p>
where \(\phi(x,y)\) is the adaptive phase and \(\psi(x,y)\) is the blazed grating phase.
The resulting field is propagated to the camera plane to obtain the output intensity
\(I(x,y)\). The phase mask is optimized by minimizing a combined Mean Squared Error (MSE)
and Total Variation (TV) loss:
&lt;/p>
&lt;p style="text-align: center;">
\[
\mathcal{L}=\mathcal{L}_{MSE}+\mathcal{L}_{TV}.
\]
&lt;/p>
&lt;p style="text-align: center;">
&lt;img
src="Forward_model.png"
alt="Forward model"
style="width: 50%; max-width: 1000px; height: auto;">
&lt;/p>
&lt;!--OPTIMIZATION METHOD -->
&lt;h3 id="optimization">Optimization Methods&lt;/h3>
&lt;p>
We evaluate three optimization strategies that progressively increase the diversity of input data, from a single scene to individual objects and numerically shifted image datasets. All methods use the same forward model to optimize the phase mask, allowing us to examine the effects of input diversity on target highlighting, robustness to new scenes, and computational cost.
&lt;/p>
&lt;p id="method1">
&lt;strong style="color: #2F6DB2;">Method 1: Single-scene optimization.&lt;/strong>
The phase mask is optimized using a single scene containing multiple objects, with the target distribution highlighting only the desired object.
&lt;/p>
&lt;p>
&lt;p id="method2">
&lt;strong style="color: #3A8F5C;">Method 2: Individual object presentation.&lt;/strong>
We present the objects individually during optimization, allowing the phase mask to encode target-specific patterns. This approach reduces dependence on the optimized scene and allows the target to be highlighted more independently of surrounding objects.
&lt;/p>
&lt;p id="method3">
&lt;strong style="color: #7A4FA3;">Method 3: Numerically shifted image dataset.&lt;/strong>
The input scene is numerically shifted to generate diverse spatial configurations without requiring additional image acquisition. The target is shifted accordingly to maintain the desired augmentation across different object positions.
&lt;/p>
&lt;p style="text-align: center;">
&lt;img
src="Optimization_methods.png"
alt="Optimization methods"
style="width: 50%; max-width: 1000px; height: auto;">
&lt;/p>
&lt;h2 id="results">Results&lt;/h2>
&lt;h3 id="scenario1">Scenario 1: Object highlighting&lt;/h3>
&lt;p>
In the offline stage (I), the phase mask is optimized using a 30 µm diameter circle as the target, generating the precomputed SLM phase pattern (SLM-P). In the real-time augmentation stage (II), the precomputed SLM-P is applied to novel scenes to selectively highlight the target objects. Across 45 novel scenes, the experimental and simulated outputs achieved a mean CC of &lt;strong>0.75 ± 0.03&lt;/strong> and PSNR of &lt;strong>27.60 ± 0.61 dB&lt;/strong>.
&lt;/p>
&lt;p style="text-align: center;">
&lt;img
src="Scenario1 results.png"
alt="Scenario1 results"
style="width: 50%; max-width: 1000px; height: auto;">
&lt;/p>
&lt;h3 id="scenario2">Scenario 2: Size-based selective object highlighting&lt;/h3>
&lt;p>
We optimize phase mask to highlight 40 µm-diameter circular objects.
&lt;span style="color: #2F6DB2;">&lt;strong>Method 1&lt;/strong>&lt;/span>
performs effectively on the optimization scene and scenes with high similarity to it, but its performance decreases as the input scene differs from the optimized scene.
&lt;span style="color: #3A8F5C;">&lt;strong>Method 2&lt;/strong>&lt;/span>
and
&lt;span style="color: #7A4FA3;">&lt;strong>Method 3&lt;/strong>&lt;/span>
provide more consistent target highlighting across novel scenes.
&lt;span style="color: #3A8F5C;">&lt;strong>Method 2&lt;/strong>&lt;/span>
achieve the highest CC of 0.68 and PSNR of 24.07 dB, followed by
&lt;span style="color: #7A4FA3;">&lt;strong>Method 3&lt;/strong>&lt;/span>
with a CC of 0.65 and PSNR of 23.76 dB, while
&lt;span style="color: #2F6DB2;">&lt;strong>Method 1&lt;/strong>&lt;/span>
achieve a CC of 0.60 and PSNR of 23.77 dB.
&lt;/p>
&lt;p style="text-align: center;">
&lt;img
src="Scenario2_results.png"
alt="Scenario2_results"
style="width: 50%; max-width: 1000px; height: auto;">
&lt;/p>
&lt;h3 id="scenario3">Scenario 3: Morphology-based selective object highlighting&lt;/h3>
&lt;p>
This scenario evaluates morphology-based target augmentation by selectively highlighting a square object among circle, square, and triangle objects of ≈ 40 µm.
Quantitatively,
&lt;span style="color: #2F6DB2;">&lt;strong>Method 1&lt;/strong>&lt;/span>
achieves a CC of 0.59 and PSNR of 25.01 dB, while
&lt;span style="color: #3A8F5C;">&lt;strong>Method 2&lt;/strong>&lt;/span>
achieves the highest CC of 0.71 and PSNR of 25.84 dB.
&lt;span style="color: #7A4FA3;">&lt;strong>Method 3&lt;/strong>&lt;/span>
achieves a CC of 0.70 and PSNR of 25.57 dB. These results indicate that
&lt;span style="color: #3A8F5C;">&lt;strong>Method 2&lt;/strong>&lt;/span>
and
&lt;span style="color: #7A4FA3;">&lt;strong>Method 3&lt;/strong>&lt;/span>
provide more consistent target highlighting across different morphological scenes.
&lt;/p>
&lt;p style="text-align: center;">
&lt;img
src="Scenario3_results.png"
alt="Scenario 3 results"
style="width: 50%; max-width: 1000px; height: auto;">
&lt;/p>
&lt;table style="
width: 70%;
max-width: 800px;
margin: 30px auto;
border-collapse: collapse;
text-align: center;
font-size: 13px;
">
&lt;thead>
&lt;tr>
&lt;th rowspan="2" style="
border: 1px solid #101111;
padding: 10px;
vertical-align: middle;
">
Method
&lt;/th>
&lt;th colspan="2" style="
border: 1px solid #101111;
padding: 10px;
">
Size-Based
&lt;/th>
&lt;th colspan="2" style="
border: 1px solid #101111;
padding: 10px;
">
Morphology-Based
&lt;/th>
&lt;/tr>
&lt;tr>
&lt;th style="
border: 1px solid #101111;
padding: 8px;
">
CC ↑
&lt;/th>
&lt;th style="
border: 1px solid #101111;
padding: 8px;
">
PSNR ↑
&lt;/th>
&lt;th style="
border: 1px solid #101111;
padding: 8px;
">
CC ↑
&lt;/th>
&lt;th style="
border: 1px solid #101111;
padding: 8px;
">
PSNR ↑
&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="
border: 1px solid #101111;
padding: 8px;
">
&lt;strong style="color: #2F6DB2;">Method 1&lt;/strong>
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
0.60
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
23.77
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
0.59
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
25.01
&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="
border: 1px solid #101111;
padding: 8px;
">
&lt;strong style="color: #3A8F5C;">Method 2&lt;/strong>
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
&lt;strong>0.68&lt;/strong>
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
&lt;strong>24.07&lt;/strong>
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
&lt;strong>0.71&lt;/strong>
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
&lt;strong>25.84&lt;/strong>
&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="
border: 1px solid #101111;
padding: 8px;
">
&lt;strong style="color: #7A4FA3;">Method 3&lt;/strong>
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
0.65
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
23.76
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
0.70
&lt;/td>
&lt;td style="border: 1px solid #101111; padding: 8px;">
25.57
&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="acknowledgment">Acknowledgment&lt;/h2> This work is supported by TÜBİTAK under project number 123N774. M. F. Toy acknowledges
support from the Turkish Academy of Sciences - Outstanding Young Scientist Award Program (TUBA - GEBIP). Open access publication of this work was supported by the institutional agreement between UCL and Optica.
&lt;/div>
&lt;!-- End project-main -->
&lt;/div>
&lt;!-- End project-layout -->
&lt;/div>
&lt;!-- End project-content -->
&lt;script>
(function () {
function initContentsScrollSpy() {
const navigation = document.querySelector(".project-navigation");
if (!navigation) {
console.log("Contents navigation not found.");
return;
}
const links = Array.from(
navigation.querySelectorAll("a[href^='#']")
);
const sections = links
.map(function (link) {
const id = link.getAttribute("href").substring(1);
const section = document.getElementById(id);
return {
link: link,
section: section
};
})
.filter(function (item) {
return item.section !== null;
});
console.log("Contents scroll-spy loaded.");
console.log("Number of links:", links.length);
console.log("Number of sections:", sections.length);
function updateContents() {
const activationPoint = 120;
let currentIndex = -1;
sections.forEach(function (item, index) {
const rect = item.section.getBoundingClientRect();
if (rect.top &lt;= activationPoint) {
currentIndex = index;
}
});
sections.forEach(function (item, index) {
item.link.classList.remove(
"active",
"passed",
"future"
);
if (index &lt; currentIndex) {
item.link.classList.add("passed");
} else if (index === currentIndex) {
item.link.classList.add("active");
} else {
item.link.classList.add("future");
}
});
}
window.addEventListener("scroll", updateContents, {
passive: true
});
window.addEventListener("resize", updateContents);
window.addEventListener("load", updateContents);
updateContents();
}
if (document.readyState === "loading") {
document.addEventListener(
"DOMContentLoaded",
initContentsScrollSpy
);
} else {
initContentsScrollSpy();
}
})();
&lt;/script></description></item></channel></rss>