Client¶
Gadgetron client for running on network machines.
Adapted from https://github.com/gadgetron/gadgetron-python-ismrmrd-client.git Keeps same command line interface, but allows for import into scripts.
-
mr_utils.gadgetron.client.
client
(data, address=None, port=None, outfile=None, in_group='/dataset', out_group=None, config='default.xml', config_local=None, script=None, existing_modules=['numpy', 'scipy', 'h5py'], script_dir=None, verbose=False)[source]¶ Send acquisitions to Gadgetron.
This client allows you to connect to a Gadgetron server and process data.
Parameters: - data (str or array_like) – Input file with file extension or numpy array.
- address (str, optional) – Hostname of Gadgetron. If not set, taken from profile config.
- port (int, optional) – Port to connect to. If not set, taken from profile config.
- outfile (str, optional) – If provided, output will be saved to file with this name.
- in_group (str, optional) – If input is hdf5, input data group name.
- out_group (str, optional) – Output group name if file is written.
- config (xml_str, optional) – Remote configuration file.
- config_local (xml_str, optional) – Local configuration file.
- script (str, optional) – File path to the Python script to be bundled and transfered.
- existing_modules (list, optional) – Python packages to exclude from bundling.
- script_dir (str, optional) – Directory to send script on remote machine.
- verbose (bool, optional) – Verbose mode.
Returns: - data (array_like) – Image from Gadgetron
- header (xml) – Header from Gadgetron
Raises: NotImplementedError
– script bundling is not currently implemented.Exception
– data is not provided in the correct format.
Notes
out_group=None will use the current date as the group name.