Ciao. Per prima cosa ecco il codice. È un po’ lungo, ma questo problema c’è quando l’abstract è più lungo di una facciata 😉
`\documentclass [12pt,a4paper,twoside,openright]{book}
%———————-Definition of usefull packages
\usepackage[italian,english]{babel}
%\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{amsfonts}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage{lastpage}
\usepackage{longtable}
\usepackage{amsmath}
\usepackage{texdraw}
\usepackage{makeidx}
\usepackage{epigraph}
\usepackage{natbib}
\usepackage{verbatim}
\usepackage{a4wide}
\usepackage{multicol}
\usepackage{float}
\usepackage{listings}
\usepackage{textcomp}
\usepackage{alltt}
%\usepackage{doxygen}
%\usepackage{times}
\usepackage{ifpdf}
%%%%%%%%%%%Dimensioni by Andre%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength\topmargin{0cm} % impostazioni margini e layout pagina
\setlength\voffset{-1.34cm}
\setlength\hoffset{-2.54cm}
\setlength\oddsidemargin{4.1cm}
\setlength\evensidemargin{3.2cm}
\setlength\textwidth{13.7cm}
\setlength\headheight{0.53cm}
\setlength\headsep{2.447cm}
\setlength\textheight{21cm}
\setlength\footskip{3.2cm}
\setlength\marginparsep{0cm}
\setlength\marginparwidth{0cm}
%%%%%%%%%%%Fine dimensioni by Andre%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%———————-Magia
\providecommand{\csletcs}[2]{%
\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
\newcommand{\equivUC}[3][\def]{%
\expandafter#1\csname#2\expandafter\endcsname\expandafter{%
\csname#3\endcsname}}
\newcommand{\UPCASElang}[1]{
\uppercase{\def\temp{#1}}
\csletcs{l@\temp}{l@#1}
\equivUC{date\temp}{date#1}
\equivUC{captions\temp}{captions#1}
\equivUC{extras\temp}{extras#1}
\equivUC{noextras\temp}{noextras#1}
\equivUC[\edef]{\temp hyphenmins}{#1hyphenmins}
}
\UPCASElang{english}
\UPCASElang{italian}
\ifpdf
\usepackage[pdftex,
pagebackref=true,
colorlinks=true,
linkcolor=black,
unicode
]{hyperref}
\else
\usepackage[ps2pdf,
pagebackref=true,
colorlinks=true,
linkcolor=black,
unicode
]{hyperref}
\usepackage{pspicture}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%SONO QUELLI CHE HO AGGIUNTO “A NASO”..
\lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=8,numbers=left }
%\makeindex
%\setcounter{tocdepth}{3}
\renewcommand{\footrulewidth}{0.4pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{amssymb}
%\usepackage[dvips]{graphicx}
%\usepackage{psfrag}
%\usepackage{minitoc}
%\usepackage{amsmath}
%\usepackage{hyperref}
%———————-Set Toc Counter
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%———————-Line Setting
%\linespread{1.3}
%———————-Do Index
%\makeindex
%———————-New environments
\newcommand{\fncyblank}{\fancyhf{}}
\newenvironment{abstract}
{\cleardoublepage\fncyblank\null \vfill\begin{center}
\bfseries \abstractname \end{center}}
{\vfill\null}
%———————-Page Style Setting
\newcommand{\fncymain}{
\fancyhead[RO]{\footnotesize\MakeUppercase{\rightmark}}
\fancyfoot[RO]{\thepage}
\fancyhead[LE]{\footnotesize\MakeUppercase{\leftmark}}
\fancyfoot[LE]{\thepage}
\fancyfoot[C]{}
\renewcommand{\headrulewidth}{0.3pt}}
\newcommand{\fncyfront}{
\fancyhead[RO]{\footnotesize{\rightmark}}
\fancyfoot[RO]{\thepage}
\fancyhead[LE]{\footnotesize{\leftmark}}
\fancyfoot[LE]{\thepage}
\fancyhead[RE,LO]{}
\fancyfoot[C]{}
\renewcommand{\headrulewidth}{0.3pt}}
%———————-Commands to avoid head/footnote at the end of each chapter
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page
\else\hbox{}\thispagestyle{empty}\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
%———————-Definition of new commands
\newcommand{\vtk}{\textit{VTK}}
\newcommand{\vmtk}{\textit{VMTK}}
\newcommand{\vmtkgui}{\textit{VMTKGui}}
\newcommand{\virtualvalvestent}{\textit{VirtualValveStent}}
\newcommand{\ct}{\textit{CT}}
\newcommand{\ctscan}{\textit{CT-scan}}
\newcommand{\dicom}{\textit{DICOM}}
\newcommand{\mr}{\textit{MR}}
\newcommand{\cfd}{\textit{CFD}}
\newcommand{\gui}{\textit{GUI}}
\newcommand{\lss}{\textit{LSS}}
%———————-Beginning Document
\begin{document}
\fncyfront
%———————-frontmatter
\frontmatter
%———————-Copertina
%\include{copertina/copertina}\cleardoublepage
%\pagenumbering{Roman}
%\include{dedica/dedica}
\selectlanguage{italian}
%\include{abs/sommario}
\begin{abstract}
Lo scopo principale di questa tesi è quello di presentare lo sviluppo dell'interfaccia grafica \vmtkgui da affiancare ad un software pre-esistente – \vmtk – per poter creare un tool in grado di passare da un'immagine medica di tipo DICOM (DIgital COmmunication in Medicine) a una ricostruzione tridimensionale che permetta di effettuare simulazioni numeriche su quello che è il flusso nei vasi, come è spiegato in \cite{art:jean}. A questo scopo si sfruttano alcune funzioni offerte da un software open-source per l'analisi e visualizzazione di immagini (\vtk). Lo scopo del tool che si intende realizzare è quello di poter ricostruire la geometria di una parte anatomica non banale (nello specifico il fine ultimo è quello di ricostruire la zona intorno alla valvola mitrale, vale a dire ventricolo sinistro, valvola mitrale stessa e ultimo tratto di aorta ascendente) per poter successivamente fare un'analisi numerica di quello che è il flusso in quella zona. Per la realizzazione dell'interfaccia grafica si utilizza il linguaggio \textit{Python}: si è preferito andare in questa direzione dal momento che la totalità delle librerie \vmtk ha un'interfaccia evoluta in linguaggio \textit{Python}.
Il lavoro è così suddiviso: nel primo capitolo viene presentato il progetto nelle sue linee generali. Viene dunque dedicato ampio spazio a quello che è lo stato dell'arte di \vmtk per quel che riguarda la visualizzazione di immagini in campo medico; di seguito sono presentati gli obbiettivi che ci si è posti all'inizio del lavoro; ancora, si dà spazio alle applicazioni pratiche che potrebbero prendere piede a partire dal tool sviluppato; nell'ultima sezione di questo capitolo, invece, si sottolinea l'importanza del lavoro svolto. Questo tool permette di ricostruire una geometria non banale partendo da immagini \ct e troverà ampio spazio in applicazioni, principalmente a carattere medico, in cui si vogliano effettuare simulazioni numeriche di flussi.
Nel secondo capitolo si tratta della ricostruzione geometrica da un punto di vista teorico: dopo aver presentato nella prima sezione le possibili tecniche per ricostruire una certa geometria partendo da un'immagine in formato \dicom, nella seconda sono presentati i dettagli del \textit{Level Set Segmentation}, individuando i vantaggi che questa tecnica presenta rispetto alle altre ed evidenziando così i motivi che hanno spinto a tale scelta.
Nel terzo capitolo, invece, si è redatto un manuale per l'utente del software \vmtkgui. Nella prima sezione si discutono i dettagli relativi all'algoritmo realizzato. Nella seconda sezione, invece, è presentato un esempio pratico di funzionamento del codice. Si è scelto di analizzare un esempio semplice (i.e. la ricostruzione dell'aorta discendente), facendo però attenzione che tutte le funzioni del programma siano utilizzate.
Nel quarto ed ultimo capitolo, infine, viene fatta un'attenta analisi di quelli che sono stati i risultati ottenuti in rapporto agli obbiettivi che ci si era posti in partenza. Inoltre, in questo quarto capitolo vi è una sezione finale in cui è possibile trovare una discussione relativa ai possibili sviluppi futuri al fine di migliorare e ultimare il tool realizzato rendendolo disponibile a tutti gli utilizzatori del software \vmtk, sicuri del fatto che un tool con le caratteristiche di quello realizzato suscita l'interesse degli addetti ai lavori, specialmente nel campo medico.
\end{abstract}
\selectlanguage{english}
%\include{abs/abs}
\begin{abstract}
The main target of this thesis is to describe the development of the graphic interface, \vmtkgui. This tool can be used with \vmtk, an already-existing software used for image reconstruction in the medical field. This graphic interface, roughly speaking, has the goal to make it possible to reconstruct the geometry we are interested in, starting from a medical image in the \dicom format. To do this, we use some libraries offered from another software, \vtk which is an open-source, freely available software system for 3D computer graphics, image processing and visualization. The tool that we realize should be able to reconstruct the geometry of vessels (in this specific case we should reconstruct the left ventricle, the mitral valve and the final part of the ascending aorta.) in order build a three dimensional mesh needed for numerical simulations of the flow in that area. The \gui has been coded in \textit{Python}, since \vmtk has the proper interfaces.
This work is divided into 4 chapters: in the first chapter an overview of the project is presented. The state of the art of medical images visualization is described at the very beginning. Furthermore, the targets of the project are pointed out; also, some pratical application are discussed. Finally, in the last section of this first chapter, the importance of the \vmtkgui is claimed. This tool allows the user to generate a non-simple geometry starting from a \ct-series. We hope it will be used in many different applicatcion, above all in the medical field, where the numerical simulation of the flow is required.
In the second chapter we give the theoretical details about the \textit{Level Set Segmentation} technique. Thanks to this technique it is possible to reconstruct a 3D geometry that can be meshed and then used for simulations. In the first section of this chapter we present different techniques for the reconstruction of a certain geometry, while in the second one we give the details about the \textit{Level Set Segmentation} and its implementation.
The third chapter is the \vmtkgui user's guide: all the details of the code are discussed in the first section, while in the second one we show – through an easy example – how the developed tool works. We show an example that deals with the recostruction of the descending aorta. What it is important is that, in this example, we use all the functions that are offered from our software.
Nel quarto ed ultimo capitolo, infine, viene fatta un'attenta analisi di quelli che sono stati i risultati ottenuti in rapporto agli obbiettivi che ci si era posti in partenza. Inoltre, in questo quarto capitolo vi è una sezione finale in cui è possibile trovare una discussione relativa ai possibili sviluppi futuri al fine di migliorare e ultimare il tool realizzato rendendolo disponibile a tutti gli utilizzatori del software \vmtk, sicuri del fatto che un tool con le caratteristiche di quello realizzato suscita l'interesse degli addetti ai lavori, specialmente nel campo medico.
Finally, in the fourth chapter, we analyze the results and we compare them with the goals we had at the beginning of this project. The very end of this thesis deals with the discussion of possible future development in order to build a better tool and in order to make it available to the \vmtk community. In fact, we think it could be interesting to have such a tool that anyone can use and develop.
\end{abstract}
%\include{ringraziamenti/ackn}
%\selectlanguage{italian}
%\include{ringraziamenti/ring}
%\tableofcontents
%\listoffigures
%\listoftables
%\include{simb_not/simb_not}
%\selectlanguage{english}
%\include{prefazione/preface}
%\selectlanguage{italian}
%\include{prefazione/prefazione}
%———————-Mainmatter
%\selectlanguage{english}
%\fncymain
%\mainmatter
%\include{chap1/chap1}
%\include{chap3/chap3}
%\include{chap2/chap2}
%\include{chap4/chap4}
%\appendix
%\include{doxy_doc/latex/refman}\clearpage
%———————-Backmatter
%\backmatter
%\bibliographystyle{plain}
%\bibliography{biblio/biblio}
%\include{biblio/biblio}\clearpage
%\include{acronimi/acronimi}\clearpage
%\printindex\clearpage
\end{document}`
Inoltre, circa l’uso di “pspicture” vs. “pict2e”, mi puoi dare delle spiegazioni?
Ti spiego, io ho tutte immagini .eps.
E per compilare utilizzo la serie di comandi
`
latex thesis.tex
dvips thesis.dvi
ps2pdf thesis.ps
`
Come posso fare, altrimenti?
Grazie,
Samuele