Diffusion MRI Matlab scripts
Jump to navigation
Jump to search
There are many Matlab scripts in $G/project/brain/pipeline that are useful for manipulating diffusion MRI data. These generally fall into two groups: those used in the diffusion processing pipeline for non-interactive conversion to the VRL in-house MRIimage format, and those used interactively to inspect and troubleshoot data.
For non-interactive applications, the utility program matlabLauncher.py can be used to call a Matlab function with specific arguments from the command line.
- Batch Convert several files of a given type to MRIimage
- Read images in various formats from disk and create Matlab structures from them
- readMriImage.m --- read a directory of MRIimage volumes
- readMriImageVolume.m --- read a single of MRIimage volume
- readDicomDir.m --- read a directory of DICOM images
- stackFromPattern.m --- read an arbitrary collection of DICOM images matching a pattern
- splitMosaic.m --- read a single DICOM mosaic file
- splitMosaicList.m --- run splitMosaic on each of a list of files
- readTubegenLineFile.m --- read a tubegen .data or .nocr file
- Write Matlab structures to disk in various formats
- Inspect and troubleshoot data interactively
- viewSlice.m --- show a single 2-D slice of an array with a realistic gamma-corrected monochrome colormap
- stackToVideo.m --- show 2-D slices of an array as a video, sweeping the viewing slice along the Z axis
- makeMriAtlas.m --- read MRIimage data, generate a mosaic for each volume, and write the mosaics to disk as PNGs
- stackToMosaic.m --- flatten an array to 2-D by assembling slices into a tiled 2-D matrix (view the output with viewSlice)
- viewDicomDir.m --- show all 2-D DICOM images in a directory as a video
- Utility functions used in the above
- getDicomIdentifiers.m --- get the b-value and gradient ID from the DICOM header (assuming the Siemens file naming scheme)
- patternToFileList.m --- generate a cell array of full paths to non-directory files matching a simple (not regex) path pattern
- copyType.m --- change the type (e.g. uint16 or double) of one object to match that of another object
- searchUpward.m --- find a file whose name matches a given regular expression in the deepest directory above a specified path
- strjoin.m --- join a cell array of strings together into a single string, separated by some delimiter
- strsplit.m --- split a single string containing some delimiter into a cell array of delimited strings