fix(t1c): exclude TOF MRA and subtraction series

Add tof, sub, and subtraction tokens to the Lee T1c exclusion regex.
This prevents time-of-flight MRA and post/pre subtraction sequences
from matching T1-based names.
This commit is contained in:
Furen Xiao 2026-09-27 18:45:09 +08:00
parent 0de7655153
commit d8296ff40d

View file

@ -21,7 +21,14 @@ BASE = path("lee")
T1_NAME_RE = re.compile(r"t1|tfl|spgr|mp2rage|tse3d|vfl|mpage", re.I)
# fiesta/ciss/ssfp: balanced-SSFP (fluid-bright, T2-dominant) — their short TE
# fools the seq/TE fallback below, so they are excluded by name, not T1c
EXCL_RE = re.compile(r"\bt2\b|dwi|dti|mra|mrv|angi|swi|bold|\bpp2d|\bpp3d|perf|t2\*|t2star|fiesta|ciss|ssfp", re.I)
# tof: time-of-flight MRA (angiographic; "spgr" in the name matches T1_NAME_RE)
# sub/subtraction: post/pre subtraction images (KVP carries POST CONTRAST);
# "sub" = the token prefix followed by any non-letter (sub_s16, sub:3d,
# _SUB, sub. — but not "subject"/"subtraction", handled separately)
EXCL_RE = re.compile(r"\bt2\b|dwi|dti|mra|mrv|angi|swi|bold|\bpp2d|\bpp3d|perf|t2\*|t2star"
r"|fiesta|ciss|ssfp"
r"|(?<![a-z])tof(?![a-z])"
r"|sub(?![a-z])|subtraction", re.I)
def parse_txt(p):