def _extract_xy_from_gdcm_str_seg(lines, dicom_tags):
    """Get rows, columns from gdcmdump output."""
    rows = 0
    cols = 0
    for line in lines:
        line = line.lstrip()
        tag = line.split(" ")[0]
        if tag == dicom_tags["rows"]:
            rows = line.split(" ")[2]
        elif tag == dicom_tags["columns"]:
            cols = line.split(" ")[2]
    return int(rows), int(cols)