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

Revisit segmentation directory structure #60

Open
mgxd opened this issue May 17, 2021 · 0 comments
Open

Revisit segmentation directory structure #60

mgxd opened this issue May 17, 2021 · 0 comments

Comments

@mgxd
Copy link
Collaborator

mgxd commented May 17, 2021

Current implementation:

def _parse_segmentation_atlases(anat_modality, template_dir):
"""
Parse segmentation templates directory for anatomical and segmentation files.
This is currently hardcoded to match DCAN lab templates.
Will need to rethink standardization for more general cases.
"""
from pathlib import Path
anats, segs = [], []
for f in Path(template_dir).glob("**/*.nii*"):
if "Segmentation" in f.name:
segs.append(str(f.absolute()))
elif anat_modality in f.name:
anats.append(str(f.absolute()))
assert anats
assert segs
# there should matching files per template
assert len(anats) == len(segs)
return sorted(anats), sorted(segs)

  • The validity of the segmentation directory should happen as soon as inputs are processed.
  • We should implement a more BIDS-like structure.
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

1 participant