AverageOfAir_DilatedMask.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:MDT 作者: cbclab 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号