Giter Club home page Giter Club logo

fatbacpc's Introduction

Brain Imaging Accessoires: Fully automatic tilting of brainscans to ACPC (fatbACPC)

Everyday CT or MR examinations are supposed to be acquired in the same fashion, but slight deviations (e.g. due to subject/patient movement, differences in planning standards for MR and CT, or improper planning) may result in not easily comparable images. The fully automatic tilting of brainscans to Anterior Commissure - Posterior Commissure (fatbACPC) tool is meant to align CT and MR scans to the ACPC line to yield easily comparable images.

fatbACPC is meant to be used as a submodule of BrainSTEM.

Please note, this software is research-only and must not be used for clinical decisions/diagnosis.

Details

The fatbACPC script takes a directory with DICOM files of a CT or (3D) MR brain scan as input and then aligns that scan with a reference volume, such as the MNI brain atlas.

The Anterior Commissure - Posterior Commissure (ACPC) line has been adopted as a standard in neuroimaging as a reference plane for axial imaging. Most atlases are aligned with the ACPC line and therefore this script should yield image volumes aligned to the ACPC line. Hence the name of the script.

Screenshot of the MNI ICBM 2009c Nonlinear Symmetric T1 template highlighting the ACPC line Screenshot of the CT template from the Clinical toolbox for SPM 8/2014 highlighting the ACPC line

The ACPC line is similar to the orbitomeatal line used as a common reference plane in CT, which is about 9° steeper than the ACPC line. Aligning both CT and MR scans to the ACPC line should yield image volumes, which are easily comparable longitudinally and between modalities.

Especially interesting for CT scans is the option to automatically generate mean slabs. By default, mean slabs of 5 mm thickness are generated for CT scans. When generating the slabs, an algorithm finds the top non-air slice in the volume and starts the creation of slabs with that slice.

A simple check for a mis-registration is in place. If rotation around one axis is more than 45°, we assume a mis-registration happened and try to realign the image volume after skull stripping. FSL's skull stripping might introduce it's own set of artifacts in CT, therefore, we apply it as "rescue attempt" only.

The aligned scans will be automatically exported back to the PACS.

Options to fatbACPC.bash:

 -i --input [arg]    Directory containing the DICOM input files. Required.
 -k --keep-workdir   After running, copy the temporary work directory into the input directory.
 -c --cleanup        After running, empty the source directory (reference DICOM and translation matrix are kept)
 -p --no-pacs        Do not send the results to the PACS.
 -v                  Enable verbose mode, print script as it is executed.
 -d --debug          Enables debug mode.
 -h --help           This page.

Installation

Requirements

We are listing the software versions we used (likely the latest available during development), but we are currently not aware that we rely on any features that are specific to one of the software's versions.

Installation

fatbACPC is in the modules/ subdirectory of BrainSTEM (after you initialized and updated the submodules).

Configuration

Copy the setup templates:

$ cd modules/fatbACPC
$ cp setup.fatbACPC.bash-template setup.fatbACPC.bash

Update the PATH to FSL in setup.fatbACPC.bash:

# Setup FSL
#
export FSLDIR="/path/to/fsl-5.0.11"

By default, mean slabs are only generated for CT examinations.

# Intended slice thickness for DICOM export in millimetres (mm),
# which will be matched as close as possible.
#
# Use -1 to not generate any mean slabs, for example on isometric
# MRI acquisitions.
#
intended_slice_thickness_ct=5
intended_slice_thickness_t1=-1
intended_slice_thickness_t2=-1

Running

Make sure that you enable fatbACPC in BrainSTEM.

Debugging

Please see https://github.com/BrainImAccs/BrainSTEM#debugging

Acknowledgements

Please see templates/README.md for information on the templates.

The main scripts are based on the BASH3 Boilerplate.

fatbacpc's People

Contributors

crubb avatar

Forkers

crubb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.