Skip to content

Instantly share code, notes, and snippets.

@jefferis
Created April 18, 2016 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefferis/6cac924fc192fec581c4e199001bfa85 to your computer and use it in GitHub Desktop.
Save jefferis/6cac924fc192fec581c4e199001bfa85 to your computer and use it in GitHub Desktop.
munger.pl help
Usage: /usr/local/bin/munger [OPTIONS] <PICFILE/DIR> [<PICFILE2/DIR2> ...]
Version: 1.21
A wrapper script for CMTK registration software. For more on CMTK see:
http://www.nitrc.org/projects/cmtk/
-h print this help
-v verbose (provide extra feed back at runtime)
-t test run (no commands are actually run)
-g debug: prints every command run by myexec and the return value
-p make a scriPt from commands that would be run
(nb cannot produce commands that depend on earlier commands)
-u statUs - display number of images, registrations etc
-z turn gzip off (on by default)
-k lock message ie contents of lock file (defaults to hostname:process id)
-m maximum time to keep starting registrations (in hours, default 8760=1y)
nb this will not stop any running registrations
-x [never|only|any]:[truncate|delete] Clear input images when done.
default is never, eg only:truncate, any:delete
only => only the job that runs reformat can clear input
any => any job can delete; in fact a job started with any will not
reformat at all. This is useful because you can run a cleanup
job if it becomes clear that you are running short of space.
truncate => leave a 0 length file with same mtime as original image
-a run affine transform
-w run warp transform
-c [01|02|..] channels for registration (default 01 or "")
-r [01|02|..] run reformat on these channels
-l [p|a|0..9|f] run reformat on these levels
(default f=final warp, p=principal axis, a=affine, 0..9=warp intermediates)
-f [01|02|..] channel of the images used for registration - default is 01
[nb use -f to specify the channel of the images that were previously used to
generate a registration if you now want to reformat a different channel using
that registration information]
-i register brain to itself if possible (default is to skip)
-0 Don't output intermediate warp registration levels
-s [file|fileStem] Reference brain (average e-2 by default)
-b [path] bin directory
-d [stem] registration subdirectory (default ./Registration)
[nb if this begins in a dot then the value will be appended to both
reformatted and Registration directories]
-F Read path to input files, one per line, from <PICFILE1> ...
NB path should be absolute or relative to registration directory e.g.
images/imagea-01.nrrd
images/imageb-01.nrrd
-e File ending of input images (pic, nrrd, nhdr)
-o File ending of output images (bin, nrrd, nhdr) - defaults to nrrd
-H use Amira's Generalised Hough Transform to initialise affine registration when available
(nb the registration folder should be called Registration/affine/XXX_ght.list)
-P find initial affine transform using image principal axes
-L find initial affine transform using landmarks
-I inverse consistent warp weight (--ic-weight) default 0, try 1e-5
-E [energy] energy of warp transform (default e-1)
-X [exploration] (default 16)
-M [metric] (Supported values: nmi, mi, cr, msd, ncc, default is nmi)
See warp --help for details
-C [coarsest] (default 4)
-G [grid-spacing] (default 40)
-R [refine] (default 3)
-J [0 to 1] jacobian-weight volume constraining param (default 0)
-T [threads] (default auto)
-A [option] additional options for affine transformation
-W [option] additional options for warp transformation
-1 use this brain for reformatx target
-2 [option] additional options for reformatx
Munge a BioRad PIC or nrrd file or (recursively) parse a directory of PIC/nrrd
files by running CMTK affine and warp registrations and reformatting images
as required. Final argument must be the images directory or a single image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment