oxytcmri.interface.repositories.nifti_folders_mri_exam_repository
¶
Classes:
| Name | Description |
|---|---|
FileInfo |
|
MRIDataFactory |
|
DTIMapFactory |
|
AtlasSegmentationFactory |
|
DTISegmentationFactory |
Factory for creating DTI segmentation MRI data. |
DefaultMRIDataFactory |
|
NiftiFoldersMRIExamRepository |
|
FileInfo(filepath, filename, mri_exam_id)
dataclass
¶
MRIDataFactory
¶
Bases: Protocol
Methods:
| Name | Description |
|---|---|
create_mri_data |
|
create_mri_data(file_info)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
20 21 | |
DTIMapFactory
¶
Methods:
| Name | Description |
|---|---|
create_mri_data |
|
create_mri_data(file_info)
staticmethod
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
25 26 27 28 29 30 31 32 33 | |
AtlasSegmentationFactory(atlas_repository)
¶
Methods:
| Name | Description |
|---|---|
create_mri_data |
|
Attributes:
| Name | Type | Description |
|---|---|---|
atlas_repository |
|
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
37 38 | |
atlas_repository = atlas_repository
instance-attribute
¶
create_mri_data(file_info)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
40 41 42 43 44 45 46 47 | |
DTISegmentationFactory
¶
Factory for creating DTI segmentation MRI data.
Methods:
| Name | Description |
|---|---|
create_mri_data |
|
create_mri_data(file_info)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
55 56 57 58 59 60 | |
DefaultMRIDataFactory
¶
Methods:
| Name | Description |
|---|---|
create_mri_data |
|
create_mri_data(file_info)
staticmethod
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
73 74 75 76 77 78 79 | |
NiftiFoldersMRIExamRepository(base_path, atlas_repository=None)
¶
Bases: MRIExamRepository
Methods:
| Name | Description |
|---|---|
exists |
Check if an MRI exam exists in the repository. |
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
83 84 85 86 87 88 89 90 | |
base_path = Path(base_path)
instance-attribute
¶
atlas_repository = atlas_repository
instance-attribute
¶
mri_exam_list = self.scan_nifti_folders() if atlas_repository else []
instance-attribute
¶
exists(entity)
¶
Check if an MRI exam exists in the repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity
|
Entity
|
The entity to check for existence |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the entity exists, False otherwise |
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
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
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_exam_for_subject(subject)
¶
Retrieve the MRI exam for a specific subject.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subject
|
Subject
|
The subject to retrieve the MRI exam for |
required |
Returns:
| Type | Description |
|---|---|
MRIExam
|
The MRI exam for the subject |
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
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
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
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
214 215 216 217 218 219 220 221 222 | |
delete(entity)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
224 225 | |
save(mri_exam)
¶
Source code in oxytcmri/interface/repositories/nifti_folders_mri_exam_repository.py
227 228 | |