REPLICA: An MRI image synthesis algorithm
-----------------------------------------
The files included implement the algorithm described in:
A. Jog, et al., ``Random forest regression for magnetic resonance
image synthesis'', Medical Image Analysis, 35:475-488, 2017.
 

This code has been tested on MATLAB 2015 and 2016 versions.
Some of the parallelzing code has changed from 2014 onwards
so those lines need to be edited for backward compatibility.


Files:
------
* replica_demo.m

This file can be used to understand how to train the random forests in REPLICA
and use them to synthesize a) T2w images from T1w images, and b) FLAIR images from T1w,
T2w, and PDw images.

* REPLICA_train.m

This function is used to extract features and train the random forest for REPLICA

* REPLICA_predict.m

This function is called to apply the trained random forest and synthesize images

* wmPeakNormalize.m

Scales T1w images by fixing the white matter histogram peak to 1000

* wmPeakNormalize_T2w.m

Scales T2w images by fixing the white matter histogram peak to 1000

* extractContextPatch.m
Extract a context descriptor as described in Jog et al. 2017 from the image

* peakdet.m
Peak detection code by Eli Billauer 

* fileformat_tooblbox/nii
Code to load and save NifTI files from Jimmy Shen

* ../data/
Sample data for training and testing

