- if infarctus:
- # print("infarctus:", infarctus) # Testing..
- # topng(join(caspath, dic), '%/%-%' % (join(OUT_DIR, 'infarctus'), cas, dic)
- # print(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'infarctus'), cas, dic)) # Testing..
- topng(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'infarctus'), cas, dic))
- else:
- # print("no infarctus:", infarctus) # Testing..
- # print(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'noinfarctus'), cas, dic)) # Testing..
- topng(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'noinfarctus'), cas, dic))
-
- print('Ended!')
\ No newline at end of file
+ # epimask = mask(ref, EPI_STR)
+ # print("infarctus:", infarctus) # Testing..
+ # topng(join(caspath, dic), '%/%-%' % (join(OUT_DIR, 'infarctus'), cas, dic)
+ w, h = topng(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'infarctus' if infarctus else 'noinfarctus'), cas, dic))
+
+ # search maximums
+ if wmax < w: wmax = w
+ if hmax < h: hmax = h
+
+ # search width minimum
+ if wmin is None: wmin = w
+ elif wmin > w: wmin = w
+
+ # search height minimum
+ if hmin is None: hmin = h
+ elif hmin > h: hmin = h
+
+ print('min-width, max-width:', (wmin, wmax))
+ print('min-height, max-height:', (hmin, hmax))
+
+ print('Ended!')