Added preds back to GUI
Browse files- demo/src/gui.py +2 -2
- demo/src/utils.py +0 -2
demo/src/gui.py
CHANGED
|
@@ -61,7 +61,7 @@ class WebUI:
|
|
| 61 |
self.fixed_images = load_ct_to_numpy(fixed_image_path)
|
| 62 |
self.moving_images = load_ct_to_numpy(moving_image_path)
|
| 63 |
self.pred_images = load_ct_to_numpy(output_path + "pred_image.nii.gz")
|
| 64 |
-
return
|
| 65 |
|
| 66 |
def get_fixed_image(self, k):
|
| 67 |
k = int(k) - 1
|
|
@@ -183,7 +183,7 @@ class WebUI:
|
|
| 183 |
self.run_btn.click(
|
| 184 |
fn=lambda x: self.process(x),
|
| 185 |
inputs=file_output,
|
| 186 |
-
outputs=
|
| 187 |
)
|
| 188 |
|
| 189 |
self.slider.input(
|
|
|
|
| 61 |
self.fixed_images = load_ct_to_numpy(fixed_image_path)
|
| 62 |
self.moving_images = load_ct_to_numpy(moving_image_path)
|
| 63 |
self.pred_images = load_ct_to_numpy(output_path + "pred_image.nii.gz")
|
| 64 |
+
return None
|
| 65 |
|
| 66 |
def get_fixed_image(self, k):
|
| 67 |
k = int(k) - 1
|
|
|
|
| 183 |
self.run_btn.click(
|
| 184 |
fn=lambda x: self.process(x),
|
| 185 |
inputs=file_output,
|
| 186 |
+
outputs=None,
|
| 187 |
)
|
| 188 |
|
| 189 |
self.slider.input(
|
demo/src/utils.py
CHANGED
|
@@ -21,7 +21,6 @@ def load_ct_to_numpy(data_path):
|
|
| 21 |
data = data / np.amax(data) * 255
|
| 22 |
data = data.astype("uint8")
|
| 23 |
|
| 24 |
-
print(data.shape)
|
| 25 |
return [data[..., i] for i in range(data.shape[-1])]
|
| 26 |
|
| 27 |
|
|
@@ -38,7 +37,6 @@ def load_pred_volume_to_numpy(data_path):
|
|
| 38 |
data[data > 0] = 1
|
| 39 |
data = data.astype("uint8")
|
| 40 |
|
| 41 |
-
print(data.shape)
|
| 42 |
return [data[..., i] for i in range(data.shape[-1])]
|
| 43 |
|
| 44 |
|
|
|
|
| 21 |
data = data / np.amax(data) * 255
|
| 22 |
data = data.astype("uint8")
|
| 23 |
|
|
|
|
| 24 |
return [data[..., i] for i in range(data.shape[-1])]
|
| 25 |
|
| 26 |
|
|
|
|
| 37 |
data[data > 0] = 1
|
| 38 |
data = data.astype("uint8")
|
| 39 |
|
|
|
|
| 40 |
return [data[..., i] for i in range(data.shape[-1])]
|
| 41 |
|
| 42 |
|