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

Space iteration notes #34

Open
effigies opened this issue May 17, 2024 · 1 comment
Open

Space iteration notes #34

effigies opened this issue May 17, 2024 · 1 comment
Milestone

Comments

@effigies
Copy link
Member


aroma_wf:
  inputnode:
    bold_mni6
    mask_mni6
  outputnode:
    

#### Calculate aroma
if 'bold_mni6' in found:
  aroma_wf = init_aroma_wf()
  wf.inputs.inputnode.bold_mni6 = found['bold_mni6']
else:
  resample_wf = init_resample_wf()
  resample_wf.inputs....
  wf.connect([
    (resample_wf, aroma_wf, [
      ('outputnode.bold_mni6', 'inputnode.bold_mni6')
]),

#### Apply aroma
iterator_wf = ...
  # anat2std_xfm
  # std_t1w
  # std_mask

xfms = [
  hmc_xfms,
  coreg_xfm
]

all_xfms = Merge(2)
wf.connect(xfms, 'out', all_xfms, 'in1')
wf.connect(iterator_wf, 'outputnode.anat2std', all_xfms, 'in2')

resampler = ...
  # bold.nii
  # fmap.nii
  # fmapreg

wf.connect(xfms, 'out', resampler, 'xfms')

wf.connect(aroma_wf, ..., denoise, ...)
wf.connect(resampler, ..., denoise, ...)

## If resampled data exists

std_buffer = KeySelect(bold=[found[space].bold for space in spaces], keys=spaces)
wf.connect(iterator_wf, 'space', std_buffer, 'key')

wf.connect(aroma_wf, ..., denoise, ...)
wf.connect(std_buffer, 'bold', denoise, 'bold')
@tsalo
Copy link
Collaborator

tsalo commented Aug 6, 2024

I started working on this in #33, but I couldn't get it working because the space iterator collects the transforms, but resampler does as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants