miblab_data.xnat.download_series#

miblab_data.xnat.download_series(xnat_url, output_dir, project_id, subject_label=None, experiment_label=None, attr: dict | None = None, n_max=None, log=False)[source]#

Downloads all scan series with a given attribute value.

Parameters:
  • xnat_url (str) – Base URL of the XNAT server.

  • output_dir (str) – Directory to store downloaded data.

  • project_id (str) – XNAT project ID.

  • subject_label (str) – XNAT subject label. If this is None, all subjects are downloaded. Defaults to None.

  • experiment_label (str) – XNAT experiment label. If this is None, all experiments are downloaded. Defaults to None.

  • attr (dict, optional) – Attribute(s) to filter by. Keys must be valid XNAT attributes, and values must be a list of required values. Series will only be returned if each attribute has a value in the list.

  • n_max (int, optional) – maximum number of series to download

  • log (bool, optional) – If True each download is logged.