Brain Volume
6.9K
pl-mri-preview is a ChRIS plugin
to produce PNG image previews of the center slices of MRIs
(NIFTI, MINC, ...) and also compute total brain volume.

pl-mri-preview is a ChRIS plugin, meaning it can
run from either within ChRIS or the command-line.
To get started with local command-line usage, use Apptainer
(a.k.a. Singularity) to run pl-mri-preview as a container:
singularity exec docker://fnndsc/pl-mri-preview mri_preview [--background 0.0] input/ output/
To print its available options, run:
singularity exec docker://fnndsc/pl-mri-preview mri_preview --help
mri_preview requires two positional arguments: a directory containing
input MRI images, and a directory where to create output PNGs.
mkdir incoming/ outgoing/
mv brain_recon.nii.gz incoming/
singularity exec docker://fnndsc/pl-mri-preview mri_preview incoming/ outgoing/
--inputsEvery input file with a file name ending with a value given by --inputs
is processed. Unmatched files are ignored. Supported formats are listed on
NiBabel's website.
--units-fallbackpl-mri-preview can get voxel size units from the headers of NIFTI or MINC files.
Units can be specified manually for other file types using --units-fallback.
https://github.com/nipy/nibabel/pull/1098
--outputspl-mri-preview creates image files. Supported output formats are
any which are supported by
matplotlib,
including .png, .jpg, and .svg.
The special type .txt writes a plaintext file instead, e.g.
2236612 voxels
230437.66977741406 mm^3
The input file should be masked (or it should be a mask), meaning it should have a background intensity which is lower than the foreground intensity -- usually the value denoting background is just 0 or 1.
pl-mri-preview is part of a pipeline which runs after
pl-irtk-reconstruction.
mri_label_volumemri_label_volume -a is a FreeSurfer tool to do the same thing, though their
non-zero intensity threshold starts at and includes 5, which depending on what
kind of input file you're working with, is probably an underestimation.
To reproduce the behavior of mri_label_volume -a with pl-mri-preview,
specify the value mri_preview --background 4.999.
Another computational approach to measure total brain volume is to compute the volume inside a topologically closed polygonal mesh representation of the pial matter. This object obtained from a surface extraction algorithm, such as ep-sphere_mesh.
The advantage of measuring volume from a surface instead of in voxel space is that the computation is not discrete.
Content type
Image
Digest
sha256:5e7a65ec2…
Size
823.6 MB
Last updated
over 3 years ago
docker pull fnndsc/pl-mri-preview