CerebNet.data_loader.dataset¶
- class CerebNet.data_loader.dataset.CerebDataset(dataset_path, cfg, transforms, load_aux_data)[source]¶
Class for loading aseg file with augmentations (transforms)
Methods
get_subject_names
- class CerebNet.data_loader.dataset.SubjectDataset(img_org, brain_seg, patch_size, slice_thickness, primary_slice=None)[source]¶
Single subject loader to load and prepare slices for network process.
Attributes
Returns the active plane
Methods
locate_mask_bbox(mask)Find the largest connected component of the mask.
set_plane(plane)Set the active plane.
get_bounding_offsets
get_nibabel_img
roi
- locate_mask_bbox(mask)[source]¶
Find the largest connected component of the mask.
- Returns:
bbox of min0, min1, …, max0, max1, …
- roi() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)[source]¶
alias of
dict[Literal[‘source_shape’, ‘offsets’, ‘target_shape’],tuple[int, …]]