Giter Club home page Giter Club logo

frog's Introduction

FROG : Fast Registration Of image Groups

Info

This code is the implementation deriving from those papers:

[1] Rémi Agier, Sébastien Valette, Laurent Fanton, Pierre Croisille and Rémy Prost, Hubless 3D Medical Image Bundle Registration, In Proceedings of the 11th Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 3: VISAPP, 265-272, 2016, Rome, Italy. https://hal.archives-ouvertes.fr/hal-01284240

[2] Rémi Agier, Sébastien Valette, Razmig Kéchichian, Laurent Fanton, Rémy Prost, Hubless keypoint-based 3D deformable groupwise registration, Medical Image Analysis, Volume 59, January 2020, https://arxiv.org/abs/1809.03951

Authors:

  • Rémi Agier : match code
  • Sébastien Valette : registration and tools code

Licence

This code is distributed under the CeCILL-B license (BSD-compatible) (copyright CNRS, INSA-Lyon, UCBL, INSERM.)

Dependencies

Simple compilation HowTo under Linux

git clone --recursive [email protected]:valette/FROG.git FROG
cd FROG
cmake . -DCMAKE_BUILD_TYPE=Release
make

Note for FEDORA linux : in case of crashes, please use a self-compiled version of VTK.

Usage with global script run.sh

Groupwise registration is computed via the run.sh script, in three steps:

  • Keypoint extraction from input images
  • Keypoint matching
  • groupwise registration of keypoints

As parameter, run.sh should be fed with a params.sh script containing all input parameters. The run.sh script should not be modified whereas one can copy, rename and edit the params.sh script at will.

To launch registration, execute

./run.sh ./params.sh

After registration is computed, input images can be transformed into the common space via the transform.sh script, which should also be fed with the parameters file as well as the desired spacing for the transformed images. As an example:

./transform.sh ./params.sh 2

will transform input images and compute their average with a spacing equal to 2

To check that the output transforms are diffeomorphic:

./checkDiffeomorphism.sh ./params.sh

Usage with custom commandline execution

Three steps are needed to compute groupwise registration:

  • Keypoint extraction from input images

use the surf3d executable to extract keypoints from each 3D image:

bin/surf3d inputImage [options]

Documentation for this program is available here: https://github.com/valette/vtkOpenSURF3D

  • Keypoint matching

Edit a text file (e.g. myPointFiles.txt) containing the list of keypoint files to match. use the match executable. Then:

bin/match myPointFiles.txt [options]

Options:

* -d distance : set max distance between matches. Default : 0.22
* -d2 distance2secondRatio : maximum closestDistance / distance2second ratio. Default : 1

This program outputs a binary pairs.bin file describing matches between keypoints. Reading the binary file can easily be done, as shown in the frog code: https://github.com/valette/FROG/blob/master/registration/imageGroup.cxx#L953

  • Groupwise registration of keypoints

Finally, groupwise registration can occur, with the frog program:

bin/frog pairs.bin [options]

Options :

 * -da <value>  : set alpha for deformable registration. Default : 0.02
 * -dlinear 0/1 : display linear parameters during registration. default : 0
 * -dstats 0/1  : display stats during registration. Default : 0
 * -di number   : number of iterations for each deformable level. Default : 200
 * -dl number   : number of deformable levels. Default : 3
 * -emi number  : max number of iterations for EM weighting. Default : 10000
 * -fi number   : number of fixed images. Default : 0
 * -fd path     : fixed images transforms directory.
 * -g spacing   : initial grid spacing for deformable. Default : 100
 * -gd 0/1      : guaranteed diffeomorphism. Default : 1
 * -gm ratio    : maximal displacement ratio to guarantee diffeomorphism. Default : 0.4
 * -il 0/1      : invert landmarks x and y coordinates. Default : 1
 * -la <value>  : set alpha for linear registration. Default : 0.5
 * -li number   : number of iterations for linear registration. Default : 50
 * -nt <number> : set number of threads. Default : number of cores
 * -s 0/1       : use scale for linear registration. Default : 1
 * -se number   : stats epsilon. Default : 1e-06
 * -si number   : interval update for statistics. Default : 10
 * -ss number   : stats maximal sample size. Default : 10000
 * -t threshold : inlier probability threshold. Default : 0.5
 * -l path      : path containing reference landmarks.

FROG outputs several files:

  • a set of transform files (transformXX.json) which can be used to transform images using the VolumeTransform executable
  • histograms_linear.csv and histograms.csv, which provide histograms of distances (bin size = 1) between matching keypoints after registration (one histogram per input image). An example of such histograms is shown in figure 5 of the paper [2]. histograms_linear.csv contains histograms after linear registration, histograms.csv contains histograms after deformable regstration.

comments, suggestions : https://github.com/valette/FROG/issues

frog's People

Contributors

ant89ne avatar loiseaunicolas avatar valette avatar

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.