BioPARR Documentation
Installation
Dependencies
The following programs must be installed to run the BioPARR suite:
- 3D Slicer (tested with 4.4.0)
- Paraview (tested with version 4.3.1)
- Abaqus (tested with version 6.14)
These programs have been shipped with the BioPARR binaries but your local version could also be used:
Installation procedure
- Install the required dependencies.
- Clone the BioPARR GitHub repository or download the precompiled binaries for Windows.
- If using the source code, compile the binaries by following the compilation instructions.
- Edit the
AAA_Configure
file and set up the paths to 3D Slicer and Paraview based on your installation.
Compilation
The steps to compile your own binaries for the Slicer extensions are as follows:
- Go to the build instructions for Slicer and follow the steps to install prerequisites and clone Slicer but do not build yet.
- In the cloned file
Slicer/CMakeLists.txt
findSlicer_VTK_COMPONENTS
and the lineset(Slicer_VTK_COMPONENTS)
In the indented section below this line, add these lines:
${VTK_COMPONENT_PREFIX}FiltersVerdict ${VTK_COMPONENT_PREFIX}IOGeometry
- Finish building Slicer according the instructions.
- Change directory to the directory containing the extension you want to build. For example:
cd path/to/BioPARR/Software/SlicerModules/AAA_AverageStress
- Run
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DSlicer_DIR:PATH=~/Applications/Slicer-SuperBuild-Debug/Slicer-build . make
- Binaries for this extension should now be available.
Analysis Configuration
Edit AAA_AnalyseCase.bat
to change the analysis configuration. By default, both variable (if data for the variable thickness exists) and constant thickness geometries are created and analysed using three scenarios.
For example, if you don’t want variable thickness geometry, change
SET AAA_ANALYSE_VAR_THICKNESS=0
at the start of the script. If you don’t want the constant thickness scenario to be analysed, change
SET AAA_ANALYSE_CONST_THICKNESS=0
at the start of the script.
The scenarios to be analsed are configures in ./Software/Scripts/AnalyseAllCases.bat
. If you want to remove some of these scenarios from analysis, change the definition of the variable
SET AAA_ANALYSIS_CASE=NoILT,ILTPressure,WallPressure
at the top of that file.
The actual configuration for each of the scenarios can be found in the Abaqus input file ./Software/Scripts/Abaqus/AAA.inp
. You can modiy these scenarios or add additional scenarios that you want to analyse by creating additional subfolders and Abaqus input files.
The 3D Slicer modules used for analysis are found in ./Software/SlicerModules
. You can run these with the --help
parameters to find the different configuration options they have and then change their command line parameters. For exmaple, the module for creating the Abaqus input files corresponding to the wall and ILT parts is called from AAA_AnlyseCase.bat
with the options --quad --hybrid
which means it created hybrid tetrahedral elements with quadratic shape functions and 10 nodes. This may lead to very long analysis time so these options can be removed and linear tetrahedral elements used instead.
Case Analysis
-
Setup
Duplicate the folder CaseID and rename it with the ID of the case you are going to analyse. Once this has been created, change the working directory to this folder and run
AAA_AnalyseCase.bat
. This will set up the directory structure for you.For example, if we were analysing Case11220:
cp -r CaseID Case11220 cd Case11220 AAA_AnalyseCase.bat
-
Check the data
Go to the shared data drive and copy the folders with the CT and MRI images you will use for this case. Open them in 3D Slicer and check if appropriate for analysis.
-
Cropping
Open the CT image in 3D Slicer, define the region of interest (ROI) and crop the volume (Converters -> Crop Volume) with isotropic output voxels. Save result in
./1_Segmentation_CT/CT_cropped.nrrd
.Open the MRI image in 3D Slicer, define the region of interest (ROI) and crop the volume (Converters -> Crop Volume) with isotropic output voxels. Save result in
./2_Segmentation_MRI/MRI_cropped.nrrd
.Note: The ROI should start just under the renal arteries nd end under the bifurcation of the iliac arteries (if visible in the images).
- Segmentation
-
Lumen
Open
./1_Segmentation_CT/CT_cropped.nrrd
in 3D Slicer. Go intoVolumes
and underWindow/Level
selectCT-abdomen
. Go intoSegment Editor
and use theThreshold
effect to create a rough segmentation of the blood channel. UseIslands
to eliminate unconnected regions. UsePaint
to make manual corrections (eliminate small veins, calcification the may be in contact with the blood channel, etc). The changes can be checked by usingSurface Models
->ModelMaker
to create a surface representation of your segmentation.Once you are satisfied with your manual corrections use
Surface Models
->Label Map Smoothing
with a Gaussian smoothing parameterSigma
of 1 (set both input and output volumes asCT_cropped-label
) to smooth out the segmentation. Save result to./1_Segmentation_CT/CT_blood_label.nrrd
.Note: Make sure the segmentation extends the entire height of the cropped CT image by checking the first and last red slices in 3D Slicer before saving the segmentation results.
-
AAA
Use
Paint
to extend the blood channel label to cover the entire AAA. Use a different label to mark the region around the AAA. UseFastGrowCutEffect
to segment the AAA. Once satisfied with the result stopFastGrowCutEffect
, useChangeLabelEffect
to change the label used to mark the region around the AAA to background colour and usePaint
to make manual corrections.Once you are satisfied with your manual corrections use
Surface Models
->Label Map Smoothing
with a Gaussian smoothing parameterSigma
of 1 (set both input and output volumes asCT_cropped-label
) to smooth out the segmentation. Save result to./1_Segmentation_CT/CT_AAA_label.nrrd
.Note: Make sure the segmentation extends the entire height of the cropped CT image by checking the first and last red slices in 3D Slicer before saving the segmentation results.
Tip: Use a sphere in
Paint
to mark regions in several slices at once. Take care not to mark incorrect regions in the slices you don’t see. -
AAA from MRI
Use the same procedure as above to segment the AAA from the MRI. The lumen does not need to be segmented separately in this case. Save results to
./2_Segmentation_MRI/MRI_AAA_label.nrrd
.
-
-
Wall extraction and MRI to CT registration
Run
AAA_AnalyseCase.bat
from the command prompt. The script will do this step automatically based on the segmentation data. -
Wall thickness extraction
Open
./1_Segmentation_CT/CT_cropped.nrrd
and./2_Segmentation_MRI/MRI_aligned_to_CT.nrrd
(created by the script) in 3D Slicer. If you set the asBackground
andForeground
images you can blend them together and check they are aligned. Look for areas where the wall is visible in the MRI (or calcifications in CT) and use the ruler to measure the wall thickness. Save measurements in./3_Thickness/M.acsv
. -
Complete the analysis
Run
AAA_AnalyseCase.bat
from the command prompt. The script will create the AAA and ILT surfaces, mesh the AAA and ILT volumes, create the Abaqus input files, run the Abaqus analysis for the prescribed loading configurations, extract the stress in the wall and compute the rupture potential index (RPI). -
Check the results
If there are no errors during the script execution, open some of the result files and check the output.
If there are errors, you must solve them so the analysis can progress further (this may involve cleaning up the segmentations or using different parameters for meshing). Then rerun
AAA_AnalyseCase.bat
If you cannot solve your error on your own please feel free to submit an issue here.
Tutorials
Tutorials describing the different steps of the analysis can be found here.