代码储存在
Github仓库:https://github.com/One-sixth/imagescope_xml_utils
这是一个 Aperio ImageScope 的 XML标签文件读写类
支持读取和写入 方框,轮廓,箭头,椭圆标签。
目前不支持读取和写入 xml 的元数据
注意,因本人习惯原因。坐标排列顺序为 yx,不是xy。
详情更多请参见代码仓库Readme
坐标格式:
boxes (use_box_y1x1y2x2=True): [y1x1y2x2, y1x1y2x2, …]
boxes (use_box_y1x1y2x2=False): [[top_left_yx, top_right_yx, bottom_right_yx, bottom_left_yx], [top_left_yx, top_right_yx, bottom_right_yx, bottom_left_yx], …]
arrows (keep_arrow_tail=True): [[head_yx, tail_yx], [head_yx, tail_yx], …]
arrows (keep_arrow_tail=False): [head_yx, head_yx, …]
contours : [[con_yx, con_yx, …], [con_yx, con_yx, …], …]
ellipses : [[top_left_yx, bottom_right_yx], [top_left_yx, bottom_right_yx], …]