Software downloads

Disclaimer: The author and Tampere University of Technology make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

Open source c/c++ programs/libraries

Dualsurfacemin : An object oriented implementation for the dual surface minimization (DSM) algorithm. The dualsurfacemin is a C++ implementation of the fully automatic dual surface minimization (DSM) algorithm for the optimization of deformable surfaces. The method is developed for automatic surface extraction from noisy volumetric images.

MRFSEG+GAMIXTURE Software Bundle :MRFSEG+GAMIXTURE is a collection of open-source software tools written in C implementing a flexible voxel classification framework. The framework is based on a novel genetic algorithm based finite mixture model (GAMIXTURE) and a standard 3-D Markov random field (MRF) based on the iterative conditional modes (ICM) algorithm (MRFSEG). The key novelty in the MRFSEG program is the application of the configuration file to control MRF parameters. The software package is to be extended with a novel inhomogeneous MRF algorithm allowing even more flexible spatial and intensity information modeling. At the moment the software supports Analyze 7.5 images.
SVPASEG An extension of the above package dealing better with intensity nonuniformities is also available (see J. Tohka , I.D. Dinov, D.W. Shattuck, and A.W. Toga. Brain MRI Tissue Classification Based on Local Markov Random Fields, Magnetic Resonance Imaging, 28(4): 557 - 573 , 2010.). Now, supports both Analyze and NIFTI-files. Note that this software contains all the functionalities of the MRFSEG package above. This is meant to be a flexible voxel classification framework that can be easily tuned for particular applications. If, however, you're interested in partial volume estimation in high quality T1-weighted brain MRI, I would suggest to try PVEMRI below.

SPHERESMOOTH : Surface smoothing without shrinkage.

Matlab functions and toolboxes

Partial volume estimation in brain MRI

pvemri2 [Download] : A matlab implementation of the partial volume estimation for brain MRI (Tohka, Zijedenbos, Evans, NeuroImage 2004). The function also implement "the incremental k-means" based preliminary segmentation (Manjon et al MRM 2008). I'll also urge you to see our recent paper on benefits of non-local means filtering to partial volume estimation (Manjon, Tohka Robles, NeuroImage 2010) and the related code from Jose Manjon's website.

Installation: You'll need to compile two c files into mex. Saying

mex c_icm_trans.c

mex c_tissue_fractions.c

works most of the time. If for some reason a pure Matlab implementation (no mex files) is needed, it is here: pvemri2.m [Download] .

The new fast algorithms are described in J. Tohka. FAST-PVE: Extremely Fast Markov Random Field Based Brain MRI Tissue Classification. SCIA 2013, Scandinavian Conference on Image Analysis, Finland, 2013, Lecture Notes in Computer Science vol 7944 pp. 266 - 276, 2013. [Preprint] . A generic Fast-ICM wrapper will appear here soon.

pvemri [Download (old version; for compatibility reasons; this one is not recommended anymore)]: A matlab implementation of the partial volume estimation for brain MRI (Tohka, Zijedenbos, Evans, NeuroImage 2004). Contains "pure" matlab implementation of the algorithm (slow, pvemri.m) and a very fast mex-based implementation (pvemrimex.m), which is recommended. The package includes mex files for 32-bit Windows XP and 32-bit Linux OS. If you have some other system you'll need to compile the included c file into mex-file. Saying mex c_icm_trans.c works most of the time. Please note that the two versions differ in order the voxels are traversed in the ICM algorithm. This can cause slight differences in the segmentation results between the two versions of the algorithm, none of them being "more correct" than the other. The algorithms are still fully deterministic.

ICA fMRI-Artifact Remover

A Matlab toolbox for fMRI artifact reduction using ICA and global decision trees.

A matlab package for the artifact identification using readily trained Global Decision Tree classifiers (a brief manual is included in the package. The manual reflects version 1.1 and it has not been updated since version 1.1) [Download version 1.1] [Download version 1.1.1] [Download version 1.1.2]

A matlab package for training the Global Decision Tree classifiers for the artifact identification (a brief manual is included in the package. The manual reflects version 1.2 and no updates to the manual have been done since version 1.2.) [Download version 1.1] [Download version 1.2] [Download version 1.2.1]

To use this package you will also need NiFTI tools which can be downloaded here

(Main) differences between new versions and the fmri_ica_classify 1.1 and fmri_ica_training 1.2:

fmri_ica_classify version 1.1.1 and fmri_ica_training version 1.2.1: These have been updated to use load_untouch_nii.m (see NiFTI tools page for details about differences between load_nii.m and load_untouch_nii.m). However, since the artifact reduction tool does not modify and/or write any image files (it rather relies on FSL programs to do the actual processing), it is not dangerous to use an older version. Thus, those who have crafted the tool to suit their needs should probably continue to use the old versions (the version 1.1 of the classifier and the version 1.2 of the classifier training).

fmri_ica_classify version 1.1.2: This was updated to use fsl_regfilt for denoising to conform to versions 3.x of the melodic software. The end result should be the same as with the older versions which used melodic -f for the same purpose. Note however that file naming conventions are different between fsl_regfilt and melodic -f . Also, the file masking seems to be different (fsl_regfilt seems not to mask files as melodic -f did).

Important : Please read the related paper and manuals. Only preliminary testing has been done, so bugs may exist...

ISC Toolbox (New: Version 2.0 released)

A Matlab toolbox for fMRI frequency-specific inter-subject correlation analysis. This is a toolbox to perform inter-subject correlation based analysis of fmri data in Matlab as well as a GUI for the visualization of the analysis results. This toolbox grew out of a practical need during Jukka Pekka Kauppi's PhD work, who is the main developer of this code. The toolbox contains various functions to carry out the inter-subject correlation (ISC) analysis, which can be run from a GUI. A set of visualization tools - particularly designed for ISC analyses - are intergrated to the GUI. Visualization tools contain functionalities to which standard functional neuroimaging packages were difficult to adapt. The main references explaining the analyses are J.-P. Kauppi, I.P. Jääskeläinen, M. Sams and J. Tohka. Inter-subject correlation of brain hemodynamic responses during watching a movie: localization in space and frequency, Frontiers in Neuroinformatics, 4:5, 2010. and J.-P. Kauppi, J. Pajula J and J. Tohka (2014). A Versatile Software Package for Inter-subject Correlation Based Analyses of fMRI. Frontiers in Neuroinformatics, 8:2, 2014.

DogEll for ultrasound segmentation

DoGEll software for ultrasound fetal head segmentation (for nonprofit purposes only, TUT limited license). This is a fast implementation (C with Matlab wrapper) of the winning method of the ISBI2012 competition.

BEE model selection

Model selection with Bayesian error estimator (also Python implementation available). This is an implementation of the parametric Bayesian Error Estimator for model selection purposes. In small-sample scenarios using parametric Bayesian error estimator can reduce the variance of the typical cross-validation based non-parametric error estimates. Also, it is fast to compute.

Hemisphere segmentation in brain MRI: Adaptive Disconnection

ADisc version 1.1[Download]: Adaptive Disconnection is an algorithm for segmentating a brain MRI into left and right cerebrum, left and right cerebellum, and brain stem. It does this without any stereotactic registration just needing partial volume estimates to work. These can be obtained through pvemri (see above or [Download]). This was a part of Lu Zhao's PhD work in my team.

This new implementation made available here is very fast requiring about 5 minutes per image in contrast to slow running times reported in L. Zhao, U. Ruotsalainen, J. Hirvonen, J. Hietala and J. Tohka . Automatic cerebral and cerebellar hemisphere segmentation in 3D MRI: adaptive disconnection algorithm. Medical Image Analysis , 14(3): 360 - 372, 2010. The algorithm itself is the same one.

Version history version 1.0 ( the original version; version 1.1 (current, version, Minor bugs in function expand_tfe.m and shrink_tfe.m corrected.

Clustering in Matlab :
kmeans.m : A matlab implementation of the K-means clustering algorithm.

emclustering.m: A matlab implementation of the EM algorithm for parameter identification of Gaussian mixture models and clustering.  This is the "traditional" EM not CEM.

transmission_cardiac_pet_seg.m: Markov random field based segmentation of cardiac PET transmission images.