nifti_folders
oxytcmri.infrastructure.importers.nifti_folders
¶
Importer that extracts MRI exams data from folders containing Nifti files and stores them into appropriate repositories.
Classes:
Name | Description |
---|---|
NiftiFoldersImporter |
Importer for NIfTI folders that extracts MRI exams data and stores them in repositories. |
NiftiFoldersImporter(base_path, subject_repository=None, mri_exam_repository=None, atlas_repository=None)
¶
Bases: Importer
Importer for NIfTI folders that extracts MRI exams data and stores them in repositories.
This class uses a NiftiFoldersMRIExamRepository to scan folders and extract MRI data, then stores the extracted data in persistent repositories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
base_path
|
str
|
Path to the folder containing NIfTI data folders |
required |
subject_repository
|
SubjectRepository
|
Repository for storing subject information |
None
|
mri_exam_repository
|
MRIExamRepository
|
Persistent repository for storing MRI exam data |
None
|
atlas_repository
|
AtlasRepository
|
Repository for storing atlas information |
None
|
Methods:
Name | Description |
---|---|
register_repository |
Register the needed repositories for the importer. |
import_data |
Import MRI exam data from NIfTI folders and store in repositories. |
check_repositories |
Check if subject and MRI exam repositories are set. |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
|
nifti_folders_repository |
|
|
subject_repository |
|
|
mri_exam_repository |
|
Source code in oxytcmri/infrastructure/importers/nifti_folders.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
base_path = Path(base_path)
instance-attribute
¶
nifti_folders_repository = NiftiFoldersMRIExamRepository(base_path, atlas_repository)
instance-attribute
¶
subject_repository = subject_repository
instance-attribute
¶
mri_exam_repository = mri_exam_repository
instance-attribute
¶
register_repository(repositories)
¶
Register the needed repositories for the importer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
repositories
|
list[Repository]
|
List of repositories to register. |
required |
Source code in oxytcmri/infrastructure/importers/nifti_folders.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
import_data()
¶
Import MRI exam data from NIfTI folders and store in repositories.
This method scans the NIfTI folders, extracts MRI exam data, and stores the data in the subject and MRI exam repositories.
Source code in oxytcmri/infrastructure/importers/nifti_folders.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
check_repositories()
¶
Check if subject and MRI exam repositories are set.
Raises:
Type | Description |
---|---|
ValueError
|
If subject or MRI exam repository is not set. |
Source code in oxytcmri/infrastructure/importers/nifti_folders.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|