dicomparser.py 文件源码

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

项目:dicompyler-core 作者: dicompyler 项目源码 文件源码
def CalculatePlaneThickness(self, planesDict):
        """Calculates the plane thickness for each structure."""

        planes = []

        # Iterate over each plane in the structure
        for z in iterkeys(planesDict):
            planes.append(float(z))
        planes.sort()

        # Determine the thickness
        thickness = 10000
        for n in range(0, len(planes)):
            if (n > 0):
                newThickness = planes[n] - planes[n-1]
                if (newThickness < thickness):
                    thickness = newThickness

        # If the thickness was not detected, set it to 0
        if (thickness == 10000):
            thickness = 0

        return thickness
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号