MRI Reconstruction Data Classes#
- class atommic.collections.reconstruction.data.mri_reconstruction_loader.ReconstructionMRIDataset(*args: Any, **kwargs: Any)[source]#
Bases:
MRIDatasetA dataset class for accelerated MRI reconstruction.
Examples
>>> from atommic.collections.reconstruction.data.mri_reconstruction_loader import ReconstructionMRIDataset >>> dataset = ReconstructionMRIDataset(root='data/train', sample_rate=0.1) >>> print(len(dataset)) 100 >>> kspace, coil_sensitivities, mask, initial_prediction, target, attrs, filename, slice_num = dataset[0] >>> print(kspace.shape) np.array([30, 640, 368])
Note
Extends
atommic.collections.common.data.mri_loader.MRIDataset.
- class atommic.collections.reconstruction.data.mri_reconstruction_loader.CC359ReconstructionMRIDataset(*args: Any, **kwargs: Any)[source]#
Bases:
DatasetSupports the CC359 dataset for accelerated MRI reconstruction.
Note
Similar to
atommic.collections.common.data.mri_loader.MRIDataset. It does not extend it because we need to override the__init__and__getitem__methods.- get_consecutive_slices(data: Dict, key: str, dataslice: int) numpy.ndarray[source]#
Get consecutive slices from a given data dictionary.
- Parameters
data (dict) – Data to extract slices from.
key (str) – Key to extract slices from.
dataslice (int) – Slice to index.
- Returns
Array of consecutive slices. If
self.consecutive_slicesis > 1, then the array will have shape(self.consecutive_slices, *data[key].shape[1:]). Otherwise, the array will have shapedata[key].shape[1:].- Return type
np.ndarray
Examples
>>> data = {"kspace": np.random.rand(10, 640, 368)} >>> from atommic.collections.common.data.mri_loader import MRIDataset >>> MRIDataset.get_consecutive_slices(data, "kspace", 1).shape (1, 640, 368) >>> MRIDataset.get_consecutive_slices(data, "kspace", 5).shape (5, 640, 368)
- class atommic.collections.reconstruction.data.mri_reconstruction_loader.SKMTEAReconstructionMRIDataset(*args: Any, **kwargs: Any)[source]#
Bases:
MRIDatasetSupports the SKM-TEA dataset for accelerated MRI reconstruction.
- class atommic.collections.reconstruction.data.mri_reconstruction_loader.StanfordKneesReconstructionMRIDataset(*args: Any, **kwargs: Any)[source]#
Bases:
MRIDatasetSupports the Stanford Knees 2019 dataset for accelerated MRI reconstruction.