nifti_folders_mri_exam_repository
oxytcmri.interface.repositories.nifti_folders_mri_exam_repository
¶
Classes:
Name | Description |
---|---|
NiftiFoldersMRIExamRepository |
|
NiftiFoldersMRIExamRepository(base_path, atlas_repository=None)
¶
Bases: MRIExamRepository
Initialize the repository with a base path for NIfTI files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
base_path
|
str
|
The base path where NIfTI files are stored. |
required |
Methods:
Name | Description |
---|---|
scan_nifti_folders |
Scan the base path for NIfTI folders and create MRIExam objects. |
get_exam_for_subject |
Retrieve the MRI exam for a specific subject. |
find_by_id |
Find an MRIExam by its ID. |
list_all |
List all MRI exams in the repository. |
delete |
|
save |
|
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
|
atlas_repository |
|
|
mri_exam_list |
|
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
base_path = Path(base_path)
instance-attribute
¶
atlas_repository = atlas_repository
instance-attribute
¶
mri_exam_list = self.scan_nifti_folders()
instance-attribute
¶
scan_nifti_folders()
¶
Scan the base path for NIfTI folders and create MRIExam objects.
Returns:
Type | Description |
---|---|
list[MRIExam]
|
A list of MRIExam objects representing the NIfTI folders found in the base path. |
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
get_exam_for_subject(subject_id)
¶
Retrieve the MRI exam for a specific subject.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subject_id
|
SubjectId
|
The identifier of the subject |
required |
Returns:
Type | Description |
---|---|
MRIExam
|
The MRI exam for the subject |
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
find_by_id(entity_id)
¶
Find an MRIExam by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_id
|
MRIExamId
|
The ID of the MRI exam |
required |
Returns:
Type | Description |
---|---|
Entity
|
The entity if found, otherwise None |
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
list_all()
¶
List all MRI exams in the repository.
Returns:
Type | Description |
---|---|
List[MRIExam]
|
A list of all MRI exams in the repository |
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
151 152 153 154 155 156 157 158 159 |
|
delete(entity)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
161 162 |
|
save(mri_exam)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
164 165 |
|