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.LocalizerROI[source]

Methods

clear()

copy()

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

items()

keys()

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

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

plane

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.

Parameters:
masknp.ndarray of bool

Cerebellum mask.

Returns:
tuple of 6 ints

Bounding box the cerebellum 6 coordinates: x_min, y_min, z_min, x_max, y_max, z_max.

set_plane(plane)[source]

Set the active plane.

property plane[source]

Returns the active plane

class CerebNet.data_loader.dataset.TestLoader(subject_path, data_cfg, transforms=None)[source]

Methods

get_img_metadata

get_labels

get_orig