def _is_bval_type_b(grouped_dicoms):
    """
    Check if the bvals are stored in the second of 2 currently known ways for single frame dti
    """
    bval_tag = Tag(0x0018, 0x9087)
    bvec_tag = Tag(0x0018, 0x9089)
    for group in grouped_dicoms:
        if bvec_tag in group[0] and bval_tag in group[0]:
            bvec = common.get_fd_array_value(group[0][bvec_tag], 3)
            bval = common.get_fd_value(group[0][bval_tag])
            if _is_float(bvec[0]) and _is_float(bvec[1]) and _is_float(bvec[2]) and _is_float(bval) and bval != 0:
                return True
    return False
def _is_bval_type_b ( grouped_dicoms ) : bval_tag = Tag ( 0x0018 , 0x9087 ) bvec_tag = Tag ( 0x0018 , 0x9089 ) for group in grouped_dicoms : if bvec_tag in group [ 0 ] and bval_tag in group [ 0 ] : bvec = common . get_fd_array_value ( group [ 0 ] [ bvec_tag ] , 3 ) bval = common . get_fd_value ( group [ 0 ] [ bval_tag ] ) if _is_float ( bvec [ 0 ] ) and _is_float ( bvec [ 1 ] ) and _is_float ( bvec [ 2 ] ) and _is_float ( bval ) and bval != 0 : return True return False
Check if the bvals are stored in the second of 2 currently known ways for single frame dti