Skip to content

Commit

Permalink
Add placeholders for IO setup (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrahimebrahim committed Jul 31, 2024
1 parent 60f0a22 commit b4bfd71
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/abcdmicro/dwi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from __future__ import annotations

from dataclasses import dataclass

from abcdmicro.event import AbcdEvent
from abcdmicro.resource import BvalResource, BvecResource, VolumeResource


@dataclass
class Dwi:
"""An ABCD diffusion weighted image."""

event: AbcdEvent
"""The ABCD event associated with this DWI."""

volume: VolumeResource
"""The DWI image volume."""

bval: BvalResource
"""The DWI b-values"""

bvec: BvecResource
"""The DWI b-vectors"""
23 changes: 23 additions & 0 deletions src/abcdmicro/event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from __future__ import annotations

from dataclasses import dataclass
from pathlib import Path


@dataclass
class AbcdEvent:
"""An ABCD event -- a particular subject and time point."""

subject_id: str
"""The subject GUID defined in the NIMH Data Archive, for example 'NDAR_INV00U4FTRU'"""

eventname: str
"""The ABCD Study event name, for example 'baseline_year_1_arm_1'"""

image_download_path: Path
"""Path to the ABCD image download root directory. This would be the directory that
contains `fmriresults01/abcd-mproc-release5/` with some compressed images in there"""

tabular_data_path: Path
"""Path to the extracted ABCD tabular data directory. This would contain subdirectories
like `core/mental-health/` with csv tables inside them."""
15 changes: 15 additions & 0 deletions src/abcdmicro/io.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from __future__ import annotations

from abcdmicro.resource import BvalResource, BvecResource, VolumeResource


class NiftiVolumeResrouce(VolumeResource):
pass


class FslBvalResource(BvalResource):
pass


class FslBvecResource(BvecResource):
pass
29 changes: 29 additions & 0 deletions src/abcdmicro/resource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from __future__ import annotations


class Resource:
pass


class VolumeResource(Resource):
pass


class InMemoryVolumeResource(VolumeResource):
pass


class BvalResource(Resource):
pass


class InMemoryBvalResource(BvalResource):
pass


class BvecResource(Resource):
pass


class InMemoryBvecResource(BvecResource):
pass

0 comments on commit b4bfd71

Please sign in to comment.