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

MouseIn template issue #63

Open
AnriiGegliuk opened this issue Mar 20, 2024 · 1 comment
Open

MouseIn template issue #63

AnriiGegliuk opened this issue Mar 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@AnriiGegliuk
Copy link

AnriiGegliuk commented Mar 20, 2024

What happened?

Dear all, I am trying to use MouseIn templates to get a brain mask on BL6 mouse, and I got the following error.

What command did you use?

input_files = ['path']
output = 'path'

be_wf = init_rodent_brain_extraction_wf(template_id="MouseIn",  mri_scheme='T2w', output_dir=output_dir)
be_wf.inputs.inputnode.in_files = input_files

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[13], line 1
----> 1 be_wf = init_rodent_brain_extraction_wf(template_id="MouseIn",  mri_scheme='T2w', output_dir=output_dir)
      2 be_wf.inputs.inputnode.in_files = input_files

File ~/mri_course/workflow/brain_extraction.py:683, in init_rodent_brain_extraction_wf(ants_affine_init, factor, arc, step, grid, debug, interim_checkpoints, mem_gb, mri_scheme, name, omp_nthreads, output_dir, template_id, template_specs, use_float)
    681 tpl_target_path = get_template(template_id, suffix=mri_scheme, **template_specs,)
    682 if not tpl_target_path:
--> 683     raise RuntimeError(
    684         f"An instance of template <tpl-{template_id}> with MR scheme '{mri_scheme}'"
    685         " could not be found."
    686     )
    688 tpl_brainmask_path = get_template(
    689     template_id,
    690     atlas=None,
   (...)
    701     **template_specs,
    702 )
    704 tpl_regmask_path = get_template(
    705     template_id,
    706     atlas=None,
   (...)
    709     **template_specs,
    710 )

RuntimeError: An instance of template <tpl-MouseIn> with MR scheme 'T2w' could not be found. 


I have tried T1 + suphixes for templates inside the tpl-MouseIn. 


I understand that there is no T2w inside tpl-MouseIn:

➜  tpl-MouseIn tree                                                                 base
.
├── CHANGES
├── LICENSE
├── template_description.json
├── tpl-MouseIn_res-1_T1map.nii.gz
├── tpl-MouseIn_res-1_UNIT1.nii.gz
├── tpl-MouseIn_res-1_atlas-CCFv3_desc-DC_dseg.nii.gz
├── tpl-MouseIn_res-1_desc-CSF_mask.nii.gz
├── tpl-MouseIn_res-1_desc-CSF_probseg.nii.gz
├── tpl-MouseIn_res-1_desc-GM_probseg.nii.gz
├── tpl-MouseIn_res-1_desc-WM_probseg.nii.gz
├── tpl-MouseIn_res-1_desc-brain_mask.nii.gz
├── tpl-MouseIn_res-1_inv-1_MP2RAGE.nii.gz
├── tpl-MouseIn_res-1_inv-2_MP2RAGE.nii.gz
├── tpl-MouseIn_res-2_desc-brain_T1map.nii.gz
└── tpl-MouseIn_res-2_desc-brain_UNIT1.nii.gz


So I am just wandering what can I do? If there is a way to load our templates for registation and mask? Or there is some parameters I can change? Apologies if I am missing something obvious.

What version of the software are you running?

up to date one

How are you running this software?

Local installation ("bare-metal")

Is your data BIDS valid?

No

Are you reusing any previously computed results?

Work directory

Please copy and paste any relevant log output.

No response

Additional information / screenshots

image
this is just an ouput which Fischer344 template gave me

@AnriiGegliuk AnriiGegliuk added the bug Something isn't working label Mar 20, 2024
@eilidhmacnicol
Copy link
Collaborator

Thank you for bringing this to our attention.

There needs to be some logic to look for T1map as a pseudo-T2w image, as the contrasts are similar (although not identical). This should be a fairly straight forward fix, but might need a little optimization in the case that the T1map registration parameters need some tweaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants