diff --git a/src/abcdmicro/dwi.py b/src/abcdmicro/dwi.py new file mode 100644 index 0000000..4d5cb62 --- /dev/null +++ b/src/abcdmicro/dwi.py @@ -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""" diff --git a/src/abcdmicro/event.py b/src/abcdmicro/event.py new file mode 100644 index 0000000..b83c4d5 --- /dev/null +++ b/src/abcdmicro/event.py @@ -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.""" diff --git a/src/abcdmicro/io.py b/src/abcdmicro/io.py new file mode 100644 index 0000000..f095f67 --- /dev/null +++ b/src/abcdmicro/io.py @@ -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 diff --git a/src/abcdmicro/resource.py b/src/abcdmicro/resource.py new file mode 100644 index 0000000..2168570 --- /dev/null +++ b/src/abcdmicro/resource.py @@ -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