Commit 4522ea0f authored by Mark van Turnhout's avatar Mark van Turnhout
Browse files

update workflow in docs

parent ded9665a
......@@ -39,6 +39,13 @@
extendedchars=false
}
\usepackage{framed}
\usepackage{enumitem}
% indexing
\usepackage{makeidx}
\newcommand\bas[1]{\texttt{bas\_#1.m}\index{bas_\#1.m@\texttt{bas\_#1.m}}}
\newcommand\MRIroot{\texttt{<MRI-root>}\index{<MRI-root>@\texttt{<MRI-root>}}}
\newcommand\basilhome{\texttt{<basilhome>}\index{<basilhome>@\texttt{<basilhome>}}}
\makeindex
% references and hyperlinks
\usepackage[square,sort&compress,comma,numbers]{natbib}
......@@ -79,7 +86,7 @@
\Huge{\textbf{BasilLab User Manual }}\\
\mbox{}\\
\vfill
\includegraphics[width = 0.9\linewidth]{the_mother_of_all_suspicious_files.png}\\ \smallskip
%\includegraphics[width = 0.9\linewidth]{the_mother_of_all_suspicious_files.png}\\ \smallskip
\hfill\href{https://xkcd.com/1247/}{\normalsize https://xkcd.com/1247/}\\
\vfill
\mbox{}\\
......@@ -108,6 +115,8 @@
\bibliographystyle{myplainhp}
\bibliography{jabref}
\printindex
%
%\appendix
%\chapter{Git log}
......
......@@ -23,11 +23,11 @@ The FE models are analysed with Abaqus' `Large Displacement' option for geometri
\end{equation}
When you use a hyperelastic material law (such as the Ogden material model that is used in BasilLab), Abaqus will also output the logarithmic strains `LE'. See section `1.2.2 Conventions' in the Abaqus Analysis User's Guide of the \adoc{}.
\section{Directory structure}
\section{Directory structure}\label{dirstruct}
BasilLab requires knowledge on two directories: one \texttt{<MRI-root>} where the (raw) MRI-data can be found, and one \texttt{<basilhome>} where the processed MRI-data and model data can be found. Raw MRI-data for each individual experiment/animal should be stored in a unique folder \textsl{inside} \texttt{<MRI-root>}. Processed MRI-data and model data is stored \textsl{inside} a unique folder in \texttt{<basilhome>}.
BasilLab requires knowledge on two directories: one \MRIroot{} where the (raw) MRI-data can be found, and one \basilhome{} where the processed MRI-data and model data can be found. Raw MRI-data for each individual experiment/animal should be stored in a unique folder \textsl{inside} \texttt{<MRI-root>}. Processed MRI-data and model data is stored \textsl{inside} a unique folder in \basilhome{}.
The link between the unique raw MRI-data folder inside \texttt{<MRI-root>} and the unique folder for model data inside \texttt{<basilhome>} is \textsl{hard-coded} in \texttt{bas\_getMeta.m}. When you add animals/experiments or rename certain directories, you will have to adapt this file.
The link between the unique raw MRI-data folder inside \texttt{<MRI-root>} and the unique folder for model data inside \basilhome{} is \textsl{hard-coded} in \texttt{bas\_getMeta.m}. When you add animals/experiments or rename certain directories, you will have to adapt this file.
Each animal/experiment should have unique \textsl{numerical} identifier \texttt{<basilid>}. BasilLab calls \texttt{bas\_ getMeta.m} to find out where the raw MRI-data is stored for \texttt{<basilid>}, and it will look for \texttt{<basilhome>/<basilid>/} to store and read modelling data. Currently, the unique \texttt{<basilid>} is the date of the experiment in \texttt{yymmdd}-format.\\
......@@ -39,4 +39,4 @@ Thus, for the experiment performed on June 11\ap{th} 2015
\item[the link] between `\texttt{<basilid> = 140611}' and `raw MRI-data is stored in \texttt{<MRI-root>/140611.qd1/}' is hard-coded in \texttt{bas\_getMeta.m}
\end{description}
\noindent BasilLab provides \texttt{bas\_setMRIroot.m} to set \texttt{<MRI-root>}, and \texttt{bas\_setDataRoot.m} to set \texttt{<basilhome>}.
\ No newline at end of file
\noindent BasilLab provides \bas{setMRIroot} to set \MRIroot{}, and \bas{setDataRoot} to set \basilhome{} (see section \ref{basilini}).
\ No newline at end of file
......@@ -2,22 +2,40 @@
\begin{savequote}
In the computer model, all the microfilaments were given certain quantitative properties with names that mean something to physicists: a `viscous damping coefficient' and an `elastic spring constant'. Never mind exactly what these mean: they are the kind of things physicists like to measure in a spring. \qauthor{Richard Dawkins \cite{Dawkins2009}}
\end{savequote}
\chapter{Workflow}
\chapter{Work flow}
Before you can use BasilLab, you wil need to take two steps. First, add the directory that contains the (Matlab) scripts, possibly <basillab> to your Matlab search path, e.g. go (in Matlab) to that directory and issue \texttt{addpath(pwd);} on the command line.
%Before you can use BasilLab, you wil need to take two steps. First, add the directory that contains the (Matlab) scripts, possibly <basillab> to your Matlab search path, e.g. go (in Matlab) to that directory and issue \texttt{addpath(pwd);} on the command line.
%
%Second, tell your local copy of BasilLab where the raw MRI-data is to be found, and where to store and for look processed MRI-data. You should use the functions \texttt{bas\_setMRIroot} and \texttt{bas\_setDataRoot} to do that (once).
%
%The directory with the raw MRI-data (\texttt{bas\_setMRIroot}) remains untouched. The MRI-data is read and copied to the directory \texttt{<basilid>} which is created in the directory \texttt{<basilhome>} (\texttt{bas\_setDataRoot}). The link between the raw MRI-data folder inside \texttt{<MRI-root>} and \texttt{<basilid>} is \textsl{hard-coded} in \texttt{bas\_getMeta.m}.
Second, tell your local copy of BasilLab where the raw MRI-data is to be found, and where to store and for look processed MRI-data. You should use the functions \texttt{bas\_setMRIroot} and \texttt{bas\_setDataRoot} to do that (once).
The directory with the raw MRI-data (\texttt{bas\_setMRIroot}) remains untouched. The MRI-data is read and copied to the directory \texttt{<basilid>} which is created in the directory \texttt{<basilhome>} (\texttt{bas\_setDataRoot}). The link between the raw MRI-data folder inside \texttt{<MRI-root>} and \texttt{<basilid>} is \textsl{hard-coded} in \texttt{bas\_getMeta.m}.
Next the workflow can be roughly divided into four steps:
\begin{enumerate}
After initialisation of BasilLab, the work flow can be roughly divided into four steps:
\begin{enumerate}[start=0]
\item Initialise BasilLab (once)
\item Pre-processing of (raw) MRI-data. Including reading and copying (raw) MRI-data, segmentation of MR images,and processing (segmented) MRI-data. Requires Matlab (and human intervention).
\item Building the FE model. Requires Matlab and Abaqus.
\item Running the FE model, Requires Abaqus.
\item Post-processing of FE results. Requires Abaqus.
\end{enumerate}
\setcounter{section}{-1}
\section{Initialise BasilLab}\label{basilini}
Matlab needs to be aware of the location of the BasilLab-scripts, so you first have to add the directory that contains the (Matlab) scripts, possibly \basilhome{} to your Matlab search path, e.g.\ go (in Matlab) to that directory and issue \texttt{addpath(pwd);} on the command line.
As a matter of principle and for philosophical reasons, BasilLab leaves the raw MRI-data completely untouched. You have to initialise BasilLab \textsl{once} by defining the path to the raw MRI-data (\MRIroot{}), and the path to the BasilLab work directory (\basilhome{}, see also section \ref{dirstruct}). The necessary MRI (meta) data will be copied from \MRIroot{} to a unique folder \texttt{<basilid>} inside \basilhome{} for each animal. All (model) information that is extracted from the MRI-data by BasilLab will be written to, and sought in, that folder: \basilhome{}\texttt{/<basilid>}.\\
\noindent \MRIroot{} is defined (hard-coded) in \bas{getMRIroot}. This script is called by BasilLab when it needs to know the path to the \MRIroot{}-folder. You can edit this script manually, or you can use \bas{setMRIroot} to update this script to your local situation. When you call \bas{setMRIroot}, the \bas{getMRIroot}-script is overwritten with a new version that provides the \MRIroot{} that you provided as an argument to \bas{setMRIroot}.
Similarly, \basilhome{} is defined in \bas{getDataRoot} and updated with \bas{setDataRoot}. The argument for \bas{setDataRoot} or \bas{setMRIroot} is the \textsl{full} path to the folder that you wish to define, e.g.:
\begin{lstlisting}
>> bas_setMRIroot('/home/mark/BrukerData');
>> bas_setDataRoot(pwd);
\end{lstlisting}
\section{Pre-processing of MRI-data}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment