This thesis describes the development of software for the geometric comparison of computed tomography (CT) and magnetic resonance imaging (MRI) images of a phantom. The main objective is to integrate the key analysis steps into a practical and verifiable workflow for the operator. The project focuses on the development of a software tool for quality assurance in radiotherapy, together with a preliminary application to the available data. Geometric accuracy is particularly important in radiotherapy treatment planning, especially in stereotactic treatments, where spatial uncertainties can affect target delineation and treatment precision. Although MRI provides excellent soft-tissue contrast, its images may be affected by geometric distortions related to the acquisition system and the object being examined. These effects can be investigated using phantoms containing reference structures. The software was developed in Python and combines image processing, numerical computation and landmark management. CT is used as the geometric reference, while MRI is aligned through three-dimensional rigid registration, based only on rotations and translations. Reference points are expressed in physical coordinates in millimetres, allowing the positions identified in the two image volumes to be compared within a common reference system. A key challenge involved identifying the centres of the spheres embedded in the phantom. Since fully automated detection did not provide sufficiently reliable results, a semi-automatic approach was implemented. The operator manually identifies and verifies the reference points in CT, while the software searches for corresponding landmarks in the registered MRI volume and calculates the resulting residuals. The application includes a graphical user interface, an image viewer for checking the alignment and a summary table of the results. It also allows the registered volume, transformation and point correspondences to be saved and retrieved for subsequent analysis. Generative artificial intelligence tools supported code writing and revision throughout development. Their role was limited to assisting the software development process, while image analysis relied on implemented registration algorithms, filters and geometric constraints. The results demonstrate the functions implemented and the information produced by the software. However, further tests using independent reference points and repeated acquisitions are required to assess accuracy and repeatability. The prototype therefore represents a starting point for future improvements and validation. The thesis presents the background to geometric quality assurance in radiotherapy, the materials and methods used, and the resulting software, discussing its semi-automatic workflow, current limitations and future development opportunities.
Il presente elaborato descrive lo sviluppo di un software per il confronto geometrico tra immagini di tomografia computerizzata (TC) e risonanza magnetica (RM) di un fantoccio. L'obiettivo è integrare le principali fasi di analisi in una procedura pratica e verificabile dall'operatore, nell'ambito del controllo qualità in radioterapia. L'accuratezza geometrica delle immagini è particolarmente importante nella pianificazione radioterapica, soprattutto nei trattamenti stereotassici, dove le incertezze spaziali possono influenzare la definizione del bersaglio e la precisione del trattamento. Sebbene la RM offra un elevato contrasto dei tessuti molli, può presentare distorsioni geometriche legate al sistema di acquisizione e all'oggetto esaminato. Questi effetti possono essere studiati mediante fantocci contenenti strutture di riferimento. Il software è stato sviluppato in Python, integrando strumenti per l'elaborazione delle immagini, il calcolo numerico e la gestione dei landmark. La TC viene utilizzata come riferimento geometrico, mentre la RM viene allineata mediante una registrazione rigida tridimensionale, basata esclusivamente su rotazioni e traslazioni. I punti di riferimento sono espressi in coordinate fisiche in millimetri, consentendo il confronto delle posizioni nei due volumi. Una delle principali difficoltà ha riguardato l'individuazione dei centri delle sfere presenti nel fantoccio. Poiché il rilevamento completamente automatico non ha fornito risultati sufficientemente affidabili, è stata sviluppata una procedura semiautomatica. L'operatore identifica e verifica i punti di riferimento sulla TC, mentre il software ricerca i landmark corrispondenti nella RM registrata e calcola gli scostamenti risultanti. L'applicazione comprende un'interfaccia grafica per la gestione dei dati, un visualizzatore per controllare la sovrapposizione delle immagini e una tabella riepilogativa dei risultati. È inoltre possibile salvare e recuperare il volume registrato, la trasformazione applicata e le corrispondenze tra i punti, facilitando le analisi successive. Lo sviluppo è stato supportato da strumenti di intelligenza artificiale generativa, utilizzati per assistere la scrittura e la revisione del codice. Il loro impiego ha riguardato il processo di realizzazione del software, mentre l'analisi delle immagini si basa sugli algoritmi di registrazione, sui filtri e sui vincoli geometrici implementati. I risultati documentano le funzionalità realizzate e le informazioni prodotte dal programma. Saranno tuttavia necessarie ulteriori prove, basate su riferimenti indipendenti e acquisizioni ripetute, per valutarne l'accuratezza e la ripetibilità. Il prototipo rappresenta quindi una base per successive attività di validazione e miglioramento. L'elaborato presenta il contesto del controllo geometrico in radioterapia, i materiali e i metodi utilizzati e il software sviluppato, illustrandone il funzionamento, i limiti attuali e le possibili prospettive di sviluppo.
SVILUPPO DI UN SOFTWARE PER IL QA DELLA DISTORSIONE GEOMETRICA IN MRI MEDIANTE CODING ASSISTITO DA IA
MONTECCHIANI, MICHELE
2025/2026
Abstract
This thesis describes the development of software for the geometric comparison of computed tomography (CT) and magnetic resonance imaging (MRI) images of a phantom. The main objective is to integrate the key analysis steps into a practical and verifiable workflow for the operator. The project focuses on the development of a software tool for quality assurance in radiotherapy, together with a preliminary application to the available data. Geometric accuracy is particularly important in radiotherapy treatment planning, especially in stereotactic treatments, where spatial uncertainties can affect target delineation and treatment precision. Although MRI provides excellent soft-tissue contrast, its images may be affected by geometric distortions related to the acquisition system and the object being examined. These effects can be investigated using phantoms containing reference structures. The software was developed in Python and combines image processing, numerical computation and landmark management. CT is used as the geometric reference, while MRI is aligned through three-dimensional rigid registration, based only on rotations and translations. Reference points are expressed in physical coordinates in millimetres, allowing the positions identified in the two image volumes to be compared within a common reference system. A key challenge involved identifying the centres of the spheres embedded in the phantom. Since fully automated detection did not provide sufficiently reliable results, a semi-automatic approach was implemented. The operator manually identifies and verifies the reference points in CT, while the software searches for corresponding landmarks in the registered MRI volume and calculates the resulting residuals. The application includes a graphical user interface, an image viewer for checking the alignment and a summary table of the results. It also allows the registered volume, transformation and point correspondences to be saved and retrieved for subsequent analysis. Generative artificial intelligence tools supported code writing and revision throughout development. Their role was limited to assisting the software development process, while image analysis relied on implemented registration algorithms, filters and geometric constraints. The results demonstrate the functions implemented and the information produced by the software. However, further tests using independent reference points and repeated acquisitions are required to assess accuracy and repeatability. The prototype therefore represents a starting point for future improvements and validation. The thesis presents the background to geometric quality assurance in radiotherapy, the materials and methods used, and the resulting software, discussing its semi-automatic workflow, current limitations and future development opportunities.| File | Dimensione | Formato | |
|---|---|---|---|
|
Tesi laurea triennale Montecchiani Michele.pdf
non disponibili
Dimensione
3.26 MB
Formato
Adobe PDF
|
3.26 MB | Adobe PDF |
I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/20.500.12075/29846