def filter_box_list_by_position(box_list, minv, maxv, dir_fun): #TODO This should be in tree.py filtered_box_list = LeafList() # print minv, maxv, index for box in box_list: # box = boxstruct[0] if dir_fun(box) >= minv and dir_fun(box) <= maxv: # print box filtered_box_list.append(box) return filtered_box_list