Here is a completely un-organized, partial map of locally-developed
software. There are no guarantees that any of this works as advertised (or
that it works at all). Use at your own risk.
- DOT
- A package designed to provide a graphical user
interface to help a user perform various
operations and statistical analysis of PET/MRI data.
Organize data I/O thru the use of a database. The main program providing
wrappers to all other ancillary programs and scripts is referred to as 'dot'.
- Display
- Interactive program for display and
manipulation of 3D volumes and geometric
objects (lines,surfaces,tag points).
- FieldGen
- A utility for generating Minc volumes
from combinations of simple functions. Useful for simulating intensity
non-uniformity fields in MR.
- SubSample
- A utility for subsampling Minc label volumes.
Produces majority, ties, and partial volume masks. The majority mask can
be viewed as an ideal classification of the subsampled volume and can used
to evaluate classifier performance on simulated data.
- add_labels
- Usage: add_labels [-clobber] input.mnc output.mnc -label val1 str1
[val2 str2 ...]
or: add_labels [-clobber] input.mnc output.mnc lookup_file
Creates a new minc file, adding a set of value-label pairs, specified
on the command line or in a file, to the set in the input minc file.
If the label added, e.g. str1, is empty, then it deletes the value from
the list.
- add_noise
- Add Rician distributed noise (typical of MR)
to a Minc volume. The distribution is specified in terms of the standard
deviation of the complex gaussian noise distribution from which the signal
dependent Rician distribution is computed.
- ascii_binary
- Usage: ascii_binary input.obj [output.obj]
Converts ascii .obj files to binary and vice versa, placing output in
either output.obj, if specified, or input.obj.
- assemble_pets
- A gruesome hack of Peter's assemble_mris
(itself quite the hack) to throw together normalized subtractions of
all the PET volumes for one subject to give "before" and "after" shots
of PET-PET registration. This is a truly awful program, doesn't even
work on some data sets (ie. the PET volumes don't all have the same
slice start), and is due to be rewritten in C.
- autocrop
- A front-end to mincresample and/or mincreshape
that, at the very least, will save you the trouble of ever having to
multiply a step by a dimension length again. ;-) Autocrop is essentially
a tool for manipulating volume bounds, where the "bounds" of a volume
is a set of three pairs: (start,extent) for each spatial dimension.
The extent of a dimension is a real-world measurement, ie. the step times
the dimension length, and is therefore invariant with simple resampling.
There is a -help option, but it's badly out of date; man page forthcoming.
- autocrop_volume
- Usage: autocrop_volume input.mnc output.mnc [min_threshold]
Crops a volume by removing the outer voxels which are less than or equal
to min_threshold, or if none specified, zero.
- averageVolumes
- MINC volume averager - superseded by
mincaverage. The only advantage of averageVolumes is that when your
volumes are compressed, it will still finish today - at the expense
of more memory usage. I'd use mincaverage anyway, and decompress
your data first.
- box_filter_volume
- Usage: box_filter_volume input.mnc output.mnc x_width y_width z_width
[world|voxel] [byte]
Box filters a volume with the given voxel widths, or, if [world] specified,
then in mm widths. If byte is specified, then a byte volume is created.
- calculate_companion
- Calculates a companion volume for PET
subtraction analysis. A companion volume is a count of the total number
of subjects minus the number of contributing subjects at a given voxel.
- choosetag
- Generates tag files automatically by chosing tag points sequentially
from a given volume based on number of tag points specified or
percentage number of all the voxels found in the volume. It is used
to sub-sample few tag points from a classified volume.
- clampVolume
- Clamp (impose a ceiling) a MINC volume
using some heuristics. Was written to eliminate bright scalps from
AI data in order to improve regsitration. Probably better done using
volumeStats and mincmath.
- classify
- Classifies single or multi-spectral brain images (mri, pet, ...) with
various classification methods, namely minimum distance, Neural
networks, K-nearest neighbours and C4.5. Training set is provided
through a tag file
- classify_multiple_mrisets
- Given bunch of mri's having the substring t1, t2 and pd in their names
and a bunch of tag files, and a target directory, mass classify all
these volumes in one shot using ~vasco/minc/progs/bin/classify
- cluster_volume
- Usage: cluster_volume input.mnc output.mnc min_threshold max_threshold
[6|26]
Creates a label volume where each connected component has
a distinct label number.
The connectivity is specified by the last argument as
either 6-neighbour or 26-neighbour.
- colortag
- Given a classified volume and a label-less tag file, labels the tags
in the tag file according to the classification label in the
classified volume.
- contour_slice
- Usage: contour_slice volume_file output_file x|y|z slice_pos
[contour_value1] [contour_value2] ...
Creates contour lines for the given slice at the given contour values.
- convex_hull
- Usage: convex_hull input.mnc output.obj [min_value] [max_value]
Creates a polyhedron which is the convex hull of the region of the input
volume containing values between min_value and max_value, or non-zero
if not specified.
- cortical_surface
- Usage: /nil/david/public_bin/cortical_surface.pl volume.mnc output_file.obj
threshold_value [transform.xfm]
Creates a cortical surface from the specified volume and
threshold. If the volume is not in Talairach space,
a transform must be specified.
- countvoxel
- Given a classified volume count the number of voxels found in each class
- diffuse
- Anisotropic diffusion filter (noise
reduction). The default settings
should work fine for most data; more or less filtering can be
achieved by the -level switch. Some words of caution:
1) Diffuse consumes a good amount of CPU and memory. On small
volumes, using the -nocache will speed things up, but keep an
eye on the memory consumption. Given time, I'll work on
reducing the memory requirements further...
2) Diffuse usually reduces the noise so far that the data looks
"unnatural," like a watercolor painting. Don't be dissapointed
by that - we're just too used to looking at noisy data...
3) Since the level of smoothing is a function of the local
gradient strength, you may be left with some speckle: single
noise voxels which stood out so much from their surrounding
that they were not smoothed over. Increasing the level of
filtering will get rid of those, but will also smooth over some
edges that you'd probably rather keep. In my experience, the
default settings provide good results, although perhaps
somewhat on the conservative side to avoid losing precious
features.
- dilate_volume
- Usage: dilate_volume input.mnc output.mnc dilation_value
[6|26] [n_dilations] [mask.mnc min_mask max_mask]
Dilates all regions of value dilation_value, by n_dilations of 3X3X3,
(1 dilation by default). You can specify 6 or 26 neighbours, default
being 26. If the mask volume and range is specified, then only voxels
in the specified mask range will be dilated.
- do_mritopet
- Front end to mritopet that performs
multiple MRI to PET registrations. Works by searching for MRI files
in one directory, PET files in another directory, selecting the
first PET (by run number) for each subject, matching MRI and PET
subjects by sorting on last name, and running mritopet on each
MRI-PET pair. Optionally (but by default) generates resampled
versions of the input PET and MRI volumes such that the PET volumes
have cubic (2mm) voxels, and the MRI volumes are in PET space (with
cubic 1.5mm voxels). This provides the most reliable way to
visually verify the results of the registration, which is essential
for reliable operation. Can also generate static images of the
merged PET and MRI, which has been found to be not as reliable.
Imposes many of the filename and directory conventions used for
typical PET activation studies at the MNI, which work nicely with
dot. These conventions are fairly flexible -- you can specify the
directories to search and regular expressions for MRI and PET
filenames with command-line options.
- do_mritotal
- Front end to mritotal that performs
multiple MRI to Talairach registrations. Works by searching for MRI
files in one directory, and running mritotal on each of them.
Optionally (but by default) generates a static image containg
several slices from each input MRI, resampled to Talairach space.
This provides a good way to visually verify the result of the
registration, which is essential for reliable operation. Imposes
many of the filename and directory conventions used for typical PET
activation studies at the MNI, which work nicely with dot. These
conventions are fairly flexible -- you can specify the directory to
search and regular expression for MRI filenames with command-line
options.
- do_pettopet
- Front end to alignpettopet (AIR) or minctracc
that performs multiple PET to PET registrations. Works by searching
for all PET files in a single directory, selecting the first PET (by
run number) for each subject, and registering all other PETs for
each subject to the first one. Optionally (but by default) generates
static images (one per subject) containing normalized differences of
the PET volumes with and without registration, in an attempt to highlight
misregistration artifacts and to show whether running the registration
helped reduce them.
- dot
- A graphical user interface to help perform
various operations and statistical analysis of
PET/MRI data. Organize data I/O thru the use of a database: provides data
entry forms for subjects and ancillary data (pet/mri volumes, ...).
- equationtopict
- Takes a LaTeX equation description and
creates a high-resolution Mac PICT of it.
- equationtorgb
- Takes a LaTeX equation description and
creates a high-resolution SGI RGB of it.
- estTissueParam
- Tissue parameter estimator. Given a
label volume and its true MRI sources, optimizes the tissue parameters
for mrisim. Use with small volumes (single slice or less), otherwise
you'll take a big speed hit for zero gain in performance.
- euler
- Calculates the euler characteristic
(approximate p-value) given a threshold and resel volume for a t-statistic
volume
- extract3d
- Given a t1, t2 and pd volumes and a labelled tag file, generates an
inventor file that can be viewed using 'ivview' to look at 3D feature
space distribution of each of the tag points specified in the tag
file. Here also the axes denote feature dimensions rather than
spatial dimensions.
- extracttag
- Generates tag files automatically by chosing tag points from a
probability mask given a label and a probability threshold. Also a
minimum number of tag points can be chosen by having the probability
threshold adjusted automatically.
- fft
- Generates the FFT or inverse FFT of a
MINC volume. Has options to generate
magnitudes and such. By default, taking the FFT results in a complex
(4D) MINC volume.
IMPORTANT NOTE: be careful when using the -nocache option; using
fft without volume caching is a real memory hog (no kiddin'), and
might not get you the speed increase you want due to swapping. A
better way to obtain some speed improvement is by increasing the
buffer sizes.
- find_peaks
- Finds the positive and negative peaks
in a minc volume
- flip_tags
- Usage: flip_tags example.mnc input.tags output.tags
Flips tags about the left-right centre of the volume. Assumes that
the centre is between voxels (sizes[X]/2)-1 and sizes[X]/2.
- flip_volume
- Usage: flip_volume input.mnc output.mnc
Interchanges voxel values with their left-right opposites, thereby
flipping the volume. Interchanges voxel 0 with voxel sizes[X]-1, etc.
- genvol
- Given three volumes in t1, t2 and pd, generates a volume in feature
space. Ie. Each of the axes denote a feature rather than spatial
dimension.
- half_polygons
- Usage: half_polygons input.obj [output.obj]
Subsamples the polygons mesh to half the resolution, placing output
in output.obj, or if not specified, in input.obj.
- inormalize
- Intensity normalizer. Normalizes
volumes internally (slice-based in x, y, or z) or against each
other, using single scale factors. See also normalizeVolume.
- intensity_statistics
- Usage: intensity_statistics volume.mnc input.tag|input.mnc|- [dump_file]
Computes the statistics for the volume intensity of the volume. If
an input tag or label file is specified, then only those voxels in
in the region of the tags or mask volume or considered. If no label
file is desired, use a - for a filename. If a third argument is
specified, all the intensities are placed in the file, for later use
by MATLAB, for example.
- lookup_labels
- Usage: lookup_labels input.mnc
Lists all value-label pairs in the minc file.
or: lookup_labels input.mnc -value val1 val2 ...
Lists value-label pairs in the minc file, specified by value
or: lookup_labels input.mnc -label label1 label2 ...
Lists value-label pairs in the minc file, specified by label
- marching_cubes
- Usage: marching_cubes input.mnc output.obj threshold
marching_cubes input.mnc output.obj min_threshold max_threshold
Creates a polygonal surface of either the thresholded volume, or the
boundary of the region of values between min and max threshold.
- mask_volume
- Usage: mask_volume input.mnc mask_volume.mnc output.mnc
[min] [max] [correct_label_range]
Changes all voxels in the input volume to the min value, if they
correspond to a value in the mask_volume between min and max, which
default to 0. The resulting volume is placed in output.mnc.
- midas
- Medical Image Display and Analysis
System. A multi-panel, graphical user interface that supports numerous
operations, ranging from simple volume arithmetic to ROI drawing and
multi-spectral classification. In terms of image formats, midas
supports raw data files, Sun Raster files, and (3D) MINC files. In
order to run it, you need a defaults file in your *home* directory;
"cp ~alex/Midas ~" should do the trick.
A note about MINC compatibility: midas is MINC-safe, that is, all
relevant attributes are preserved. However, you should bear in mind
that midas operates in voxel space, both in terms of coordinates and
intensity. World coordinates and intensity maps are carried along, but
are not used in any of the processing steps. I.e., you should keep
volumes sampled in the same space, and keep an eye on the
intensities. For instance, a MINC mask usually has two voxel values
{0,255}, mapped to {0,1}. Using midas' volume multiplication will
multiply with 255, not with 1, which may lead to unexpected
results.
- minc_modify_header
- Modify or delete an attribute in a minc
header. Whenever possible (ie. overwriting an attribute with a value of
equal or lesser length), the file is modified in place. Otherwise, a copy
of the file is made, replacing the original file. Compressed files can
also be modified in place, but first they are de-compressed - they are
not re-compressed.
- mincaverage
- Averages a bunch of minc files together.
Can also average along a non-image dimension of a single file. Input files
can be binarized (value 0 or 1 at each pixel) by thresholding before the
average is done.
- mincconcat
- Concatenates a bunch of minc files together,
either along an existing non-image dimension, or creating a new dimension.
Images are re-ordered along the concatenation dimension to give
monotonically increasing coordinate values - ie. slices are properly
interleaved.
- mincdiff
- Does a diff of two minc files. First the
headers are dumped and compared with diff, then the data are dumped and
compared with cmp.
- mincedit
- Allows editing of the header of a minc file.
After editing of the header, a new file is created, with data copied in
such a way that real data values are preserved (even if type or range
is changed).
- mincexpand
- De-compresses (expands) a minc file if
necessary. For use by scripts that do multiple operations on a compressed
minc file. See mincview for an example that uses it.
- mincextract
- Extracts hyperslabs of values from a minc
file and writes the values out in raw binary or ascii form.
- mincheader
- Dumps the header of a minc file.
- mincinfo
- Get specific information from a minc file
or dump a simple description of the file. Used by scripts to get header
information.
- minclookup
- Performs lookup operations on a minc file.
Converts scalar input values into scalar or vector output values by
looking input values up in a table. Can be used to convert continuous
grayscale values to colour RGB values or to convert discrete label values
to new label values.
- mincmath
- Performs simple math on minc files
including arithmetic and boolean operations.
- mincresample
- Resamples a minc file with a new spatial
sampling, after applying a given transformation.
- mincreshape
- Cuts a hyperslab out of a minc volume and
does optional dimension re-ordering. Performs pixel type and range
conversions and some simple dimension direction and size conversions.
Cutting out a hyperslab means cropping, flipping, expanding or selecting
a point along any dimension (the last means, for example, get a slice
out of a volume). Pixel type and range conversions include re-scaling or
normalizing pixels (real intensity values are preserved). Dimension
operations include integer zooming or contracting of images, flipping
image dimensions, converting vector images to scalar.
- minctoraw
- Program to dump out a file in raw binary
form. It has pretty much been superceded by mincextract.
- minctotag
- Usage: minctotag volume output.tag
minctotag volume output.tag id
minctotag volume output.tag min_id max_id
Creates a tag file from a volume. The three forms create tags from:
all non-zero voxels,
all voxels with values equal to id, and
all voxels with values from min_id to max_id, respectively.
- mincview
- Script to dump out slices of a minc file
and invoke a viewer such as xv to display them. Also permits viewing of
RGB vector image minc files.
- mincwindow
- Clamps an image, preserving the values
either within or outside a given range.
- mnitominc
- Converts an MNI format file to minc format.
- mritopet
- Tool for performing a single, fully-
automated MRI-PET registration. Performs the necessary
pre-processing (crops MRI and optionally strips the scalp from it;
the MRI->Talairach transform is necessary for these steps), and then
runs either alignmritopet (part of AIR) or minctracc on the
preprocessed data. Has been rigorously validated for O-15 water PET
data + ICBM T1-weighted MRI data from the MNI; success with other
tracers and/or MRI sources is not assured.
- mritoself
- An attempt to encapsulate all the pre-
processing needed to do intra-subject (usually MRI-to-MRI) registration.
Currently it's quite flexible but still broken in many respects;
do not use this program unless you're desperate.
- mritotal
- Fits a single MRI volume to stereotaxic
space using repeated fits (with minctracc) of successively less-blurred
versions of the data. Requires configuration files (in
/usr/local/mni/etc/mni_autoreg or user's home directory) and model
files (in /data/avgbrain1/brain/images/model, or specified by
-model argument). Currently works best with T1-weighted MRI data
acquired at the MNI with the ICBM protocol; testing for other sites
and protocols is under way.
- nlfit
- A superset of mritotal that does (almost)
the same pre-processing and linear registration, but then does
non-linear fitting to the model (for purposes of automated
segmentation). Experimental and unstable; do not use this program
without care.
- normalize_volume
- Normalizes a volume for PET subtraction
analysis.
- nu_correct
- Automatically corrects for intensity
non-uniformity in MRI volumes.
- prunetag
- Simple perl script to prune an MNI tag
file; tags with specified labels can
be removed or kept.
- pstopict
- Takes a PostScript file and renders
a high-resolution Mac PICT of it.
- pstorgb
- Takes a PostScript file and renders
a high-resolution SGI RGB of it.
- pstotiff
- Takes a PostScript file and renders
a high-resolution TIFF of it.
- rawtominc
- Converts a stream of raw binary values to
a minc files. Dimension sizes, coordinates and ordering are given on
the command line. Header attributes can also be specified.
- register
- Interactive program for display of 1 or 2
3D volumes and registering them via homologous
tag point selection.
- scxtominc
- Converts Scanditronix format file(s) to
minc format.
- set_line_width
- Usage: set_line_width input_lines.obj output_lines.obj [thickness]
Copies the input lines to the output lines, with the line thickness set
accordingly, defaulting to 1.
- set_object_colour
- Usage: set_object_colour input.obj output.obj colour_name
Copies the input objects to the output objects, with the colour set
accordingly.
- set_object_opacity
- Usage: set_object_opacity input.obj output.obj opacity
Copies the input objects to the output objects, with the opacity set
accordingly, a value between 0 (transparent) and 1.
- smooth_lines
- Usage: smooth_lines input_lines.obj output_lines.obj [smooth_distance]
Copies the input lines to the output lines, with the any points within
smooth_distance (default 1) apart being deleted.
- smooth_normals
- Usage: smooth_normals input.obj [output.obj] [iters] [ratio]
Smooths the polygon normals, placing output in input.obj, or if
specified, output.obj. It performs iters iterations of replacing
each normal with the ratio interpolation between itself and the
average of its neighbours.
- sorttag
- Given a tag file with mixed labelled tags (through colortag), sort the
tags in that file in ascending order. Used with extract3d where same
color tags should be sequential.
- spline_smooth
- A utility for smoothing the intensity values
in a Minc volume by approximating the volume in terms of splines. Use this
tool instead of gaussian blurring when very blurred volumes are required
or to avoid filtering artifacts along the boundary of the region of
interest. Specification of a mask allows for smoothing of arbitrary regions
as well as extrapolation.
- stripscalp
- Uses the MRI to Talairach transform and
the average-brain mask to mask the scalp off an MRI volume.
- subdivide_polygons
- Usage: subdivide_polygons input.obj [output.obj]
Subdivides the polygons mesh to twice the resolution, placing output
in output.obj, or if not specified, in input.obj.
- tagtominc
- Usage: tagtominc example_volume.mnc input.tag output.mnc [structure_id]
Converts a tag file to a MINC volume with values equal the tags'
structure ids, given an example MINC volume.
If structure_id is specified, then only tags with this id are used.
Otherwise all tags are used.
- transform_objects
- Usage: transform_objects input.obj input.xfm [output.obj]
Transforms the input objects by the input transform, placing output in
output.obj if specified, otherwise in input.obj.
- transform_tags
- Usage: transform_tags input.tag input.xfm [output.tag] [invert]
Transforms the input tags by the input transform. If a fourth
argument is present, then the inverse of the transform is used. The
transformed tags are written to output.tag if specified, otherwise
input.tag is overwritten.
- transform_volume
- Usage: transform_volume input.mnc input.xfm output.mnc
Changes the voxel_to_world transform by appending the input transform to
the existing one, writing the resulting volume in output.mnc.
This is an efficient method of transforming a volume to another space,
since there is no data loss; the volume values stay the same.
- transformtags
- Transform a point-list (.tag) file with
a specified transform (.xfm) file.
- voldiff
- Given two classified volumes, compares the second one against the
first one, displaying a confusion matrix along with all sorts of
statistical similarity measures.
- volumeStats
- Lists statistics of a MINC volume:
voxel counts, mean, std, etc, etc. Has a handy -mask option, allowing
you to get stats only over the voxels labeled in the mask.
- volume_hist
- Computes histogram(s) of intensity values in a
minc volume. Specify an optional mask volume to compute histograms for
one or more regions of interest. Use Parzen window option for greater
accuracy and smoother histograms.
- voxeltoworld
- Convert a voxel coordinate for a minc file
to world coordinates.
- worldtovoxel
- Convert a world coordinate to voxel
coodinates for a minc file.
- xfmconcat
- Concatenate transform (.xfm) files.
- xfminvert
- Invert a transform (.xfm) file.
- xfmscale
- Extracts x, y, z, and global scale
factors from a .xfm file. Uses xfm2param.