Full Code of gift-surg/NiftyMIC for AI

master 553bce0824e7 cached
127 files
1020.4 KB
247.5k tokens
839 symbols
1 requests
Download .txt
Showing preview only (1,069K chars total). Download the full file or copy to clipboard to get everything.
Repository: gift-surg/NiftyMIC
Branch: master
Commit: 553bce0824e7
Files: 127
Total size: 1020.4 KB

Directory structure:
gitextract_rkx8168q/

├── .gitattributes
├── .gitignore
├── .gitlab-ci.yml
├── .gitmodules
├── LICENSE
├── MANIFEST.in
├── README.md
├── data/
│   └── templates/
│       ├── LICENSE
│       ├── README
│       └── templates_info.json
├── doc/
│   └── doxyfile
├── docker/
│   ├── docker-compose.yml
│   ├── itk_niftymic/
│   │   ├── .dockerignore
│   │   └── Dockerfile
│   ├── niftymic/
│   │   ├── .dockerignore
│   │   └── Dockerfile
│   └── simplereg_dependencies/
│       ├── .dockerignore
│       └── Dockerfile
├── niftymic/
│   ├── __about__.py
│   ├── __init__.py
│   ├── application/
│   │   ├── __init__.py
│   │   ├── correct_bias_field.py
│   │   ├── correct_intensities.py
│   │   ├── multiply.py
│   │   ├── nifti2dicom.py
│   │   ├── propagate_mask.py
│   │   ├── reconstruct_volume.py
│   │   ├── reconstruct_volume_from_slices.py
│   │   ├── register_image.py
│   │   ├── rsfmri_estimate_motion.py
│   │   ├── rsfmri_reconstruct_volume_from_slices.py
│   │   ├── run_reconstruction_parameter_study.py
│   │   ├── run_reconstruction_pipeline.py
│   │   ├── segment_fetal_brains.py
│   │   └── show_slice_coverage.py
│   ├── base/
│   │   ├── __init__.py
│   │   ├── data_reader.py
│   │   ├── data_writer.py
│   │   ├── exceptions.py
│   │   ├── psf.py
│   │   ├── slice.py
│   │   └── stack.py
│   ├── definitions.py
│   ├── reconstruction/
│   │   ├── __init__.py
│   │   ├── admm_solver.py
│   │   ├── linear_operators.py
│   │   ├── primal_dual_solver.py
│   │   ├── scattered_data_approximation.py
│   │   ├── solver.py
│   │   └── tikhonov_solver.py
│   ├── registration/
│   │   ├── __init__.py
│   │   ├── flirt.py
│   │   ├── intra_stack_registration.py
│   │   ├── niftyreg.py
│   │   ├── registration_method.py
│   │   ├── simple_itk_registration.py
│   │   ├── stack_registration_base.py
│   │   ├── transform_initializer.py
│   │   └── wrap_itk_registration.py
│   ├── utilities/
│   │   ├── __init__.py
│   │   ├── binary_mask_from_mask_srr_estimator.py
│   │   ├── brain_stripping.py
│   │   ├── data_preprocessing.py
│   │   ├── input_arparser.py
│   │   ├── intensity_correction.py
│   │   ├── joint_image_mask_builder.py
│   │   ├── motion_updater.py
│   │   ├── n4_bias_field_correction.py
│   │   ├── outlier_rejector.py
│   │   ├── parameter_normalization.py
│   │   ├── segmentation_propagation.py
│   │   ├── siena.py
│   │   ├── stack_mask_morphological_operations.py
│   │   ├── target_stack_estimator.py
│   │   ├── template_stack_estimator.py
│   │   ├── toolkit_executor.py
│   │   └── volumetric_reconstruction_pipeline.py
│   └── validation/
│       ├── __init__.py
│       ├── evaluate_image_similarity.py
│       ├── evaluate_simulated_stack_similarity.py
│       ├── evaluate_slice_residual_similarity.py
│       ├── export_side_by_side_simulated_vs_original_slice_comparison.py
│       ├── image_similarity_evaluator.py
│       ├── motion_evaluator.py
│       ├── motion_simulator.py
│       ├── residual_evaluator.py
│       ├── show_evaluated_simulated_stack_similarity.py
│       ├── simulate_stacks_from_reconstruction.py
│       ├── slice_acquisition.py
│       ├── slice_coverage.py
│       └── write_random_motion_transforms.py
├── niftymic_correct_bias_field.py
├── niftymic_multiply.py
├── niftymic_nifti2dicom.py
├── niftymic_reconstruct_volume.py
├── niftymic_reconstruct_volume_from_slices.py
├── niftymic_register_image.py
├── niftymic_rsfmri_estimate_motion.py
├── niftymic_rsfmri_reconstruct_volume_from_slices.py
├── niftymic_run_reconstruction_parameter_study.py
├── niftymic_run_reconstruction_pipeline.py
├── niftymic_segment_fetal_brains.py
├── niftymic_show_reconstruction_parameter_study.py
├── requirements-monaifbs.txt
├── requirements.txt
├── setup.py
└── tests/
    ├── __init__.py
    ├── brain_stripping_test.py
    ├── case_study_fetal_brain_test.py
    ├── case_study_rsfmri_test.py
    ├── data_reader_test.py
    ├── image_similarity_evaluator_test.py
    ├── installation_test.py
    ├── installation_test_fetal_brain_seg.py
    ├── installation_test_monaifbs.py
    ├── intensity_correction_test.py
    ├── intra_stack_registration_test.py
    ├── linear_image_quality_transfer_test.py
    ├── linear_operators_test.py
    ├── niftyreg_test.py
    ├── parameter_normalization_test.py
    ├── registration_test.py
    ├── residual_evaluator_test.py
    ├── run_tests.py
    ├── segmentation_propagation_test.py
    ├── simulator_slice_acquisition_test.py
    └── stack_test.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
*.pt filter=lfs diff=lfs merge=lfs -text


================================================
FILE: .gitignore
================================================
build/
html/
data/tests/
dist/
latex/
monaifbs/models/
prototyping/
*.nii
*.nii.gz
*.tar.gz
*.deb
*.zip
*.pyc
*iterate.dat
*.egg-info
*.idea
*.wiki
/.project
.DS_Store
**/.DS_Store


================================================
FILE: .gitlab-ci.yml
================================================
# -----------------------------------Set Up------------------------------------
variables:
    PY_VERSION: 3
    PRIVATE: 0
    TMPDIR: ./tmp
    DATADIR: /home/mebner/data/ci/FetalBrain
    VENV: pysitk-test-py${PY_VERSION}
    ITK_DIR: /mnt/shared/mebner/environment/ITK/ITK_NiftyMIC-python${PY_VERSION}-build
    FSL_DIR: /mnt/shared/mebner/environment/FSL/fsl
    TEST_DIR: /home/mebner/Development/NiftyMIC/data/tests
    NIFTYREG_INSTALL: /mnt/shared/mebner/environment/NiftyReg/NiftyReg-master-install
    CONVERT3D_INSTALL: /mnt/shared/mebner/environment/Convert3D/c3d-git-install

before_script:
    # add NiftyReg to PATH
    - export PATH="${NIFTYREG_INSTALL}/bin:$PATH"

    # add FSL
    - PATH=${FSL_DIR}/bin:${PATH}
    - export PATH="${FSL_INSTALL}/bin:$PATH"
    - export FSLOUTPUTTYPE=NIFTI_GZ

    # add Convert3D to PATH
    - export PATH="${CONVERT3D_INSTALL}/bin:$PATH"

    # save current folder path
    - cwd_dir=$(pwd)

    # create virtual environment
    - rm -rf ${VENV}
    - mypython=$(which python${PY_VERSION})
    - virtualenv -p $mypython ${VENV}
    - cd ${VENV}
    - venv_dir=$(pwd)
    - source bin/activate
    
    # print Python version to CI output
    - which python
    - python --version

    # copy ITK_NiftyMIC-build WrapITK to site-packages of python venv
    - py_sitepkg=${venv_dir}/lib/python*/site-packages
    - cp -v ${ITK_DIR}/Wrapping/Generators/Python/WrapITK.pth ${py_sitepkg}

    - cd $cwd_dir
    # If PRIVATE is used:
    # add CI_JOB_TOKEN for cloning dependent repositories in requirements.txt
    # (https://docs.gitlab.com/ee/user/project/new_ci_build_permissions_model.html#dependent-repositories)
    - >
      (if [ ${PRIVATE} == 1 ];
      then sed -i -- "s#github.com/gift-surg#gitlab-ci-token:${CI_JOB_TOKEN}@PRIVATE.cs.ucl.ac.uk/GIFT-Surg#g" requirements.txt;
      fi);
    # install requirements
    - pip install -r requirements.txt

    # set environment variables for installation
    - export NIFTYMIC_ITK_DIR=$ITK_DIR

    # run installation
    - pip install -e .

    # replace TEST_DIR in niftymic/definitions.py file
    - sed -i -- 's:DIR_TEST = os.path.join(DIR_ROOT, "data", "tests"):DIR_TEST = "'"$TEST_DIR"'":g' niftymic/definitions.py
    - cat niftymic/definitions.py

after_script:
    # delete tmp-directory
    - rm -rfv ${TMPDIR}

# ----------------------------------Test Jobs----------------------------------
builddocs:
  # only:
  #   - master
  script:
    - cd doc
    - doxygen doxyfile
  tags:
    - gift-adelie

installation:
  # only:
  #   - master
  script:
    - python -m nose tests/installation_test.py
  tags:
    - gift-adelie

reconstruct_volume_tk1l2:
  # only:
  #   - master
  script:
    - >
      niftymic_reconstruct_volume
      --filenames ${DATADIR}/input_data/axial.nii.gz ${DATADIR}/input_data/coronal.nii.gz ${DATADIR}/input_data/sagittal.nii.gz
      --output ${TMPDIR}/srr_from_slices_tk1l2.nii.gz
      --suffix-mask _mask
      --verbose 0 
      --isotropic-resolution 2
      --reconstruction-type TK1L2
      --two-step-cycles 1
      --iter-max 2
      --iter-max-first 2
  tags:
    - gift-adelie

reconstruct_volume_huberl2:
  # only:
  #   - master
  script:
    - >
      niftymic_reconstruct_volume
      --filenames ${DATADIR}/input_data/axial.nii.gz ${DATADIR}/input_data/coronal.nii.gz ${DATADIR}/input_data/sagittal.nii.gz 
      --output ${TMPDIR}/srr_from_slices_huberl2.nii.gz
      --suffix-mask _mask
      --verbose 0 
      --isotropic-resolution 2
      --reconstruction-type HuberL2
      --two-step-cycles 1
      --iter-max 2
      --iter-max-first 2
      --iterations 1
  tags:
    - gift-adelie

reconstruct_volume_from_slices:
  # only:
  #   - master
  script:    
    - >
      niftymic_reconstruct_volume_from_slices
      --filenames ${DATADIR}/input_data/axial.nii.gz ${DATADIR}/input_data/coronal.nii.gz ${DATADIR}/input_data/sagittal.nii.gz 
      --dir-input-mc ${DATADIR}/motion_correction_oriented
      --suffix-mask _mask
      --reconstruction-space ${DATADIR}/SRR_stacks3_TK1_lsmr_alpha0p03_itermax10_oriented.nii.gz 
      --output ${TMPDIR}/srr_from_slices.nii.gz
      --verbose 0
      --isotropic-resolution 2
      --iter-max 2
  tags:
    - gift-adelie  

run_reconstruction_pipeline:
  # only:
  #   - master
  script:
    - >
      niftymic_run_reconstruction_pipeline
      --filenames ${DATADIR}/input_data/axial.nii.gz
      --filenames-masks ${DATADIR}/input_data/axial_mask.nii.gz
      --dir-output ${TMPDIR} 
      --suffix-mask _mask
      --bias-field-correction 1
      --two-step-cycles 0
      --iter-max 1
      --run-diagnostics 1
      --slice-thicknesses 3.85
      --verbose 0 
  tags:
    - gift-adelie

param_study_huberl2:
  # only:
  #   - master
  script:
    - recon_type=HuberL2
    - >
      niftymic_run_reconstruction_parameter_study
      --filenames ${DATADIR}/input_data/axial.nii.gz ${DATADIR}/input_data/coronal.nii.gz ${DATADIR}/input_data/sagittal.nii.gz 
      --dir-input-mc ${DATADIR}/motion_correction_oriented
      --suffix-mask _mask
      --reference ${DATADIR}/SRR_stacks3_TK1_lsmr_alpha0p03_itermax10_oriented.nii.gz 
      --dir-output ${TMPDIR}/param_study 
      --alphas 0.01 0.05 
      --iter-max 2 
      --verbose 0 
      --iterations 2
      --reconstruction-type ${recon_type} 
  tags:
    - gift-adelie

rsfmri_estimate_motion:
  # only:
  #   - master
  script:
    - recon_type=HuberL2
    - >
      niftymic_rsfmri_estimate_motion
      --filename ${DATADIR}/rsfmri/bold.nii.gz
      --filename-mask ${DATADIR}/rsfmri/bold_4Dmask.nii.gz
      --dir-output ${TMPDIR}/rsfmri 
      --two-step-cycles 1
      --iterations 2
      --sda
      --alpha 1
      --verbose 0 
      --prototyping
  tags:
    - gift-adelie

rsfmri_reconstruct_volume_from_slices:
  # only:
  #   - master
  script:
    - recon_type=TK1L2
    - >
      niftymic_rsfmri_reconstruct_volume_from_slices
      --filename ${DATADIR}/rsfmri/bold.nii.gz
      --filename-mask ${DATADIR}/rsfmri/bold_4Dmask.nii.gz
      --output ${TMPDIR}/rsfmri/foo.nii.gz 
      --alpha 0.05
      --iter-max 2 
      --verbose 0 
      --reconstruction-type ${recon_type} 
      --reconstruction-spacing 2 2 5
      --use-masks-srr 1
      --prototyping
  tags:
    - gift-adelie

##
# Results can (slightly) change depending on the downloaded library version;
# enough so that the accuracy limits are not met. Run them locally instead.
# unit_tests:
#   # only:
#   #   - master
#   script:
#     - python -m nose tests/brain_stripping_test.py
#     - python -m nose tests/case_study_fetal_brain_test.py
#     - python -m nose tests/data_reader_test.py
#     - python -m nose tests/image_similarity_evaluator_test.py
#     - python -m nose tests/intensity_correction_test.py
#     - python -m nose tests/linear_operators_test.py
#     - python -m nose tests/niftyreg_test.py
#     - python -m nose tests/residual_evaluator_test.py
#     - python -m nose tests/segmentation_propagation_test.py
#     - python -m nose tests/simulator_slice_acquisition_test.py
#     - python -m nose tests/stack_test.py
#   tags:
#     - gift-adelie


================================================
FILE: .gitmodules
================================================
[submodule "MONAIfbs"]
	path = MONAIfbs
	url = https://github.com/gift-surg/MONAIfbs


================================================
FILE: LICENSE
================================================
Copyright (c) 2017, University College London
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this 
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, 
   this list of conditions and the following disclaimer in the documentation 
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors 
   may be used to endorse or promote products derived from this software without
   specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

================================================
FILE: MANIFEST.in
================================================
include LICENSE
include requirements.txt


================================================
FILE: README.md
================================================
# Motion Correction and Volumetric Image Reconstruction of 2D Ultra-fast MRI

NiftyMIC is a Python-based open-source toolkit for research developed within the [GIFT-Surg][giftsurg] project to reconstruct an isotropic, high-resolution volume from multiple, possibly motion-corrupted, stacks of low-resolution 2D slices. The framework relies on slice-to-volume registration algorithms for motion correction and reconstruction-based Super-Resolution (SR) techniques for the volumetric reconstruction. 

The algorithm and software were developed by [Michael Ebner][mebner]
at the [Wellcome/EPSRC Centre for Interventional and Surgical Sciences][weiss], [University College London (UCL)][ucl] (2015 -- 2019), and the [Department of Surgical and Interventional Sciences][sie], [King's College London (KCL)][kcl] (since 2019).

A detailed description of the NiftyMIC algorithm is found in [EbnerWang2020][ebner-wang-2020]:
* Ebner, M., Wang, G., Li, W., Aertsen, M., Patel, P. A., Aughwane, R., Melbourne, A., Doel, T., Dymarkowski, S., De Coppi, P., David, A. L., Deprest, J., Ourselin, S., Vercauteren, T. (2020). An automated framework for localization, segmentation and super-resolution reconstruction of fetal brain MRI. NeuroImage, 206, 116324.

A later extension to this paper for fetal brain automatic segmentation building on [MONAI][monai] was provided by [Marta B.M. Ranzini][martaranzini]. 
More information about `MONAIfbs` can be found [here][monaifbs].

An extension of NiftyMIC for fetal functional MRI was developed in collaboration with members of the [Computational Image Research Lab][cir], Department of Biomedical Imaging and Image-guided Therapy at the [Medical University of Vienna][muw]. A detailed description of the NiftyMIC algorithm for fetal fMRI is found in [Sobotka2022][sobotka-2022]:
* Sobotka, D., Ebner, M., Schwartz, E., Nenning, K.-H., Taymourtash, A., Vercauteren, T., Ourselin, S., Kasprian, G., Prayer, D., Langs, G., Licandro, R. (2022). Motion Correction and Volumetric Reconstruction for Fetal fMRI. arXiv.

If you have any questions or comments, please drop an email to `michael.ebner@kcl.ac.uk`.

## NiftyMIC applied to Fetal Brain MRI
Given a set of low-resolution, possibly motion-corrupted, stacks of 2D slices, NiftyMIC produces an isotropic, high-resolution 3D volume. As an example, we illustrate its use for fetal MRI by computing a high-resolution visualization of the brain for a neck mass subject. Standard clinical HASTE sequences were used to acquire the low-resolution images in multiple orientations. 
The associated brain masks for motion correction can be obtained with the included automated segmentation tool [MONAIfbs][monaifbs] (a legacy method for automated segmentation can also be found in the [fetal_brain_seg][fetal_brain_seg] package).   
Full working examples on automated segmentation and high-resolution reconstruction of fetal brain MRI using NiftyMIC is described in the [Usage](https://github.com/gift-surg/NiftyMIC#automatic-segmentation-and-high-resolution-reconstruction-of-fetal-brain-mri) section below. 

<p align="center">
   <img src="./data/demo/NiftyMIC_Algorithm.png" align="center" width="700">
</p>
<p align="center">Figure 1. NiftyMIC -- a volumetric MRI reconstruction tool based on rigid slice-to-volume registration and outlier-robust super-resolution reconstruction steps -- applied to fetal brain MRI.<p align="center">


<p align="center">
   <img src="./data/demo/NiftyMIC_VolumetricReconstructionOutput.png" align="center" width="1000">
</p>
<p align="center">Figure 2. Qualitative comparison of the original low-resolution input data and the obtained high-resolution volumetric reconstructions in both the original patient-specific and standard anatomical orientations. Five input stacks (two axial, one coronal and two sagittal) were used. <p align="center">

## Algorithm
Several methods have been implemented to solve the **Robust Super-Resolution Reconstruction (SRR)** problem 
<!-- ```math
\vec{x}^* := \text{argmin}_{\vec{x}\ge 0} \Big[\sum_{k\in\mathcal{K}_\sigma} \sum_{i=1}^{N_k} \varrho\big( (A_k\vec{x} - \vec{y}_k)_i^2 \big) + \alpha\,\text{Reg}(\vec{x}) \Big]
``` -->
<p align="center">
<img src="http://latex.codecogs.com/svg.latex?\vec{x}^*&space;:=&space;\text{argmin}_{\vec{x}\ge&space;0}&space;\Big[\sum_{k\in\mathcal{K}_\sigma}&space;\sum_{i=1}^{N_k}&space;\varrho\big(&space;(A_k\vec{x}&space;-&space;\vec{y}_k)_i^2&space;\big)&space;&plus;&space;\alpha\,\text{Reg}(\vec{x})&space;\Big]" title="http://latex.codecogs.com/svg.latex?\vec{x}^* := \text{argmin}_{\vec{x}\ge 0} \Big[\sum_{k\in\mathcal{K}_\sigma} \sum_{i=1}^{N_k} \varrho\big( (A_k\vec{x} - \vec{y}_k)_i^2 \big) + \alpha\,\text{Reg}(\vec{x}) \Big]" />
</p>

<!--to obtain the (vectorized) high-resolution 3D MRI volume $`\vec{x}\in\mathbb{R}^N`$ from multiple, possibly motion corrupted, low-resolution stacks of (vectorized) 2D MR slices $`\vec{y}_k \in\mathbb{R}^{N_k}`$ with $`N_k\ll N`$ for $`k=1,...,\,K`$-->
<!--for a variety of regularizers $`\text{Reg}`$ and data loss functions $`\varrho`$.-->
<!--The linear operator $`A_k := D_k B_k W_k`$ represents the comd operator descri the (rigid) motion $`W_k`$, the blurring operator $`B_k`$ and the downsampling operator $`D_k`$.-->
to obtain the (vectorized) high-resolution 3D MRI volume ![img](http://latex.codecogs.com/svg.latex?%5Cvec%7Bx%7D%5Cin%5Cmathbb%7BR%7D%5EN) from multiple, possibly motion corrupted, low-resolution stacks of (vectorized) 2D MR slices ![img](http://latex.codecogs.com/svg.latex?%5Cvec%7By%7D_k%5Cin%5Cmathbb%7BR%7D%5E%7BN_k%7D) with ![img](http://latex.codecogs.com/svg.latex?N_k%5Cll%7BN%7D) for ![img](https://latex.codecogs.com/svg.latex?k\in\mathcal{K}:=\\{1,\dots,K\\})
for a variety of regularizers ![img](http://latex.codecogs.com/svg.latex?%5Ctext%7BReg%7D) and data loss functions ![img](http://latex.codecogs.com/svg.latex?%5Cvarrho).
The linear operator ![img](http://latex.codecogs.com/svg.latex?A_k%3A%3DD_kB_kW_k) represents the combined operator describing the (rigid) motion ![img](http://latex.codecogs.com/svg.latex?W_k), the blurring operator ![img](http://latex.codecogs.com/svg.latex?B_k) and the downsampling operator ![img](http://latex.codecogs.com/svg.latex?D_k).

The toolkit relies on an iterative motion-correction/reconstruction approach whereby **complete outlier rejection** of misregistered slices is achieved by iteratively solving the SRR problem for a slice-index set 
![img](https://latex.codecogs.com/svg.latex?\mathcal{K}_\sigma:=\\{1\le&space;k&space;\le&space;K:&space;\text{Sim}(A_k^{\iota}\vec{x}^{\iota},&space;\vec{y}^{\iota}_k)\ge\sigma\\}\subset&space;\mathcal{K}) containing only slices that are in high agreement with their simulated counterparts projected from a previous high-resolution iterate ![img](http://latex.codecogs.com/svg.latex?\vec{x}^{\iota}) according to a similarity measure ![img](http://latex.codecogs.com/svg.latex?\text{Sim}) and parameter ![img](http://latex.codecogs.com/svg.latex?\sigma>0). In the current implementation, the similarity measure ![img](http://latex.codecogs.com/svg.latex?\text{Sim}) corresponds to Normalized Cross Correlation (NCC).

---

The provided **data loss functions** ![img](http://latex.codecogs.com/svg.latex?%5Cvarrho) are motivated by [SciPy](https://docs.scipy.org/doc/scipy-0.19.0/reference/generated/scipy.optimize.least_squares.html) and allow for additional robust outlier handling during the SRR step. Implemented data loss functions are:
<!--$`\varrho(e)=e`$-->
<!--$`\varrho(e)=2(\sqrt{1+e}-1)`$ -->
<!--$`\varrho(e)=|e|_\gamma=\begin{cases}e,&e<\gamma^2\\2\gamma\sqrt{e}-\gamma^2,&e\ge\gamma^2\end{cases}`$-->
<!--$`\varrho(e)=\arctan(e)`$-->
<!--$`\varrho(e)=\ln(1 + e)`$-->
* `linear`: <img src="http://latex.codecogs.com/svg.latex?\varrho(e)=e" title="http://latex.codecogs.com/svg.latex?\varrho(e)=e" />
* `soft_l1`: <img src="http://latex.codecogs.com/svg.latex?\varrho(e)=2(\sqrt{1&plus;e}-1)" title="http://latex.codecogs.com/svg.latex?\varrho(e)=2(\sqrt{1+e}-1)" />
* `huber`: <img src="http://latex.codecogs.com/svg.latex?\varrho(e)=|e|_\gamma=\begin{cases}e,&e<\gamma^2\\2\gamma\sqrt{e}-\gamma^2,&e\ge\gamma^2\end{cases}" title="http://latex.codecogs.com/svg.latex?\varrho(e)=|e|_\gamma=\begin{cases}e,&e<\gamma^2\\2\gamma\sqrt{e}-\gamma^2,&e\ge\gamma^2\end{cases}" />
* `arctan`: <img src="http://latex.codecogs.com/svg.latex?\varrho(e)=\arctan(e)" title="http://latex.codecogs.com/svg.latex?\varrho(e)=\arctan(e)" />
* `cauchy`: <img src="http://latex.codecogs.com/svg.latex?\varrho(e)=\ln(1&space;&plus;&space;e)" title="http://latex.codecogs.com/svg.latex?\varrho(e)=\ln(1 + e)" />

---

The **available regularizers** include
<!-- * Zeroth-order Tikhonov (TK0): $`\text{Reg}(\vec{x}) = \frac{1}{2}\Vert \vec{x} \Vert_{\ell^2}^2`$ -->
<!-- * First-order Tikhonov (TK1): $`\text{Reg}(\vec{x}) = \frac{1}{2}\Vert \nabla \vec{x} \Vert_{\ell^2}^2`$ -->
<!-- * Isotropic Total Variation (TV): $`\text{Reg}(\vec{x}) = \text{TV}_\text{iso}(\vec{x}) = \big\Vert |\nabla \vec{x}| \big\Vert_{\ell^1}`$ -->
<!-- * Huber Function: $`\text{Reg}(\vec{x}) = \frac{1}{2\gamma} \big| |\nabla \vec{x}| \big|_{\gamma}`$ -->
* Zeroth-order Tikhonov (TK0): <img src="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x})&space;=&space;\frac{1}{2}\Vert&space;\vec{x}&space;\Vert_{\ell^2}^2" title="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x}) = \frac{1}{2}\Vert \vec{x} \Vert_{\ell^2}^2" />
* First-order Tikhonov (TK1): <img src="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x})&space;=&space;\frac{1}{2}\Vert&space;\nabla&space;\vec{x}&space;\Vert_{\ell^2}^2" title="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x}) = \frac{1}{2}\Vert \nabla \vec{x} \Vert_{\ell^2}^2" />
* Isotropic Total Variation (TV): <img src="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x})&space;=&space;\text{TV}_\text{iso}(\vec{x})&space;=&space;\big\Vert&space;|\nabla&space;\vec{x}|&space;\big\Vert_{\ell^1}" title="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x}) = \text{TV}_\text{iso}(\vec{x}) = \big\Vert |\nabla \vec{x}| \big\Vert_{\ell^1}" />
* Huber Function: <img src="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x})&space;=&space;\frac{1}{2\gamma}&space;\big|&space;|\nabla&space;\vec{x}|&space;\big|_{\gamma}" title="http://latex.codecogs.com/svg.latex?\text{Reg}(\vec{x}) = \frac{1}{2\gamma} \big| |\nabla \vec{x}| \big|_{\gamma}" />
---

Additionally, the choice of finding **optimal reconstruction parameters** is facilitated by the [Numerical Solver Library (NSoL)][nsol].

## Disclaimer
NiftyMIC supports medical image registration and volumetric reconstruction for ultra-fast 2D MRI. **NiftyMIC is not intended for clinical use**.

## How to cite
If you use this software in your work for structural MRI reconstruction, please cite

* [[EbnerWang2020]][ebner-wang-2020] Ebner, M., Wang, G., Li, W., Aertsen, M., Patel, P. A., Aughwane, R., Melbourne, A., Doel, T., Dymarkowski, S., De Coppi, P., David, A. L., Deprest, J., Ourselin, S., Vercauteren, T. (2020). An automated framework for localization, segmentation and super-resolution reconstruction of fetal brain MRI. NeuroImage, 206, 116324.
* [[EbnerWang2018]][ebner-wang-2018] Ebner, M., Wang, G., Li, W., Aertsen, M., Patel, P. A., Melbourne, A., Doel, T., David, A. L., Deprest, J., Ourselin, S., Vercauteren, T. (2018). An Automated Localization, Segmentation and Reconstruction Framework for Fetal Brain MRI. In Medical Image Computing and Computer-Assisted Intervention -- MICCAI 2018 (pp. 313–320). Springer.
* [[Ebner2018]](https://www.sciencedirect.com/science/article/pii/S1053811917308042) Ebner, M., Chung, K. K., Prados, F., Cardoso, M. J., Chard, D. T., Vercauteren, T., Ourselin, S. (2018). Volumetric reconstruction from printed films: Enabling 30 year longitudinal analysis in MR neuroimaging. NeuroImage, 165, 238–250.

If you use this software in your work for functional MRI reconstruction, please cite
* [[Sobotka2022]][sobotka-2022] Sobotka, D., Ebner, M., Schwartz, E., Nenning, K.-H., Taymourtash, A., Vercauteren, T., Ourselin, S., Kasprian, G., Prayer, D., Langs, G., Licandro, R. (2022). Motion Correction and Volumetric Reconstruction for Fetal fMRI. arXiv.
* [[EbnerWang2020]][ebner-wang-2020] Ebner, M., Wang, G., Li, W., Aertsen, M., Patel, P. A., Aughwane, R., Melbourne, A., Doel, T., Dymarkowski, S., De Coppi, P., David, A. L., Deprest, J., Ourselin, S., Vercauteren, T. (2020). An automated framework for localization, segmentation and super-resolution reconstruction of fetal brain MRI. NeuroImage, 206, 116324.

## Installation

### From Source
NiftyMIC was developed in Ubuntu 16.04, 18.04 and Mac OS X 10.12 and tested for Python 2.7, 3.5 and 3.6.
It builds on a couple of additional libraries developed within the [GIFT-Surg][giftsurg] project including 
* [NSoL][nsol]
* [SimpleReg][simplereg]
* [PySiTK][pysitk]
* [ITK_NiftyMIC][itkniftymic]

whose installation requirements need to be met. Therefore, the local installation comes in three steps:

1. [Installation of ITK_NiftyMIC][itkniftymic]
1. [Installation of SimpleReg dependencies][simplereg-dependencies]
1. [Installation of NiftyMIC (including optional MONAIfbs)][niftymic-install]

Note: The optional use of the automated fetal brain segmentation tool [MONAIfbs][monaifbs] requires Python version >= 3.6.

### Virtual Machine and Docker

To avoid manual installation from source, NiftyMIC is also available as a [virtual machine][niftymic-vm] and [Docker image][niftymic-docker].

## Usage

Provided the input MR image data in NIfTI format (`nii` or `nii.gz`), NiftyMIC can reconstruct an isotropic, high-resolution volume from multiple, possibly motion-corrupted, stacks of low-resolution 2D slices.

A recommended workflow is [associated applications in square brackets]:

1. Segmentation of the anatomy of interest for all input images. For fetal brain MRI reconstructions, we recommend the use of the fully automatic segmentation tool [MONAIfbs][monaifbs] already integrated in NiftyMIC [`niftymic_segment_fetal_brains`].
1. Bias-field correction [`niftymic_correct_bias_field`]
1. Volumetric reconstruction in subject space using two-step iterative approach based on rigid slice-to-volume registration and SRR cycles [`niftymic_reconstruct_volume`]

In case reconstruction in a template space is desired (like for fetal MRI) additional steps could be:
1. Register obtained SRR to template and update respective slice motion corrections [`niftymic_register_image`]
1. Volumetric reconstruction in template space [`niftymic_reconstruct_volume_from_slices`]

Additional information on how to use NiftyMIC and its applications is provided in the following.

### Volumetric MR Reconstruction from Motion Corrupted 2D Slices
Leveraging a two-step registration-reconstruction approach an isotropic, high-resolution 3D volume can be generated from multiple stacks of low-resolution slices.

An example for a basic usage reads
```
niftymic_reconstruct_volume \
--filenames path-to-stack-1.nii.gz ... path-to-stack-N.nii.gz \
--filenames-masks path-to-stack-1_mask.nii.gz ... path-to-stack-N_mask.nii.gz \
--output path-to-srr.nii.gz \
```
whereby complete outlier removal during SRR is activated by default (`--outlier-rejection 1`).

A more elaborate example could be
```
niftymic_reconstruct_volume \
--filenames path-to-stack-1.nii.gz ... path-to-stack-N.nii.gz \
--filenames-masks path-to-stack-1_mask.nii.gz ... path-to-stack-N_mask.nii.gz \
--alpha 0.01 \
--outlier-rejection 1 \
--threshold-first 0.5 \
--threshold 0.85 \
--intensity-correction 1 \
--isotropic-resolution 0.8 \
--two-step-cycles 3 \
--output path-to-output-dir/srr.nii.gz \
--subfolder-motion-correction motion_correction \ # created in 'path-to-output-dir'
--verbose 1
```

The obtained motion-correction transformations in `motion_correction` can be used for further processing, e.g. by using `niftymic_reconstruct_volume_from_slices.py` to solve the SRR problem for a variety of different regularization and data loss function types. 

### Transformation to Template Space
If a template is available, it is possible to obtain a SRR in its associated standard anatomical space. Using the subject-space SRR outcome of `niftymic_reconstruct_volume` a rigid alignment step maps all slice motion correction transformations accordingly using
```
niftymic_register_image \
--fixed path-to-template.nii.gz \
--fixed-mask path-to-template_mask.nii.gz \
--moving path-to-subject-space-srr.nii.gz \
--moving-mask path-to-subject-space-srr_mask.nii.gz \
--dir-input-mc dir-to-motion_correction \
--output path-to-registration-transform.txt
```
For fetal brain template space alignment, a [spatio-temporal atlas][gholipour_atlas] is provided in [`data/templates`](data/templates). If you make use of it, please cite

* Gholipour, A., Rollins, C. K., Velasco-Annis, C., Ouaalam, A., Akhondi-Asl, A., Afacan, O., Ortinau, C. M., Clancy, S., Limperopoulos, C., Yang, E., Estroff, J. A. & Warfield, S. K. (2017). A normative spatiotemporal MRI atlas of the fetal brain for automatic segmentation and analysis of early brain growth. Scientific Reports 7, 476.

and abide by the license agreement as described in [`data/templates/LICENSE`](data/templates/LICENSE).

### SRR Methods for Motion Corrected (or Static) Data

After performed/updated motion correction (or having static data in the first place) several options are available:

* Volumetric reconstruction in template space
* Parameter tuning for SRR:
    * different solvers and regularizers can be used to solve the SRR problem for comparison
    * parameter studies can be performed to find optimal reconstruction parameters.

#### SRR from Motion Corrected (or Static) Slice Acquisitions

Solve the SRR problem for motion corrected data (or static data if `--dir-input-mc` is omitted):
```
niftymic_reconstruct_volume_from_slices \
--filenames path-to-stack-1.nii.gz ... path-to-stack-N.nii.gz \
--filenames-masks path-to-stack-1_mask.nii.gz ... path-to-stack-N_mask.nii.gz \
--dir-input-mc dir-to-motion_correction \ # optional
--output path-to-srr.nii.gz \
--reconstruction-type TK1L2 \
--reconstruction-space path-to-template.nii.gz \ # optional
--alpha 0.01
```
```
niftymic_reconstruct_volume_from_slices \
--filenames path-to-stack-1.nii.gz ... path-to-stack-N.nii.gz \
--dir-input-mc dir-to-motion_correction \
--output path-to-srr.nii.gz \
--reconstruction-type HuberL2 \
--alpha 0.003
```

Slices that were rejected during the `niftymic_reconstruct_volume` run are recognized as outliers based on the content of `dir-input-mc` and will not be incorporated during the volumetric reconstruction.


#### Parameter Studies to Determine Optimal SRR Parameters
The optimal choice for reconstruction parameters like the regularization parameter or data loss function can be found by running parameter studies. This includes L-curve studies and direct comparison against a reference volume for various cost functions.
In case a reference is available, similarity measures are evaluated against this "ground-truth" as well.

Example are:
```
niftymic_run_reconstruction_parameter_study \
--filenames path-to-stack-1.nii.gz ... path-to-stack-N.nii.gz \
--filenames-masks path-to-stack-1_mask.nii.gz ... path-to-stack-N_mask.nii.gz \
--dir-input-mc dir-to-motion_correction \
--dir-output dir-to-param-study-output \
--reconstruction-type TK1L2 \
--reconstruction-space path-to-reconstruction-space.nii.gz \ # define reconstruction space
--alphas 0.005 0.01 0.02 0.05 0.1 # regularization parameters to sweep through
--append # if given, append a previously performed parameter study in output directory (if available)
```
```
niftymic_run_reconstruction_parameter_study \
--filenames path-to-stack-1.nii.gz ... path-to-stack-N.nii.gz \
--filenames-masks path-to-stack-1_mask.nii.gz ... path-to-stack-N_mask.nii.gz \
--dir-input-mc dir-to-motion_correction \
--dir-output dir-to-param-study-output \
--reconstruction-type HuberL2 \
--reference path-to-reference-volume.nii.gz \ # in case reference ("ground-truth") is available (reconstruction space is defined by this reference)
--measures MAE RMSE PSNR NCC NMI SSIM \ # evaluate reconstruction similarities against reference
--reference-mask path-to-reference-volume_mask.nii.gz \ # if given, evaluate similarities (--measures) on masked region only
--alphas 0.001 0.003 0.005 0.001 0.003 \ # regularization parameters to sweep through
--append # if given, append a previously performed parameter study in output directory (if available)
```

The results can be assessed by accessing the [NSoL][nsol]-script `show_parameter_study.py` via
```
niftymic_show_parameter_study \
--dir-input dir-to-param-study-output \
--study-name TK1L2 \
--dir-output-figures dir-to-figures
```

### Automatic Segmentation and High-Resolution Reconstruction of Fetal Brain MRI
An automated framework is implemented to obtain a high-resolution fetal brain MRI reconstruction in the standard anatomical planes (Figure 2).
This includes two main subsequent blocks:
1. Automatic segmentation to generate fetal brain masks
2. Automatic high-resolution reconstruction.

The latter is based on the work described in [EbnerWang2018][ebner-wang-2018] and [EbnerWang2020][ebner-wang-2020].
Compared to the segmentation approach proposed in [EbnerWang2020][ebner-wang-2020], a new automated segmentation tool has
been included in the NiftyMIC package, called [MONAIfbs][monaifbs]. 
This implements a single-step segmentation approach based on the [dynUNet][dynUNet] implemented in [MONAI][monai].

The current NiftyMIC version is still compatible with the older segmentation pipeline based on the [fetal_brain_seg][fetal_brain_seg] 
package and presented in [EbnerWang2020][ebner-wang-2020]. Details on its use are available at [this wiki page][wikifetalbrainseg], 
although `MONAIfbs` is the recommended option.


#### Automatic segmentation
Provided the dependencies for `MONAIfbs` are [installed][niftymic-install], create the automatic fetal brain masks of HASTE-like images:
```
niftymic_segment_fetal_brains \
--filenames \
nifti/name-of-stack-1.nii.gz \
nifti/name-of-stack-2.nii.gz \
nifti/name-of-stack-N.nii.gz \
--filenames-masks \
seg/name-of-stack-1.nii.gz \
seg/name-of-stack-2.nii.gz \
seg/name-of-stack-N.nii.gz
```

#### Automatic reconstruction
Afterwards, four consecutive steps including
1. bias field correction (`niftymic_correct_bias_field`),
1. subject-space reconstruction (`niftymic_reconstruct_volume`),
1. template-space alignment (`niftymic_register_image`), and
1. template-space reconstruction (`niftymic_reconstruct_volume_from_slices`)

are performed to create a high-resolution fetal brain MRI reconstruction in the standard anatomical planes:
```
niftymic_run_reconstruction_pipeline \
--filenames \
nifti/name-of-stack-1.nii.gz \
nifti/name-of-stack-2.nii.gz \
nifti/name-of-stack-N.nii.gz \
--filenames-masks \
seg/name-of-stack-1.nii.gz \
seg/name-of-stack-2.nii.gz \
seg/name-of-stack-N.nii.gz \
--dir-output srr
```

Additional parameters such as the regularization parameter `alpha` can be specified too. For more information please execute `niftymic_run_reconstruction_pipeline -h`.

*Note*: In case a suffix distinguishes image segmentation (`--filenames-masks`) from the associated image filenames (`--filenames`), the argument `--suffix-mask` needs to be provided for reconstructing the HR brain volume mask as part of the pipeline. E.g. if images `name-of-stack-i.nii.gz` are associated with the mask `name-of-stack-i_mask.nii.gz`, then the additional argument `--suffix-mask _mask` needs to be specified.

### NiftyMIC applied to Fetal Brain Functional MRI

An extension of NiftyMIC for fetal functional MRI is described in [Sobotka2022][sobotka-2022]:

<p align="center">
   <img src="./data/demo/NiftyMIC_rsfmri_Algorithm.png" align="center" width="700">
</p>

<p align="center">
Figure 3: Overview of the proposed motion correction and volumetric reconstruction algorithm for rs-fMRI. With the first n=15 (default) time points a HR reference volume with outlier rejection is estimated (Ebner, Wang et al., 2020). Afterwards each slice of a time point is registered to the HR reference volume following which individual time points are reconstructed using Huber L2 regularization.<p align="center">

<p align="center">
   <img src="./data/demo/NiftyMIC_rsfmri_Reconstruction.png" align="center" width="700">
</p>
<p align="center">
Figure 4: Qualitative comparison of the original low-resolution input sequence (top row) and the obtained volumetric reconstruction of the functional MRI (bottom row) in patient-specific orientation. A sequence of axial stacks were used as input.<p align="center">


A recommended workflow is [associated applications in square brackets]:

1. Volumetric segmentation of the fetal brain for all input images in the sequence. We tested the algorithm with fetal functional brains masks created using the Brain Extraction Tool incorporated in the [FSL Toolbox][fsl] (Smith et al. 2002).

1. Motion estimation [`rsfmri_estimate_motion`]
   ```
    rsfmri_estimate_motion \
    --filename path-to-bold.nii.gz  \
    --filename-mask path-to-bold_mask.nii.gz \
    --dir-output path-to-dir-output
    ```
1. Functional volumetric reconstruction [`rsfmri_reconstruct_volume_from_slices`]
    
   An example for a basic usage reads
    ```
    rsfmri_reconstruct_volume_from_slices \
    --filename path-to-bold.nii.gz  \
    --filename-mask path-to-bold_mask.nii.gz \
    --dir-input-mc path-to-motion_correction \ # created in `dir-output` in step 2 above
    --output path-to-bold_reconstructed.nii.gz
    ```
    
   A more elaborate example using a different reconstruction approach `HuberL2` could be
    ```
    rsfmri_reconstruct_volume_from_slices \
    --filename path-to-bold.nii.gz \
    --filename-mask path-to-bold_mask.nii.gz \
    --dir-input-mc path-to-motion_correction \ # created in `dir-output` in step 2 above
    --output path-to-bold_reconstructed.nii.gz \
    --reconstruction-type HuberL2
    --alpha 0.1 \
    --iter-max 20
   ```

If you have any questions or comments with regards to the use of NiftyMIC for functional MRI, please drop an email to `daniel.sobotka@meduniwien.ac.at`.
   
   
## Licensing and Copyright
Copyright (c) 2022 Michael Ebner and contributors.
This framework is made available as free open-source software under the [BSD-3-Clause License][bsd]. Other licenses may apply for dependencies.


## Funding
This work is partially funded by the UCL [Engineering and Physical Sciences Research Council (EPSRC)][epsrc] Centre for Doctoral Training in Medical Imaging (EP/L016478/1), the Innovative Engineering for Health award ([Wellcome Trust][wellcometrust] [WT101957] and [EPSRC][epsrc] [NS/A000027/1]), and supported by researchers at the [National Institute for Health Research][nihr] [University College London Hospitals (UCLH)][uclh] Biomedical Research Centre.

## References
Selected publications associated with NiftyMIC are:
* [[Sobotka2022]][sobotka-2022] Sobotka, D., Ebner, M., Schwartz, E., Nenning, K.-H., Taymourtash, A., Vercauteren, T., Ourselin, S., Kasprian, G., Prayer, D., Langs, G., Licandro, R. (2022). Motion Correction and Volumetric Reconstruction for Fetal fMRI. arXiv.
* [[EbnerWang2020]][ebner-wang-2020] Ebner, M., Wang, G., Li, W., Aertsen, M., Patel, P. A., Aughwane, R., Melbourne, A., Doel, T., Dymarkowski, S., De Coppi, P., David, A. L., Deprest, J., Ourselin, S., Vercauteren, T. (2020). An automated framework for localization, segmentation and super-resolution reconstruction of fetal brain MRI. NeuroImage, 206, 116324.
* [[Ebner2019]](https://onlinelibrary.wiley.com/doi/abs/10.1002/mrm.27852) Ebner, M., Patel, P. A., Atkinson, D., Caselton, C., Firmin, F., Amin, Z., Bainbridge, A., De Coppi, P., Taylor, S. A., Ourselin, S., Chouhan, M. D., Vercauteren, T. (2019). Super‐resolution for upper abdominal MRI: Acquisition and post‐processing protocol optimization using brain MRI control data and expert reader validation. Magnetic Resonance in Medicine, 82(5), 1905–1919.
* [[Sobotka2019]](http://link.springer.com/10.1007/978-3-030-32875-7_14) Sobotka, D., Licandro, R., Ebner, M., Schwartz, E., Vercauteren, T., Ourselin, S., Kasprian, G., Prayer, D., Langs, G. (2019). Reproducibility of Functional Connectivity Estimates in Motion Corrected Fetal fMRI. Smart Ultrasound Imaging and Perinatal, Preterm and Paediatric Image Analysis (pp. 123–132). Cham: Springer International Publishing.
* [[EbnerWang2018]][ebner-wang-2018] Ebner, M., Wang, G., Li, W., Aertsen, M., Patel, P. A., Melbourne, A., Doel, T., David, A. L., Deprest, J., Ourselin, S., Vercauteren, T. (2018). An Automated Localization, Segmentation and Reconstruction Framework for Fetal Brain MRI. In Medical Image Computing and Computer-Assisted Intervention -- MICCAI 2018 (pp. 313–320). Springer
* [[Ebner2018]](https://www.sciencedirect.com/science/article/pii/S1053811917308042) Ebner, M., Chung, K. K., Prados, F., Cardoso, M. J., Chard, D. T., Vercauteren, T., Ourselin, S. (2018). Volumetric reconstruction from printed films: Enabling 30 year longitudinal analysis in MR neuroimaging. NeuroImage, 165, 238–250.
* [[Ranzini2017]](https://mski2017.files.wordpress.com/2017/09/miccai-mski2017.pdf) Ranzini, M. B., Ebner, M., Cardoso, M. J., Fotiadou, A., Vercauteren, T., Henckel, J., Hart, A., Ourselin, S., and Modat, M. (2017). Joint Multimodal Segmentation of Clinical CT and MR from Hip Arthroplasty Patients. MICCAI Workshop on Computational Methods and Clinical Applications in Musculoskeletal Imaging (MSKI) 2017.
* [[Ebner2017]](https://link.springer.com/chapter/10.1007%2F978-3-319-52280-7_1) Ebner, M., Chouhan, M., Patel, P. A., Atkinson, D., Amin, Z., Read, S., Punwani, S., Taylor, S., Vercauteren, T., Ourselin, S. (2017). Point-Spread-Function-Aware Slice-to-Volume Registration: Application to Upper Abdominal MRI Super-Resolution. In Zuluaga, M. A., Bhatia, K., Kainz, B., Moghari, M. H., and Pace, D. F., editors, Reconstruction, Segmentation, and Analysis of Medical Images. RAMBO 2016, volume 10129 of Lecture Notes in Computer Science, pages 3–13. Springer International Publishing.

[bsd]: https://opensource.org/licenses/BSD-3-Clause
[cir]: https://www.cir.meduniwien.ac.at/
[cmic]: http://cmic.cs.ucl.ac.uk
[dynUNet]: https://github.com/Project-MONAI/tutorials/blob/master/modules/dynunet_tutorial.ipynb
[ebner-wang-2018]: http://link.springer.com/10.1007/978-3-030-00928-1_36
[ebner-wang-2020]: https://www.sciencedirect.com/science/article/pii/S1053811919309152
[epsrc]: http://www.epsrc.ac.uk
[fetal_brain_seg]: https://github.com/gift-surg/fetal_brain_seg
[fsl]: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET
[gholipour_atlas]: https://www.nature.com/articles/s41598-017-00525-w
[giftsurg]: http://www.gift-surg.ac.uk
[guarantors]: https://guarantorsofbrain.org/
[itkniftymic]: https://github.com/gift-surg/ITK_NiftyMIC/wikis/home
[kcl]: https://www.kcl.ac.uk
[martaranzini]: https://www.linkedin.com/in/marta-bianca-maria-ranzini
[mebner]: https://www.linkedin.com/in/ebnermichael
[monai]: https://monai.io/
[monaifbs]: https://github.com/gift-surg/MONAIfbs
[mssociety]: https://www.mssociety.org.uk/
[muw]: https://www.meduniwien.ac.at
[niftymic-docker]: https://hub.docker.com/r/renbem/niftymic
[niftymic-install]: https://github.com/gift-surg/NiftyMIC/wikis/niftymic-installation
[niftymic-vm]: https://github.com/gift-surg/NiftyMIC/wiki/niftymic-virtualbox
[nihr]: http://www.nihr.ac.uk/research
[nsol]: https://github.com/gift-surg/NSoL
[pysitk]: https://github.com/gift-surg/PySiTK
[sie]: https://www.kcl.ac.uk/bmeis/our-departments/surgical-interventional-engineering
[simplereg-dependencies]: https://github.com/gift-surg/SimpleReg/wikis/simplereg-dependencies
[simplereg]: https://github.com/gift-surg/SimpleReg
[sobotka-2022]: https://arxiv.org/abs/2202.05863
[ucl]: http://www.ucl.ac.uk
[uclh]: http://www.uclh.nhs.uk
[weiss]: https://www.ucl.ac.uk/interventional-surgical-sciences
[wellcometrust]: http://www.wellcome.ac.uk
[wikifetalbrainseg]: https://github.com/gift-surg/NiftyMIC/wiki/Legacy-Segmentation-Tool-(fetal_brain_seg)


================================================
FILE: data/templates/LICENSE
================================================
CRL (Computational Radiology Laboratory) hereby grants a license to use, including the right to share, copy, distribute, and transmit, the information, images and data that appears on this webpage solely for non-commercial educational and research purposes, subject to the following restrictions: (1) You must at all times acknowledge and attribute ownership of the information, images and data to CRL, including reproducing CRL's copyright to the extent that the same appears thereon; for publications referencing the fetal structural atlas, cite Gholipour et al., Scientific Reports, 2017; for publications referencing the DTI atlas, cite Khan et al., NeuroImage, 2018 and Khan et al., MICCAI, 2018 (full citations found on the Fetal Brain Atlas webpage); and (2) You may not post the information, images and data on any website, electronic bulletin board or any other electronic medium without the express written permission of CRL or required acknowledgements. As the information, images and data is experimental in nature and is being provided solely to facilitate academic and scientific research, you agree that you will use this information, images and data at your own risk and without liability of any kind to CRL. CRL MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED WITH RESPECT TO THE INFORMATION, IMAGES AND DATA, AND THERE ARE NO EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Use of the information, images or data for any commercial purposes is strictly prohibited without the express written consent of CRL. By requesting access through submitting this form, you acknowledge that you understand and accept all the terms and conditions in this license agreement.


================================================
FILE: data/templates/README
================================================
2016 Fetal Brain Atlas
Copyright 2016, Computational Radiology Lab, Boston Childrens Hospital

Contact:
Ali Gholipour: Ali.Gholipour@childrens.harvard.edu
Clemente Velasco-Annis: Clemente.Velasco-Annis@childrens.harvard.edu

This version of the Spatio-Temporal Atlas (STA) was last edited on 11/21/16

This spatio-temporal atlas and the included parcellations are not intended for medical use and have no warranty. Structures received varying amounts of attention and refinement based on the research goals at the time of creation and thus no guarantees can be made regarding the accuracy or precision of the segmentations, nor the withholding to any particular labeling convention or protocol between structures. Any output derived from the use of these atlases or parcellations shouled be checked in order to validate the accuracy of the results.

# # # # # # # # # # # # # # # # # # # # # #
New to this update (11/21/16) "Olympic edition":

CHANGES TO LABELING SCHEME:
	The parcellation scheme (label numbers) has been reorganized
		All atlas images now share the same label key
		The full key can be found below
	Left and right white matter have been separated into separate labels
	Labels for left and right internal capsule have been added to all images
	
REFINEMENT TO PARCELLATIONS:
	"Miscellanous_brain_tissue" has been mostly removed as most of the label was internal capsule
	Developing white matter zones (SP, IZ & VZ) have been removed from STA31-33 because they were not felt to be accurate (differentiation between layers was arbitrary)
		*There are two versions of the STA30 parcellation, one with developing white matter zones, one without*
	Cortical plate was reduced in the region anterior to the corpus callosum (reduced the portion "wrapping" into hemisphere)
	Subplate has been expanded to the appropriate width as per reviewer feedback
	The intermediate zone/ventricular zone has been edited to shrink the ventricular zone in line with reviewer feedback
	Deep gray matter structures have been edited to increase segmentation consistency between gestational ages

# # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # #
New to this update (06/07/16):

	White and gray cerebellum have been recombined because we could not ensure the accuracy of the delineation (very little refinement had been done since initial propagation of the parcellation scheme to this atlas).
	
	The files have been renamed slightly.

# # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # #
New to this update (03/30/16):

ADDED TEMPLATES:
	There are now atlas images and labels for gestational age (GA) weeks 21-37.

DEVELOPING WHITE MATTER ZONES:
	Labels for developing white matter zones have been added for GA 21-33
	This includes left and right "ventricular zone", "intermediate zone" (similar to subventricular zone), and "subplate"
	In these images, label 51 is now "miscellaneous brain tissue", mostly deep gray matter found between the larger subcortical structures
	Images with the labeling convention are marked with "wmz"; for example, STA27_WMZparc.nii.gz

	There are two versions of labels for STA31, STA32, and STA33
	STA31_parc.nii.gz = All white matter is label 51
	STA31_WMZparc.nii.gz = Developing white matter layers have been separated into miscellaneous brain tissue (#51), subplate (#73,74), intermediate zone (#75,76), and ventricular zone (#77,78)

	Note: As the white matter homogenizes in composition during development, the visual differentiation between the layers also decreases. Because of this the accuracy of the developmental layers may not be great for the older brains (i.e. STA30-33). This primarily pertains to the border between intermediate zone and subplate.

ADDITIONAL ADDED LABELS:
	#5: Hippocampal commisure
	#6: Fornix

LABEL REFINEMENTS:
	Many of the labels have been refined to increase accuracy, in particular:
		hippocampus
		caudate
		thalamus
		lentiform
		corpus callosum
		cortical plate
# # # # # # # # # # # # # # # # # # # # # # 

Label key (all images):

   37 Hippocampus_L
   38 Hippocampus_R
   41 Amygdala_L
   42 Amygdala_R
   71 Caudate_L
   72 Caudate_R
   73 Lentiform_L
   74 Lentiform_R
   77 Thalamus_L
   78 Thalamus_R
   91 CorpusCallosum
   92 Lateral_Ventricle_L
   93 Lateral_Ventricle_R
   94 Brainstem
  100 Cerebellum_L
  101 Cerebellum_R
  108 Subthalamic_Nuc_L
  109 Subthalamic_Nuc_R
  110 Hippocampal_Comm
  111 Fornix
  112 Cortical_Plate_L
  113 Cortical_Plate_R
  114 Subplate_L
  115 Subplate_R
  116 Inter_Zone_L
  117 Inter_Zone_R
  118 Vent_Zone_L
  119 Vent_Zone_R
  120 White_Matter_L
  121 White_Matter_R
  122 Internal_Capsule_L
  123 Internal_Capsule_R
  124 CSF
  125 Misc

# # # # # # # # # # # # # # # # # # # # # # 

Michael Ebner, Feb 16, 2018:
- All image headers have been updated using fslreorient2std using `for i in *.nii.gz; do echo $i; fslreorient2std $i $i; done`
- _mask: binarized image labels
- _mask_dil: dilated binary masks; applied to SRR it approximates brain tissue only
- templates_info.json: Additional information on templates like volume

================================================
FILE: data/templates/templates_info.json
================================================
{
    "21": {
        "image": "STA21.nii.gz", 
        "mask": "STA21_mask.nii.gz", 
        "mask_dil": "STA21_mask_dil.nii.gz", 
        "volume_mask": 89246.38487071976, 
        "volume_mask_dil": 120038.46124333153
    }, 
    "22": {
        "image": "STA22.nii.gz", 
        "mask": "STA22_mask.nii.gz", 
        "mask_dil": "STA22_mask_dil.nii.gz", 
        "volume_mask": 101490.30689354343, 
        "volume_mask_dil": 134909.44540126887
    }, 
    "23": {
        "image": "STA23.nii.gz", 
        "mask": "STA23_mask.nii.gz", 
        "mask_dil": "STA23_mask_dil.nii.gz", 
        "volume_mask": 106235.50507484014, 
        "volume_mask_dil": 140715.503598928
    }, 
    "24": {
        "image": "STA24.nii.gz", 
        "mask": "STA24_mask.nii.gz", 
        "mask_dil": "STA24_mask_dil.nii.gz", 
        "volume_mask": 130878.99653601555, 
        "volume_mask_dil": 170357.1202916332
    }, 
    "25": {
        "image": "STA25.nii.gz", 
        "mask": "STA25_mask.nii.gz", 
        "mask_dil": "STA25_mask_dil.nii.gz", 
        "volume_mask": 178492.25774336213, 
        "volume_mask_dil": 227175.59493246424
    }, 
    "26": {
        "image": "STA26.nii.gz", 
        "mask": "STA26_mask.nii.gz", 
        "mask_dil": "STA26_mask_dil.nii.gz", 
        "volume_mask": 201635.08283969283, 
        "volume_mask_dil": 253806.15093200956
    }, 
    "27": {
        "image": "STA27.nii.gz", 
        "mask": "STA27_mask.nii.gz", 
        "mask_dil": "STA27_mask_dil.nii.gz", 
        "volume_mask": 210435.81779203523, 
        "volume_mask_dil": 263941.1528740433
    }, 
    "28": {
        "image": "STA28.nii.gz", 
        "mask": "STA28_mask.nii.gz", 
        "mask_dil": "STA28_mask_dil.nii.gz", 
        "volume_mask": 233175.18840337868, 
        "volume_mask_dil": 290329.5337829808
    }, 
    "29": {
        "image": "STA29.nii.gz", 
        "mask": "STA29_mask.nii.gz", 
        "mask_dil": "STA29_mask_dil.nii.gz", 
        "volume_mask": 257051.194746539, 
        "volume_mask_dil": 317684.56706204003
    }, 
    "30": {
        "image": "STA30.nii.gz", 
        "mask": "STA30_mask.nii.gz", 
        "mask_dil": "STA30_mask_dil.nii.gz", 
        "volume_mask": 282285.5319890282, 
        "volume_mask_dil": 346364.6513653975
    }, 
    "31": {
        "image": "STA31.nii.gz", 
        "mask": "STA31_mask.nii.gz", 
        "mask_dil": "STA31_mask_dil.nii.gz", 
        "volume_mask": 312587.62620157294, 
        "volume_mask_dil": 380993.6413300073
    }, 
    "32": {
        "image": "STA32.nii.gz", 
        "mask": "STA32_mask.nii.gz", 
        "mask_dil": "STA32_mask_dil.nii.gz", 
        "volume_mask": 340744.4484698328, 
        "volume_mask_dil": 413634.54276009236
    }, 
    "33": {
        "image": "STA33.nii.gz", 
        "mask": "STA33_mask.nii.gz", 
        "mask_dil": "STA33_mask_dil.nii.gz", 
        "volume_mask": 356126.40670901025, 
        "volume_mask_dil": 430765.4864316511
    }, 
    "34": {
        "image": "STA34.nii.gz", 
        "mask": "STA34_mask.nii.gz", 
        "mask_dil": "STA34_mask_dil.nii.gz", 
        "volume_mask": 392819.77292167663, 
        "volume_mask_dil": 472869.6483262277
    }, 
    "35": {
        "image": "STA35.nii.gz", 
        "mask": "STA35_mask.nii.gz", 
        "mask_dil": "STA35_mask_dil.nii.gz", 
        "volume_mask": 418491.86852033855, 
        "volume_mask_dil": 502023.33085117553
    }, 
    "36": {
        "image": "STA36.nii.gz", 
        "mask": "STA36_mask.nii.gz", 
        "mask_dil": "STA36_mask_dil.nii.gz", 
        "volume_mask": 422497.7414778769, 
        "volume_mask_dil": 506874.512634493
    }, 
    "37": {
        "image": "STA37.nii.gz", 
        "mask": "STA37_mask.nii.gz", 
        "mask_dil": "STA37_mask_dil.nii.gz", 
        "volume_mask": 390531.14151572104, 
        "volume_mask_dil": 470833.9439705052
    }
}

================================================
FILE: doc/doxyfile
================================================
# Doxyfile 1.8.9.1

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
# TAG = value [value, ...]
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").

#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------

# This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.

DOXYFILE_ENCODING      = UTF-8

# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the
# project for which the documentation is generated. This name is used in the
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME           = "Motion Correction and Volumetric Image Reconstruction of 2D Ultra-fast MRI"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER         = 

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF          = 

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO           = 

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY       = "./"

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
# will distribute the generated files over these directories. Enabling this
# option can be useful when feeding doxygen a huge amount of source files, where
# putting all generated files in the same directory would otherwise causes
# performance problems for the file system.
# The default value is: NO.

CREATE_SUBDIRS         = NO

# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
# characters to appear in the names of generated files. If set to NO, non-ASCII
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
# U+3044.
# The default value is: NO.

ALLOW_UNICODE_NAMES    = NO

# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
# Ukrainian and Vietnamese.
# The default value is: English.

OUTPUT_LANGUAGE        = English

# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.
# The default value is: YES.

BRIEF_MEMBER_DESC      = YES

# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
# description of a member or function before the detailed description
#
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
# The default value is: YES.

REPEAT_BRIEF           = YES

# This tag implements a quasi-intelligent brief description abbreviator that is
# used to form the text in various listings. Each string in this list, if found
# as the leading text of the brief description, will be stripped from the text
# and the result, after processing the whole list, is used as the annotated
# text. Otherwise, the brief description is used as-is. If left blank, the
# following values are used ($name is automatically replaced with the name of
# the entity):The $name class, The $name widget, The $name file, is, provides,
# specifies, contains, represents, a, an and the.

ABBREVIATE_BRIEF       = "The $name class" \
                         "The $name widget" \
                         "The $name file" \
                         is \
                         provides \
                         specifies \
                         contains \
                         represents \
                         a \
                         an \
                         the

# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# doxygen will generate a detailed section even if there is only a brief
# description.
# The default value is: NO.

ALWAYS_DETAILED_SEC    = NO

# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
# The default value is: NO.

INLINE_INHERITED_MEMB  = YES

# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
# before files name in the file list and in the header files. If set to NO the
# shortest path that makes the file name unique will be used
# The default value is: YES.

FULL_PATH_NAMES        = YES

# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
# part of the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the path to
# strip.
#
# Note that you can specify absolute paths here, but also relative paths, which
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH        = 

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
# header file to include in order to use a class. If left blank only the name of
# the header file containing the class definition is used. Otherwise one should
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.

STRIP_FROM_INC_PATH    = 

# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
# support long names like on DOS, Mac, or CD-ROM.
# The default value is: NO.

SHORT_NAMES            = NO

# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
# first line (until the first dot) of a Javadoc-style comment as the brief
# description. If set to NO, the Javadoc-style will behave just like regular Qt-
# style comments (thus requiring an explicit @brief command for a brief
# description.)
# The default value is: NO.

JAVADOC_AUTOBRIEF      = NO

# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
# line (until the first dot) of a Qt-style comment as the brief description. If
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
# requiring an explicit \brief command for a brief description.)
# The default value is: NO.

QT_AUTOBRIEF           = NO

# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
# a brief description. This used to be the default behavior. The new default is
# to treat a multi-line C++ comment block as a detailed description. Set this
# tag to YES if you prefer the old behavior instead.
#
# Note that setting this tag to YES also means that rational rose comments are
# not recognized any more.
# The default value is: NO.

MULTILINE_CPP_IS_BRIEF = NO

# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
# documentation from any documented member that it re-implements.
# The default value is: YES.

INHERIT_DOCS           = YES

# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
# page for each member. If set to NO, the documentation of a member will be part
# of the file/class/namespace that contains it.
# The default value is: NO.

SEPARATE_MEMBER_PAGES  = NO

# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
# uses this value to replace tabs by spaces in code fragments.
# Minimum value: 1, maximum value: 16, default value: 4.

TAB_SIZE               = 4

# This tag can be used to specify a number of aliases that act as commands in
# the documentation. An alias has the form:
# name=value
# For example adding
# "sideeffect=@par Side Effects:\n"
# will allow you to put the command \sideeffect (or @sideeffect) in the
# documentation, which will result in a user-defined paragraph with heading
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.

ALIASES                = 

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.

TCL_SUBST              = 

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
# members will be omitted, etc.
# The default value is: NO.

OPTIMIZE_OUTPUT_FOR_C  = NO

# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
# for that language. For instance, namespaces will be presented as packages,
# qualified scopes will look different, etc.
# The default value is: NO.

OPTIMIZE_OUTPUT_JAVA   = YES

# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
# sources. Doxygen will then generate output that is tailored for Fortran.
# The default value is: NO.

OPTIMIZE_FOR_FORTRAN   = NO

# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
# sources. Doxygen will then generate output that is tailored for VHDL.
# The default value is: NO.

OPTIMIZE_OUTPUT_VHDL   = NO

# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
# Fortran. In the later case the parser tries to guess whether the code is fixed
# or free formatted code, this is the default for Fortran type files), VHDL. For
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
#
# Note: For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.

EXTENSION_MAPPING      = 

# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
# The default value is: YES.

MARKDOWN_SUPPORT       = YES

# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
# globally by setting AUTOLINK_SUPPORT to NO.
# The default value is: YES.

AUTOLINK_SUPPORT       = YES

# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should set this
# tag to YES in order to let doxygen match functions declarations and
# definitions whose arguments contain STL classes (e.g. func(std::string);
# versus func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
# The default value is: NO.

BUILTIN_STL_SUPPORT    = NO

# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
# The default value is: NO.

CPP_CLI_SUPPORT        = NO

# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
# will parse them like normal C++ but will assume all classes use public instead
# of private inheritance when no explicit protection keyword is present.
# The default value is: NO.

SIP_SUPPORT            = NO

# For Microsoft's IDL there are propget and propput attributes to indicate
# getter and setter methods for a property. Setting this option to YES will make
# doxygen to replace the get and set methods by a property in the documentation.
# This will only work if the methods are indeed getting or setting a simple
# type. If this is not the case, or you want to show the methods anyway, you
# should set this option to NO.
# The default value is: YES.

IDL_PROPERTY_SUPPORT   = YES

# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
# The default value is: NO.

DISTRIBUTE_GROUP_DOC   = NO

# Set the SUBGROUPING tag to YES to allow class member groups of the same type
# (for instance a group of public functions) to be put as a subgroup of that
# type (e.g. under the Public Functions section). Set it to NO to prevent
# subgrouping. Alternatively, this can be done per class using the
# \nosubgrouping command.
# The default value is: YES.

SUBGROUPING            = YES

# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
# are shown inside the group in which they are included (e.g. using \ingroup)
# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
# and RTF).
#
# Note that this feature does not work in combination with
# SEPARATE_MEMBER_PAGES.
# The default value is: NO.

INLINE_GROUPED_CLASSES = NO

# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
# with only public data fields or simple typedef fields will be shown inline in
# the documentation of the scope in which they are defined (i.e. file,
# namespace, or group documentation), provided this scope is documented. If set
# to NO, structs, classes, and unions are shown on a separate page (for HTML and
# Man pages) or section (for LaTeX and RTF).
# The default value is: NO.

INLINE_SIMPLE_STRUCTS  = NO

# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
# enum is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
# with name TypeT. When disabled the typedef will appear as a member of a file,
# namespace, or class. And the struct will be named TypeS. This can typically be
# useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
# The default value is: NO.

TYPEDEF_HIDES_STRUCT   = NO

# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
# cache is used to resolve symbols given their name and scope. Since this can be
# an expensive process and often the same symbol appears multiple times in the
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
# doxygen will become slower. If the cache is too large, memory is wasted. The
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
# symbols. At the end of a run doxygen will report the cache usage and suggest
# the optimal cache size from a speed point of view.
# Minimum value: 0, maximum value: 9, default value: 0.

LOOKUP_CACHE_SIZE      = 0

#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------

# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
# documentation are documented, even if no documentation was available. Private
# class members and static file members will be hidden unless the
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
# Note: This will also disable the warnings about undocumented members that are
# normally produced when WARNINGS is set to YES.
# The default value is: NO.

EXTRACT_ALL            = YES

# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
# The default value is: NO.

EXTRACT_PRIVATE        = YES

# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.

EXTRACT_PACKAGE        = YES

# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
# included in the documentation.
# The default value is: NO.

EXTRACT_STATIC         = YES

# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO,
# only classes defined in header files are included. Does not have any effect
# for Java sources.
# The default value is: YES.

EXTRACT_LOCAL_CLASSES  = YES

# This flag is only useful for Objective-C code. If set to YES, local methods,
# which are defined in the implementation section but not in the interface are
# included in the documentation. If set to NO, only methods in the interface are
# included.
# The default value is: NO.

EXTRACT_LOCAL_METHODS  = YES

# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
# 'anonymous_namespace{file}', where file will be replaced with the base name of
# the file that contains the anonymous namespace. By default anonymous namespace
# are hidden.
# The default value is: NO.

EXTRACT_ANON_NSPACES   = NO

# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
# members will be included in the various overviews, but no documentation
# section is generated. This option has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.

HIDE_UNDOC_MEMBERS     = NO

# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy. If set
# to NO, these classes will be included in the various overviews. This option
# has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.

HIDE_UNDOC_CLASSES     = NO

# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# (class|struct|union) declarations. If set to NO, these declarations will be
# included in the documentation.
# The default value is: NO.

HIDE_FRIEND_COMPOUNDS  = NO

# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
# documentation blocks found inside the body of a function. If set to NO, these
# blocks will be appended to the function's detailed documentation block.
# The default value is: NO.

HIDE_IN_BODY_DOCS      = NO

# The INTERNAL_DOCS tag determines if documentation that is typed after a
# \internal command is included. If the tag is set to NO then the documentation
# will be excluded. Set it to YES to include the internal documentation.
# The default value is: NO.

INTERNAL_DOCS          = NO

# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
# names in lower-case letters. If set to YES, upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
# The default value is: system dependent.

CASE_SENSE_NAMES       = NO

# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
# their full class and namespace scopes in the documentation. If set to YES, the
# scope will be hidden.
# The default value is: NO.

HIDE_SCOPE_NAMES       = NO

# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
# append additional text to a page's title, such as Class Reference. If set to
# YES the compound reference will be hidden.
# The default value is: NO.

HIDE_COMPOUND_REFERENCE= NO

# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
# the files that are included by a file in the documentation of that file.
# The default value is: YES.

SHOW_INCLUDE_FILES     = YES

# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
# grouped member an include statement to the documentation, telling the reader
# which file to include in order to use the member.
# The default value is: NO.

SHOW_GROUPED_MEMB_INC  = NO

# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
# files with double quotes in the documentation rather than with sharp brackets.
# The default value is: NO.

FORCE_LOCAL_INCLUDES   = NO

# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
# documentation for inline members.
# The default value is: YES.

INLINE_INFO            = YES

# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
# (detailed) documentation of file and class members alphabetically by member
# name. If set to NO, the members will appear in declaration order.
# The default value is: YES.

SORT_MEMBER_DOCS       = YES

# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
# name. If set to NO, the members will appear in declaration order. Note that
# this will also influence the order of the classes in the class list.
# The default value is: NO.

SORT_BRIEF_DOCS        = NO

# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
# (brief and detailed) documentation of class members so that constructors and
# destructors are listed first. If set to NO the constructors will appear in the
# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
# member documentation.
# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
# detailed member documentation.
# The default value is: NO.

SORT_MEMBERS_CTORS_1ST = NO

# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
# of group names into alphabetical order. If set to NO the group names will
# appear in their defined order.
# The default value is: NO.

SORT_GROUP_NAMES       = NO

# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
# fully-qualified names, including namespaces. If set to NO, the class list will
# be sorted only by class name, not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option applies only to the class list, not to the alphabetical
# list.
# The default value is: NO.

SORT_BY_SCOPE_NAME     = NO

# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
# type resolution of all parameters of a function it will reject a match between
# the prototype and the implementation of a member function even if there is
# only one candidate or it is obvious which candidate to choose by doing a
# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
# accept a match between prototype and implementation in such cases.
# The default value is: NO.

STRICT_PROTO_MATCHING  = NO

# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
# list. This list is created by putting \todo commands in the documentation.
# The default value is: YES.

GENERATE_TODOLIST      = YES

# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
# list. This list is created by putting \test commands in the documentation.
# The default value is: YES.

GENERATE_TESTLIST      = YES

# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
# list. This list is created by putting \bug commands in the documentation.
# The default value is: YES.

GENERATE_BUGLIST       = YES

# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
# the deprecated list. This list is created by putting \deprecated commands in
# the documentation.
# The default value is: YES.

GENERATE_DEPRECATEDLIST= YES

# The ENABLED_SECTIONS tag can be used to enable conditional documentation
# sections, marked by \if <section_label> ... \endif and \cond <section_label>
# ... \endcond blocks.

ENABLED_SECTIONS       = 

# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
# initial value of a variable or macro / define can have for it to appear in the
# documentation. If the initializer consists of more lines than specified here
# it will be hidden. Use a value of 0 to hide initializers completely. The
# appearance of the value of individual variables and macros / defines can be
# controlled using \showinitializer or \hideinitializer command in the
# documentation regardless of this setting.
# Minimum value: 0, maximum value: 10000, default value: 30.

MAX_INITIALIZER_LINES  = 30

# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
# the bottom of the documentation of classes and structs. If set to YES, the
# list will mention the files that were used to generate the documentation.
# The default value is: YES.

SHOW_USED_FILES        = YES

# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
# will remove the Files entry from the Quick Index and from the Folder Tree View
# (if specified).
# The default value is: YES.

SHOW_FILES             = YES

# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
# page. This will remove the Namespaces entry from the Quick Index and from the
# Folder Tree View (if specified).
# The default value is: YES.

SHOW_NAMESPACES        = YES

# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
# the version control system). Doxygen will invoke the program by executing (via
# popen()) the command command input-file, where command is the value of the
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.

FILE_VERSION_FILTER    = 

# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. To create the layout file
# that represents doxygen's defaults, run doxygen with the -l option. You can
# optionally specify a file name after the option, if omitted DoxygenLayout.xml
# will be used as the name of the layout file.
#
# Note that if you run doxygen from a directory containing a file called
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.

LAYOUT_FILE            = 

# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references.

CITE_BIB_FILES         = 

#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------

# The QUIET tag can be used to turn on/off the messages that are generated to
# standard output by doxygen. If QUIET is set to YES this implies that the
# messages are off.
# The default value is: NO.

QUIET                  = NO

# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
# this implies that the warnings are on.
#
# Tip: Turn warnings on while writing the documentation.
# The default value is: YES.

WARNINGS               = YES

# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
# will automatically be disabled.
# The default value is: YES.

WARN_IF_UNDOCUMENTED   = YES

# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some parameters
# in a documented function, or documenting parameters that don't exist or using
# markup commands wrongly.
# The default value is: YES.

WARN_IF_DOC_ERROR      = YES

# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
# value. If set to NO, doxygen will only warn about wrong or incomplete
# parameter documentation, but not about the absence of documentation.
# The default value is: NO.

WARN_NO_PARAMDOC       = NO

# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
# will be replaced by the file and line number from which the warning originated
# and the warning text. Optionally the format may contain $version, which will
# be replaced by the version of the file (if it could be obtained via
# FILE_VERSION_FILTER)
# The default value is: $file:$line: $text.

WARN_FORMAT            = "$file:$line: $text"

# The WARN_LOGFILE tag can be used to specify a file to which warning and error
# messages should be written. If left blank the output is written to standard
# error (stderr).

WARN_LOGFILE           = 

#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------

# The INPUT tag is used to specify the files and/or directories that contain
# documented source files. You may enter file names like myfile.cpp or
# directories like /usr/src/myproject. Separate the files or directories with
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT                  = "../niftymic"

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.

INPUT_ENCODING         = UTF-8

# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
# *.h) to filter out the source-files in the directories. If left blank the
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.

FILE_PATTERNS          = *.c \
                         *.cc \
                         *.cxx \
                         *.cpp \
                         *.c++ \
                         *.java \
                         *.ii \
                         *.ixx \
                         *.ipp \
                         *.i++ \
                         *.inl \
                         *.idl \
                         *.ddl \
                         *.odl \
                         *.h \
                         *.hh \
                         *.hxx \
                         *.hpp \
                         *.h++ \
                         *.cs \
                         *.d \
                         *.php \
                         *.php4 \
                         *.php5 \
                         *.phtml \
                         *.inc \
                         *.m \
                         *.markdown \
                         *.md \
                         *.mm \
                         *.dox \
                         *.py \
                         *.f90 \
                         *.f \
                         *.for \
                         *.tcl \
                         *.vhd \
                         *.vhdl \
                         *.ucf \
                         *.qsf \
                         *.as \
                         *.js

# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
# The default value is: NO.

RECURSIVE              = YES

# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
#
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE                = 

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
# The default value is: NO.

EXCLUDE_SYMLINKS       = NO

# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
#
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS       = 

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
#
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*

EXCLUDE_SYMBOLS        = 

# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
# command).

EXAMPLE_PATH           = 

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
# *.h) to filter out the source-files in the directories. If left blank all
# files are included.

EXAMPLE_PATTERNS       = *

# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude commands
# irrespective of the value of the RECURSIVE tag.
# The default value is: NO.

EXAMPLE_RECURSIVE      = NO

# The IMAGE_PATH tag can be used to specify one or more files or directories
# that contain images that are to be included in the documentation (see the
# \image command).

IMAGE_PATH             = 

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
# by executing (via popen()) the command:
#
# <filter> <input-file>
#
# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
# name of an input file. Doxygen will then use the output that the filter
# program writes to standard output. If FILTER_PATTERNS is specified, this tag
# will be ignored.
#
# Note that the filter must not add or remove lines; it is applied before the
# code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly.

INPUT_FILTER           = 

# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form: pattern=filter
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
# patterns match the file name, INPUT_FILTER is applied.

FILTER_PATTERNS        = 

# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will also be used to filter the input files that are used for
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
# The default value is: NO.

FILTER_SOURCE_FILES    = NO

# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
# it is also possible to disable source filtering for a specific pattern using
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.

FILTER_SOURCE_PATTERNS = 

# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
# is part of the input, its contents will be placed on the main page
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.

USE_MDFILE_AS_MAINPAGE = 

#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------

# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
# generated. Documented entities will be cross-referenced with these sources.
#
# Note: To get rid of all source code in the generated output, make sure that
# also VERBATIM_HEADERS is set to NO.
# The default value is: NO.

SOURCE_BROWSER         = YES

# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
# The default value is: NO.

INLINE_SOURCES         = NO

# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
# special comment blocks from generated source code fragments. Normal C, C++ and
# Fortran comments will always remain visible.
# The default value is: YES.

STRIP_CODE_COMMENTS    = YES

# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
# function all documented functions referencing it will be listed.
# The default value is: NO.

REFERENCED_BY_RELATION = NO

# If the REFERENCES_RELATION tag is set to YES then for each documented function
# all documented entities called/used by that function will be listed.
# The default value is: NO.

REFERENCES_RELATION    = NO

# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
# to YES then the hyperlinks from functions in REFERENCES_RELATION and
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
# link to the documentation.
# The default value is: YES.

REFERENCES_LINK_SOURCE = YES

# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
# source code will show a tooltip with additional information such as prototype,
# brief description and links to the definition and documentation. Since this
# will make the HTML file larger and loading of large files a bit slower, you
# can opt to disable this feature.
# The default value is: YES.
# This tag requires that the tag SOURCE_BROWSER is set to YES.

SOURCE_TOOLTIPS        = YES

# If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system
# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
# - Install the latest version of global
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
# - Make sure the INPUT points to the root of the source tree
# - Run doxygen as normal
#
# Doxygen will invoke htags (and that will in turn invoke gtags), so these
# tools must be available from the command line (i.e. in the search path).
#
# The result: instead of the source browser generated by doxygen, the links to
# source code will now point to the output of htags.
# The default value is: NO.
# This tag requires that the tag SOURCE_BROWSER is set to YES.

USE_HTAGS              = NO

# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
# verbatim copy of the header file for each class for which an include is
# specified. Set to NO to disable this.
# See also: Section \class.
# The default value is: YES.

VERBATIM_HEADERS       = YES

# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
# cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type
# information.
# Note: The availability of this option depends on whether or not doxygen was
# compiled with the --with-libclang option.
# The default value is: NO.

CLANG_ASSISTED_PARSING = NO

# If clang assisted parsing is enabled you can provide the compiler with command
# line options that you would normally use when invoking the compiler. Note that
# the include paths will already be set by doxygen for the files and directories
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.

CLANG_OPTIONS          = 

#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------

# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
# compounds will be generated. Enable this if the project contains a lot of
# classes, structs, unions or interfaces.
# The default value is: YES.

ALPHABETICAL_INDEX     = YES

# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
# which the alphabetical index list will be split.
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.

COLS_IN_ALPHA_INDEX    = 5

# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.

IGNORE_PREFIX          = 

#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------

# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.

GENERATE_HTML          = YES

# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_OUTPUT            = html

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
# The default value is: .html.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_FILE_EXTENSION    = .html

# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
# each generated HTML page. If the tag is left blank doxygen will generate a
# standard header.
#
# To get valid HTML the header file that includes any scripts and style sheets
# that doxygen needs, which is dependent on the configuration options used (e.g.
# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
# default header using
# doxygen -w html new_header.html new_footer.html new_stylesheet.css
# YourConfigFile
# and then modify the file new_header.html. See also section "Doxygen usage"
# for information on how to generate the default header that doxygen normally
# uses.
# Note: The header is subject to change so you typically have to regenerate the
# default header when upgrading to a newer version of doxygen. For a description
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_HEADER            = 

# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
# footer. See HTML_HEADER for more information on how to generate a default
# footer and what special commands can be used inside the footer. See also
# section "Doxygen usage" for information on how to generate the default footer
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_FOOTER            = 

# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
# the HTML output. If left blank doxygen will generate a default style sheet.
# See also section "Doxygen usage" for information on how to generate the style
# sheet that doxygen normally uses.
# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
# it is more robust and this tag (HTML_STYLESHEET) will in the future become
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_STYLESHEET        = 

# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# cascading style sheets that are included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
# standard style sheet and is therefore more robust against future updates.
# Doxygen will copy the style sheet files to the output directory.
# Note: The order of the extra style sheet files is of importance (e.g. the last
# style sheet in the list overrules the setting of the previous ones in the
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET  = 

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
# that these files will be copied to the base HTML output directory. Use the
# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_FILES       = 

# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_HUE    = 220

# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
# in the HTML output. For a value of 0 the output will use grayscales only. A
# value of 255 will produce the most vivid colors.
# Minimum value: 0, maximum value: 255, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_SAT    = 100

# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
# luminance component of the colors in the HTML output. Values below 100
# gradually make the output lighter, whereas values above 100 make the output
# darker. The value divided by 100 is the actual gamma applied, so 80 represents
# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
# change the gamma.
# Minimum value: 40, maximum value: 240, default value: 80.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_GAMMA  = 80

# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
# to NO can help when comparing the output of multiple runs.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_TIMESTAMP         = YES

# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_DYNAMIC_SECTIONS  = NO

# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
# shown in the various tree structured indices initially; the user can expand
# and collapse entries dynamically later on. Doxygen will expand the tree to
# such a level that at most the specified number of entries are visible (unless
# a fully collapsed tree already exceeds this amount). So setting the number of
# entries 1 will produce a full collapsed tree by default. 0 is a special value
# representing an infinite number of entries and will result in a full expanded
# tree by default.
# Minimum value: 0, maximum value: 9999, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_INDEX_NUM_ENTRIES = 100

# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
# Makefile in the HTML output directory. Running make will produce the docset in
# that directory and running make install will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_DOCSET        = NO

# This tag determines the name of the docset feed. A documentation feed provides
# an umbrella under which multiple documentation sets from a single provider
# (such as a company or product suite) can be grouped.
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.

DOCSET_FEEDNAME        = "Doxygen generated docs"

# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_DOCSET is set to YES.

DOCSET_BUNDLE_ID       = org.doxygen.Project

# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
# the documentation publisher. This should be a reverse domain-name style
# string, e.g. com.mycompany.MyDocSet.documentation.
# The default value is: org.doxygen.Publisher.
# This tag requires that the tag GENERATE_DOCSET is set to YES.

DOCSET_PUBLISHER_ID    = org.doxygen.Publisher

# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
# The default value is: Publisher.
# This tag requires that the tag GENERATE_DOCSET is set to YES.

DOCSET_PUBLISHER_NAME  = Publisher

# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
# Windows.
#
# The HTML Help Workshop contains a compiler that can convert all HTML output
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
# files are now used as the Windows 98 help format, and will replace the old
# Windows help format (.hlp) on all Windows platforms in the future. Compressed
# HTML files also contain an index, a table of contents, and you can search for
# words in the documentation. The HTML workshop also contains a viewer for
# compressed HTML files.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_HTMLHELP      = NO

# The CHM_FILE tag can be used to specify the file name of the resulting .chm
# file. You can add a path in front of the file if the result should not be
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

CHM_FILE               = 

# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
# doxygen will try to run the HTML help compiler on the generated index.hhp.
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

HHC_LOCATION           = 

# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

GENERATE_CHI           = NO

# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

CHM_INDEX_ENCODING     = 

# The BINARY_TOC flag controls whether a binary table of contents is generated
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
# enables the Previous and Next buttons.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

BINARY_TOC             = NO

# The TOC_EXPAND flag can be set to YES to add extra items for group members to
# the table of contents of the HTML help documentation and to the tree view.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

TOC_EXPAND             = NO

# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
# (.qch) of the generated HTML documentation.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_QHP           = NO

# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
# the file name of the resulting .qch file. The path specified is relative to
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.

QCH_FILE               = 

# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.

QHP_NAMESPACE          = org.doxygen.Project

# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.

QHP_VIRTUAL_FOLDER     = doc

# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.

QHP_CUST_FILTER_NAME   = 

# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.

QHP_CUST_FILTER_ATTRS  = 

# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.

QHP_SECT_FILTER_ATTRS  = 

# The QHG_LOCATION tag can be used to specify the location of Qt's
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
# generated .qhp file.
# This tag requires that the tag GENERATE_QHP is set to YES.

QHG_LOCATION           = 

# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
# generated, together with the HTML files, they form an Eclipse help plugin. To
# install this plugin and make it available under the help contents menu in
# Eclipse, the contents of the directory containing the HTML and XML files needs
# to be copied into the plugins directory of eclipse. The name of the directory
# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
# After copying Eclipse needs to be restarted before the help appears.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_ECLIPSEHELP   = NO

# A unique identifier for the Eclipse help plugin. When installing the plugin
# the directory name containing the HTML and XML files should also have this
# name. Each documentation set should have its own identifier.
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.

ECLIPSE_DOC_ID         = org.doxygen.Project

# If you want full control over the layout of the generated HTML pages it might
# be necessary to disable the index and replace it with your own. The
# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
# of each HTML page. A value of NO enables the index and the value YES disables
# it. Since the tabs in the index contain the same information as the navigation
# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

DISABLE_INDEX          = NO

# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
# structure should be generated to display hierarchical information. If the tag
# value is set to YES, a side panel will be generated containing a tree-like
# index structure (just like the one that is generated for HTML Help). For this
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
# (i.e. any modern browser). Windows users are probably better off using the
# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
# further fine-tune the look of the index. As an example, the default style
# sheet generated by doxygen has an example that shows how to put an image at
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
# the same information as the tab index, you could consider setting
# DISABLE_INDEX to YES when enabling this option.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_TREEVIEW      = YES

# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
# doxygen will group on one line in the generated HTML documentation.
#
# Note that a value of 0 will completely suppress the enum values from appearing
# in the overview section.
# Minimum value: 0, maximum value: 20, default value: 4.
# This tag requires that the tag GENERATE_HTML is set to YES.

ENUM_VALUES_PER_LINE   = 4

# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
# to set the initial width (in pixels) of the frame in which the tree is shown.
# Minimum value: 0, maximum value: 1500, default value: 250.
# This tag requires that the tag GENERATE_HTML is set to YES.

TREEVIEW_WIDTH         = 250

# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
# external symbols imported via tag files in a separate window.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

EXT_LINKS_IN_WINDOW    = NO

# Use this tag to change the font size of LaTeX formulas included as images in
# the HTML documentation. When you change the font size after a successful
# doxygen run you need to manually remove any form_*.png images from the HTML
# output directory to force them to be regenerated.
# Minimum value: 8, maximum value: 50, default value: 10.
# This tag requires that the tag GENERATE_HTML is set to YES.

FORMULA_FONTSIZE       = 10

# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#
# Note that when changing this option you need to delete any form_*.png files in
# the HTML output directory before the changes have effect.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.

FORMULA_TRANSPARENT    = YES

# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
# to it using the MATHJAX_RELPATH option.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

USE_MATHJAX            = NO

# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see:
# http://docs.mathjax.org/en/latest/output.html) for more details.
# Possible values are: HTML-CSS (which is slower, but has the best
# compatibility), NativeMML (i.e. MathML) and SVG.
# The default value is: HTML-CSS.
# This tag requires that the tag USE_MATHJAX is set to YES.

MATHJAX_FORMAT         = HTML-CSS

# When MathJax is enabled you need to specify the location relative to the HTML
# output directory using the MATHJAX_RELPATH option. The destination directory
# should contain the MathJax.js script. For instance, if the mathjax directory
# is located at the same level as the HTML output directory, then
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of
# MathJax from http://www.mathjax.org before deployment.
# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.

MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest

# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
# extension names that should be enabled during MathJax rendering. For example
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.

MATHJAX_EXTENSIONS     = 

# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.

MATHJAX_CODEFILE       = 

# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and
# should work on any modern browser. Note that when using HTML help
# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
# there is already a search function so this one should typically be disabled.
# For large projects the javascript based search engine can be slow, then
# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
# search using the keyboard; to jump to the search box use <access key> + S
# (what the <access key> is depends on the OS and browser, but it is typically
# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
# key> to jump into the search results window, the results can be navigated
# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
# the search. The filter options can be selected when the cursor is inside the
# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
# to select a filter and <Enter> or <escape> to activate or cancel the filter
# option.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.

SEARCHENGINE           = YES

# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript. There
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
# setting. When disabled, doxygen will generate a PHP script for searching and
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
# and searching needs to be provided by external tools. See the section
# "External Indexing and Searching" for details.
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.

SERVER_BASED_SEARCH    = NO

# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
# script for searching. Instead the search results are written to an XML file
# which needs to be processed by an external indexer. Doxygen will invoke an
# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
# search results.
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.

EXTERNAL_SEARCH        = NO

# The SEARCHENGINE_URL should point to a search engine hosted by a web server
# which will return the search results when EXTERNAL_SEARCH is enabled.
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.

SEARCHENGINE_URL       = 

# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
# search data is written to a file for indexing by an external tool. With the
# SEARCHDATA_FILE tag the name of this file can be specified.
# The default file is: searchdata.xml.
# This tag requires that the tag SEARCHENGINE is set to YES.

SEARCHDATA_FILE        = searchdata.xml

# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.

EXTERNAL_SEARCH_ID     = 

# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
# projects other than the one defined by this configuration file, but that are
# all added to the same external search index. Each project needs to have a
# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
# to a relative location where the documentation can be found. The format is:
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.

EXTRA_SEARCH_MAPPINGS  = 

#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------

# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.

GENERATE_LATEX         = YES

# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: latex.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_OUTPUT           = latex

# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked.
#
# Note that when enabling USE_PDFLATEX this option is only used for generating
# bitmaps for formulas in the HTML output, but not in the Makefile that is
# written to the output directory.
# The default file is: latex.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_CMD_NAME         = latex

# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
# index for LaTeX.
# The default file is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.

MAKEINDEX_CMD_NAME     = makeindex

# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

COMPACT_LATEX          = NO

# The PAPER_TYPE tag can be used to set the paper type that is used by the
# printer.
# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
# 14 inches) and executive (7.25 x 10.5 inches).
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.

PAPER_TYPE             = a4

# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. To get the times font for
# instance you can specify
# EXTRA_PACKAGES=times
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.

EXTRA_PACKAGES         = amsmath,amssymb,latexsym

# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
# generated LaTeX document. The header should contain everything until the first
# chapter. If it is left blank doxygen will generate a standard header. See
# section "Doxygen usage" for information on how to let doxygen write the
# default header to a separate file.
#
# Note: Only use a user-defined header if you know what you are doing! The
# following commands have a special meaning inside the header: $title,
# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
# string, for the replacement values of the other commands the user is referred
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_HEADER           = 

# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
# generated LaTeX document. The footer should contain everything after the last
# chapter. If it is left blank doxygen will generate a standard footer. See
# LATEX_HEADER for more information on how to generate a default footer and what
# special commands can be used inside the footer.
#
# Note: Only use a user-defined footer if you know what you are doing!
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_FOOTER           = 

# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# LaTeX style sheets that are included after the standard style sheets created
# by doxygen. Using this option one can overrule certain style aspects. Doxygen
# will copy the style sheet files to the output directory.
# Note: The order of the extra style sheet files is of importance (e.g. the last
# style sheet in the list overrules the setting of the previous ones in the
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_EXTRA_STYLESHEET = 

# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the LATEX_OUTPUT output
# directory. Note that the files will be copied as-is; there are no commands or
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_EXTRA_FILES      = 

# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
# contain links (just like the HTML output) instead of page references. This
# makes the output suitable for online browsing using a PDF viewer.
# The default value is: YES.
# This tag requires that the tag GENERATE_LATEX is set to YES.

PDF_HYPERLINKS         = YES

# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
# higher quality PDF documentation.
# The default value is: YES.
# This tag requires that the tag GENERATE_LATEX is set to YES.

USE_PDFLATEX           = YES

# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
# command to the generated LaTeX files. This will instruct LaTeX to keep running
# if errors occur, instead of asking the user for help. This option is also used
# when generating formulas in HTML.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_BATCHMODE        = NO

# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
# index chapters (such as File Index, Compound Index, etc.) in the output.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_HIDE_INDICES     = NO

# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
# code with syntax highlighting in the LaTeX output.
#
# Note that which sources are shown also depends on other settings such as
# SOURCE_BROWSER.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_SOURCE_CODE      = NO

# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_BIB_STYLE        = plain

#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------

# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
# RTF output is optimized for Word 97 and may not look too pretty with other RTF
# readers/editors.
# The default value is: NO.

GENERATE_RTF           = NO

# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: rtf.
# This tag requires that the tag GENERATE_RTF is set to YES.

RTF_OUTPUT             = rtf

# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.

COMPACT_RTF            = NO

# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
# contain hyperlink fields. The RTF file will contain links (just like the HTML
# output) instead of page references. This makes the output suitable for online
# browsing using Word or some other Word compatible readers that support those
# fields.
#
# Note: WordPad (write) and others do not support links.
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.

RTF_HYPERLINKS         = NO

# Load stylesheet definitions from file. Syntax is similar to doxygen's config
# file, i.e. a series of assignments. You only have to provide replacements,
# missing definitions are set to their default value.
#
# See also section "Doxygen usage" for information on how to generate the
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.

RTF_STYLESHEET_FILE    = 

# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config file. A template extensions file can be generated
# using doxygen -e rtf extensionFile.
# This tag requires that the tag GENERATE_RTF is set to YES.

RTF_EXTENSIONS_FILE    = 

# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
# with syntax highlighting in the RTF output.
#
# Note that which sources are shown also depends on other settings such as
# SOURCE_BROWSER.
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.

RTF_SOURCE_CODE        = NO

#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------

# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
# classes and files.
# The default value is: NO.

GENERATE_MAN           = NO

# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it. A directory man3 will be created inside the directory specified by
# MAN_OUTPUT.
# The default directory is: man.
# This tag requires that the tag GENERATE_MAN is set to YES.

MAN_OUTPUT             = man

# The MAN_EXTENSION tag determines the extension that is added to the generated
# man pages. In case the manual section does not start with a number, the number
# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
# optional.
# The default value is: .3.
# This tag requires that the tag GENERATE_MAN is set to YES.

MAN_EXTENSION          = .3

# The MAN_SUBDIR tag determines the name of the directory created within
# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.

MAN_SUBDIR             = 

# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
# will generate one additional man file for each entity documented in the real
# man page(s). These additional files only source the real man page, but without
# them the man command would be unable to find the correct page.
# The default value is: NO.
# This tag requires that the tag GENERATE_MAN is set to YES.

MAN_LINKS              = NO

#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------

# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
# captures the structure of the code including all documentation.
# The default value is: NO.

GENERATE_XML           = NO

# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: xml.
# This tag requires that the tag GENERATE_XML is set to YES.

XML_OUTPUT             = xml

# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to
# the XML output. Note that enabling this will significantly increase the size
# of the XML output.
# The default value is: YES.
# This tag requires that the tag GENERATE_XML is set to YES.

XML_PROGRAMLISTING     = YES

#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------

# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
# that can be used to generate PDF.
# The default value is: NO.

GENERATE_DOCBOOK       = NO

# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
# front of it.
# The default directory is: docbook.
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.

DOCBOOK_OUTPUT         = docbook

# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
# program listings (including syntax highlighting and cross-referencing
# information) to the DOCBOOK output. Note that enabling this will significantly
# increase the size of the DOCBOOK output.
# The default value is: NO.
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.

DOCBOOK_PROGRAMLISTING = NO

#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------

# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
# structure of the code including all documentation. Note that this feature is
# still experimental and incomplete at the moment.
# The default value is: NO.

GENERATE_AUTOGEN_DEF   = NO

#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------

# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
# file that captures the structure of the code including all documentation.
#
# Note that this feature is still experimental and incomplete at the moment.
# The default value is: NO.

GENERATE_PERLMOD       = NO

# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
# output from the Perl module output.
# The default value is: NO.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.

PERLMOD_LATEX          = NO

# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
# formatted so it can be parsed by a human reader. This is useful if you want to
# understand what is going on. On the other hand, if this tag is set to NO, the
# size of the Perl module output will be much smaller and Perl will parse it
# just the same.
# The default value is: YES.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.

PERLMOD_PRETTY         = YES

# The names of the make variables in the generated doxyrules.make file are
# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
# so different doxyrules.make files included by the same Makefile don't
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.

PERLMOD_MAKEVAR_PREFIX = 

#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------

# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
# C-preprocessor directives found in the sources and include files.
# The default value is: YES.

ENABLE_PREPROCESSING   = YES

# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
# in the source code. If set to NO, only conditional compilation will be
# performed. Macro expansion can be done in a controlled way by setting
# EXPAND_ONLY_PREDEF to YES.
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

MACRO_EXPANSION        = NO

# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
# EXPAND_AS_DEFINED tags.
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

EXPAND_ONLY_PREDEF     = NO

# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

SEARCH_INCLUDES        = YES

# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by the
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.

INCLUDE_PATH           = 

# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
# directories. If left blank, the patterns specified with FILE_PATTERNS will be
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

INCLUDE_FILE_PATTERNS  = 

# The PREDEFINED tag can be used to specify one or more macro names that are
# defined before the preprocessor is started (similar to the -D option of e.g.
# gcc). The argument of the tag is a list of macros of the form: name or
# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
# is assumed. To prevent a macro definition from being undefined via #undef or
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED             = 

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
# macro definition that is found in the sources will be used. Use the PREDEFINED
# tag if you want to use a different macro definition that overrules the
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

EXPAND_AS_DEFINED      = 

# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all references to function-like macros that are alone on a line, have
# an all uppercase name, and do not end with a semicolon. Such function macros
# are typically used for boiler-plate code, and will confuse the parser if not
# removed.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

SKIP_FUNCTION_MACROS   = YES

#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------

# The TAGFILES tag can be used to specify one or more tag files. For each tag
# file the location of the external documentation should be added. The format of
# a tag file without this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where loc1 and loc2 can be relative or absolute paths or URLs. See the
# section "Linking to external documentation" for more information about the use
# of tag files.
# Note: Each tag file must have a unique name (where the name does NOT include
# the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here.

TAGFILES               = 

# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files.

GENERATE_TAGFILE       = 

# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
# the class index. If set to NO, only the inherited external classes will be
# listed.
# The default value is: NO.

ALLEXTERNALS           = NO

# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
# in the modules index. If set to NO, only the current project's groups will be
# listed.
# The default value is: YES.

EXTERNAL_GROUPS        = YES

# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
# the related pages index. If set to NO, only the current project's pages will
# be listed.
# The default value is: YES.

EXTERNAL_PAGES         = YES

# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of 'which perl').
# The default file (with absolute path) is: /usr/bin/perl.

PERL_PATH              = /usr/bin/perl

#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------

# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
# disabled, but it is recommended to install and use dot, since it yields more
# powerful graphs.
# The default value is: YES.

CLASS_DIAGRAMS         = YES

# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.

MSCGEN_PATH            = 

# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path.

DIA_PATH               = 

# If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class.
# The default value is: YES.

HIDE_UNDOC_RELATIONS   = NO

# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see:
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: NO.

HAVE_DOT               = YES

# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
# processors available in the system. You can set it explicitly to a value
# larger than 0 to get control over the balance between CPU load and processing
# speed.
# Minimum value: 0, maximum value: 32, default value: 0.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_NUM_THREADS        = 0

# When you want a differently looking font in the dot files that doxygen
# generates you can specify the font name using DOT_FONTNAME. You need to make
# sure dot is able to find the font, which can be done by putting it in a
# standard location or by setting the DOTFONTPATH environment variable or by
# setting DOT_FONTPATH to the directory containing the font.
# The default value is: Helvetica.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTNAME           = Helvetica

# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
# dot graphs.
# Minimum value: 4, maximum value: 24, default value: 10.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTSIZE           = 10

# By default doxygen will tell dot to use the default font as specified with
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTPATH           = 

# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
# each documented class showing the direct and indirect inheritance relations.
# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

CLASS_GRAPH            = YES

# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
# graph for each documented class showing the direct and indirect implementation
# dependencies (inheritance, containment, and class references variables) of the
# class with other documented classes.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

COLLABORATION_GRAPH    = YES

# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
# groups, showing the direct groups dependencies.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

GROUP_GRAPHS           = YES

# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

UML_LOOK               = YES

# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
# class node. If there are many fields or methods and many nodes the graph may
# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
# number of items for each type to make the size more manageable. Set this to 0
# for no limit. Note that the threshold may be exceeded by 50% before the limit
# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
# but if the number exceeds 15, the total amount of fields shown is limited to
# 10.
# Minimum value: 0, maximum value: 100, default value: 10.
# This tag requires that the tag HAVE_DOT is set to YES.

UML_LIMIT_NUM_FIELDS   = 100

# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
# collaboration graphs will show the relations between templates and their
# instances.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

TEMPLATE_RELATIONS     = NO

# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the
# direct and indirect include dependencies of the file with other documented
# files.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

INCLUDE_GRAPH          = YES

# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
# set to YES then doxygen will generate a graph for each documented file showing
# the direct and indirect include dependencies of the file with other documented
# files.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

INCLUDED_BY_GRAPH      = YES

# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
# dependency graph for every global function or class method.
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable call graphs for selected
# functions only using the \callgraph command.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

CALL_GRAPH             = YES

# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
# dependency graph for every global function or class method.
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable caller graphs for selected
# functions only using the \callergraph command.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

CALLER_GRAPH           = YES

# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
# hierarchy of all classes instead of a textual one.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

GRAPHICAL_HIERARCHY    = YES

# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
# dependencies a directory has on other directories in a graphical way. The
# dependency relations are determined by the #include relations between the
# files in the directories.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

DIRECTORY_GRAPH        = YES

# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot.
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
# to make the SVG files visible in IE 9+ (other browsers do not have this
# requirement).
# Possible values are: png, jpg, gif and svg.
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_IMAGE_FORMAT       = svg

# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
#
# Note that this requires a modern browser other than Internet Explorer. Tested
# and working are Firefox, Chrome, Safari, and Opera.
# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
# the SVG files visible. Older versions of IE do not have SVG support.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

INTERACTIVE_SVG        = YES

# The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_PATH               = 

# The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the \dotfile
# command).
# This tag requires that the tag HAVE_DOT is set to YES.

DOTFILE_DIRS           = 

# The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the \mscfile
# command).

MSCFILE_DIRS           = 

# The DIAFILE_DIRS tag can be used to specify one or more directories that
# contain dia files that are included in the documentation (see the \diafile
# command).

DIAFILE_DIRS           = 

# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
# path where java can find the plantuml.jar file. If left blank, it is assumed
# PlantUML is not used or called during a preprocessing step. Doxygen will
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.

PLANTUML_JAR_PATH      = 

# When using plantuml, the specified paths are searched for files specified by
# the !include statement in a plantuml block.

PLANTUML_INCLUDE_PATH  = 

# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
# that will be shown in the graph. If the number of nodes in a graph becomes
# larger than this value, doxygen will truncate the graph, which is visualized
# by representing a node as a red box. Note that doxygen if the number of direct
# children of the root node in a graph is already larger than
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
# Minimum value: 0, maximum value: 10000, default value: 50.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_GRAPH_MAX_NODES    = 50

# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
# generated by dot. A depth value of 3 means that only nodes reachable from the
# root by following a path via at most 3 edges will be shown. Nodes that lay
# further from the root node will be omitted. Note that setting this option to 1
# or 2 may greatly reduce the computation time needed for large code bases. Also
# note that the size of a graph can be further restricted by
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
# Minimum value: 0, maximum value: 1000, default value: 0.
# This tag requires that the tag HAVE_DOT is set to YES.

MAX_DOT_GRAPH_DEPTH    = 0

# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
# background. This is disabled by default, because dot on Windows does not seem
# to support this out of the box.
#
# Warning: Depending on the platform used, enabling this option may lead to
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
# read).
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_TRANSPARENT        = NO

# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
# this, this feature is disabled by default.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_MULTI_TARGETS      = NO

# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
# explaining the meaning of the various boxes and arrows in the dot generated
# graphs.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

GENERATE_LEGEND        = YES

# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
# files that are used to generate the various graphs.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_CLEANUP            = YES


================================================
FILE: docker/docker-compose.yml
================================================
# Comments:
#  - should work in principle, but not tested
#  - seems not possible to add two tags per "service" with one run
#  - existing docker images were created by executing Dockerfiles individually

# SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" docker-compose build 

version: "3.7"

services:

  itk_niftymic:
    build:
      context: ./itk_niftymic
      args:
        VERSION: v4.13.1-niftymic-v1
    image: itk_niftymic:v4.13.1-niftymic-v1

  simplereg_dependencies:
    build:
      context: ./simplereg_dependencies
    image: simplereg_dependencies:noitksnap

  niftymic:
    build:
      context: ./niftymic
      args:
        VERSION: latest
        FETAL_SEG_TOOL: monaifbs
    image: niftymic:latest



================================================
FILE: docker/itk_niftymic/.dockerignore
================================================
.git*
.cache

================================================
FILE: docker/itk_niftymic/Dockerfile
================================================
#
# Building of Docker image:
#   docker build --build-arg VERSION=v? -t renbem/itk_niftymic:v? -t renbem/itk_niftymic .

ARG VERSION=latest
ARG REPO=ITK_NiftyMIC
ARG IMAGE=python:3.6-slim

# -----------------------------------------------------------------------------
FROM $IMAGE as compile-image

ARG REPO
ARG VERSION

RUN apt-get update && \
    apt-get install -y \
        build-essential \
        cmake \
        git \
        && \
    rm -rf /var/lib/apt/lists/* 

RUN if [ "$VERSION" = "latest" ] ; then \
        git clone \
        https://github.com/gift-surg/${REPO}.git /code/${REPO}/${REPO} \
    ;else \
        git clone \
        --branch ${VERSION} \
        https://github.com/gift-surg/${REPO}.git /code/${REPO}/${REPO} \
    ;fi

RUN mkdir -p /code/${REPO}/${REPO}-build && \
    cd /code/${REPO}/${REPO}-build && \
    cmake \
        -D BUILD_EXAMPLES=OFF \
        -D BUILD_SHARED_LIBS=ON \
        -D BUILD_TESTING=OFF \
        -D CMAKE_BUILD_TYPE=Release \
        -D ITK_LEGACY_SILENT=ON \
        -D ITK_WRAP_covariant_vector_double=ON \
        -D ITK_WRAP_double=ON \
        -D ITK_WRAP_float=ON \
        -D ITK_WRAP_PYTHON=ON \
        -D ITK_WRAP_signed_char=ON \
        -D ITK_WRAP_signed_long=ON \
        -D ITK_WRAP_signed_short=ON \
        -D ITK_WRAP_unsigned_char=ON \
        -D ITK_WRAP_unsigned_long=ON \
        -D ITK_WRAP_unsigned_short=ON \
        -D ITK_WRAP_vector_double=ON \
        -D ITK_WRAP_vector_float=ON \
        -D Module_BridgeNumPy=ON \
        -D Module_ITKReview=ON \
        -D Module_SmoothingRecursiveYvvGaussianFilter=ON \
        /code/${REPO}/${REPO}
RUN cd /code/${REPO}/${REPO}-build && make -j 4

# install files to /usr/local
RUN cd /code/${REPO}/${REPO}-build && make install

# make shared libraries available to Python
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"

# remove unnecessary .git folders
RUN rm -r /code/${REPO}/${REPO}/.git*

# -----------------------------------------------------------------------------
FROM $IMAGE AS runtime-image

ARG REPO
ARG VERSION

LABEL author="Michael Ebner"
LABEL email="michael.ebner@kcl.ac.uk"
LABEL title="$REPO"
LABEL version="$VERSION"
LABEL uri="https://github.com/gift-surg/${REPO}"

# copy compiled ITK files and make libraries available to Python
COPY --from=compile-image /usr/local /usr/local
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"

# add Dockerfile to image
ADD Dockerfile /

# use bash with color output
RUN echo 'alias ls="ls --color=auto"' >> ~/.bashrc
CMD bash


================================================
FILE: docker/niftymic/.dockerignore
================================================
.git*
.cache

================================================
FILE: docker/niftymic/Dockerfile
================================================
#
# Building of Docker image with default monaifbs segmentation tool:
#   docker build --build-arg VERSION=v? -t renbem/niftymic:v? -t renbem/niftymic .
#
# If building with fetal_brain_seg as segmentation pipeline:
#   docker build --build-arg VERSION=v? --build-arg FETAL_SEG_TOOL=fetal_brain_seg -t renbem/niftymic:v? -t renbem/niftymic .

ARG VERSION=latest
ARG REPO=NiftyMIC
# default use monaifbs for segmentation. Define this arg as fetal_brain_seg to use previous app
# https://github.com/gift-surg/fetal_brain_seg.git
ARG FETAL_SEG_TOOL=monaifbs


# GUI with ITK-Snap does not work at the moment, unfortunately
ARG IMAGE=renbem/simplereg_dependencies:noitksnap

# -----------------------------------------------------------------------------
FROM $IMAGE as compile-image

ARG REPO
ARG VERSION
ARG FETAL_SEG_TOOL

RUN apt-get update && \
    apt-get install -y \
        build-essential \
        git \
        && \
    rm -rf /var/lib/apt/lists/* 

# download NiftyMIC
RUN if [ "$VERSION" = "latest" ] ; then \
        git clone \
        https://github.com/gift-surg/${REPO}.git /app/${REPO} \
    ;else \
        git clone \
        --branch ${VERSION} \
        https://github.com/gift-surg/${REPO}.git /app/${REPO} \
    ;fi

# fetch MONAIfbs and download pretrained model for MONAIfbs
RUN if [ "$FETAL_SEG_TOOL" = "monaifbs" ] ; then \
        cd /app/${REPO} && \
        git submodule update --init && \
        # fetch the pretrained model
        cd /app && \
        pip install zenodo-get && \
        zenodo_get 10.5281/zenodo.4282679 && \
        tar xvf models.tar.gz && \
        mv models /app/${REPO}/MONAIfbs/monaifbs/ && \
        # remove the downloaded compressed file
        rm -r /app/models.tar.gz \
    ;fi

# download fetal_brain_seg if required (need to create an empty directory for following copy, line 105)
RUN mkdir /app/fetal_brain_seg
ADD https://github.com/taigw/Demic/archive/v0.1.tar.gz /app/Demic-0.1.tar.gz
RUN if [ "$FETAL_SEG_TOOL" = "fetal_brain_seg" ] ; then \
        git clone \
        https://github.com/gift-surg/fetal_brain_seg.git /app/fetal_brain_seg  && \
        cd /app && \
        tar xvf Demic-0.1.tar.gz && \
        mv Demic-0.1 /app/fetal_brain_seg/Demic && \
        # remove unecessary .git folders
        rm -r /app/fetal_brain_seg/.git* && \
        rm -r /app/fetal_brain_seg/Demic/.git* \
    ;fi

# remove unnecessary folders
RUN rm -r /app/${REPO}/.git*
RUN rm -r /app/Demic-0.1.tar.gz

# -----------------------------------------------------------------------------
FROM $IMAGE AS runtime-image

ARG REPO
ARG VERSION
ARG FETAL_SEG_TOOL

LABEL author="Michael Ebner"
LABEL email="michael.ebner@kcl.ac.uk"
LABEL title="$REPO"
LABEL version="$VERSION"
LABEL uri="https://github.com/gift-surg/${REPO}"

# install NiftyMIC with specific python library versions
COPY --from=compile-image /app/${REPO} /app/${REPO}
WORKDIR /app/${REPO}
RUN apt-get update && \
    apt-get install -y \
        build-essential \
        nifti2dicom \
        && \
    rm -rf /var/lib/apt/lists/*

RUN pip install \
    matplotlib==3.1.1 \
    natsort==6.0.0 \
    nibabel==2.4.1 \
    nipype==1.2.0 \
    nose==1.3.7 \
    numpy==1.16.4 \
    pandas==0.25.0 \
    pydicom==1.3.0 \
    scikit_image==0.15.0 \
    scipy==1.3.0 \
    seaborn==0.9.0 \
    SimpleITK==1.2.4 \
    six==1.12.0 \
    pysitk==0.2.19 \
    simplereg==0.3.2 \
    nsol==0.1.14
# install monaifbs dependencies
RUN if [ "$FETAL_SEG_TOOL" = "monaifbs" ] ; then \
        pip install \
        torch==1.4.0 \
        torch-summary==1.4.3 \
        monai==0.3.0  \
        pyyaml==5.3.1 \
        pytorch-ignite==0.4.2 \
        tensorboard==2.3.0 \
    ;fi
# install packages for niftymic and monaifbs
RUN pip install -e .
RUN if [ "$FETAL_SEG_TOOL" = "monaifbs" ] ; then \
        pip install -e /app/${REPO}/MONAIfbs/ \
    ;fi

# prepare fetal_brain_seg with specific python library versions if required
COPY --from=compile-image /app/fetal_brain_seg /app/fetal_brain_seg
RUN if [ "$FETAL_SEG_TOOL" = "fetal_brain_seg" ] ; then \
        cd /app/fetal_brain_seg && \
        pip install \
        niftynet==0.2 \
        tensorflow==1.12.0 && \
        SITEDIR=$(python -m site --user-site) && \
        mkdir -p $SITEDIR && \
        echo /app/fetal_brain_seg > $SITEDIR/Demic.pth && \
        export FETAL_BRAIN_SEG=/app/fetal_brain_seg \
    ;else \
        rm -r /app/fetal_brain_seg \
    ;fi

# add Dockerfile to image
ADD Dockerfile /

WORKDIR /app

# use bash with color output
RUN echo 'alias ls="ls --color=auto"' >> ~/.bashrc
CMD bash

================================================
FILE: docker/simplereg_dependencies/.dockerignore
================================================
.git*
.cache

================================================
FILE: docker/simplereg_dependencies/Dockerfile
================================================
#
# Building of Docker image:
#   docker build -t renbem/simplereg_dependencies .
#   
# Run with GUI (however, does not work unfortunately):
#   xhost +local:docker  # needed only the first time
#   docker run --rm -ti --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" renbem/simplereg_dependencies

ARG VERSION=noitksnap
ARG REPO=SimpleReg-dependencies
ARG IMAGE=renbem/itk_niftymic:v4.13.1-niftymic-v1

# -----------------------------------------------------------------------------
FROM $IMAGE as compile-image-fsl

ARG REPO
ARG VERSION

RUN apt-get update && \
    apt-get install -y \
        build-essential \
        wget \
        && \
    rm -rf /var/lib/apt/lists/* 

# install FSL
RUN wget -O- http://neuro.debian.net/lists/stretch.au.full | \
    tee /etc/apt/sources.list.d/neurodebian.sources.list
RUN apt-key adv --recv-keys --keyserver \
    hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive \
        apt-get install -y fsl-core \
        && \
    rm -rf /var/lib/apt/lists/* 

# -----------------------------------------------------------------------------
FROM $IMAGE as compile-image-niftyreg

RUN apt-get update && \
    apt-get install -y \
        build-essential \
        cmake \
        git \
        && \
    rm -rf /var/lib/apt/lists/* 

# install NiftyReg
RUN git clone https://github.com/KCL-BMEIS/niftyreg.git /code/niftyreg
RUN mkdir -p /code/niftyreg-build && \
    mkdir -p /usr/share/niftyreg
RUN cd /code/niftyreg-build && \
    cmake \
        -D CMAKE_INSTALL_PREFIX=/usr/share/niftyreg \
        /code/niftyreg
RUN cd /code/niftyreg-build && make -j4
RUN cd /code/niftyreg-build && make install

# -----------------------------------------------------------------------------
FROM $IMAGE as compile-image-itksnap
# itksnap GUI not working unfortunately

# convert3D
ADD c3d-1.0.0-Linux-x86_64.tar.gz /code/
RUN mv /code/c3d-1.0.0-Linux-x86_64 /code/c3d

# itksnap with QT4 opens but GUI has issues then
# a)
ADD itksnap-3.8.0-20190612-Linux-x86_64-qt4.tar.gz /code/
RUN mv /code/itksnap-3.8.0-20190612-Linux-gcc64-qt4 /code/itksnap
# b)
# ADD itksnap-nightly-master-Linux-x86_64-qt4.tar.gz /code/
# RUN mv /code/itksnap-3.6.0-20170401-Linux-x86_64-qt4 /code/itksnap

# versions do not work: after 'itksnap', the following error:
# 
# [7]: The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.
# Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.
# D-Bus not built with -rdynamic so unable to print a backtrace
# Aborted (core dumped)
# 
# a)
# ADD itksnap-3.8.0-20190612-Linux-x86_64.tar.gz /code/
# RUN mv /code/itksnap-3.8.0-20190612-Linux-gcc64 /code/itksnap
# b)
# ADD itksnap-nightly-master-Linux-x86_64.tar.gz /code/
# RUN mv /code/itksnap-3.6.0-20170401-Linux-x86_64 /code/itksnap


# -----------------------------------------------------------------------------
FROM $IMAGE AS runtime-image

ARG REPO
ARG VERSION

LABEL author="Michael Ebner"
LABEL email="michael.ebner@kcl.ac.uk"
LABEL title="$REPO"
LABEL version="$VERSION"
LABEL uri="https://github.com/gift-surg/SimpleReg/wiki/simplereg-dependencies"

# copy compiled FSL files and link associated binaries
COPY --from=compile-image-fsl /etc/fsl /etc/fsl
COPY --from=compile-image-fsl /usr/lib /usr/lib
COPY --from=compile-image-fsl /usr/share/fsl /usr/share/fsl
COPY --from=compile-image-fsl /usr/bin/fsl5.0-* /usr/bin/
RUN ln -s /usr/bin/fsl5.0-flirt /usr/local/bin/flirt && \
    ln -s /usr/bin/fsl5.0-fslhd /usr/local/bin/fslhd && \
    ln -s /usr/bin/fsl5.0-fslmodhd /usr/local/bin/fslmodhd && \
    ln -s /usr/bin/fsl5.0-fslorient /usr/local/bin/fslorient && \
    ln -s /usr/bin/fsl5.0-fslreorient2std /usr/local/bin/fslreorient2std && \
    ln -s /usr/bin/fsl5.0-fslswapdim /usr/local/bin/fslswapdim && \
    ln -s /usr/bin/fsl5.0-bet /usr/local/bin/bet

# copy compiled NiftyReg files and link associated binaries
COPY --from=compile-image-niftyreg /usr/share/niftyreg /usr/share/niftyreg
ENV PATH="/usr/share/niftyreg/bin:$PATH"

# copy compiled itksnap files
COPY --from=compile-image-itksnap /code/c3d/bin /usr/local/bin
COPY --from=compile-image-itksnap /code/c3d/lib /usr/local/lib
COPY --from=compile-image-itksnap /code/c3d/share /usr/local/share

COPY --from=compile-image-itksnap /code/itksnap/bin /usr/local/bin
COPY --from=compile-image-itksnap /code/itksnap/lib /usr/local/lib

# to make use of itksnap GUI within docker (in principle;
# but errors/problems as above; thus, deactivated for now)
# RUN apt-get update && \
#     apt-get install -y \
#         wget \
#         libglu1 \
#         libcurl4-openssl-dev \
#         libsm6 \
#         libxt6 \
#         libfreetype6 \
#         libxrender1 \
#         libfontconfig1 \
#         libglib2.0-0 \
#         libqt4-dev \
#         libgtk2.0-dev \
#         curl \
#         libgtk2.0 \
#         qt5dxcb-plugin \
#         && \
#     rm -rf /var/lib/apt/lists/*
# RUN apt-get update && \
#     apt-get install -y \
#         libxcb1 libxcb1-dev \
#         libx11-dev \
#         libgl1-mesa-dev \
#         libxt-dev libxft-dev \
#         && \
#     rm -rf /var/lib/apt/lists/*
# ADD libpng12-0_1.2.54-1ubuntu1.1_amd64.deb /code/
# RUN dpkg -i /code/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb

# add Dockerfile to image
ADD Dockerfile /

# use bash with color output
RUN echo 'alias ls="ls --color=auto"' >> ~/.bashrc
CMD bash

================================================
FILE: niftymic/__about__.py
================================================
__author__ = "Michael Ebner"
__email__ = "michael.ebner@kcl.ac.uk"
__license__ = "BSD-3-Clause"
__version__ = "0.9"
__summary__ = "NiftyMIC is a research-focused toolkit for " \
    "motion-correction and volumetric image reconstruction of " \
    "2D ultra-fast MRI."


================================================
FILE: niftymic/__init__.py
================================================
from niftymic.__about__ import (
    __author__,
    __email__,
    __license__,
    __summary__,
    __version__,
 )

__all__ = [
    "__author__",
    "__email__",
    "__license__",
    "__summary__",
    "__version__",
]


================================================
FILE: niftymic/application/__init__.py
================================================


================================================
FILE: niftymic/application/correct_bias_field.py
================================================
##
# \file correct_bias_field.py
# \brief      Script to correct for bias field. Based on N4ITK
#
# \author     Michael Ebner (michael.ebner.14@ucl.ac.uk)
# \date       October 2017
#

# Import libraries
import numpy as np
import os

import niftymic.base.stack as st
import niftymic.base.data_writer as dw
import niftymic.utilities.n4_bias_field_correction as n4itk
import pysitk.python_helper as ph
import pysitk.simple_itk_helper as sitkh
from niftymic.utilities.input_arparser import InputArgparser

from niftymic.definitions import ALLOWED_EXTENSIONS


def main():

    time_start = ph.start_timing()

    np.set_printoptions(precision=3)

    input_parser = InputArgparser(
        description="Perform Bias Field correction using N4ITK.",
    )
    input_parser.add_filename(required=True)
    input_parser.add_output(required=True)
    input_parser.add_filename_mask()
    input_parser.add_option(
        option_string="--convergence-threshold",
        type=float,
        help="Specify the convergence threshold.",
        default=1e-6,
    )
    input_parser.add_option(
        option_string="--spline-order",
        type=int,
        help="Specify the spline order defining the bias field estimate.",
        default=3,
    )
    input_parser.add_option(
        option_string="--wiener-filter-noise",
        type=float,
        help="Specify the noise estimate defining the Wiener filter.",
        default=0.11,
    )
    input_parser.add_option(
        option_string="--bias-field-fwhm",
        type=float,
        help="Specify the full width at half maximum parameter characterizing "
        "the width of the Gaussian deconvolution.",
        default=0.15,
    )
    input_parser.add_log_config(default=1)
    input_parser.add_verbose(default=0)

    args = input_parser.parse_args()
    input_parser.print_arguments(args)

    if np.alltrue([not args.output.endswith(t) for t in ALLOWED_EXTENSIONS]):
        raise ValueError(
            "output filename invalid; allowed extensions are: %s" %
            ", ".join(ALLOWED_EXTENSIONS))

    if args.log_config:
        input_parser.log_config(os.path.abspath(__file__))

    # Read data
    stack = st.Stack.from_filename(
        file_path=args.filename,
        file_path_mask=args.filename_mask,
        extract_slices=False,
    )

    # Perform Bias Field Correction
    # ph.print_title("Perform Bias Field Correction")
    bias_field_corrector = n4itk.N4BiasFieldCorrection(
        stack=stack,
        use_mask=True if args.filename_mask is not None else False,
        convergence_threshold=args.convergence_threshold,
        spline_order=args.spline_order,
        wiener_filter_noise=args.wiener_filter_noise,
        bias_field_fwhm=args.bias_field_fwhm,
    )
    ph.print_info("N4ITK Bias Field Correction ... ", newline=False)
    bias_field_corrector.run_bias_field_correction()
    stack_corrected = bias_field_corrector.get_bias_field_corrected_stack()
    print("done")

    dw.DataWriter.write_image(stack_corrected.sitk, args.output)

    elapsed_time = ph.stop_timing(time_start)

    if args.verbose:
        ph.show_niftis([args.filename, args.output])

    ph.print_title("Summary")
    exe_file_info = os.path.basename(os.path.abspath(__file__)).split(".")[0]
    print("%s | Computational Time for Bias Field Correction: %s" % (
        exe_file_info, elapsed_time))

    return 0


if __name__ == '__main__':
    main()


================================================
FILE: niftymic/application/correct_intensities.py
================================================
##
# \file correct_intensities.py
# \brief      Script to perform intensity correction across images given a
#             reference image
#
# \author     Michael Ebner (michael.ebner.14@ucl.ac.uk)
# \date       October 2017
#

# Import libraries
import numpy as np
import os

# Import modules
import niftymic.base.data_reader as dr
import niftymic.base.stack as st
import niftymic.registration.flirt as regflirt
import niftymic.utilities.intensity_correction as ic
import pysitk.python_helper as ph
import pysitk.simple_itk_helper as sitkh
from niftymic.utilities.input_arparser import InputArgparser


def main():

    time_start = ph.start_timing()

    np.set_printoptions(precision=3)

    input_parser = InputArgparser(
        description="Perform (linear) intensity correction across "
        "stacks/images given a reference stack/image",
    )
    input_parser.add_filenames(required=True)
    input_parser.add_dir_output(required=True)
    input_parser.add_reference(required=True)
    input_parser.add_suffix_mask(default="_mask")
    input_parser.add_search_angle(default=180)
    input_parser.add_prefix_output(default="IC_")
    input_parser.add_log_config(default=1)
    input_parser.add_option(
        option_string="--registration",
        type=int,
        help="Turn on/off registration from image to reference prior to "
        "intensity correction.",
        default=0)
    input_parser.add_verbose(default=0)

    args = input_parser.parse_args()
    input_parser.print_arguments(args)

    if args.log_config:
        input_parser.log_config(os.path.abspath(__file__))

    if args.reference in args.filenames:
        args.filenames.remove(args.reference)

    # Read data
    data_reader = dr.MultipleImagesReader(
        args.filenames, suffix_mask=args.suffix_mask, extract_slices=False)
    data_reader.read_data()
    stacks = data_reader.get_data()

    data_reader = dr.MultipleImagesReader(
        [args.reference], suffix_mask=args.suffix_mask, extract_slices=False)
    data_reader.read_data()
    reference = data_reader.get_data()[0]

    if args.registration:
        # Define search angle ranges for FLIRT in all three dimensions
        search_angles = ["-searchr%s -%d %d" %
                         (x, args.search_angle, args.search_angle)
                         for x in ["x", "y", "z"]]
        search_angles = (" ").join(search_angles)
        registration = regflirt.FLIRT(
            moving=reference,
            registration_type="Rigid",
            use_fixed_mask=True,
            use_moving_mask=True,
            options=search_angles,
            use_verbose=False,
        )

    # Perform Intensity Correction
    ph.print_title("Perform Intensity Correction")
    intensity_corrector = ic.IntensityCorrection(
        use_reference_mask=True,
        use_individual_slice_correction=False,
        prefix_corrected=args.prefix_output,
        use_verbose=False,
    )
    stacks_corrected = [None] * len(stacks)
    for i, stack in enumerate(stacks):
        if args.registration:
            ph.print_info("Image %d/%d: Registration ... "
                          % (i+1, len(stacks)), newline=False)
            registration.set_fixed(stack)
            registration.run()
            transform_sitk = registration.get_registration_transform_sitk()
            stack.update_motion_correction(transform_sitk)
            print("done")

        ph.print_info("Image %d/%d: Intensity Correction ... "
                      % (i+1, len(stacks)), newline=False)

        ref = reference.get_resampled_stack(stack.sitk)
        ref = st.Stack.from_sitk_image(
            image_sitk=ref.sitk,
            image_sitk_mask=stack.sitk_mask*ref.sitk_mask,
            filename=reference.get_filename()
        )
        intensity_corrector.set_stack(stack)
        intensity_corrector.set_reference(ref)
        intensity_corrector.run_linear_intensity_correction()
        # intensity_corrector.run_affine_intensity_correction()
        stacks_corrected[i] = \
            intensity_corrector.get_intensity_corrected_stack()
        print("done (c1 = %g) " % intensity_corrector.get_intensity_correction_coefficients())

        # Write Data
        stacks_corrected[i].write(
            args.dir_output, write_mask=True, suffix_mask=args.suffix_mask)

        if args.verbose:
            sitkh.show_stacks([
                reference, stacks_corrected[i],
                # stacks[i],
            ],
                segmentation=stacks_corrected[i])
            # ph.pause()

    # Write reference too (although not intensity corrected)
    reference.write(args.dir_output,
                    filename=args.prefix_output+reference.get_filename(),
                    write_mask=True, suffix_mask=args.suffix_mask)

    elapsed_time = ph.stop_timing(time_start)

    ph.print_title("Summary")
    exe_file_info = os.path.basename(os.path.abspath(__file__)).split(".")[0]
    print("%s | Computational Time for Intensity Correction(s): %s" %
          (exe_file_info, elapsed_time))

    return 0

if __name__ == '__main__':
    main()


================================================
FILE: niftymic/application/multiply.py
================================================
##
# \file multiply.py
# \brief      Script multiply images with each other.
#
# \author     Michael Ebner (michael.ebner.14@ucl.ac.uk)
# \date       October 2017
#

import os
import SimpleITK as sitk

import pysitk.python_helper as ph

import niftymic.base.data_writer as dw
from niftymic.utilities.input_arparser import InputArgparser


def main():

    input_parser = InputArgparser(
        description="Multiply images. "
        "Pixel type is determined by first given image.",
    )

    input_parser.add_filenames(required=True)
    input_parser.add_output(required=True)
    input_parser.add_verbose(default=0)

    args = input_parser.parse_args()
    input_parser.print_arguments(args)

    if len(args.filenames) < 2:
        raise IOError("At least two images must be provided")

    out_sitk = sitk.ReadImage(args.filenames[0])
    for f in args.filenames[1:]:
        im_sitk = sitk.Cast(sitk.ReadImage(f), out_sitk.GetPixelIDValue())
        out_sitk = out_sitk * im_sitk

    dw.DataWriter.write_image(out_sitk, args.output)

    if args.verbose:
        args.filenames.insert(0, args.output)
        ph.show_niftis(args.filenames)

if __name__ == '__main__':
    main()


================================================
FILE: niftymic/application/nifti2dicom.py
================================================
##
# \file convert_nifti_to_dicom.py
# \brief      Script to convert a 3D NIfTI image to DICOM.
#
# \author     Michael Ebner (michael.ebner.14@ucl.ac.uk)
# \date       Mar 2018
#

# NOTES (quite some candidates were tried to get a working solution):
#
# - nifti2dicom (https://packages.ubuntu.com/xenial/science/nifti2dicom; tested version 0.4.11):
#   Although nifti2dicom allows the import of a DICOM header from a template
#   (-d) not all tags would be set correctly. E.g. if DOB is not given at
#   template, it would just be set to 01.01.1990 which would prevent the
#   resulting dcm file to be grouped correctly with the original data.
#   Moreover, annoying tags like 'InstitutionName' are set to their predefined
#   value which cannot be deleted (only overwritten).
#   Apart from that, only a relatively small selection of tags can be edited.
#   However, it does a good job in creating a series of 2D DICOM slices from a
#   NIfTI file (including correct image orientation!).
#
# - medcon (https://packages.ubuntu.com/xenial/medcon; tested version 0.14.1):
#   A single 3D dcm file can be created but image orientation is flawed
#   when created from a nifti file directly.
#   However, if a 3D stack is created from a set of 2D dicoms, the orientation
#   stays correct.
#
# - pydicom (https://github.com/pydicom/pydicom; tested version 1.0.2):
#   Can only read a single 3D dcm file. In particular, it is not possible
#   to read a set of 2D slices unless a DICOMDIR is provided which is not
#   always guaranteed to exist (I tried to create it from 2D slices using
#   dcmmkdir from dcmtk and dcm4che -- neither seemed to work reliably)
#   Once the dicom file is read, pydicom does a really good job of updating
#   DICOM tags + there are plenty of tags available to be chosen from!
#   Saving a single 3D DICOM file is very easy too then.

import os
import pydicom

import pysitk.python_helper as ph

import niftymic.base.data_reader as dr
from niftymic.utilities.input_arparser import InputArgparser
from niftymic.definitions import DIR_TMP


COPY_DICOM_TAGS = {
    # important for grouping
    "PatientID",
    "PatientName",
    "PatientBirthDate",
    "StudyInstanceUID",

    # additional information
    "StudyID",
    "AcquisitionDate",
    "PatientSex",
    "MagneticFieldStrength",
    "Manufacturer",
    "ManufacturerModelName",
    "Modality",
    "StudyDescription",
}

ACCESSION_NUMBER = "1"
SERIES_NUMBER = "0"
IMAGE_COMMENTS = "*** NOT APPROVED FOR CLINICAL USE ***"


def main():

    input_parser = InputArgparser(
        description="Convert NIfTI to DICOM image",
    )
    input_parser.add_filename(required=True)
    input_parser.add_option(
        option_string="--template",
        type=str,
        required=True,
        help="Template DICOM to extract relevant DICOM tags.",
    )
    input_parser.add_dir_output(required=True)
    input_parser.add_label(
        help="Label used for series description of DICOM output.",
        default="SRR_NiftyMIC")
    input_parser.add_argument(
        "--volume", "-volume",
        action='store_true',
        help="If given, the output DICOM file is combined as 3D volume"
    )
    args = input_parser.parse_args()
    input_parser.print_arguments(args)

    # Prepare for final DICOM output
    ph.create_directory(args.dir_output)

    if args.volume:
        dir_output_2d_slices = os.path.join(DIR_TMP, "dicom_slices")
    else:
        dir_output_2d_slices = os.path.join(args.dir_output, args.label)
    ph.create_directory(dir_output_2d_slices, delete_files=True)

    # read NiftyMIC version (if available)
    data_reader = dr.ImageHeaderReader(args.filename)
    data_reader.read_data()
    niftymic_version = data_reader.get_niftymic_version()
    if niftymic_version is None:
        niftymic_version = "NiftyMIC"
    else:
        niftymic_version = "NiftyMIC-v%s" % niftymic_version

    # Create set of 2D DICOM slices from 3D NIfTI image
    # (correct image orientation!)
    ph.print_title("Create set of 2D DICOM slices from 3D NIfTI image")
    cmd_args = ["nifti2dicom"]
    cmd_args.append("-i '%s'" % args.filename)
    cmd_args.append("-o '%s'" % dir_output_2d_slices)
    cmd_args.append("-d '%s'" % args.template)
    cmd_args.append("--prefix ''")
    cmd_args.append("--seriesdescription '%s'" % args.label)
    cmd_args.append("--accessionnumber '%s'" % ACCESSION_NUMBER)
    cmd_args.append("--seriesnumber '%s'" % SERIES_NUMBER)
    cmd_args.append("--institutionname '%s'" % IMAGE_COMMENTS)

    # Overwrite default "nifti2dicom" tags which would be added otherwise
    # (no deletion/update with empty '' sufficient to overwrite them)
    cmd_args.append("--manufacturersmodelname '%s'" % "NiftyMIC")
    cmd_args.append("--protocolname '%s'" % niftymic_version)

    cmd_args.append("-y")
    ph.execute_command(" ".join(cmd_args))

    if args.volume:
        path_to_output = os.path.join(args.dir_output, "%s.dcm" % args.label)
        # Combine set of 2D DICOM slices to form 3D DICOM image
        # (image orientation stays correct)
        ph.print_title("Combine set of 2D DICOM slices to form 3D DICOM image")
        cmd_args = ["medcon"]
        cmd_args.append("-f '%s'/*.dcm" % dir_output_2d_slices)
        cmd_args.append("-o '%s'" % path_to_output)
        cmd_args.append("-c dicom")
        cmd_args.append("-stack3d")
        cmd_args.append("-n")
        cmd_args.append("-qc")
        cmd_args.append("-w")
        ph.execute_command(" ".join(cmd_args))

        # Update all relevant DICOM tags accordingly
        ph.print_title("Update all relevant DICOM tags accordingly")
        print("")
        dataset_template = pydicom.dcmread(args.template)
        dataset = pydicom.dcmread(path_to_output)

        # Copy tags from template (to guarantee grouping with original data)
        update_dicom_tags = {}
        for tag in COPY_DICOM_TAGS:
            try:
                update_dicom_tags[tag] = getattr(dataset_template, tag)
            except:
                update_dicom_tags[tag] = ""

        # Additional tags
        update_dicom_tags["SeriesDescription"] = args.label
        update_dicom_tags["InstitutionName"] = institution_name
        update_dicom_tags["ImageComments"] = IMAGE_COMMENTS
        update_dicom_tags["AccessionNumber"] = ACCESSION_NUMBER
        update_dicom_tags["SeriesNumber"] = SERIES_NUMBER

        for tag in sorted(update_dicom_tags.keys()):
            value = update_dicom_tags[tag]
            setattr(dataset, tag, value)
            ph.print_info("%s: '%s'" % (tag, value))

        dataset.save_as(path_to_output)
        print("")
        ph.print_info("3D DICOM image written to '%s'" % path_to_output)

    else:
        ph.print_info("DICOM images written to '%s'" % dir_output_2d_slices)

    return 0


if __name__ == '__main__':
    main()


================================================
FILE: niftymic/application/propagate_mask.py
================================================
##
# \file propagate_mask.py
# \brief      Script to propagate an image mask using rigid registration
#
# \author     Michael Ebner (michael.ebner@kcl.ac.uk)
# \date       Aug 2019
#

import os
import numpy as np
import SimpleITK as sitk

import pysitk.python_helper as ph
import pysitk.simple_itk_helper as sitkh

import niftymic.base.data_writer as dw
import niftymic.base.stack as st
import niftymic.registration.flirt as regflirt
import niftymic.registration.niftyreg as niftyreg
import niftymic.utilities.stack_mask_morphological_operations as stmorph
from niftymic.utilities.input_arparser import InputArgparser

from niftymic.definitions import V2V_METHOD_OPTIONS, ALLOWED_EXTENSIONS


def main():

    time_start = ph.start_timing()

    # Set print options for numpy
    np.set_printoptions(precision=3)

    input_parser = InputArgparser(
        description="Propagate image mask using rigid registration.",
    )
    input_parser.add_moving(required=True)
    input_parser.add_moving_mask(required=True)
    input_parser.add_fixed(required=True)
    input_parser.add_output(required=True)
    input_parser.add_v2v_method(
        option_string="--method",
        help="Registration method used for the registration (%s)." % (
            ", or ".join(V2V_METHOD_OPTIONS)),
        default="RegAladin",
    )
    input_parser.add_option(
        option_string="--use-moving-mask",
        type=int,
        help="Turn on/off use of moving mask to constrain the registration.",
        default=0,
    )
    input_parser.add_dilation_radius(default=1)
    input_parser.add_verbose(default=0)
    input_parser.add_log_config(default=0)

    args = input_parser.parse_args()
    input_parser.print_arguments(args)

    if np.alltrue([not args.output.endswith(t) for t in ALLOWED_EXTENSIONS]):
        raise ValueError(
            "output filename invalid; allowed extensions are: %s" %
            ", ".join(ALLOWED_EXTENSIONS))

    if args.method not in V2V_METHOD_OPTIONS:
        raise ValueError("method must be in {%s}" % (
            ", ".join(V2V_METHOD_OPTIONS)))

    if args.log_config:
        input_parser.log_config(os.path.abspath(__file__))

    stack = st.Stack.from_filename(
        file_path=args.fixed,
        extract_slices=False,
    )
    template = st.Stack.from_filename(
        file_path=args.moving,
        file_path_mask=args.moving_mask,
        extract_slices=False,
    )

    if args.method == "FLIRT":
        # Define search angle ranges for FLIRT in all three dimensions
        # search_angles = ["-searchr%s -%d %d" %
        #                  (x, args.search_angle, args.search_angle)
        #                  for x in ["x", "y", "z"]]
        # options = (" ").join(search_angles)
        # options += " -noresample"

        registration = regflirt.FLIRT(
            registration_type="Rigid",
            fixed=stack,
            moving=template,
            use_fixed_mask=False,
            use_moving_mask=args.use_moving_mask,
            # options=options,
            use_verbose=False,
        )
    else:
        registration = niftyreg.RegAladin(
            registration_type="Rigid",
            fixed=stack,
            moving=template,
            use_fixed_mask=False,
            use_moving_mask=args.use_moving_mask,
            # options="-ln 2",
            use_verbose=False,
        )

    try:
        registration.run()
    except RuntimeError as e:
        raise RuntimeError(
            "%s\n\n"
            "Have you tried running the script with '--use-moving-mask 0'?" % e)

    transform_sitk = registration.get_registration_transform_sitk()
    stack.sitk_mask = sitk.Resample(
        template.sitk_mask,
        stack.sitk_mask,
        transform_sitk,
        sitk.sitkNearestNeighbor,
        0,
        template.sitk_mask.GetPixelIDValue()
    )
    if args.dilation_radius > 0:
        stack_mask_morpher = stmorph.StackMaskMorphologicalOperations.from_sitk_mask(
            mask_sitk=stack.sitk_mask,
            dilation_radius=args.dilation_radius,
            dilation_kernel="Ball",
            use_dilation_in_plane_only=True,
        )
        stack_mask_morpher.run_dilation()
        stack.sitk_mask = stack_mask_morpher.get_processed_mask_sitk()

    dw.DataWriter.write_mask(stack.sitk_mask, args.output)

    elapsed_time = ph.stop_timing(time_start)

    if args.verbose:
        ph.show_nifti(args.fixed, segmentation=args.output)

    ph.print_title("Summary")
    exe_file_info = os.path.basename(os.path.abspath(__file__)).split(".")[0]
    print("%s | Computational Time for Segmentation Propagation: %s" % (
        exe_file_info, elapsed_time))

    return 0


if __name__ == '__main__':
    main()


================================================
FILE: niftymic/application/reconstruct_volume.py
================================================
##
# \file reconstruct_volume.py
# \brief      Script to reconstruct an isotropic, high-resolution volume from
#             multiple stacks of low-resolution 2D slices including
#             motion-correction.
#
# \author     Michael Ebner (michael.ebner.14@ucl.ac.uk)
# \date       March 2017
#

import os
import numpy as np

import pysitk.python_helper as ph
import pysitk.simple_itk_helper as sitkh

import niftymic.base.stack as st
import niftymic.base.data_reader as dr
import niftymic.base.data_writer as dw
import niftymic.registration.flirt as regflirt
import niftymic.registration.niftyreg as niftyreg
import niftymic.registration.simple_itk_registration as regsitk
import niftymic.reconstruction.tikhonov_solver as tk
import niftymic.reconstruction.primal_dual_solver as pd
import niftymic.reconstruction.scattered_data_approximation as sda
import niftymic.utilities.data_preprocessing as dp
import niftymic.utilities.outlier_rejector as outre
import niftymic.utilities.intensity_correction as ic
import niftymic.utilities.joint_image_mask_builder as imb
import niftymic.utilities.segmentation_propagation as segprop
import niftymic.utilities.volumetric_reconstruction_pipeline as pipeline
from niftymic.utilities.input_arparser import InputArgparser

from niftymic.definitions import V2V_METHOD_OPTIONS, ALLOWED_EXTENSIONS


def main():

    time_start = ph.start_timing()

    # Set print options for numpy
    np.set_printoptions(precision=3)

    input_parser = InputArgparser(
        description="Volumetric MRI reconstruction framework to reconstruct "
        "an isotropic, high-resolution 3D volume from multiple stacks of 2D "
        "slices with motion correction. The resolution of the computed "
        "Super-Resolution Reconstruction (SRR) is given by the in-plane "
        "spacing of the selected target stack. A region of interest can be "
        "specified by providing a mask for the selected target stack. Only "
        "this region will then be reconstructed by the SRR algorithm which "
        "can substantially reduce the computational time.",
    )
    input_parser.add_filenames(required=True)
    input_parser.add_filenames_masks()
    input_parser.add_output(required=True)
    input_parser.add_suffix_mask(default="_mask")
    input_parser.add_target_stack(default=None)
    input_parser.add_search_angle(default=45)
    input_parser.add_multiresolution(default=0)
    input_parser.add_shrink_factors(default=[3, 2, 1])
    input_parser.add_smoothing_sigmas(default=[1.5, 1, 0])
    input_parser.add_sigma(default=1)
    input_parser.add_reconstruction_type(default="TK1L2")
    input_parser.add_iterations(default=15)
    input_parser.add_alpha(default=0.015)
    input_parser.add_alpha_first(default=0.2)
    input_parser.add_iter_max(default=10)
    input_parser.add_iter_max_first(default=5)
    input_parser.add_dilation_radius(default=3)
    input_parser.add_extra_frame_target(default=10)
    input_parser.add_bias_field_correction(default=0)
    input_parser.add_intensity_correction(default=1)
    input_parser.add_isotropic_resolution(default=1)
    input_parser.add_log_config(default=1)
    input_parser.add_subfolder_motion_correction()
    input_parser.add_write_motion_correction(default=1)
    input_parser.add_verbose(default=0)
    input_parser.add_two_step_cycles(default=3)
    input_parser.add_use_masks_srr(default=0)
    input_parser.add_boundary_stacks(default=[10, 10, 0])
    input_parser.add_metric(default="Correlation")
    input_parser.add_metric_radius(default=10)
 
Download .txt
gitextract_rkx8168q/

├── .gitattributes
├── .gitignore
├── .gitlab-ci.yml
├── .gitmodules
├── LICENSE
├── MANIFEST.in
├── README.md
├── data/
│   └── templates/
│       ├── LICENSE
│       ├── README
│       └── templates_info.json
├── doc/
│   └── doxyfile
├── docker/
│   ├── docker-compose.yml
│   ├── itk_niftymic/
│   │   ├── .dockerignore
│   │   └── Dockerfile
│   ├── niftymic/
│   │   ├── .dockerignore
│   │   └── Dockerfile
│   └── simplereg_dependencies/
│       ├── .dockerignore
│       └── Dockerfile
├── niftymic/
│   ├── __about__.py
│   ├── __init__.py
│   ├── application/
│   │   ├── __init__.py
│   │   ├── correct_bias_field.py
│   │   ├── correct_intensities.py
│   │   ├── multiply.py
│   │   ├── nifti2dicom.py
│   │   ├── propagate_mask.py
│   │   ├── reconstruct_volume.py
│   │   ├── reconstruct_volume_from_slices.py
│   │   ├── register_image.py
│   │   ├── rsfmri_estimate_motion.py
│   │   ├── rsfmri_reconstruct_volume_from_slices.py
│   │   ├── run_reconstruction_parameter_study.py
│   │   ├── run_reconstruction_pipeline.py
│   │   ├── segment_fetal_brains.py
│   │   └── show_slice_coverage.py
│   ├── base/
│   │   ├── __init__.py
│   │   ├── data_reader.py
│   │   ├── data_writer.py
│   │   ├── exceptions.py
│   │   ├── psf.py
│   │   ├── slice.py
│   │   └── stack.py
│   ├── definitions.py
│   ├── reconstruction/
│   │   ├── __init__.py
│   │   ├── admm_solver.py
│   │   ├── linear_operators.py
│   │   ├── primal_dual_solver.py
│   │   ├── scattered_data_approximation.py
│   │   ├── solver.py
│   │   └── tikhonov_solver.py
│   ├── registration/
│   │   ├── __init__.py
│   │   ├── flirt.py
│   │   ├── intra_stack_registration.py
│   │   ├── niftyreg.py
│   │   ├── registration_method.py
│   │   ├── simple_itk_registration.py
│   │   ├── stack_registration_base.py
│   │   ├── transform_initializer.py
│   │   └── wrap_itk_registration.py
│   ├── utilities/
│   │   ├── __init__.py
│   │   ├── binary_mask_from_mask_srr_estimator.py
│   │   ├── brain_stripping.py
│   │   ├── data_preprocessing.py
│   │   ├── input_arparser.py
│   │   ├── intensity_correction.py
│   │   ├── joint_image_mask_builder.py
│   │   ├── motion_updater.py
│   │   ├── n4_bias_field_correction.py
│   │   ├── outlier_rejector.py
│   │   ├── parameter_normalization.py
│   │   ├── segmentation_propagation.py
│   │   ├── siena.py
│   │   ├── stack_mask_morphological_operations.py
│   │   ├── target_stack_estimator.py
│   │   ├── template_stack_estimator.py
│   │   ├── toolkit_executor.py
│   │   └── volumetric_reconstruction_pipeline.py
│   └── validation/
│       ├── __init__.py
│       ├── evaluate_image_similarity.py
│       ├── evaluate_simulated_stack_similarity.py
│       ├── evaluate_slice_residual_similarity.py
│       ├── export_side_by_side_simulated_vs_original_slice_comparison.py
│       ├── image_similarity_evaluator.py
│       ├── motion_evaluator.py
│       ├── motion_simulator.py
│       ├── residual_evaluator.py
│       ├── show_evaluated_simulated_stack_similarity.py
│       ├── simulate_stacks_from_reconstruction.py
│       ├── slice_acquisition.py
│       ├── slice_coverage.py
│       └── write_random_motion_transforms.py
├── niftymic_correct_bias_field.py
├── niftymic_multiply.py
├── niftymic_nifti2dicom.py
├── niftymic_reconstruct_volume.py
├── niftymic_reconstruct_volume_from_slices.py
├── niftymic_register_image.py
├── niftymic_rsfmri_estimate_motion.py
├── niftymic_rsfmri_reconstruct_volume_from_slices.py
├── niftymic_run_reconstruction_parameter_study.py
├── niftymic_run_reconstruction_pipeline.py
├── niftymic_segment_fetal_brains.py
├── niftymic_show_reconstruction_parameter_study.py
├── requirements-monaifbs.txt
├── requirements.txt
├── setup.py
└── tests/
    ├── __init__.py
    ├── brain_stripping_test.py
    ├── case_study_fetal_brain_test.py
    ├── case_study_rsfmri_test.py
    ├── data_reader_test.py
    ├── image_similarity_evaluator_test.py
    ├── installation_test.py
    ├── installation_test_fetal_brain_seg.py
    ├── installation_test_monaifbs.py
    ├── intensity_correction_test.py
    ├── intra_stack_registration_test.py
    ├── linear_image_quality_transfer_test.py
    ├── linear_operators_test.py
    ├── niftyreg_test.py
    ├── parameter_normalization_test.py
    ├── registration_test.py
    ├── residual_evaluator_test.py
    ├── run_tests.py
    ├── segmentation_propagation_test.py
    ├── simulator_slice_acquisition_test.py
    └── stack_test.py
Download .txt
SYMBOL INDEX (839 symbols across 84 files)

FILE: niftymic/application/correct_bias_field.py
  function main (line 23) | def main():

FILE: niftymic/application/correct_intensities.py
  function main (line 24) | def main():

FILE: niftymic/application/multiply.py
  function main (line 18) | def main():

FILE: niftymic/application/nifti2dicom.py
  function main (line 70) | def main():

FILE: niftymic/application/propagate_mask.py
  function main (line 26) | def main():

FILE: niftymic/application/reconstruct_volume.py
  function main (line 37) | def main():

FILE: niftymic/application/reconstruct_volume_from_slices.py
  function main (line 32) | def main():

FILE: niftymic/application/register_image.py
  function main (line 27) | def main():

FILE: niftymic/application/rsfmri_estimate_motion.py
  function main (line 33) | def main():

FILE: niftymic/application/rsfmri_reconstruct_volume_from_slices.py
  function main (line 33) | def main():

FILE: niftymic/application/run_reconstruction_parameter_study.py
  function main (line 24) | def main():

FILE: niftymic/application/run_reconstruction_pipeline.py
  function main (line 31) | def main():

FILE: niftymic/application/segment_fetal_brains.py
  function main (line 23) | def main():

FILE: niftymic/application/show_slice_coverage.py
  function main (line 21) | def main():

FILE: niftymic/base/data_reader.py
  class DataReader (line 34) | class DataReader(object):
    method read_data (line 38) | def read_data(self):
    method get_data (line 42) | def get_data(self):
  class ImageHeaderReader (line 46) | class ImageHeaderReader(DataReader):
    method __init__ (line 48) | def __init__(self, path_to_image):
    method read_data (line 52) | def read_data(self):
    method get_data (line 55) | def get_data(self):
    method get_niftymic_version (line 58) | def get_niftymic_version(self):
  class ImageDataReader (line 81) | class ImageDataReader(DataReader):
    method __init__ (line 84) | def __init__(self):
    method get_data (line 96) | def get_data(self):
  class ImageDirectoryReader (line 109) | class ImageDirectoryReader(ImageDataReader):
    method __init__ (line 126) | def __init__(self,
    method read_data (line 141) | def read_data(self):
  class MultipleImagesReader (line 198) | class MultipleImagesReader(ImageDataReader):
    method __init__ (line 219) | def __init__(self,
    method read_data (line 251) | def read_data(self):
    method _check_input (line 289) | def _check_input(self):
    method _get_path_to_potential_mask (line 307) | def _get_path_to_potential_mask(self, file_path):
  class ImageSlicesDirectoryReader (line 358) | class ImageSlicesDirectoryReader(ImageDataReader):
    method __init__ (line 373) | def __init__(self,
    method read_data (line 387) | def read_data(self):
    method get_slice_transforms_sitk (line 453) | def get_slice_transforms_sitk(self):
  class MultiComponentImageReader (line 461) | class MultiComponentImageReader(ImageDataReader):
    method __init__ (line 463) | def __init__(self,
    method read_data (line 479) | def read_data(self):
  class TransformationDataReader (line 527) | class TransformationDataReader(DataReader):
    method __init__ (line 530) | def __init__(self):
    method get_data (line 540) | def get_data(self):
    method _get_sitk_transform_from_filepath (line 543) | def _get_sitk_transform_from_filepath(self, path_to_sitk_transform):
  class SliceTransformationDirectoryReader (line 567) | class SliceTransformationDirectoryReader(TransformationDataReader):
    method __init__ (line 569) | def __init__(self, directory, suffix_slice="_slice"):
    method read_data (line 574) | def read_data(self):
  class TransformationDirectoryReader (line 603) | class TransformationDirectoryReader(TransformationDataReader):
    method __init__ (line 605) | def __init__(self, directory):
    method read_data (line 621) | def read_data(self, extension="tfm"):
  class MultipleTransformationsReader (line 640) | class MultipleTransformationsReader(TransformationDataReader):
    method __init__ (line 642) | def __init__(self, file_paths):
    method read_data (line 654) | def read_data(self):

FILE: niftymic/base/data_writer.py
  class DataWriter (line 21) | class DataWriter(object):
    method _get_header_update (line 37) | def _get_header_update(description=None):
    method write_image (line 51) | def write_image(
    method write_mask (line 72) | def write_mask(
  class StacksWriter (line 93) | class StacksWriter(object):
    method __init__ (line 96) | def __init__(self, stacks):
    method set_stacks (line 99) | def set_stacks(self, stacks):
    method write_data (line 103) | def write_data(self):
  class MultipleStacksWriter (line 107) | class MultipleStacksWriter(StacksWriter):
    method __init__ (line 109) | def __init__(self,
    method set_directory (line 125) | def set_directory(self, directory):
    method write_data (line 128) | def write_data(self):
  class MultiComponentImageWriter (line 137) | class MultiComponentImageWriter(StacksWriter):
    method __init__ (line 139) | def __init__(self,
    method set_filename (line 155) | def set_filename(self, filename):
    method write_data (line 158) | def write_data(self):

FILE: niftymic/base/exceptions.py
  class InputFilesNotValid (line 14) | class InputFilesNotValid(Exception):
    method __init__ (line 22) | def __init__(self, directory):
    method __str__ (line 25) | def __str__(self):
  class ObjectNotCreated (line 36) | class ObjectNotCreated(Exception):
    method __init__ (line 45) | def __init__(self, function_call):
    method __str__ (line 48) | def __str__(self):
  class FileNotExistent (line 57) | class FileNotExistent(Exception):
    method __init__ (line 66) | def __init__(self, missing_file):
    method __str__ (line 69) | def __str__(self):
  class DirectoryNotExistent (line 78) | class DirectoryNotExistent(Exception):
    method __init__ (line 87) | def __init__(self, missing_directory):
    method __str__ (line 90) | def __str__(self):
  class FilenameAmbiguous (line 100) | class FilenameAmbiguous(Exception):
    method __init__ (line 109) | def __init__(self, ambiguous_filename):
    method __str__ (line 112) | def __str__(self):
  class IOError (line 120) | class IOError(Exception):
    method __init__ (line 129) | def __init__(self, error):
    method __str__ (line 132) | def __str__(self):

FILE: niftymic/base/psf.py
  class PSF (line 16) | class PSF:
    method get_covariance_matrix_in_reconstruction_space (line 31) | def get_covariance_matrix_in_reconstruction_space(
    method get_covariance_matrix_in_reconstruction_space_sitk (line 57) | def get_covariance_matrix_in_reconstruction_space_sitk(
    method get_predefined_covariance_matrix_in_reconstruction_space (line 91) | def get_predefined_covariance_matrix_in_reconstruction_space(
    method get_gaussian_psf_covariance_matrix_from_spacing (line 120) | def get_gaussian_psf_covariance_matrix_from_spacing(spacing):
    method _get_relative_rotation_matrix (line 144) | def _get_relative_rotation_matrix(slice_direction_sitk,

FILE: niftymic/base/slice.py
  class Slice (line 24) | class Slice:
    method from_sitk_image (line 32) | def from_sitk_image(cls,
    method from_filename (line 112) | def from_filename(cls,
    method from_slice (line 176) | def from_slice(cls, slice_to_copy):
    method update_motion_correction (line 222) | def update_motion_correction(self, affine_transform_sitk):
    method get_filename (line 257) | def get_filename(self):
    method set_filename (line 260) | def set_filename(self, filename):
    method get_slice_number (line 265) | def get_slice_number(self):
    method get_slice_thickness (line 268) | def get_slice_thickness(self):
    method get_inplane_resolution (line 271) | def get_inplane_resolution(self):
    method get_directory (line 276) | def get_directory(self):
    method get_affine_transform (line 282) | def get_affine_transform(self):
    method get_motion_correction_transform (line 293) | def get_motion_correction_transform(self):
    method get_registration_history (line 300) | def get_registration_history(self):
    method set_registration_history (line 305) | def set_registration_history(self, registration_history):
    method show (line 314) | def show(self, show_segmentation=0, label=None, viewer=VIEWER, verbose...
    method write (line 336) | def write(self,
    method _update_affine_transform (line 398) | def _update_affine_transform(self, affine_transform_sitk):
    method _generate_identity_mask (line 464) | def _generate_identity_mask(self):

FILE: niftymic/base/stack.py
  class Stack (line 30) | class Stack:
    method __init__ (line 32) | def __init__(self):
    method from_filename (line 49) | def from_filename(cls,
    method from_slice_filenames (line 170) | def from_slice_filenames(cls,
    method from_sitk_image (line 285) | def from_sitk_image(cls,
    method from_stack (line 361) | def from_stack(cls, stack_to_copy, filename=None):
    method get_slices (line 418) | def get_slices(self):
    method get_slice (line 433) | def get_slice(self, index):
    method get_slice_thickness (line 443) | def get_slice_thickness(self):
    method get_inplane_resolution (line 446) | def get_inplane_resolution(self):
    method get_deleted_slice_numbers (line 459) | def get_deleted_slice_numbers(self):
    method set_slice (line 470) | def set_slice(self, slice, index):
    method delete_slice (line 492) | def delete_slice(self, slice):
    method get_deleted_slice_numbers (line 504) | def get_deleted_slice_numbers(self):
    method get_directory (line 510) | def get_directory(self):
    method set_filename (line 513) | def set_filename(self, filename):
    method get_filename (line 523) | def get_filename(self):
    method get_registration_history (line 530) | def get_registration_history(self):
    method set_registration_history (line 535) | def set_registration_history(self, registration_history):
    method get_number_of_slices (line 544) | def get_number_of_slices(self):
    method is_unity_mask (line 547) | def is_unity_mask(self):
    method show (line 552) | def show(self, show_segmentation=0, label=None, viewer=VIEWER, verbose...
    method show_slices (line 569) | def show_slices(self):
    method write (line 579) | def write(self,
    method update_motion_correction (line 669) | def update_motion_correction(self, affine_transform_sitk):
    method update_motion_correction_of_slices (line 697) | def update_motion_correction_of_slices(self, affine_transforms_sitk):
    method _update_affine_transform (line 708) | def _update_affine_transform(self, affine_transform_sitk):
    method get_resampled_stack_from_slices (line 756) | def get_resampled_stack_from_slices(self, resampling_grid=None, interp...
    method get_resampled_stack (line 875) | def get_resampled_stack(self, resampling_grid=None, spacing=None, inte...
    method get_stack_multiplied_with_mask (line 949) | def get_stack_multiplied_with_mask(self, filename=None, mask_sitk=None):
    method get_isotropically_resampled_stack_from_slices (line 972) | def get_isotropically_resampled_stack_from_slices(self, resolution=Non...
    method get_isotropically_resampled_stack (line 1048) | def get_isotropically_resampled_stack(self, resolution=None, interpola...
    method get_increased_stack (line 1106) | def get_increased_stack(self, extra_slices_z=0):
    method get_cropped_stack_based_on_mask (line 1150) | def get_cropped_stack_based_on_mask(self, boundary_i=0, boundary_j=0, ...
    method _get_rectangular_masked_region (line 1199) | def _get_rectangular_masked_region(self, mask_sitk):
    method _crop_image_to_region (line 1247) | def _crop_image_to_region(self, image_sitk, range_x, range_y, range_z):
    method _extract_slices (line 1259) | def _extract_slices(self, slice_thickness, slice_numbers=None):
    method _generate_identity_mask (line 1285) | def _generate_identity_mask(self):

FILE: niftymic/reconstruction/admm_solver.py
  class ADMMSolver (line 26) | class ADMMSolver(Solver):
    method __init__ (line 53) | def __init__(self,
    method set_rho (line 100) | def set_rho(self, rho):
    method get_rho (line 105) | def get_rho(self):
    method set_iterations (line 114) | def set_iterations(self, iterations):
    method get_iterations (line 119) | def get_iterations(self):
    method get_setting_specific_filename (line 132) | def get_setting_specific_filename(self, prefix="SRR_"):
    method get_solver (line 151) | def get_solver(self):
    method _run (line 201) | def _run(self):
    method _print_info_text (line 219) | def _print_info_text(self):

FILE: niftymic/reconstruction/linear_operators.py
  class LinearOperators (line 26) | class LinearOperators(object):
    method __init__ (line 44) | def __init__(self,
    method A_itk (line 111) | def A_itk(self, reconstruction_itk, slice_itk, slice_spacing):
    method A (line 150) | def A(self, reconstruction, stack_slice, interpolator_mask="Linear"):
    method A_adj_itk (line 219) | def A_adj_itk(self, slice_itk, reconstruction_itk, slice_spacing):
    method M_itk (line 249) | def M_itk(self, image_itk, image_itk_mask):
    method _get_covariance_full_3d (line 261) | def _get_covariance_full_3d(
    method _get_covariance_only_in_plane (line 280) | def _get_covariance_only_in_plane(
    method _get_covariance_predefined (line 303) | def _get_covariance_predefined(

FILE: niftymic/reconstruction/primal_dual_solver.py
  class PrimalDualSolver (line 34) | class PrimalDualSolver(Solver):
    method __init__ (line 36) | def __init__(self,
    method get_setting_specific_filename (line 86) | def get_setting_specific_filename(self, prefix="SRR_"):
    method get_solver (line 111) | def get_solver(self):
    method _run (line 173) | def _run(self, verbose=0):
    method _print_info_text (line 191) | def _print_info_text(self):

FILE: niftymic/reconstruction/scattered_data_approximation.py
  class ScatteredDataApproximation (line 26) | class ScatteredDataApproximation:
    method __init__ (line 45) | def __init__(self,
    method set_sigma (line 90) | def set_sigma(self, sigma):
    method set_stacks (line 93) | def set_stacks(self, stacks):
    method set_sigma_array (line 107) | def set_sigma_array(self, sigma_array):
    method get_sigma_array (line 116) | def get_sigma_array(self):
    method set_approach (line 122) | def set_approach(self, sda_approach):
    method get_approach (line 131) | def get_approach(self):
    method get_reconstruction (line 136) | def get_reconstruction(self):
    method get_setting_specific_filename (line 139) | def get_setting_specific_filename(self, prefix="SDA_"):
    method get_computational_time (line 161) | def get_computational_time(self):
    method run (line 166) | def run(self):
    method generate_mask_from_stack_mask_unions (line 191) | def generate_mask_from_stack_mask_unions(self,
    method generate_mask_from_stack_mask_intersections (line 246) | def generate_mask_from_stack_mask_intersections(self,
    method _get_image_slice (line 294) | def _get_image_slice(slice):
    method _get_masked_image_slice (line 298) | def _get_masked_image_slice(slice):
    method _get_mask_slice (line 304) | def _get_mask_slice(slice):
    method _run_discrete_shepard_reconstruction (line 311) | def _run_discrete_shepard_reconstruction(self):
    method _run_discrete_shepard_based_on_Deriche_reconstruction (line 439) | def _run_discrete_shepard_based_on_Deriche_reconstruction(self):

FILE: niftymic/reconstruction/solver.py
  class Solver (line 31) | class Solver(object):
    method __init__ (line 63) | def __init__(self,
    method set_stacks (line 148) | def set_stacks(self, stacks):
    method set_use_masks (line 168) | def set_use_masks(self, use_masks):
    method set_reconstruction (line 171) | def set_reconstruction(self, reconstruction):
    method set_alpha (line 191) | def set_alpha(self, alpha):
    method get_alpha (line 196) | def get_alpha(self):
    method set_iter_max (line 208) | def set_iter_max(self, iter_max):
    method get_iter_max (line 213) | def get_iter_max(self):
    method set_minimizer (line 223) | def set_minimizer(self, minimizer):
    method get_minimizer (line 226) | def get_minimizer(self):
    method set_data_loss (line 236) | def set_data_loss(self, data_loss):
    method set_huber_gamma (line 241) | def set_huber_gamma(self, huber_gamma):
    method get_huber_gamma (line 244) | def get_huber_gamma(self):
    method set_verbose (line 247) | def set_verbose(self, verbose):
    method get_verbose (line 250) | def get_verbose(self):
    method run (line 253) | def run(self):
    method get_reconstruction (line 260) | def get_reconstruction(self):
    method get_alpha_cut (line 265) | def get_alpha_cut(self):
    method get_computational_time (line 270) | def get_computational_time(self):
    method get_A (line 281) | def get_A(self):
    method get_A_adj (line 292) | def get_A_adj(self):
    method get_b (line 303) | def get_b(self):
    method get_x0 (line 315) | def get_x0(self):
    method get_x_scale (line 318) | def get_x_scale(self):
    method get_setting_specific_filename (line 332) | def get_setting_specific_filename(self, prefix=""):
    method _run (line 336) | def _run(self):
    method get_solver (line 340) | def get_solver(self):
    method get_predefined_covariance (line 351) | def get_predefined_covariance(self):
    method _get_M_y (line 366) | def _get_M_y(self):
    method _Mk_Ak (line 414) | def _Mk_Ak(self, reconstruction_itk, slice_k):
    method _Ak_adj_Mk (line 445) | def _Ak_adj_Mk(self, slice_itk, slice_k):
    method _MA (line 480) | def _MA(self, reconstruction_nda_vec):
    method _A_adj_M (line 530) | def _A_adj_M(self, stacked_slices_nda_vec):
    method _get_itk_image_from_array_vec (line 580) | def _get_itk_image_from_array_vec(self, nda_vec, image_itk_ref):

FILE: niftymic/reconstruction/tikhonov_solver.py
  class TikhonovSolver (line 59) | class TikhonovSolver(Solver):
    method __init__ (line 93) | def __init__(self,
    method set_regularization_type (line 141) | def set_regularization_type(self, reg_type):
    method get_regularization_type (line 146) | def get_regularization_type(self):
    method get_setting_specific_filename (line 159) | def get_setting_specific_filename(self, prefix="SRR_"):
    method get_solver (line 180) | def get_solver(self):
    method _run (line 237) | def _run(self):
    method _print_info_text (line 255) | def _print_info_text(self):
  class TemporalTikhonovSolver (line 288) | class TemporalTikhonovSolver(object):
    method __init__ (line 290) | def __init__(self,
    method get_computational_time (line 344) | def get_computational_time(self):
    method get_reconstructions (line 347) | def get_reconstructions(self):
    method run (line 350) | def run(self):
    method _A_fw (line 429) | def _A_fw(self, x, sqrt_alpha, sqrt_beta):
    method _A_bw (line 463) | def _A_bw(self, b, sqrt_alpha, sqrt_beta):
    method _get_reconstructions (line 504) | def _get_reconstructions(self, x):
    method _print_info_text (line 521) | def _print_info_text(self):
    method get_setting_specific_filename (line 555) | def get_setting_specific_filename(self, prefix="SRR_"):

FILE: niftymic/registration/flirt.py
  class FLIRT (line 27) | class FLIRT(AffineRegistrationMethod):
    method __init__ (line 29) | def __init__(self,
    method set_options (line 60) | def set_options(self, options):
    method get_options (line 71) | def get_options(self):
    method _run (line 74) | def _run(self):
    method _get_warped_moving_sitk (line 106) | def _get_warped_moving_sitk(self):

FILE: niftymic/registration/intra_stack_registration.py
  class IntraStackRegistration (line 26) | class IntraStackRegistration(StackRegistrationBase):
    method __init__ (line 126) | def __init__(self,
    method set_transform_type (line 277) | def set_transform_type(self, transform_type):
    method get_transform_type (line 284) | def get_transform_type(self):
    method set_intensity_correction_type_slice_neighbour_fit (line 294) | def set_intensity_correction_type_slice_neighbour_fit(self, intensity_...
    method get_intensity_correction_type_slice_neighbour_fit (line 303) | def get_intensity_correction_type_slice_neighbour_fit(self):
    method set_intensity_correction_type_reference_fit (line 313) | def set_intensity_correction_type_reference_fit(self, intensity_correc...
    method get_intensity_correction_type_reference_fit (line 323) | def get_intensity_correction_type_reference_fit(self):
    method set_intensity_correction_initializer_type (line 336) | def set_intensity_correction_initializer_type(self, intensity_correcti...
    method get_intensity_correction_initializer_type (line 346) | def get_intensity_correction_initializer_type(self):
    method set_prior_scale (line 356) | def set_prior_scale(self, prior_scale):
    method set_prior_intensity_coefficients (line 360) | def set_prior_intensity_coefficients(self, coefficients):
    method set_image_transform_reference_fit_term (line 377) | def set_image_transform_reference_fit_term(self, image_transform_refer...
    method use_stack_mask_reference_fit_term (line 386) | def use_stack_mask_reference_fit_term(self, flag):
    method use_stack_mask_neighbour_fit_term (line 389) | def use_stack_mask_neighbour_fit_term(self, flag):
    method get_final_cost (line 392) | def get_final_cost(self):
    method print_statistics (line 397) | def print_statistics(self):
    method get_setting_specific_filename (line 418) | def get_setting_specific_filename(self, prefix="_"):
    method _print_info_text_least_squares (line 452) | def _print_info_text_least_squares(self):
    method _print_info_text_minimize (line 460) | def _print_info_text_minimize(self):
    method _print_into_text_common (line 468) | def _print_into_text_common(self):
    method _run_registration_pipeline_initialization (line 501) | def _run_registration_pipeline_initialization(self):
    method _get_residual_call (line 672) | def _get_residual_call(self):
    method _get_jacobian_residual_call (line 784) | def _get_jacobian_residual_call(self):
    method _get_residual_reference_fit (line 897) | def _get_residual_reference_fit(self,
    method _get_jacobian_residual_reference_fit (line 970) | def _get_jacobian_residual_reference_fit(self,
    method _get_residual_slice_neighbours_fit (line 1081) | def _get_residual_slice_neighbours_fit(self, parameters_vec):
    method _get_jacobian_residual_slice_neighbours_fit (line 1175) | def _get_jacobian_residual_slice_neighbours_fit(self, parameters_vec):
    method _get_jacobian_slice_in_slice_neighbours_fit (line 1247) | def _get_jacobian_slice_in_slice_neighbours_fit(self,
    method _get_gradient_with_respect_to_transform_parameters (line 1303) | def _get_gradient_with_respect_to_transform_parameters(self,
    method _get_gradient_image_nda_from_sitk_image (line 1323) | def _get_gradient_image_nda_from_sitk_image(self, slice_sitk):
    method _get_residual_scale (line 1381) | def _get_residual_scale(self, parameters_vec):
    method _get_jacobian_residual_scale (line 1390) | def _get_jacobian_residual_scale(self, parameters_vec):
    method _get_residual_intensity_coefficients_None (line 1410) | def _get_residual_intensity_coefficients_None(self, parameters_vec):
    method _get_jacobian_residual_intensity_coefficients_None (line 1413) | def _get_jacobian_residual_intensity_coefficients_None(self,
    method _get_residual_intensity_coefficients_linear (line 1417) | def _get_residual_intensity_coefficients_linear(self, parameters_vec):
    method _get_jacobian_residual_intensity_coefficients_linear (line 1427) | def _get_jacobian_residual_intensity_coefficients_linear(self,
    method _get_residual_intensity_coefficients_affine (line 1439) | def _get_residual_intensity_coefficients_affine(self, parameters_vec):
    method _get_jacobian_residual_intensity_coefficients_affine (line 1449) | def _get_jacobian_residual_intensity_coefficients_affine(self,
    method _apply_image_transform_identity (line 1471) | def _apply_image_transform_identity(self, slice_2D_sitk):
    method _apply_image_transform_dx (line 1474) | def _apply_image_transform_dx(self, slice_2D_sitk):
    method _apply_image_transform_dy (line 1480) | def _apply_image_transform_dy(self, slice_2D_sitk):
    method _apply_image_transform_gradient_magnitude (line 1486) | def _apply_image_transform_gradient_magnitude(self, slice_2D_sitk):
    method _get_dx_image_sitk (line 1494) | def _get_dx_image_sitk(self, image_sitk):
    method _get_dy_image_sitk (line 1500) | def _get_dy_image_sitk(self, image_sitk):
    method _compute_statistics_residuals_ell2 (line 1514) | def _compute_statistics_residuals_ell2(self):
    method _get_initial_transforms_and_parameters_identity (line 1548) | def _get_initial_transforms_and_parameters_identity(self):
    method _get_initial_transforms_and_parameters_geometry_moments (line 1571) | def _get_initial_transforms_and_parameters_geometry_moments(self):
    method _get_initial_intensity_correction_parameters_None (line 1704) | def _get_initial_intensity_correction_parameters_None(self):
    method _get_initial_intensity_correction_parameters_linear (line 1717) | def _get_initial_intensity_correction_parameters_linear(self):
    method _get_initial_intensity_correction_parameters_affine (line 1745) | def _get_initial_intensity_correction_parameters_affine(self):
    method _apply_intensity_correction_None (line 1775) | def _apply_intensity_correction_None(self,
    method _apply_intensity_correction_linear (line 1780) | def _apply_intensity_correction_linear(self,
    method _apply_intensity_correction_affine (line 1785) | def _apply_intensity_correction_affine(self,
    method _add_gradient_with_respect_to_intensity_correction_parameters_None (line 1803) | def _add_gradient_with_respect_to_intensity_correction_parameters_None(
    method _add_gradient_with_respect_to_intensity_correction_parameters_linear (line 1809) | def _add_gradient_with_respect_to_intensity_correction_parameters_linear(
    method _add_gradient_with_respect_to_intensity_correction_parameters_affine (line 1822) | def _add_gradient_with_respect_to_intensity_correction_parameters_affine(
    method _get_projected_2D_slices_of_stack (line 1850) | def _get_projected_2D_slices_of_stack(self,
    method _get_TPP_transform (line 1969) | def _get_TPP_transform(self, slice_sitk):
    method _new_rigid_transform_sitk (line 1984) | def _new_rigid_transform_sitk(self):
    method _new_rigid_transform_itk (line 1987) | def _new_rigid_transform_itk(self):
    method _new_similarity_transform_sitk (line 1990) | def _new_similarity_transform_sitk(self):
    method _new_similarity_transform_itk (line 1993) | def _new_similarity_transform_itk(self):
    method _new_affine_transform_sitk (line 1996) | def _new_affine_transform_sitk(self):
    method _new_affine_transform_itk (line 1999) | def _new_affine_transform_itk(self):
    method _apply_motion_correction (line 2011) | def _apply_motion_correction(self):
    method _apply_rigid_motion_correction_and_compute_slice_transforms (line 2023) | def _apply_rigid_motion_correction_and_compute_slice_transforms(self):
    method _apply_similarity_motion_correction_and_compute_slice_transforms (line 2074) | def _apply_similarity_motion_correction_and_compute_slice_transforms(s...
    method _apply_affine_motion_correction_and_compute_slice_transforms (line 2165) | def _apply_affine_motion_correction_and_compute_slice_transforms(self):
    method _get_3D_from_2D_rigid_transform_sitk (line 2219) | def _get_3D_from_2D_rigid_transform_sitk(self, rigid_transform_2D_sitk):
    method _get_3D_from_2D_affine_transform_sitk (line 2253) | def _get_3D_from_2D_affine_transform_sitk(self, affine_transform_2D_si...

FILE: niftymic/registration/niftyreg.py
  class RegAladin (line 26) | class RegAladin(AffineRegistrationMethod):
    method __init__ (line 28) | def __init__(self,
    method set_options (line 59) | def set_options(self, options):
    method get_options (line 70) | def get_options(self):
    method _run (line 73) | def _run(self):
    method _get_warped_moving_sitk (line 112) | def _get_warped_moving_sitk(self):
  class RegF3D (line 116) | class RegF3D(RegistrationMethod):
    method __init__ (line 118) | def __init__(self,
    method set_options (line 143) | def set_options(self, options):
    method get_options (line 154) | def get_options(self):
    method _run (line 157) | def _run(self):
    method get_warped_moving (line 193) | def get_warped_moving(self):

FILE: niftymic/registration/registration_method.py
  class RegistrationMethod (line 24) | class RegistrationMethod(object):
    method __init__ (line 39) | def __init__(self,
    method set_fixed (line 62) | def set_fixed(self, fixed):
    method get_fixed (line 73) | def get_fixed(self):
    method set_moving (line 84) | def set_moving(self, moving):
    method get_moving (line 95) | def get_moving(self):
    method use_fixed_mask (line 105) | def use_fixed_mask(self, use_fixed_mask):
    method use_moving_mask (line 115) | def use_moving_mask(self, use_moving_mask):
    method use_verbose (line 125) | def use_verbose(self, use_verbose):
    method get_computational_time (line 136) | def get_computational_time(self):
    method get_registration_transform_sitk (line 147) | def get_registration_transform_sitk(self):
    method run (line 156) | def run(self):
    method _run (line 179) | def _run(self):
    method get_warped_moving (line 192) | def get_warped_moving(self):
  class AffineRegistrationMethod (line 200) | class AffineRegistrationMethod(RegistrationMethod):
    method __init__ (line 215) | def __init__(self,
    method set_registration_type (line 240) | def set_registration_type(self, registration_type):
    method get_registration_type (line 254) | def get_registration_type(self):
    method get_warped_moving (line 266) | def get_warped_moving(self):
    method get_transformed_fixed (line 304) | def get_transformed_fixed(self):
    method _get_warped_moving_sitk (line 310) | def _get_warped_moving_sitk(self):

FILE: niftymic/registration/simple_itk_registration.py
  class SimpleItkRegistration (line 33) | class SimpleItkRegistration(AffineRegistrationMethod):
    method __init__ (line 35) | def __init__(
    method use_multiresolution_framework (line 99) | def use_multiresolution_framework(self, flag):
    method use_oriented_psf (line 106) | def use_oriented_psf(self, flag):
    method set_initializer_type (line 111) | def set_initializer_type(self, initializer_type):
    method get_initializer_type (line 119) | def get_initializer_type(self):
    method set_interpolator (line 124) | def set_interpolator(self, interpolator_type):
    method get_interpolator (line 129) | def get_interpolator(self):
    method set_metric (line 132) | def set_metric(self, metric):
    method set_metric_params (line 135) | def set_metric_params(self, metric_params):
    method set_optimizer (line 138) | def set_optimizer(self, optimizer):
    method set_optimizer_params (line 141) | def set_optimizer_params(self, optimizer_params):
    method set_scales_estimator (line 146) | def set_scales_estimator(self, scales_estimator):
    method _run (line 153) | def _run(self):
    method _get_warped_moving_sitk (line 223) | def _get_warped_moving_sitk(self):

FILE: niftymic/registration/stack_registration_base.py
  class StackRegistrationBase (line 38) | class StackRegistrationBase(object):
    method __init__ (line 82) | def __init__(self,
    method set_stack (line 158) | def set_stack(self, stack):
    method get_stack (line 162) | def get_stack(self):
    method set_reference (line 172) | def set_reference(self, reference):
    method get_reference (line 175) | def get_reference(self):
    method use_stack_mask (line 186) | def use_stack_mask(self, flag):
    method use_reference_mask (line 197) | def use_reference_mask(self, flag):
    method use_verbose (line 207) | def use_verbose(self, flag):
    method use_parameter_normalization (line 217) | def use_parameter_normalization(self, flag):
    method set_transform_initializer_type (line 232) | def set_transform_initializer_type(self, transform_initializer_type):
    method get_transform_initializer_type (line 239) | def get_transform_initializer_type(self):
    method set_interpolator (line 249) | def set_interpolator(self, interpolator):
    method get_interpolator (line 253) | def get_interpolator(self):
    method set_alpha_neighbour (line 263) | def set_alpha_neighbour(self, alpha_neighbour):
    method get_alpha_neighbour (line 266) | def get_alpha_neighbour(self):
    method set_alpha_reference (line 277) | def set_alpha_reference(self, alpha_reference):
    method get_alpha_reference (line 280) | def get_alpha_reference(self):
    method set_alpha_parameter (line 292) | def set_alpha_parameter(self, alpha_parameter):
    method get_alpha_parameter (line 295) | def get_alpha_parameter(self):
    method set_optimizer (line 298) | def set_optimizer(self, optimizer):
    method get_optimizer (line 301) | def get_optimizer(self):
    method set_optimizer_iter_max (line 316) | def set_optimizer_iter_max(self, optimizer_iter_max):
    method get_optimizer_iter_max (line 319) | def get_optimizer_iter_max(self):
    method set_optimizer_loss (line 332) | def set_optimizer_loss(self, optimizer_loss):
    method get_optimizer_loss (line 339) | def get_optimizer_loss(self):
    method set_optimizer_method (line 351) | def set_optimizer_method(self, optimizer_method):
    method get_optimizer_method (line 358) | def get_optimizer_method(self):
    method get_parameters (line 369) | def get_parameters(self):
    method get_corrected_stack (line 380) | def get_corrected_stack(self):
    method get_slice_transforms_sitk (line 404) | def get_slice_transforms_sitk(self):
    method print_statistics (line 413) | def print_statistics(self):
    method run (line 428) | def run(self):
    method _run_optimizer_least_squares (line 538) | def _run_optimizer_least_squares(self, fun, jac, x0, method, loss, ite...
    method _run_optimizer_minimize (line 554) | def _run_optimizer_minimize(self, fun, jac, x0, method, loss, iter_max...
    method _print_info_text_least_squares (line 576) | def _print_info_text_least_squares(self):
    method _print_info_text_minimize (line 580) | def _print_info_text_minimize(self):
    method _run_registration_pipeline_initialization (line 592) | def _run_registration_pipeline_initialization(self):
    method _get_residual_call (line 605) | def _get_residual_call(self):
    method _get_initial_transforms_and_parameters_identity (line 617) | def _get_initial_transforms_and_parameters_identity(self):
    method _get_initial_transforms_and_parameters_geometry_moments (line 631) | def _get_initial_transforms_and_parameters_geometry_moments(self):
    method _apply_motion_correction (line 643) | def _apply_motion_correction(self):

FILE: niftymic/registration/transform_initializer.py
  class TransformInitializer (line 29) | class TransformInitializer(object):
    method __init__ (line 31) | def __init__(self,
    method get_transform_sitk (line 50) | def get_transform_sitk(self):
    method run (line 53) | def run(self, debug=False):
    method get_pca_from_mask (line 95) | def get_pca_from_mask(mask_sitk, robust=False):
    method _get_best_transform (line 123) | def _get_best_transform(self, transformations, debug=False):
    method _run_registrations (line 179) | def _run_registrations(self, transformations):

FILE: niftymic/registration/wrap_itk_registration.py
  class WrapItkRegistration (line 33) | class WrapItkRegistration(SimpleItkRegistration):
    method __init__ (line 35) | def __init__(
    method _run (line 92) | def _run(self):

FILE: niftymic/utilities/binary_mask_from_mask_srr_estimator.py
  class BinaryMaskFromMaskSRREstimator (line 25) | class BinaryMaskFromMaskSRREstimator(object):
    method __init__ (line 27) | def __init__(self,
    method get_mask_sitk (line 47) | def get_mask_sitk(self):
    method run (line 50) | def run(self):

FILE: niftymic/utilities/brain_stripping.py
  class BrainStripping (line 29) | class BrainStripping(object):
    method __init__ (line 44) | def __init__(self,
    method from_filename (line 81) | def from_filename(cls,
    method from_sitk_image (line 115) | def from_sitk_image(cls,
    method from_stack (line 146) | def from_stack(cls,
    method set_input_image_sitk (line 171) | def set_input_image_sitk(self, sitk_image):
    method compute_brain_image (line 181) | def compute_brain_image(self, compute_brain_image):
    method compute_brain_mask (line 191) | def compute_brain_mask(self, compute_brain_mask):
    method compute_skull_image (line 201) | def compute_skull_image(self, compute_skull_image):
    method set_bet_options (line 211) | def set_bet_options(self, bet_options):
    method get_input_image_sitk (line 222) | def get_input_image_sitk(self):
    method get_brain_masked_stack (line 238) | def get_brain_masked_stack(self, filename="Unknown", extract_slices=Fa...
    method get_brain_image_sitk (line 262) | def get_brain_image_sitk(self):
    method get_brain_mask_sitk (line 277) | def get_brain_mask_sitk(self, dilate_radius=0):
    method get_skull_mask_sitk (line 311) | def get_skull_mask_sitk(self,
    method get_mask_around_skull (line 358) | def get_mask_around_skull(self,
    method run (line 414) | def run(self):
    method _run_bet_for_brain_stripping (line 424) | def _run_bet_for_brain_stripping(self, debug=0):

FILE: niftymic/utilities/data_preprocessing.py
  class DataPreprocessing (line 21) | class DataPreprocessing:
    method __init__ (line 44) | def __init__(self,
    method use_N4BiasFieldCorrector (line 79) | def use_N4BiasFieldCorrector(self, flag):
    method run (line 88) | def run(self):
    method get_preprocessed_stacks (line 177) | def get_preprocessed_stacks(self):
    method get_computational_time (line 182) | def get_computational_time(self):
    method write_preprocessed_data (line 187) | def write_preprocessed_data(self, dir_output):

FILE: niftymic/utilities/input_arparser.py
  class InputArgparser (line 38) | class InputArgparser(object):
    method __init__ (line 40) | def __init__(self,
    method get_parser (line 77) | def get_parser(self):
    method parse_args (line 80) | def parse_args(self):
    method print_arguments (line 88) | def print_arguments(self, args, title="Configuration:"):
    method log_config (line 117) | def log_config(self,
    method add_filename (line 172) | def add_filename(
    method add_filename_mask (line 182) | def add_filename_mask(
    method add_dir_input (line 192) | def add_dir_input(
    method add_dir_input_mc (line 202) | def add_dir_input_mc(
    method add_subfolder_motion_correction (line 213) | def add_subfolder_motion_correction(
    method add_subfolder_comparison (line 224) | def add_subfolder_comparison(
    method add_dir_inputs (line 235) | def add_dir_inputs(
    method add_filenames (line 246) | def add_filenames(
    method add_filenames_masks (line 256) | def add_filenames_masks(
    method add_label (line 266) | def add_label(
    method add_fixed (line 276) | def add_fixed(
    method add_fixed_mask (line 286) | def add_fixed_mask(
    method add_moving (line 296) | def add_moving(
    method add_moving_mask (line 307) | def add_moving_mask(
    method add_metric (line 317) | def add_metric(
    method add_metric_radius (line 327) | def add_metric_radius(
    method add_labels (line 337) | def add_labels(
    method add_image_selection (line 347) | def add_image_selection(
    method add_reference (line 358) | def add_reference(
    method add_reference_mask (line 368) | def add_reference_mask(
    method add_output (line 378) | def add_output(
    method add_dir_output (line 388) | def add_dir_output(
    method add_suffix_mask (line 398) | def add_suffix_mask(
    method add_use_masks_srr (line 412) | def add_use_masks_srr(
    method add_outlier_rejection (line 423) | def add_outlier_rejection(
    method add_boundary_stacks (line 434) | def add_boundary_stacks(
    method add_prefix_output (line 447) | def add_prefix_output(
    method add_target_stack_index (line 457) | def add_target_stack_index(
    method add_target_stack (line 468) | def add_target_stack(
    method add_reconstruction (line 479) | def add_reconstruction(
    method add_reconstruction_space (line 490) | def add_reconstruction_space(
    method add_gestational_age (line 501) | def add_gestational_age(
    method add_search_angle (line 512) | def add_search_angle(
    method add_multiresolution (line 521) | def add_multiresolution(
    method add_shrink_factors (line 530) | def add_shrink_factors(
    method add_smoothing_sigmas (line 540) | def add_smoothing_sigmas(
    method add_two_step_cycles (line 550) | def add_two_step_cycles(
    method add_sigma (line 561) | def add_sigma(
    method add_minimizer (line 571) | def add_minimizer(
    method add_alpha (line 584) | def add_alpha(
    method add_alpha_first (line 595) | def add_alpha_first(
    method add_threshold (line 605) | def add_threshold(
    method add_threshold_first (line 615) | def add_threshold_first(
    method add_s2v_smoothing (line 625) | def add_s2v_smoothing(
    method add_interleave (line 634) | def add_interleave(
    method add_iter_max (line 643) | def add_iter_max(
    method add_iter_max_first (line 652) | def add_iter_max_first(
    method add_rho (line 662) | def add_rho(
    method add_iterations (line 672) | def add_iterations(
    method add_tv_solver (line 681) | def add_tv_solver(
    method add_data_loss (line 690) | def add_data_loss(
    method add_data_loss_scale (line 701) | def add_data_loss_scale(
    method add_pd_alg_type (line 714) | def add_pd_alg_type(
    method add_dilation_radius (line 726) | def add_dilation_radius(
    method add_extra_frame_target (line 737) | def add_extra_frame_target(
    method add_bias_field_correction (line 747) | def add_bias_field_correction(
    method add_intensity_correction (line 757) | def add_intensity_correction(
    method add_isotropic_resolution (line 767) | def add_isotropic_resolution(
    method add_log_config (line 778) | def add_log_config(
    method add_write_motion_correction (line 787) | def add_write_motion_correction(
    method add_provide_comparison (line 799) | def add_provide_comparison(
    method add_verbose (line 816) | def add_verbose(
    method add_option (line 825) | def add_option(
    method add_argument (line 836) | def add_argument(
    method add_psf_aware (line 843) | def add_psf_aware(
    method add_stack_recon_range (line 852) | def add_stack_recon_range(
    method add_alphas (line 861) | def add_alphas(
    method add_data_losses (line 872) | def add_data_losses(
    method add_data_loss_scales (line 882) | def add_data_loss_scales(
    method add_study_name (line 893) | def add_study_name(
    method add_measures (line 903) | def add_measures(
    method add_reconstruction_type (line 916) | def add_reconstruction_type(
    method add_interpolator (line 927) | def add_interpolator(
    method add_slice_thicknesses (line 937) | def add_slice_thicknesses(
    method add_viewer (line 950) | def add_viewer(
    method add_v2v_method (line 961) | def add_v2v_method(
    method _parse_config_file (line 985) | def _parse_config_file(self):
    method _add_argument (line 1033) | def _add_argument(self, allvars):

FILE: niftymic/utilities/intensity_correction.py
  class IntensityCorrection (line 28) | class IntensityCorrection(object):
    method __init__ (line 51) | def __init__(self,
    method set_stack (line 102) | def set_stack(self, stack):
    method set_reference (line 112) | def set_reference(self, reference):
    method set_additional_stack (line 124) | def set_additional_stack(self, additional_stack):
    method use_verbose (line 134) | def use_verbose(self, verbose):
    method use_reference_mask (line 137) | def use_reference_mask(self, use_reference_mask):
    method use_stack_mask (line 140) | def use_stack_mask(self, use_stack_mask):
    method use_individual_slice_correction (line 150) | def use_individual_slice_correction(self, flag):
    method get_intensity_corrected_stack (line 161) | def get_intensity_corrected_stack(self):
    method get_intensity_corrected_additional_stack (line 166) | def get_intensity_corrected_additional_stack(self):
    method get_intensity_correction_coefficients (line 179) | def get_intensity_correction_coefficients(self):
    method run_lower_percentile_capping_of_stack (line 189) | def run_lower_percentile_capping_of_stack(self, percentile=10):
    method run_linear_intensity_correction (line 226) | def run_linear_intensity_correction(self):
    method run_affine_intensity_correction (line 239) | def run_affine_intensity_correction(self):
    method _run_intensity_correction (line 251) | def _run_intensity_correction(self, correction_model):
    method _apply_affine_intensity_correction (line 324) | def _apply_affine_intensity_correction(self, nda, nda_reference, nda_m...
    method _apply_linear_intensity_correction (line 365) | def _apply_linear_intensity_correction(self, nda, nda_reference, nda_m...
    method _get_data_arrays_prior_to_intensity_correction (line 399) | def _get_data_arrays_prior_to_intensity_correction(self):
    method _create_stack_from_corrected_intensity_array (line 447) | def _create_stack_from_corrected_intensity_array(self, nda, stack):

FILE: niftymic/utilities/joint_image_mask_builder.py
  class JointImageMaskBuilder (line 16) | class JointImageMaskBuilder(object):
    method __init__ (line 18) | def __init__(self,
    method run (line 33) | def run(self):
    method get_stack (line 67) | def get_stack(self):

FILE: niftymic/utilities/motion_updater.py
  class MotionUpdater (line 38) | class MotionUpdater(object):
    method __init__ (line 57) | def __init__(
    method run (line 76) | def run(self, older_than_v3=False):
    method get_data (line 231) | def get_data(self):
    method _check_against_json_true (line 250) | def _check_against_json_true(self, stack_name, slice_number):
    method _check_against_json_false (line 272) | def _check_against_json_false(self, stack_name, slice_number):

FILE: niftymic/utilities/n4_bias_field_correction.py
  class N4BiasFieldCorrection (line 27) | class N4BiasFieldCorrection(object):
    method __init__ (line 29) | def __init__(self,
    method set_stack (line 50) | def set_stack(self, stack):
    method get_bias_field_corrected_stack (line 53) | def get_bias_field_corrected_stack(self):
    method get_computational_time (line 56) | def get_computational_time(self):
    method run_bias_field_correction (line 59) | def run_bias_field_correction(self):

FILE: niftymic/utilities/outlier_rejector.py
  class OutlierRejector (line 24) | class OutlierRejector(object):
    method __init__ (line 26) | def __init__(self,
    method get_stacks (line 44) | def get_stacks(self):
    method run (line 47) | def run(self):

FILE: niftymic/utilities/parameter_normalization.py
  class ParameterNormalization (line 25) | class ParameterNormalization(object):
    method __init__ (line 36) | def __init__(self, parameters_array):
    method get_normalization_coefficients (line 59) | def get_normalization_coefficients(self):
    method compute_normalization_coefficients (line 70) | def compute_normalization_coefficients(self):
    method normalize_parameters (line 98) | def normalize_parameters(self, parameters):
    method denormalize_parameters (line 119) | def denormalize_parameters(self, parameters):

FILE: niftymic/utilities/segmentation_propagation.py
  class SegmentationPropagation (line 27) | class SegmentationPropagation(object):
    method __init__ (line 30) | def __init__(self,
    method set_stack (line 55) | def set_stack(self, stack):
    method get_stack (line 58) | def get_stack(self):
    method set_template (line 61) | def set_template(self, template):
    method get_template (line 64) | def get_template(self):
    method set_dilation_radius (line 67) | def set_dilation_radius(self, dilation_radius):
    method get_dilation_radius (line 70) | def get_dilation_radius(self):
    method set_dilation_kernel (line 73) | def set_dilation_kernel(self, dilation_kernel):
    method get_dilation_kernel (line 79) | def get_dilation_kernel(self):
    method get_segmented_stack (line 82) | def get_segmented_stack(self):
    method get_registration_transform_sitk (line 94) | def get_registration_transform_sitk(self):
    method run_segmentation_propagation (line 97) | def run_segmentation_propagation(self):

FILE: niftymic/utilities/siena.py
  class Siena (line 26) | class Siena(object):
    method __init__ (line 28) | def __init__(self,
    method run (line 41) | def run(self):
    method print_statistics (line 63) | def print_statistics(self):
    method _extract_percentage_brain_volume_change (line 74) | def _extract_percentage_brain_volume_change(self):
    method get_percentage_brain_volume_change (line 83) | def get_percentage_brain_volume_change(self):

FILE: niftymic/utilities/stack_mask_morphological_operations.py
  class StackMaskMorphologicalOperations (line 25) | class StackMaskMorphologicalOperations(object):
    method __init__ (line 37) | def __init__(self, dilation_radius, dilation_kernel, use_dilation_in_p...
    method from_sitk_mask (line 44) | def from_sitk_mask(cls, mask_sitk=None, dilation_radius=0, dilation_ke...
    method from_stack (line 55) | def from_stack(cls, stack=None, dilation_radius=0, dilation_kernel="Ba...
    method set_mask_sitk (line 65) | def set_mask_sitk(self, mask_sitk):
    method get_mask_sitk (line 68) | def get_mask_sitk(self):
    method get_stack (line 71) | def get_stack(self):
    method set_dilation_radius (line 74) | def set_dilation_radius(self, dilation_radius):
    method get_dilation_radius (line 77) | def get_dilation_radius(self):
    method set_dilation_kernel (line 80) | def set_dilation_kernel(self, dilation_kernel):
    method get_dilation_kernel (line 86) | def get_dilation_kernel(self):
    method get_processed_mask_sitk (line 89) | def get_processed_mask_sitk(self):
    method get_processed_stack (line 92) | def get_processed_stack(self):
    method get_computational_time (line 98) | def get_computational_time(self):
    method run_dilation (line 101) | def run_dilation(self):

FILE: niftymic/utilities/target_stack_estimator.py
  class TargetStackEstimator (line 25) | class TargetStackEstimator(object):
    method __init__ (line 27) | def __init__(self):
    method get_target_stack_index (line 43) | def get_target_stack_index(self):
    method get_computational_time (line 46) | def get_computational_time(self):
    method _compute_volume (line 50) | def _compute_volume(file_path):
    method _compute_singular_values (line 61) | def _compute_singular_values(stack):
    method _compute_motion_score_kainz2015 (line 85) | def _compute_motion_score_kainz2015(
    method _compute_motion_score_github (line 123) | def _compute_motion_score_github(sing_values, threshold=0.99):
    method from_volume (line 157) | def from_volume(cls, file_paths_masks):
    method from_motion_score (line 197) | def from_motion_score(cls, file_paths, file_paths_masks):

FILE: niftymic/utilities/template_stack_estimator.py
  class TemplateStackEstimator (line 26) | class TemplateStackEstimator(object):
    method __init__ (line 28) | def __init__(self):
    method get_path_to_template (line 40) | def get_path_to_template(self):
    method get_estimated_gw (line 43) | def get_estimated_gw(self):
    method from_mask (line 54) | def from_mask(cls, file_path_mask):
    method get_largest_connected_region_mask (line 123) | def get_largest_connected_region_mask(mask_nda):

FILE: niftymic/utilities/toolkit_executor.py
  class ToolkitExecuter (line 21) | class ToolkitExecuter(object):
    method __init__ (line 23) | def __init__(self, paths_to_images, paths_to_masks, dir_output):
    method get_function_call_irtk (line 45) | def get_function_call_irtk(
    method write_function_call_to_file (line 117) | def write_function_call_to_file(function_call, path_to_file):
    method _exe_to_fetch_slice_thickness (line 133) | def _exe_to_fetch_slice_thickness(self, paths_to_images):
    method _exe_dilate_masks (line 158) | def _exe_dilate_masks(self, kernel, paths_to_masks, label=1):

FILE: niftymic/utilities/volumetric_reconstruction_pipeline.py
  class Pipeline (line 35) | class Pipeline(object):
    method __init__ (line 38) | def __init__(self, stacks, verbose, viewer):
    method set_stacks (line 45) | def set_stacks(self, stacks):
    method get_stacks (line 48) | def get_stacks(self):
    method set_verbose (line 51) | def set_verbose(self, verbose):
    method get_verbose (line 54) | def get_verbose(self):
    method get_computational_time (line 57) | def get_computational_time(self):
    method run (line 60) | def run(self):
    method _run (line 73) | def _run(self):
  class RegistrationPipeline (line 81) | class RegistrationPipeline(Pipeline):
    method __init__ (line 95) | def __init__(self, verbose, stacks, reference, registration_method, vi...
    method set_reference (line 102) | def set_reference(self, reference):
    method get_reference (line 105) | def get_reference(self):
  class VolumeToVolumeRegistration (line 113) | class VolumeToVolumeRegistration(RegistrationPipeline):
    method __init__ (line 125) | def __init__(self,
    method _run (line 143) | def _run(self):
  class SliceToVolumeRegistration (line 181) | class SliceToVolumeRegistration(RegistrationPipeline):
    method __init__ (line 196) | def __init__(self,
    method set_print_prefix (line 216) | def set_print_prefix(self, print_prefix):
    method _run (line 219) | def _run(self):
  class SliceSetToVolumeRegistration (line 261) | class SliceSetToVolumeRegistration(RegistrationPipeline):
    method __init__ (line 276) | def __init__(self,
    method _run (line 297) | def _run(self, debug=1):
    method _get_stack_subgroup (line 354) | def _get_stack_subgroup(self, indices):
  class ReconstructionRegistrationPipeline (line 411) | class ReconstructionRegistrationPipeline(RegistrationPipeline):
    method __init__ (line 430) | def __init__(self,
    method get_iterative_reconstructions (line 458) | def get_iterative_reconstructions(self):
    method get_computational_time_reconstruction (line 461) | def get_computational_time_reconstruction(self):
    method get_computational_time_registration (line 464) | def get_computational_time_registration(self):
  class TwoStepSliceToVolumeRegistrationReconstruction (line 473) | class TwoStepSliceToVolumeRegistrationReconstruction(
    method __init__ (line 499) | def __init__(self,
    method _run (line 546) | def _run(self):
  class HieararchicalSliceSetRegistration (line 657) | class HieararchicalSliceSetRegistration(RegistrationPipeline):
    method __init__ (line 672) | def __init__(self,
    method _run (line 693) | def _run(self, debug=0):
    method _recursive_split (line 744) | def _recursive_split(self, indices, indices_split, N_min):
  class MultiComponentReconstruction (line 768) | class MultiComponentReconstruction(Pipeline):
    method __init__ (line 781) | def __init__(self,
    method set_reconstruction_method (line 795) | def set_reconstruction_method(self, reconstruction_method):
    method get_reconstruction_method (line 798) | def get_reconstruction_method(self):
    method set_suffix (line 801) | def set_suffix(self, suffix):
    method get_suffix (line 804) | def get_suffix(self):
    method get_reconstructions (line 807) | def get_reconstructions(self):
    method _run (line 810) | def _run(self):

FILE: niftymic/validation/evaluate_image_similarity.py
  function main (line 27) | def main():

FILE: niftymic/validation/evaluate_simulated_stack_similarity.py
  function main (line 25) | def main():

FILE: niftymic/validation/evaluate_slice_residual_similarity.py
  function main (line 25) | def main():

FILE: niftymic/validation/export_side_by_side_simulated_vs_original_slice_comparison.py
  function export_comparison_to_file (line 38) | def export_comparison_to_file(nda_original,
  function _export_image_side_by_side (line 74) | def _export_image_side_by_side(
  function _resize_image (line 122) | def _resize_image(path_to_file, resize):
  function _export_pdf_from_side_by_side_images (line 140) | def _export_pdf_from_side_by_side_images(directory, path_to_file, extens...
  function main (line 154) | def main():

FILE: niftymic/validation/image_similarity_evaluator.py
  class ImageSimilarityEvaluator (line 29) | class ImageSimilarityEvaluator(object):
    method __init__ (line 43) | def __init__(
    method set_stacks (line 69) | def set_stacks(self, stacks):
    method set_reference (line 79) | def set_reference(self, reference):
    method get_similarities (line 90) | def get_similarities(self):
    method get_measures (line 93) | def get_measures(self):
    method compute_similarities (line 105) | def compute_similarities(self):
    method write_similarities (line 154) | def write_similarities(self, directory):
    method read_similarities (line 193) | def read_similarities(self, directory):
    method _get_filename_paths (line 226) | def _get_filename_paths(self, directory):

FILE: niftymic/validation/motion_evaluator.py
  class MotionEvaluator (line 29) | class MotionEvaluator(object):
    method __init__ (line 31) | def __init__(self, transforms_sitk):
    method run (line 56) | def run(self):
    method display (line 76) | def display(self, title=None, dir_output=None):
    method show (line 115) | def show(self, title=None, dir_output=None):
    method _get_scaled_params (line 168) | def _get_scaled_params(self, transform_params):
    method _replace_string (line 172) | def _replace_string(self, string):

FILE: niftymic/validation/motion_simulator.py
  class MotionSimulator (line 18) | class MotionSimulator(object):
    method __init__ (line 21) | def __init__(self, dimension, verbose):
    method simulate_motion (line 27) | def simulate_motion(self):
    method get_transforms_sitk (line 30) | def get_transforms_sitk(self):
    method write_transforms_sitk (line 39) | def write_transforms_sitk(self,
  class RigidMotionSimulator (line 51) | class RigidMotionSimulator(MotionSimulator):
    method __init__ (line 54) | def __init__(self, dimension, verbose):
  class RandomRigidMotionSimulator (line 59) | class RandomRigidMotionSimulator(RigidMotionSimulator):
    method __init__ (line 61) | def __init__(self,
    method simulate_motion (line 71) | def simulate_motion(self, seed=None, simulations=1):

FILE: niftymic/validation/residual_evaluator.py
  class ResidualEvaluator (line 34) | class ResidualEvaluator(object):
    method __init__ (line 49) | def __init__(
    method _get_original_number_of_slices (line 71) | def _get_original_number_of_slices(stack):
    method set_stacks (line 91) | def set_stacks(self, stacks):
    method set_reference (line 101) | def set_reference(self, reference):
    method get_measures (line 104) | def get_measures(self):
    method get_slice_similarities (line 121) | def get_slice_similarities(self):
    method get_slice_projections (line 135) | def get_slice_projections(self):
    method compute_slice_projections (line 147) | def compute_slice_projections(self):
    method evaluate_slice_similarities (line 182) | def evaluate_slice_similarities(self):
    method write_slice_similarities (line 255) | def write_slice_similarities(self, directory):
    method read_slice_similarities (line 283) | def read_slice_similarities(self, directory, ext="txt"):
    method show_slice_similarities (line 332) | def show_slice_similarities(

FILE: niftymic/validation/show_evaluated_simulated_stack_similarity.py
  function main (line 31) | def main():

FILE: niftymic/validation/simulate_stacks_from_reconstruction.py
  function main (line 35) | def main():

FILE: niftymic/validation/slice_acquisition.py
  class SliceAcqusition (line 27) | class SliceAcqusition(object):
    method __init__ (line 30) | def __init__(self,
    method run (line 43) | def run(self):
    method _run (line 47) | def _run(self):
    method _get_interpolator (line 50) | def _get_interpolator(self, stack_slice):
    method get_output (line 70) | def get_output(self):
  class StaticSliceAcquisition (line 74) | class StaticSliceAcquisition(SliceAcqusition):
    method __init__ (line 76) | def __init__(self,
    method set_stack_slice (line 89) | def set_stack_slice(self, stack_slice):
    method _run (line 92) | def _run(self):

FILE: niftymic/validation/slice_coverage.py
  class SliceCoverage (line 17) | class SliceCoverage(object):
    method __init__ (line 19) | def __init__(self, stacks, reconstruction_sitk):
    method get_coverage_sitk (line 34) | def get_coverage_sitk(self):
    method run (line 45) | def run(self):
    method _add_slice_contribution (line 72) | def _add_slice_contribution(slice, coverage_sitk):

FILE: niftymic/validation/write_random_motion_transforms.py
  function main (line 15) | def main():

FILE: setup.py
  function install_requires (line 31) | def install_requires(fname="requirements.txt"):

FILE: tests/brain_stripping_test.py
  class BrainStrippingTest (line 19) | class BrainStrippingTest(unittest.TestCase):
    method setUp (line 26) | def setUp(self):
    method test_01_input_output (line 32) | def test_01_input_output(self):
    method test_02_brain_mask (line 59) | def test_02_brain_mask(self):

FILE: tests/case_study_fetal_brain_test.py
  class CaseStudyFetalBrainTest (line 21) | class CaseStudyFetalBrainTest(unittest.TestCase):
    method setUp (line 23) | def setUp(self):
    method test_reconstruct_volume (line 34) | def test_reconstruct_volume(self):
    method test_reconstruct_volume_from_slices (line 105) | def test_reconstruct_volume_from_slices(self):
    method test_register_image (line 140) | def test_register_image(self):

FILE: tests/case_study_rsfmri_test.py
  class CaseStudyRestingStateFMRITest (line 24) | class CaseStudyRestingStateFMRITest(unittest.TestCase):
    method setUp (line 26) | def setUp(self):
    method test_estimate_motion (line 34) | def test_estimate_motion(self):
    method test_reconstruct_volume_from_slices (line 89) | def test_reconstruct_volume_from_slices(self):
    method test_reconstruct_volume_from_slices_temporal_reg (line 125) | def test_reconstruct_volume_from_slices_temporal_reg(self):

FILE: tests/data_reader_test.py
  class DataReaderTest (line 21) | class DataReaderTest(unittest.TestCase):
    method setUp (line 23) | def setUp(self):
    method test_read_transformations (line 40) | def test_read_transformations(self):

FILE: tests/image_similarity_evaluator_test.py
  class ImageSimilarityEvaluatorTest (line 23) | class ImageSimilarityEvaluatorTest(unittest.TestCase):
    method setUp (line 25) | def setUp(self):
    method test_compute_write_read_similarities (line 28) | def test_compute_write_read_similarities(self):
    method test_results_not_created (line 61) | def test_results_not_created(self):

FILE: tests/installation_test.py
  class InstallationTest (line 20) | class InstallationTest(unittest.TestCase):
    method setUp (line 22) | def setUp(self):
    method test_fsl (line 36) | def test_fsl(self):
    method test_niftyreg (line 51) | def test_niftyreg(self):
    method test_itk_niftymic (line 67) | def test_itk_niftymic(self):

FILE: tests/installation_test_fetal_brain_seg.py
  class InstallationTest (line 18) | class InstallationTest(unittest.TestCase):
    method setUp (line 20) | def setUp(self):
    method test_fetal_brain_seg (line 30) | def test_fetal_brain_seg(self):

FILE: tests/installation_test_monaifbs.py
  class InstallationTestMonaiFbs (line 18) | class InstallationTestMonaiFbs(unittest.TestCase):
    method setUp (line 20) | def setUp(self):
    method test_fetal_brain_seg (line 30) | def test_fetal_brain_seg(self):

FILE: tests/intensity_correction_test.py
  class IntensityCorrectionTest (line 21) | class IntensityCorrectionTest(unittest.TestCase):
    method setUp (line 29) | def setUp(self):
    method test_linear_intensity_correction (line 32) | def test_linear_intensity_correction(self):
    method test_affine_intensity_correction (line 79) | def test_affine_intensity_correction(self):

FILE: tests/intra_stack_registration_test.py
  function get_inplane_corrupted_stack (line 28) | def get_inplane_corrupted_stack(stack,
  class IntraStackRegistrationTest (line 140) | class IntraStackRegistrationTest(unittest.TestCase):
    method setUp (line 147) | def setUp(self):
    method test_initial_transform_computation_1 (line 158) | def test_initial_transform_computation_1(self):
    method test_initial_transform_computation_2 (line 226) | def test_initial_transform_computation_2(self):
    method test_initial_transform_computation_3 (line 329) | def test_initial_transform_computation_3(self):
    method test_initial_intensity_coefficient_computation (line 466) | def test_initial_intensity_coefficient_computation(self):
    method test_inplane_rigid_alignment_to_neighbour (line 550) | def test_inplane_rigid_alignment_to_neighbour(self):
    method test_inplane_rigid_alignment_to_reference (line 640) | def test_inplane_rigid_alignment_to_reference(self):
    method test_inplane_rigid_alignment_to_reference_with_intensity_correction_linear (line 712) | def test_inplane_rigid_alignment_to_reference_with_intensity_correctio...
    method test_inplane_rigid_alignment_to_reference_with_intensity_correction_affine (line 794) | def test_inplane_rigid_alignment_to_reference_with_intensity_correctio...
    method test_inplane_similarity_alignment_to_reference (line 866) | def test_inplane_similarity_alignment_to_reference(self):
    method test_inplane_rigid_alignment_to_reference_multimodal (line 969) | def test_inplane_rigid_alignment_to_reference_multimodal(self):
    method test_inplane_uniform_scale_similarity_alignment_to_reference (line 1061) | def test_inplane_uniform_scale_similarity_alignment_to_reference(self):

FILE: tests/linear_image_quality_transfer_test.py
  class LinearImageQualityTransferTest (line 20) | class LinearImageQualityTransferTest(unittest.TestCase):
    method setUp (line 27) | def setUp(self):
    method test_kernel_2D_as_kernel_3D (line 36) | def test_kernel_2D_as_kernel_3D(self):

FILE: tests/linear_operators_test.py
  class LinearOperatorsTest (line 26) | class LinearOperatorsTest(unittest.TestCase):
    method setUp (line 28) | def setUp(self):
    method test_forward_operator_stack (line 48) | def test_forward_operator_stack(self):
    method test_simulate_stacks_from_slices (line 94) | def test_simulate_stacks_from_slices(self):

FILE: tests/niftyreg_test.py
  class NiftyRegTest (line 24) | class NiftyRegTest(unittest.TestCase):
    method setUp (line 31) | def setUp(self):
    method test_affine_transform_reg_aladin (line 34) | def test_affine_transform_reg_aladin(self):

FILE: tests/parameter_normalization_test.py
  class ParameterNormalizationTest (line 26) | class ParameterNormalizationTest(unittest.TestCase):
    method setUp (line 33) | def setUp(self):
    method test_parameter_normalization (line 36) | def test_parameter_normalization(self):

FILE: tests/registration_test.py
  class RegistrationTest (line 32) | class RegistrationTest(unittest.TestCase):
    method setUp (line 39) | def setUp(self):
    method test_translation_registration_of_slices (line 252) | def test_translation_registration_of_slices(self):

FILE: tests/residual_evaluator_test.py
  class ResidualEvaluatorTest (line 23) | class ResidualEvaluatorTest(unittest.TestCase):
    method setUp (line 25) | def setUp(self):
    method test_compute_write_read_slice_similarities (line 29) | def test_compute_write_read_slice_similarities(self):
    method test_slice_projections_not_created (line 62) | def test_slice_projections_not_created(self):

FILE: tests/segmentation_propagation_test.py
  class SegmentationPropagationTest (line 23) | class SegmentationPropagationTest(unittest.TestCase):
    method setUp (line 30) | def setUp(self):
    method test_registration (line 33) | def test_registration(self):

FILE: tests/simulator_slice_acquisition_test.py
  class SimulatorSliceAcqusitionTest (line 29) | class SimulatorSliceAcqusitionTest(unittest.TestCase):
    method setUp (line 36) | def setUp(self):
    method test_conversion_image_direction (line 39) | def test_conversion_image_direction(self):
    method test_run_simulation_view (line 84) | def test_run_simulation_view(self):
    method test_ground_truth_affine_transforms_no_motion (line 179) | def test_ground_truth_affine_transforms_no_motion(self):
    method test_ground_truth_affine_transforms_with_motion_NearestNeighbor (line 226) | def test_ground_truth_affine_transforms_with_motion_NearestNeighbor(se...
    method test_ground_truth_affine_transforms_with_motion_OrientedGaussian (line 274) | def test_ground_truth_affine_transforms_with_motion_OrientedGaussian(s...

FILE: tests/stack_test.py
  class StackTest (line 22) | class StackTest(unittest.TestCase):
    method setUp (line 30) | def setUp(self):
    method test_get_resampled_stack_from_slices (line 33) | def test_get_resampled_stack_from_slices(self):
    method test_io_image_not_existent (line 60) | def test_io_image_not_existent(self):
    method test_io_image_and_mask_1 (line 74) | def test_io_image_and_mask_1(self):
    method test_io_image_and_mask_2 (line 88) | def test_io_image_and_mask_2(self):
    method test_io_image_and_mask_3 (line 101) | def test_io_image_and_mask_3(self):
    method test_io_image_and_mask_4 (line 114) | def test_io_image_and_mask_4(self):
    method test_update_write_transform (line 127) | def test_update_write_transform(self):
Condensed preview — 127 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,090K chars).
[
  {
    "path": ".gitattributes",
    "chars": 41,
    "preview": "*.pt filter=lfs diff=lfs merge=lfs -text\n"
  },
  {
    "path": ".gitignore",
    "chars": 181,
    "preview": "build/\nhtml/\ndata/tests/\ndist/\nlatex/\nmonaifbs/models/\nprototyping/\n*.nii\n*.nii.gz\n*.tar.gz\n*.deb\n*.zip\n*.pyc\n*iterate.d"
  },
  {
    "path": ".gitlab-ci.yml",
    "chars": 7122,
    "preview": "# -----------------------------------Set Up------------------------------------\nvariables:\n    PY_VERSION: 3\n    PRIVATE"
  },
  {
    "path": ".gitmodules",
    "chars": 85,
    "preview": "[submodule \"MONAIfbs\"]\n\tpath = MONAIfbs\n\turl = https://github.com/gift-surg/MONAIfbs\n"
  },
  {
    "path": "LICENSE",
    "chars": 1522,
    "preview": "Copyright (c) 2017, University College London\nAll rights reserved.\n\nRedistribution and use in source and binary forms, w"
  },
  {
    "path": "MANIFEST.in",
    "chars": 41,
    "preview": "include LICENSE\ninclude requirements.txt\n"
  },
  {
    "path": "README.md",
    "chars": 32204,
    "preview": "# Motion Correction and Volumetric Image Reconstruction of 2D Ultra-fast MRI\n\nNiftyMIC is a Python-based open-source too"
  },
  {
    "path": "data/templates/LICENSE",
    "chars": 1762,
    "preview": "CRL (Computational Radiology Laboratory) hereby grants a license to use, including the right to share, copy, distribute,"
  },
  {
    "path": "data/templates/README",
    "chars": 5116,
    "preview": "2016 Fetal Brain Atlas\nCopyright 2016, Computational Radiology Lab, Boston Childrens Hospital\n\nContact:\nAli Gholipour: A"
  },
  {
    "path": "data/templates/templates_info.json",
    "chars": 3859,
    "preview": "{\n    \"21\": {\n        \"image\": \"STA21.nii.gz\", \n        \"mask\": \"STA21_mask.nii.gz\", \n        \"mask_dil\": \"STA21_mask_di"
  },
  {
    "path": "doc/doxyfile",
    "chars": 105747,
    "preview": "# Doxyfile 1.8.9.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org"
  },
  {
    "path": "docker/docker-compose.yml",
    "chars": 715,
    "preview": "# Comments:\n#  - should work in principle, but not tested\n#  - seems not possible to add two tags per \"service\" with one"
  },
  {
    "path": "docker/itk_niftymic/.dockerignore",
    "chars": 12,
    "preview": ".git*\n.cache"
  },
  {
    "path": "docker/itk_niftymic/Dockerfile",
    "chars": 2526,
    "preview": "#\n# Building of Docker image:\n#   docker build --build-arg VERSION=v? -t renbem/itk_niftymic:v? -t renbem/itk_niftymic ."
  },
  {
    "path": "docker/niftymic/.dockerignore",
    "chars": 12,
    "preview": ".git*\n.cache"
  },
  {
    "path": "docker/niftymic/Dockerfile",
    "chars": 4571,
    "preview": "#\n# Building of Docker image with default monaifbs segmentation tool:\n#   docker build --build-arg VERSION=v? -t renbem/"
  },
  {
    "path": "docker/simplereg_dependencies/.dockerignore",
    "chars": 12,
    "preview": ".git*\n.cache"
  },
  {
    "path": "docker/simplereg_dependencies/Dockerfile",
    "chars": 5567,
    "preview": "#\n# Building of Docker image:\n#   docker build -t renbem/simplereg_dependencies .\n#   \n# Run with GUI (however, does not"
  },
  {
    "path": "niftymic/__about__.py",
    "chars": 269,
    "preview": "__author__ = \"Michael Ebner\"\n__email__ = \"michael.ebner@kcl.ac.uk\"\n__license__ = \"BSD-3-Clause\"\n__version__ = \"0.9\"\n__su"
  },
  {
    "path": "niftymic/__init__.py",
    "chars": 225,
    "preview": "from niftymic.__about__ import (\n    __author__,\n    __email__,\n    __license__,\n    __summary__,\n    __version__,\n )\n\n_"
  },
  {
    "path": "niftymic/application/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "niftymic/application/correct_bias_field.py",
    "chars": 3427,
    "preview": "##\n# \\file correct_bias_field.py\n# \\brief      Script to correct for bias field. Based on N4ITK\n#\n# \\author     Michael "
  },
  {
    "path": "niftymic/application/correct_intensities.py",
    "chars": 5101,
    "preview": "##\n# \\file correct_intensities.py\n# \\brief      Script to perform intensity correction across images given a\n#          "
  },
  {
    "path": "niftymic/application/multiply.py",
    "chars": 1189,
    "preview": "##\n# \\file multiply.py\n# \\brief      Script multiply images with each other.\n#\n# \\author     Michael Ebner (michael.ebne"
  },
  {
    "path": "niftymic/application/nifti2dicom.py",
    "chars": 6850,
    "preview": "##\n# \\file convert_nifti_to_dicom.py\n# \\brief      Script to convert a 3D NIfTI image to DICOM.\n#\n# \\author     Michael "
  },
  {
    "path": "niftymic/application/propagate_mask.py",
    "chars": 4715,
    "preview": "##\n# \\file propagate_mask.py\n# \\brief      Script to propagate an image mask using rigid registration\n#\n# \\author     Mi"
  },
  {
    "path": "niftymic/application/reconstruct_volume.py",
    "chars": 23435,
    "preview": "##\n# \\file reconstruct_volume.py\n# \\brief      Script to reconstruct an isotropic, high-resolution volume from\n#        "
  },
  {
    "path": "niftymic/application/reconstruct_volume_from_slices.py",
    "chars": 13043,
    "preview": "##\n# \\file reconstruct_volume_from_slices.py\n# \\brief      Script to reconstruct an isotropic, high-resolution volume fr"
  },
  {
    "path": "niftymic/application/register_image.py",
    "chars": 10207,
    "preview": "##\n# \\file register_image.py\n# \\brief      Script to register the obtained reconstruction to a template\n#             sp"
  },
  {
    "path": "niftymic/application/rsfmri_estimate_motion.py",
    "chars": 16347,
    "preview": "##\n# \\file rsfmri_estimate_motion.py\n# \\brief      Estimate motion in resting-state fMRI volumes\n#\n# \\author     Michael"
  },
  {
    "path": "niftymic/application/rsfmri_reconstruct_volume_from_slices.py",
    "chars": 9114,
    "preview": "##\n# \\file reconstruct_volume_from_slices_rsfmri.py\n# \\brief      Script to reconstruct an isotropic, high-resolution vo"
  },
  {
    "path": "niftymic/application/run_reconstruction_parameter_study.py",
    "chars": 7736,
    "preview": "##\n# \\file run_reconstruction_parameter_study.py\n# \\brief      Script to study reconstruction parameters and their impac"
  },
  {
    "path": "niftymic/application/run_reconstruction_pipeline.py",
    "chars": 25462,
    "preview": "##\n# \\file run_reconstruction_pipeline.py\n# \\brief      Script to execute entire reconstruction pipeline\n#\n# \\author    "
  },
  {
    "path": "niftymic/application/segment_fetal_brains.py",
    "chars": 4768,
    "preview": "##\n# \\file correct_bias_field.py\n# \\brief      Script to apply automated fetal brain mask segmentation using monaifbs/fe"
  },
  {
    "path": "niftymic/application/show_slice_coverage.py",
    "chars": 1742,
    "preview": "##\n# \\file show_slice_coverage.py\n# \\brief      Script to show slice coverage available over reconstruction\n#           "
  },
  {
    "path": "niftymic/base/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "niftymic/base/data_reader.py",
    "chars": 23580,
    "preview": "##\n# \\file DataReader.py\n# \\brief      Reads data and returns Stack objects\n#\n# \\author     Michael Ebner (michael.ebner"
  },
  {
    "path": "niftymic/base/data_writer.py",
    "chars": 6025,
    "preview": "##\n# \\file DataWriter.py\n# \\brief      Writes data to HDD\n#\n# \\author     Michael Ebner (michael.ebner.14@ucl.ac.uk)\n# \\"
  },
  {
    "path": "niftymic/base/exceptions.py",
    "chars": 3423,
    "preview": "##\n# \\file exceptions.py\n# \\brief      User-specific exceptions\n#\n# \\author     Michael Ebner (michael.ebner.14@ucl.ac.u"
  },
  {
    "path": "niftymic/base/psf.py",
    "chars": 6070,
    "preview": "##\n# \\file psf.py\n# \\brief      Compute the Gaussian point spread function (PSF) associated with\n#             a slice a"
  },
  {
    "path": "niftymic/base/slice.py",
    "chars": 19065,
    "preview": "##\n# \\file Slice.py\n# \\brief      { item_description }\n#\n# \\author     Michael Ebner (michael.ebner.14@ucl.ac.uk)\n# \\dat"
  },
  {
    "path": "niftymic/base/stack.py",
    "chars": 50512,
    "preview": "##\n# \\file stack.py\n# \\brief      { item_description }\n#\n# \\author     Michael Ebner (michael.ebner.14@ucl.ac.uk)\n# \\dat"
  },
  {
    "path": "niftymic/definitions.py",
    "chars": 833,
    "preview": "import os\nimport sys\n\nfrom pysitk.definitions import DIR_TMP\nfrom pysitk.definitions import ITKSNAP_EXE\nfrom pysitk.defi"
  },
  {
    "path": "niftymic/reconstruction/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "niftymic/reconstruction/admm_solver.py",
    "chars": 8657,
    "preview": "##\n# \\file admm_solver.py\n# \\brief      Implementation to get an approximate solution of the TVL2-SRR\n#             prob"
  },
  {
    "path": "niftymic/reconstruction/linear_operators.py",
    "chars": 12984,
    "preview": "##\n# \\file linear_operators.py\n# \\brief      Implementation of linear operations associated with the physical\n#         "
  },
  {
    "path": "niftymic/reconstruction/primal_dual_solver.py",
    "chars": 7270,
    "preview": "##\n# \\file primal_dual_solver.py\n# \\brief      Solve reconstruction problem A_k x = y_k for all slices k via\n#          "
  },
  {
    "path": "niftymic/reconstruction/scattered_data_approximation.py",
    "chars": 21518,
    "preview": "##\n# \\file ScatteredDataApproximation.py\n# \\brief      Implementation of two different approaches for Scattered Data\n#  "
  },
  {
    "path": "niftymic/reconstruction/solver.py",
    "chars": 19223,
    "preview": "##\n# \\file solver.py\n# \\brief      Base class to solve the SRR problem y_k = D_k B_k W_k x = A_k x\n#             for all"
  },
  {
    "path": "niftymic/reconstruction/tikhonov_solver.py",
    "chars": 21148,
    "preview": "##\n# \\file tikhonov_solver.py\n# \\brief      Implementation to get an approximate solution of the SRR\n#             probl"
  },
  {
    "path": "niftymic/registration/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "niftymic/registration/flirt.py",
    "chars": 3024,
    "preview": "##\n# \\file flirt.py\n# \\brief      Class to use registration method FLIRT\n#\n# \\author     Michael Ebner (michael.ebner.14"
  },
  {
    "path": "niftymic/registration/intra_stack_registration.py",
    "chars": 98467,
    "preview": "##\n# \\file intra_stack_registration.py\n# \\brief      Intra-stack registration steps where slices are only transformed\n# "
  },
  {
    "path": "niftymic/registration/niftyreg.py",
    "chars": 6527,
    "preview": "##\n# \\file niftyreg.py\n# \\brief      Class to use registration method NiftyReg\n#\n# \\author     Michael Ebner (michael.eb"
  },
  {
    "path": "niftymic/registration/registration_method.py",
    "chars": 9272,
    "preview": "##\n# \\file registration_method.py\n# \\brief      Abstract class to define a registration method\n#\n# \\author     Michael E"
  },
  {
    "path": "niftymic/registration/simple_itk_registration.py",
    "chars": 8257,
    "preview": "##\n# \\file simple_itk_registration.py\n# \\brief      Class to use registration method based on SimpleITK\n#\n# \\author     "
  },
  {
    "path": "niftymic/registration/stack_registration_base.py",
    "chars": 22454,
    "preview": "##\n# \\file stack_registration_base.py\n# \\brief      Abstract class containing the shared attributes and functions for\n# "
  },
  {
    "path": "niftymic/registration/transform_initializer.py",
    "chars": 8785,
    "preview": "# \\file transform_initializer.py\n# \\brief      Class to obtain transform estimate to align fixed with moving\n#          "
  },
  {
    "path": "niftymic/registration/wrap_itk_registration.py",
    "chars": 4945,
    "preview": "##\n# \\file wrap_itk_registration.py\n# \\brief      Class to use registration method based on SimpleITK\n#\n# \\author     Mi"
  },
  {
    "path": "niftymic/utilities/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "niftymic/utilities/binary_mask_from_mask_srr_estimator.py",
    "chars": 1751,
    "preview": "##\n# \\file binary_mask_from_mask_srr_estimator.py\n# \\brief      Class to estimate binary mask from mask SRR stack\n#\n# \\a"
  },
  {
    "path": "niftymic/utilities/brain_stripping.py",
    "chars": 16120,
    "preview": "##\n# \\file brain_stripping.py\n# \\brief      This class implements the interface to the Brain Extraction Tool\n#          "
  },
  {
    "path": "niftymic/utilities/data_preprocessing.py",
    "chars": 7666,
    "preview": "##\n# \\file data_preprocessing.py\n# \\brief      Performs preprocessing steps\n#\n# \\author     Michael Ebner (michael.ebner"
  },
  {
    "path": "niftymic/utilities/input_arparser.py",
    "chars": 31780,
    "preview": "##\n# \\file input_argparser.py\n# \\brief      Class holding a collection of possible arguments to parse for\n#             "
  },
  {
    "path": "niftymic/utilities/intensity_correction.py",
    "chars": 18212,
    "preview": "##\n# \\file intensity_correction.py\n# \\brief      Class containing functions to correct for intensities\n#\n# \\author     M"
  },
  {
    "path": "niftymic/utilities/joint_image_mask_builder.py",
    "chars": 2097,
    "preview": "##\n# \\file joint_image_mask_builder.py\n# \\brief      Build common mask from multiple, individual ones\n#\n# \\author     Mi"
  },
  {
    "path": "niftymic/utilities/motion_updater.py",
    "chars": 11592,
    "preview": "##\n# \\file motion_updater.py\n# \\brief      Class to apply stack and individual slice motion transformations\n#           "
  },
  {
    "path": "niftymic/utilities/n4_bias_field_correction.py",
    "chars": 3030,
    "preview": "##\n# \\file n4_bias_field_correction.py\n# \\brief      N4ITK Bias-Field Correction interface\n#\n# \\author     Michael Ebner"
  },
  {
    "path": "niftymic/utilities/outlier_rejector.py",
    "chars": 3911,
    "preview": "##\n# \\file outlier_rejector.py\n# \\brief      Class to identify and reject outliers.\n#\n# \\author     Michael Ebner (micha"
  },
  {
    "path": "niftymic/utilities/parameter_normalization.py",
    "chars": 3777,
    "preview": "##\n# \\file parameter_normalization.py\n# \\brief      Class containing functions to normalize parameters. This can be\n#   "
  },
  {
    "path": "niftymic/utilities/segmentation_propagation.py",
    "chars": 4728,
    "preview": "##\n# \\file SegmentationPropagation.py\n# \\brief      { item_description }\n#\n# \\author     Michael Ebner (michael.ebner.14"
  },
  {
    "path": "niftymic/utilities/siena.py",
    "chars": 2489,
    "preview": "##\n# \\file siena.py\n# \\brief\n#\n# \\author     Michael Ebner (michael.ebner.14@ucl.ac.uk)\n# \\date       Nov 2016\n#\n\n\n# Imp"
  },
  {
    "path": "niftymic/utilities/stack_mask_morphological_operations.py",
    "chars": 4386,
    "preview": "##\n# \\file stack_mask_morphological_operations.py\n# \\brief      { item_description }\n#\n# \\author     Michael Ebner (mich"
  },
  {
    "path": "niftymic/utilities/target_stack_estimator.py",
    "chars": 8153,
    "preview": "##\n# \\file target_stack_estimator.py\n# \\brief      Class to estimate target stack automatically\n#\n# \\author     Michael "
  },
  {
    "path": "niftymic/utilities/template_stack_estimator.py",
    "chars": 4544,
    "preview": "##\n# \\file template_stack_estimator.py\n# \\brief      Class to estimate template stack automatically\n#\n# \\author     Mich"
  },
  {
    "path": "niftymic/utilities/toolkit_executor.py",
    "chars": 6276,
    "preview": "##\n# \\file toolkit_executor.py\n# \\brief      generates function calls to execute other reconstruction toolkits\n#\n# \\auth"
  },
  {
    "path": "niftymic/utilities/volumetric_reconstruction_pipeline.py",
    "chars": 29415,
    "preview": "##\n# \\file volumetric_reconstruction_pipeline.py\n# \\brief      Collection of modules useful for registration and\n#      "
  },
  {
    "path": "niftymic/validation/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "niftymic/validation/evaluate_image_similarity.py",
    "chars": 3736,
    "preview": "##\n# \\file evaluate_image_similarity.py\n# \\brief      Evaluate similarity to a reference of one or more images\n#\n# \\auth"
  },
  {
    "path": "niftymic/validation/evaluate_simulated_stack_similarity.py",
    "chars": 4961,
    "preview": "##\n# \\file evaluate_simulated_stack_similarity.py\n# \\brief      Script to evaluate the similarity of simulated stack fro"
  },
  {
    "path": "niftymic/validation/evaluate_slice_residual_similarity.py",
    "chars": 5125,
    "preview": "##\n# \\file evaluate_slice_residual_similarity.py\n# \\brief      Evaluate similarity to a reference of one or more images\n"
  },
  {
    "path": "niftymic/validation/export_side_by_side_simulated_vs_original_slice_comparison.py",
    "chars": 8874,
    "preview": "##\n# \\file export_side_by_side_simulated_vs_original_slice_comparison.py\n# \\brief      Script to generate a pdf holding "
  },
  {
    "path": "niftymic/validation/image_similarity_evaluator.py",
    "chars": 7591,
    "preview": "##\n# \\file image_similarity_evaluator.py\n# \\brief      Class to evaluate image similarity between stacks and a reference"
  },
  {
    "path": "niftymic/validation/motion_evaluator.py",
    "chars": 5219,
    "preview": "##\n# \\file motion_evaluator.py\n# \\brief      Class to evaluate computed motions\n#\n# Should help to assess the registrati"
  },
  {
    "path": "niftymic/validation/motion_simulator.py",
    "chars": 2996,
    "preview": "##\n# \\file MotionSimulator.py\n# \\brief      Abstract class to define interface for motion simulator\n#\n# \\author     Mich"
  },
  {
    "path": "niftymic/validation/residual_evaluator.py",
    "chars": 13718,
    "preview": "##\n# \\file residual_evaluator.py\n# \\brief      Class to evaluate computed residuals between a\n#             simulated/pr"
  },
  {
    "path": "niftymic/validation/show_evaluated_simulated_stack_similarity.py",
    "chars": 7767,
    "preview": "##\n# \\file show_evaluated_simulated_stack_similarity.py\n# \\brief      Script to show the evaluated similarity between si"
  },
  {
    "path": "niftymic/validation/simulate_stacks_from_reconstruction.py",
    "chars": 5858,
    "preview": "##\n# \\file simulate_stacks_from_reconstruction.py\n# \\brief      Simulate stacks from obtained reconstruction\n#\n# Example"
  },
  {
    "path": "niftymic/validation/slice_acquisition.py",
    "chars": 3339,
    "preview": "##\n# \\file slice_acquisition.py\n# \\brief      Based on a given volume, this class aims to simulate the slice\n#          "
  },
  {
    "path": "niftymic/validation/slice_coverage.py",
    "chars": 2791,
    "preview": "##\n# \\file slice_coverage.py\n# \\brief      Class to visualize slice coverage over reconstruction space\n#\n# \\author     M"
  },
  {
    "path": "niftymic/validation/write_random_motion_transforms.py",
    "chars": 2151,
    "preview": "##\n# \\file write_random_motion_transforms.py\n# \\brief      Create and write random motion transforms\n#\n# \\author     Mic"
  },
  {
    "path": "niftymic_correct_bias_field.py",
    "chars": 142,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.correct_bias_field import main\n\nif __name__ == \"__main__\":"
  },
  {
    "path": "niftymic_multiply.py",
    "chars": 132,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.multiply import main\n\nif __name__ == \"__main__\":\n    sys.e"
  },
  {
    "path": "niftymic_nifti2dicom.py",
    "chars": 135,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.nifti2dicom import main\n\nif __name__ == \"__main__\":\n    sy"
  },
  {
    "path": "niftymic_reconstruct_volume.py",
    "chars": 142,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.reconstruct_volume import main\n\nif __name__ == \"__main__\":"
  },
  {
    "path": "niftymic_reconstruct_volume_from_slices.py",
    "chars": 154,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.reconstruct_volume_from_slices import main\n\nif __name__ =="
  },
  {
    "path": "niftymic_register_image.py",
    "chars": 138,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.register_image import main\n\nif __name__ == \"__main__\":\n   "
  },
  {
    "path": "niftymic_rsfmri_estimate_motion.py",
    "chars": 146,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.rsfmri_estimate_motion import main\n\nif __name__ == \"__main"
  },
  {
    "path": "niftymic_rsfmri_reconstruct_volume_from_slices.py",
    "chars": 161,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.rsfmri_reconstruct_volume_from_slices import main\n\nif __na"
  },
  {
    "path": "niftymic_run_reconstruction_parameter_study.py",
    "chars": 158,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.run_reconstruction_parameter_study import main\n\nif __name_"
  },
  {
    "path": "niftymic_run_reconstruction_pipeline.py",
    "chars": 148,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.multiply_stack_with_mask import main\n\nif __name__ == \"__ma"
  },
  {
    "path": "niftymic_segment_fetal_brains.py",
    "chars": 144,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom niftymic.application.segment_fetal_brains import main\n\nif __name__ == \"__main__"
  },
  {
    "path": "niftymic_show_reconstruction_parameter_study.py",
    "chars": 140,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom nsol.application.show_parameter_study import main\n\nif __name__ == \"__main__\":\n "
  },
  {
    "path": "requirements-monaifbs.txt",
    "chars": 102,
    "preview": "torch>=1.4.0\ntorch-summary>=1.3.2\nmonai==0.3.0\npyyaml>=5.3.1\npytorch-ignite>=0.3.0\ntensorboard>=2.2.1\n"
  },
  {
    "path": "requirements.txt",
    "chars": 250,
    "preview": "matplotlib>=2.2.2\nnatsort>=5.3.0\nnibabel>=2.4.1\nnipype>=1.0.3\nnose>=1.3.7\nnsol>=0.1.14\nnumpy>=1.14.2,!=1.16.0\npandas>=0."
  },
  {
    "path": "setup.py",
    "chars": 3326,
    "preview": "##\n# \\file setup.py\n#\n# Instructions:\n# 1) Set environment variables with prefix NIFTYMIC_, e.g.\n#   `export NIFTYMIC_IT"
  },
  {
    "path": "tests/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "tests/brain_stripping_test.py",
    "chars": 2551,
    "preview": "# \\file TestBrainStripping.py\n#  \\brief  Class containing unit tests for module BrainStripping\n#\n#  \\author Michael Ebne"
  },
  {
    "path": "tests/case_study_fetal_brain_test.py",
    "chars": 9049,
    "preview": "##\n# \\file case_study_fetal_brain_test.py\n#  \\brief  Unit tests based on fetal brain case study\n#\n#  \\author Michael Ebn"
  },
  {
    "path": "tests/case_study_rsfmri_test.py",
    "chars": 6786,
    "preview": "##\n# \\file case_study_fetal_brain_test.py\n#  \\brief  Unit tests based on fetal brain case study\n#\n#  \\author Michael Ebn"
  },
  {
    "path": "tests/data_reader_test.py",
    "chars": 1963,
    "preview": "##\n# \\file data_reader_test.py\n#  \\brief  Unit tests for data reader\n#\n#  \\author Michael Ebner (michael.ebner.14@ucl.ac"
  },
  {
    "path": "tests/image_similarity_evaluator_test.py",
    "chars": 2371,
    "preview": "##\n# \\file image_similarity_evaluator_test.py\n#  \\brief  Test ImageSimilarityEvaluator class\n#\n#  \\author Michael Ebner "
  },
  {
    "path": "tests/installation_test.py",
    "chars": 1964,
    "preview": "##\n# \\file installation_test.py\n#  \\brief  Class to test installation\n#\n#  \\author Michael Ebner (michael.ebner.14@ucl.a"
  },
  {
    "path": "tests/installation_test_fetal_brain_seg.py",
    "chars": 1075,
    "preview": "##\n# \\file installation_test_fetal_brain_seg.py\n# \\brief      Class to test installation of fetal_brain_seg\n#           "
  },
  {
    "path": "tests/installation_test_monaifbs.py",
    "chars": 1002,
    "preview": "##\n# \\file installation_test_monaifbs.py\n# \\brief      Class to test installation of MONAIfbs\n#             (https://git"
  },
  {
    "path": "tests/intensity_correction_test.py",
    "chars": 4163,
    "preview": "# \\file TestIntensityCorrection.py\n\n##\n#  \\brief  Class containing unit tests for module IntensityCorrection\n#\n#  \\autho"
  },
  {
    "path": "tests/intra_stack_registration_test.py",
    "chars": 48812,
    "preview": "##\n# \\file intra_stack_registration_test.py\n#  \\brief  Class containing unit tests for module IntraStackRegistration\n#\n#"
  },
  {
    "path": "tests/linear_image_quality_transfer_test.py",
    "chars": 1584,
    "preview": "# \\file TestLinearImageQualityTransfer.py\n#  \\brief  Class containing unit tests for module DifferentialOperations\n#\n#  "
  },
  {
    "path": "tests/linear_operators_test.py",
    "chars": 5058,
    "preview": "##\n# \\file linear_operators_test.py\n#  \\brief  unit tests of linear operators\n#\n#  \\author Michael Ebner (michael.ebner."
  },
  {
    "path": "tests/niftyreg_test.py",
    "chars": 2263,
    "preview": "# \\file TestNiftyReg.py\n#  \\brief  Class containing unit tests for module Stack\n#\n#  \\author Michael Ebner (michael.ebne"
  },
  {
    "path": "tests/parameter_normalization_test.py",
    "chars": 4178,
    "preview": "##\n# \\file parameter_normalization_test.py\n#  \\brief  Class containing unit tests for module ParameterNormalization\n#\n# "
  },
  {
    "path": "tests/registration_test.py",
    "chars": 16859,
    "preview": "# \\file TestRegistration.py\n#  \\brief  Class containing unit tests for module Stack\n#\n#  \\author Michael Ebner (michael."
  },
  {
    "path": "tests/residual_evaluator_test.py",
    "chars": 2809,
    "preview": "##\n# \\file residual_evaluator_test.py\n#  \\brief  Test ResidualEvaluator class\n#\n#  \\author Michael Ebner (michael.ebner."
  },
  {
    "path": "tests/run_tests.py",
    "chars": 909,
    "preview": "#!/usr/bin/python\n\n##\n# \\file run_tests.py\n# \\brief      main-file to run specified unit tests\n#\n# \\author     Michael E"
  },
  {
    "path": "tests/segmentation_propagation_test.py",
    "chars": 2785,
    "preview": "# \\file TestSegmentationPropagation.py\n#  \\brief  Class containing unit tests for module SegmentationPropagation\n#\n#  \\a"
  },
  {
    "path": "tests/simulator_slice_acquisition_test.py",
    "chars": 14828,
    "preview": "# \\file simulator_slice_acquisition_test.py\n#  \\brief  Class containing unit tests for module SimulatorSliceAcqusition\n#"
  },
  {
    "path": "tests/stack_test.py",
    "chars": 7652,
    "preview": "# \\file TestStack.py\n#  \\brief  Class containing unit tests for module Stack\n#\n#  \\author Michael Ebner (michael.ebner.1"
  }
]

About this extraction

This page contains the full source code of the gift-surg/NiftyMIC GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 127 files (1020.4 KB), approximately 247.5k tokens, and a symbol index with 839 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!