From 0b357a4b1208f411f457062a9286f17170348aa0 Mon Sep 17 00:00:00 2001
From: Tamino Huxohl <thuxohl@techfak.uni-bielefeld.de>
Date: Thu, 19 Jan 2023 12:50:15 +0100
Subject: [PATCH] remove tmp file

---
 mu_map/tmp/vis.py | 42 ------------------------------------------
 1 file changed, 42 deletions(-)
 delete mode 100644 mu_map/tmp/vis.py

diff --git a/mu_map/tmp/vis.py b/mu_map/tmp/vis.py
deleted file mode 100644
index acc8b82..0000000
--- a/mu_map/tmp/vis.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import argparse
-import os
-
-import cv2 as cv
-import numpy as np
-import pydicom
-
-from interfile2dicom import read_interfile
-
-def to_gray(img, _min, _max):
-    _img = (img - _min) / (_max - _min)
-    _img = (_img * 255).astype(np.uint8)
-    _scale = 512 / img.shape[0]
-    _img = cv.resize(_img, None, fx=_scale, fy=_scale)
-    return _img
-
-if __name__ == "__main__":
-    parser = argparse.ArgumentParser()
-    parser.add_argument("image", type=str)
-    args = parser.parse_args()
-
-    _, ext = os.path.splitext(args.image)
-
-    if ext == ".dcm":
-        img = pydicom.dcmread(args.image)
-        img = img.pixel_array / img[0x00331038].value
-    else:
-        img, _ = read_interfile(args.image)
-
-    i = 0
-    timeout = 100
-    while True:
-        _img = to_gray(img[i], img.min(), img.max())
-        _img = cv.putText(_img, str(i), (0, 30), cv.FONT_HERSHEY_SIMPLEX, 1, 255, 3)
-        i = (i + 1) % img.shape[0]
-
-        cv.imshow("Proj", _img)
-        key = cv.waitKey(timeout)
-        if key == ord("q"):
-            break
-        elif key == ord("p"):
-            timeout = 0 if timeout > 0 else 100
-- 
GitLab