Workflow example for warping & meshing arbitrary geometry, including
- example surface mesh
- image creation from surface mesh
- creation of example displacement field
- warping by displacement field using ANTs
- meshing of final warped image
Functionality depends on
- python vtk
- simpleITK
- ANTs installation
- installation of MeshTool
All dependencies are included in this docker image. Functionality has been tested with singularity image created from above docker, using the ipython3 executable.
A singularity image containing all dependencies is available at singularity hub.
It can be downloaded from the shell using:
singularity pull shub://danielabler/dockerfiles:libadjoint-2017-2_ants_meshtool
To start an interactive session:
singularity shell -e <path_to_singularity_image>
To leave an interactive singularity session:
exit
-
Go to folder where git repository was downloaded .
-
start singularity session
singularity shell -e <path_to_singularity_image>
-
adapt script in analysis folder, eg.
analysis/pptT_prePTA.py
, for one of three steps:- Downsample original OCT image & produce Matlab output:
- From this output we compute displacement.
- Resize original OCT image based on displacement field:
This requires the
disps.mat
file to be present in the respective folder.- Uses coarse displacement field to identify approximate dimensions of image after warping.
- Creates image and matlab output for resized image
- Warp image based on displacement field:
This requires
disps.mat
as well as centerlinesOCTCenterLine.mat
andXrayCenterLine.mat
to be present in respective folder.- create high-res warped image using high-res displacement field
These steps are outlined in any of the example files in <repository/analysis/*.py> . The procedure can be followed by un/commenting the respective lines of code for each step.
- Downsample original OCT image & produce Matlab output:
-
run script from analysis folder, e.g.
python3 analysis/pptT_prePTA.py
When running the code with the singularity image mentioned above, make sure to use
python3
, notpython
. -
leave an interactive singularity session:
exit