def _get_air_voxels(self, input_data, border_offset=3):
"""Get a two dimensional list with all the voxels in the air.
Returns:
ndarray: The first dimension is the list of voxels, the second the signal per voxel.
"""
mask = np.copy(input_data.mask)
mask = binary_dilation(mask, iterations=1)
mask[0:border_offset] = True
mask[-border_offset:] = True
mask[:, 0:border_offset, :] = True
mask[:, -border_offset:, :] = True
mask[..., 0:border_offset] = True
mask[..., -border_offset:] = True
return create_roi(input_data.signal4d, np.invert(mask))
评论列表
文章目录