MeshExtractorFromSegmentedImage#

class polpo.preprocessing.mri.MeshExtractorFromSegmentedImage(structure_id=-1, marching_cubes=None)[source]#

Bases: PreprocessingStep

Mesh extractor from images.

Structure_ID names, numbers, and colors:#

1 255 0 0 1 1 1 “CA1” 2 0 255 0 1 1 1 “CA2+3” 3 0 0 255 1 1 1 “DG” 4 255 255 0 1 1 1 “ERC” 5 0 255 255 1 1 1 “PHC” 6 255 0 255 1 1 1 “PRC” 7 80 179 221 1 1 1 “SUB” 8 255 215 0 1 1 1 “AntHipp” 9 184 115 51 1 1 1 “PostHipp” 2, 6 are expected to grow in volume with progesterone 4, 5 are expected to shrink in volume with progesterone

apply(img_fdata)[source]#

Extract one surface mesh from the fdata of a segmented image.

Parameters:

img_fdata (array-like, shape = [n_x, n_y, n_z]. Voxels which are colored) – according to substructure assignment. For example, color of voxel (0, 0, 0) is an integer value that can be anywhere from 0-9.