MINC hints
Some of the more useful programs I found from the MNI. Also to find more information on how to use the programs, running the program and with the -help
option will usually do the trick. You can also man progname
if you set your MANPATH environment variable correctly.
- Display
- Usage: Display file1.mnc file2.mnc ... -label roi.mnc
- Displays MNC files. Can be used for displaying multiple imaging modalities, overlays and for drawing/determining up to 256 regions of interest (ROIs) a.k.a. painting. More information can be found here.
- register
- Usage: register -rgb file1.mnc file2.mnc
- Shows two MNC files side-by-side, and their overlay. Great for comparing results of coregistration and can be used to manually coregister two image files (useful for those really hard cases). More documentation can be found here.
- mincpik
- Usage: mincpik infile.mnc image.type
- Generates PNG or JPG image of particular slices - useful for making figures.
- mincinfo
- Usage: mincinfo [options] file1.mnc
- Provides information on the type of file you are viewing, e.g. range, dimensions, and voxel size. You can also use it to find out information on attributes.
- mincmath
- Usage: Too much to describe here. Run with the
-help
option to find out all the possbilities...
- Use this tool to do various mathematical operations that you would do on datasets or on constants: add, subtract, multiply, divide,...
- volume_stats
- Usage: Too much to describe here. Run with the
-help
option to find out all the possbilities...
- Use this tool to quickly calculate statistics (mean, std, max, min, mode,...) across several volumes. Using this with a mask file (e.g. an ROI generated using Display) will limit the results to only a particular region.
- mincaverage
- Usage: mincaverage [options] file1.mnc ... averagefile.mnc
- Averages a bunch of MNC files together - they all need to be the same dimensions
- mincreshape
- Usage: mincreshape [options] infile outfile
- Useful for reshaping your data.
- mincdiff
- Usage: mincdiff [options] file1.mnc file2.mnc
- Determines if the separate components of the MNC files are different, e.g. just the header or the images have changed
- mincresample
- Usage: mincresample [options] in.mnc out.mnc
- Resamples a MNC file based on options. Usually you give an XFM file (generated through register or automatically through mritoself or minctracc) and that will produce an output image that is coregistered to your target image.
- xfmconcat
- Usage: xfmconcat in1.xfm in2.xfm ... final.xfm
- Concatenates a bunch of transformations resulting in final.xfm which you can then use with resample. Gives you the equivalent of transforming first by in1.xfm, then in2.xfm and so forth.
- xfminvert
- Usage: xfminvert in.xfm out.xfm
- Inverses the transformation
Display tips
Display is a great program. For the full documentation, check here. Hints on keystrokes are shown on the keyboard that pops up when you run Display. To get back to the top keyboard menu, hit <space>. Here are some of the commands which I find useful:
Mouse controls:
- Left - move cursor
- Middle - move through slices
- Right - paint a label
- [Shift]-Left (simultaneously) - translate image
- [Shift]-Middle - zoom in/out
- [Shift]-Right - erase label
Keyboard controls (commands represent sequence of keystrokes starting from initial menu). If you make a mistake, hit Esc a few times:
- Q S - trilinear interpolation of volume - makes it look nicer
- D D - Greyscale colormap
- D H - change image display range
- D C - sets label (ROI) opacity
- D Z - all values below your threshold is set to this color, very useful value is 0 0 0 0 , which is transparent
- F F - change radius of your paintbrush - units are in mm
- F D - change paint label, e.g. if you want another value to represent a different ROI
- F E - fill the label, so if you drew a closed outline of a lesion, you can fill in the rest of the lesion usin this command and placing your mouse in the middle of the outline
- F T - clears the label your mouse is on
- F S - if you really make mistakes, clears the whole slice
- F Z B - if you really really make mistakes, clears all labels
- F Y - sets a threshold (really useful!) such that only values within the range are selected
- F V - calculates volume of your label
- T 1 - turn crop save labels off, otherwise your saved ROIs will be cropped to save space
- T w - save labels as MNC file - lets you treat your ROI files like a mask
- T F - load a new file
- S T - change which volume you are operating on (don't use S R since won't let you see two volumes at once anymore)