cube.py 文件源码

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

项目:pytrip 作者: pytrip 项目源码 文件源码
def set_data_type(self, type):
        """ Sets the data type for the TRiP98 header files.

        :param numpy.type type: numpy type, e.g. np.uint16
        """
        if type is np.int8 or type is np.uint8:
            self.data_type = "integer"
            self.num_bytes = 1
        elif type is np.int16 or type is np.uint16:
            self.data_type = "integer"
            self.num_bytes = 2
        elif type is np.int32 or type is np.uint32:
            self.data_type = "integer"
            self.num_bytes = 4
        elif type is np.float:
            self.data_type = "float"
            self.num_bytes = 4
        elif type is np.double:
            self.data_type = "double"
            self.num_bytes = 8

    # ######################  WRITING DICOM FILES #######################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号