andreped commited on
Commit
ca94437
·
1 Parent(s): 2bc6def

Fixed orientiation in 2D renderer

Browse files
Files changed (1) hide show
  1. neukit/utils.py +4 -2
neukit/utils.py CHANGED
@@ -9,7 +9,8 @@ def load_ct_to_numpy(data_path):
9
  data_path = data_path.name
10
 
11
  image = nib.load(data_path)
12
- data = image.get_fdata()
 
13
 
14
  data = np.rot90(data, k=1, axes=(0, 1))
15
 
@@ -29,7 +30,8 @@ def load_pred_volume_to_numpy(data_path):
29
  data_path = data_path.name
30
 
31
  image = nib.load(data_path)
32
- data = image.get_fdata()
 
33
 
34
  data = np.rot90(data, k=1, axes=(0, 1))
35
 
 
9
  data_path = data_path.name
10
 
11
  image = nib.load(data_path)
12
+ resampled = resample_to_output(image, None, order=0)
13
+ data = resampled.get_fdata()
14
 
15
  data = np.rot90(data, k=1, axes=(0, 1))
16
 
 
30
  data_path = data_path.name
31
 
32
  image = nib.load(data_path)
33
+ resampled = resample_to_output(image, None, order=0)
34
+ data = resampled.get_fdata()
35
 
36
  data = np.rot90(data, k=1, axes=(0, 1))
37