Chris Oswald commited on
Commit
3013e2b
·
1 Parent(s): 6bb95ec
Files changed (1) hide show
  1. SPIDER.py +4 -4
SPIDER.py CHANGED
@@ -487,15 +487,15 @@ class SPIDER(datasets.GeneratorBasedBuilder):
487
  # Convert .mha image to original size numeric array
488
  image_array_original = sitk.GetArrayFromImage(image)
489
 
490
- # Rescale to UInt8 type (required for PyArrow and PIL)
491
- image_array_rescaled = skimage.img_as_ubyte(image_array_original)
492
-
493
  # Convert .mha image to standardized numeric array
494
  image_array_standardized = standardize_3D_image(
495
- image_array_rescaled,
496
  resize_shape,
497
  )
498
 
 
 
 
499
  # Load .mha mask file
500
  mask_path = os.path.join(paths_dict['masks'], 'masks', example)
501
  mask = sitk.ReadImage(mask_path)
 
487
  # Convert .mha image to original size numeric array
488
  image_array_original = sitk.GetArrayFromImage(image)
489
 
 
 
 
490
  # Convert .mha image to standardized numeric array
491
  image_array_standardized = standardize_3D_image(
492
+ image_array_original,
493
  resize_shape,
494
  )
495
 
496
+ # Rescale to UInt8 type (required for PyArrow and PIL)
497
+ image_array_standardized = skimage.img_as_ubyte(image_array_standardized)
498
+
499
  # Load .mha mask file
500
  mask_path = os.path.join(paths_dict['masks'], 'masks', example)
501
  mask = sitk.ReadImage(mask_path)