NiftyReg

repository·master·Indexed 41 days ago

https://github.com/kcl-bmeis/niftyreg

A high-performance toolkit for 2D and 3D medical image registration supporting rigid, affine, and non-linear transformations. It provides optimized CPU and GPU (CUDA) implementations, supporting NIfTI and Analyze formats. Key commands include `reg aladin` for rigid/affine registration, `reg f3d` for non-linear registration using Free-Form Deformation (FFD), and `reg resample` for applying transformations and generating deformation fields or Jacobian maps.

Tokens
775
Snippets
1
Records
9
Agent score
2%

What's inside NiftyReg

  1. Overview of NiftyReg registration capabilities

    master

    NiftyReg is a toolkit for performing 2D and 3D image registration. It supports multiple registration types and image formats:

    Supported Registration Types

    • Rigid and Affine Registration: Performed using the reg aladin command. It uses a symmetric block-matching approach with a Trimmed Least Square (TLS) scheme and a coarse-to-fine strategy via a Gaussian pyramid.
    • Non-linear (Non-rigid) Registration: Performed using the reg f3d command. It is based on Free-Form Deformation (FFD) using cubic B-splines. The algorithm optimizes an objective function composed of Normalised Mutual Information (NMI) and Bending-Energy (BE) using a conjugate gradient scheme.
    • Resampling: The reg resample command uses the outputs from reg aladin or reg f3d to apply transformations, generate deformation fields, or create Jacobian map images.

    Supported Formats and Architectures

    • Image Formats: NIfTI (.nii) and Analyze (.hdr/.img).
    • Hardware Acceleration: The package includes implementations for both CPU (C/C++) and GPU (CUDA).
  2. Overview of zlib data compression

    master

    zlib is a general-purpose, thread-safe data compression library. It supports several data formats defined by IETF RFCs:

    • zlib format: RFC 1950
    • deflate format: RFC 1951
    • gzip format: RFC 1952

    For C developers, the full API documentation is located in zlib.h. Usage examples can be found in test/example.c and test/minigzip.c.

  3. Language bindings and interfaces for zlib

    master

    zlib is available across multiple programming environments:

    • Java: Use the java.util.zip package.
    • Python: Use the built-in zlib module (available in Python 1.5+).
    • Perl: Use the IO-Compress interface.
    • Tcl: zlib is built into the Tcl language.
    • C/C++: Use the header zlib.h.
  4. Install and build zlib on Unix-like systems

    master

    To compile the library and run the included test programs on most Unix-like systems, use the standard configure and make workflow. After running tests, you can install the library to your system.

    ./configure
    make test
    make install
  5. Apply transformations with reg resample

    master

    The reg resample command is used to apply the results of previous registration steps. It can take the output from reg aladin (rigid/affine) or reg f3d (non-linear) to:

    • Apply the calculated transformation to an image.
    • Generate deformation fields.
    • Generate Jacobian map images.
  6. Perform rigid or affine registration with reg aladin

    master
    Use the reg aladin command to perform rigid or affine registration between a reference image and a floating image. The algorithm uses a block-matching approach with normalized cross-correlation and a coarse-to-fine approach (Gaussian pyramid) to find the best transformation.
  7. Perform non-linear registration with reg f3d

    master
    Use the reg f3d command to perform non-linear (non-rigid) registration. This implementation uses Free-Form Deformation (FFD) with cubic B-splines. It optimizes an objective function consisting of Normalised Mutual Information (NMI) and Bending-Energy (BE) using a conjugate gradient scheme.