andreped commited on
Commit
8b764f5
·
1 Parent(s): aa832f1

Refactored code

Browse files
Files changed (2) hide show
  1. demo/src/gui.py +3 -1
  2. demo/src/utils.py +2 -2
demo/src/gui.py CHANGED
@@ -154,7 +154,9 @@ class WebUI:
154
  )
155
 
156
  self.slider.input(
157
- self.get_img_pred_pair, self.slider, t,
 
 
158
  )
159
 
160
  self.slider.render()
 
154
  )
155
 
156
  self.slider.input(
157
+ self.get_img_pred_pair,
158
+ self.slider,
159
+ t,
160
  )
161
 
162
  self.slider.render()
demo/src/utils.py CHANGED
@@ -5,7 +5,7 @@ from skimage.measure import marching_cubes
5
 
6
 
7
  def load_ct_to_numpy(data_path):
8
- if type(data_path) != str:
9
  data_path = data_path.name
10
 
11
  image = nib.load(data_path)
@@ -25,7 +25,7 @@ def load_ct_to_numpy(data_path):
25
 
26
 
27
  def load_pred_volume_to_numpy(data_path):
28
- if type(data_path) != str:
29
  data_path = data_path.name
30
 
31
  image = nib.load(data_path)
 
5
 
6
 
7
  def load_ct_to_numpy(data_path):
8
+ if not isinstance(data_path, str):
9
  data_path = data_path.name
10
 
11
  image = nib.load(data_path)
 
25
 
26
 
27
  def load_pred_volume_to_numpy(data_path):
28
+ if not isinstance(data_path, str):
29
  data_path = data_path.name
30
 
31
  image = nib.load(data_path)