main¶
- nibabel.cmdline.dicomfs.main(args=None)¶
Functionality to be exposed in the command line
| DICOMFS(*args, **kwargs) | |
| FileHandle(fno) | |
| dummy_fuse | Dummy fuse “module” so that nose does not blow during doctests |
| get_opt_parser() | |
| main([args]) |
Quick summary of the differences among a set of neuroimaging files
| are_values_different(*values) | Generically compare values, return True if different |
| diff(files[, header_fields, ...]) | |
| display_diff(files, diff) | Format header differences into a nice string |
| get_data_diff(files[, max_abs, max_rel, dtype]) | Get difference between data |
| get_data_hash_diff(files[, dtype]) | Get difference between md5 values of data |
| get_headers_diff(file_headers[, names]) | Get difference between headers |
| get_opt_parser() | |
| main([args, out]) | Getting the show on the road |
Output a summary table for neuroimaging files (resolution, dimensionality, etc.)
| get_opt_parser() | |
| main([args]) | Show must go on |
| proc_file(f, opts) |
Code for PAR/REC to NIfTI converter command
| error(msg, exit_code) | |
| get_opt_parser() | |
| main() | |
| proc_file(infile, opts) | |
| verbose(msg[, indent]) |
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 |
Generically compare values, return True if different
Note that comparison is targetting reporting of comparison of the headers so has following specifics: - even a difference in data types is considered a difference, i.e. 1 != 1.0 - nans are considered to be the “same”, although generally nan != nan
Format header differences into a nice string
| Parameters: | files: list of files that were compared so we can print their names : diff: dict of different valued header fields : |
|---|---|
| Returns: | str :
|
Get difference between data
| Parameters: | files: list of (str or ndarray) :
max_abs: float, optional :
max_rel: float, optional :
dtype: np, optional :
|
|---|---|
| Returns: | diffs: OrderedDict :
|
Get difference between md5 values of data
| Parameters: | files: list of actual files : |
|---|---|
| Returns: | list :
|
Get difference between headers
| Parameters: | file_headers: list of actual headers (dicts) from files : names: list of header fields to test : |
|---|---|
| Returns: | dict :
|
A getattr which would return ‘-‘ if getattr fails
Given list of lists figure out their common widths and print to out
| Parameters: | table : list of lists of strings
out : None or stream
|
|---|---|
| Returns: | string if out was None : |