cmdline
¶
Functionality to be exposed in the command line
Module: cmdline.dicomfs
¶
DICOMFS (*args, **kwargs) |
|
FileHandle (fno) |
|
dummy_fuse |
Dummy fuse “module” so that nose does not blow during doctests |
get_opt_parser () |
|
main ([args]) |
Module: cmdline.ls
¶
Output a summary table for neuroimaging files (resolution, dimensionality, etc.)
get_opt_parser () |
|
main ([args]) |
Show must go on |
proc_file (f, opts) |
Module: cmdline.parrec2nii
¶
Code for PAR/REC to NIfTI converter command
error (msg, exit_code) |
|
get_opt_parser () |
|
main () |
|
proc_file (infile, opts) |
|
verbose (msg[, indent]) |
Module: cmdline.utils
¶
Helper utilities to be used in cmdline applications
ap (helplist, format_[, sep]) |
Little helper to enforce consistency |
safe_get (obj, name) |
A getattr which would return ‘-‘ if getattr fails |
table2string (table[, out]) |
Given list of lists figure out their common widths and print to out |
verbose (thing, msg) |
Print s if thing is less than the verbose_level |
DICOMFS
¶
-
class
nibabel.cmdline.dicomfs.
DICOMFS
(*args, **kwargs)¶ Bases:
fuse.Fuse
-
__init__
(*args, **kwargs)¶ Not much happens here apart from initializing the parser attribute. Arguments are forwarded to the constructor of the parser class almost unchanged.
The parser class is FuseOptParse unless you specify one using the
parser_class
keyword. (See FuseOptParse documentation for available options.)
-
get_paths
()¶
-
getattr
(path)¶
-
match_path
(path)¶
-
open
(path, flags)¶
-
read
(path, size, offset, fh)¶
-
readdir
(path, fh)¶
-
release
(path, flags, fh)¶
-
safe_get¶
-
nibabel.cmdline.utils.
safe_get
(obj, name)¶ A getattr which would return ‘-‘ if getattr fails
table2string¶
-
nibabel.cmdline.utils.
table2string
(table, out=None)¶ Given list of lists figure out their common widths and print to out
Parameters: table : list of lists of strings
What is aimed to be printed
out : None or stream
Where to print. If None – will print and return string
Returns: string if out was None