chenz53 commited on
Commit
f8a660a
·
verified ·
1 Parent(s): 2069947

Update dataload.py

Browse files
Files changed (1) hide show
  1. dataload.py +2 -3
dataload.py CHANGED
@@ -20,6 +20,7 @@ from monai.transforms import (
20
  ScaleIntensityRanged,
21
  Spacingd,
22
  SpatialPadd,
 
23
  ToTensord,
24
  Transform,
25
  )
@@ -101,11 +102,9 @@ class CTDataset:
101
  clip=True,
102
  ),
103
  CropForegroundd(keys=["image"], source_key="image"),
104
- RandSpatialCropSamplesd(
105
  keys=["image"],
106
  roi_size=(self.img_size, self.img_size, self.depth),
107
- random_size=False,
108
- num_samples=1,
109
  ),
110
  SpatialPadd(
111
  keys=["image"],
 
20
  ScaleIntensityRanged,
21
  Spacingd,
22
  SpatialPadd,
23
+ CenterSpatialCropd,
24
  ToTensord,
25
  Transform,
26
  )
 
102
  clip=True,
103
  ),
104
  CropForegroundd(keys=["image"], source_key="image"),
105
+ CenterSpatialCropd(
106
  keys=["image"],
107
  roi_size=(self.img_size, self.img_size, self.depth),
 
 
108
  ),
109
  SpatialPadd(
110
  keys=["image"],