Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Use BIDS standard template identifiers for templates #12

Open
3 tasks
shnizzedy opened this issue May 3, 2022 · 1 comment
Open
3 tasks

✨ Use BIDS standard template identifiers for templates #12

shnizzedy opened this issue May 3, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request RBC https://github.com/PennLINC/RBC templates

Comments

@shnizzedy
Copy link
Member

Related problem

Currently template-space files derived from C-PAC are labeled space-template which does not differentiate different-template-spaced files from one another.

Proposed feature

Use standard template identifiers like space-MNI152NLin2009

Acceptance criteria

Alternatives

No response

Additional context

Related:

@shnizzedy shnizzedy added enhancement New feature or request templates labels May 3, 2022
@shnizzedy shnizzedy added the RBC https://github.com/PennLINC/RBC label Sep 15, 2022
@shnizzedy
Copy link
Member Author

I'm backburnering in favor of FCP-INDI/TheWay#8. I case someone else picks this up before I get back to it, I started a branch (templates/MNI) that so far just adds a function (lookup_identifier) to look up the standard identifier based on a regex of the in-container filename. So far the lookup table only includes two MNI spaces.

    '''Function to return a standard template identifier for a packaged
    template, if known. Otherwise, returns the literal string
    'template'

    Parameters
    ----------
    template_path : str

    Returns
    -------
    identifier : str

    Examples
    --------
    >>> lookup_identifier('/usr/share/fsl/5.0/data/standard/'
    ...                   'MNI152_T1_1mm_brain.nii.gz')
    'MNI152NLin6ASym'
    >>> lookup_identifier('/code/CPAC/resources/templates/'
    ...                   'tpl-MNI152NLin2009cAsym_res-01_label-brain_'
    ...                   'probseg.nii.gz')
    'MNI152NLin2009cAsym'
    >>> lookup_identifier('/cpac_templates/chd8_functional_template_sk.nii')
    'template'
    '''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request RBC https://github.com/PennLINC/RBC templates
Projects
Status: No status
Development

No branches or pull requests

1 participant