templateflow / python-client

A python client to query TemplateFlow via pyBIDS
https://templateflow.org/python-client/
Apache License 2.0
8 stars 12 forks source link

Copy custom templates into the TEMPLATEFLOW_HOME directory #12

Open oesteban opened 5 years ago

oesteban commented 5 years ago

Allow custom templates via indexing arbitrary paths.

EDITED

Instead of complicated operations and symlinks, add some kind of install(custom_path, template_id) method to the API, so that the user can insert their templates into the TEMPLATEFLOW_HOME folder.

Then, the names are checked with PyBIDS, and all the NIfTI files are "sanitized" with the appropriate orientation and data types.

We also need to be careful with the update() method, and make sure that these templates are never deleted, even after update(local=False, overwrite=True)

This will be useful in the context of fMRIPrep, as now we will be able to either:

  1. Ask the user to install the template before running fmriprep (which could use of a command line utility)
  2. Add a flag pointing to the path.