Chris Oswald commited on
Commit
568e823
·
1 Parent(s): 25cca1f
Files changed (1) hide show
  1. SPIDER.py +1 -3
SPIDER.py CHANGED
@@ -67,7 +67,6 @@ def subset_file_list(all_files: List[str], subset_ids: Set[int]):
67
  def standardize_3D_image(
68
  image: np.ndarray,
69
  resize_shape: Tuple[int, int, int],
70
- nearest_neighbor_interpolation: bool = False,
71
  ) -> np.ndarray:
72
  """Aligns dimensions of image to be (height, width, channels); resizes
73
  images to values specified in resize_shape; and rescales pixel values
@@ -97,6 +96,7 @@ def standardize_3D_mask(
97
  resize_shape,
98
  order=0,
99
  preserve_range=True,
 
100
  )
101
  # Rescale to UInt8 type (required for PyArrow and PIL)
102
  mask = skimage.img_as_ubyte(mask)
@@ -515,8 +515,6 @@ class SPIDER(datasets.GeneratorBasedBuilder):
515
  image_array_standardized = standardize_3D_image(
516
  image_array_original,
517
  resize_shape,
518
- nearest_neighbor_interpolation=False,
519
- mode='edge',
520
  )
521
 
522
  # Load .mha mask file
 
67
  def standardize_3D_image(
68
  image: np.ndarray,
69
  resize_shape: Tuple[int, int, int],
 
70
  ) -> np.ndarray:
71
  """Aligns dimensions of image to be (height, width, channels); resizes
72
  images to values specified in resize_shape; and rescales pixel values
 
96
  resize_shape,
97
  order=0,
98
  preserve_range=True,
99
+ mode='edge',
100
  )
101
  # Rescale to UInt8 type (required for PyArrow and PIL)
102
  mask = skimage.img_as_ubyte(mask)
 
515
  image_array_standardized = standardize_3D_image(
516
  image_array_original,
517
  resize_shape,
 
 
518
  )
519
 
520
  # Load .mha mask file