@@ -36,8 +36,8 @@ class PatchWSIDataset(Dataset):
3636
3737 Args:
3838 data: the list of input samples including image, location, and label (see the note below for more details).
39- size : the size of patch to be extracted from the whole slide image.
40- level : the level at which the patches to be extracted (default to 0).
39+ patch_size : the size of patch to be extracted from the whole slide image.
40+ patch_level : the level at which the patches to be extracted (default to 0).
4141 transform: transforms to be executed on input data.
4242 include_label: whether to load and include labels in the output
4343 center_location: whether the input location information is the position of the center of the patch
@@ -171,26 +171,29 @@ def _transform(self, index: int):
171171
172172class SlidingPatchWSIDataset (Randomizable , PatchWSIDataset ):
173173 """
174- This dataset extracts patches from whole slide images (without loading the whole image)
174+ This dataset extracts patches in sliding-window manner from whole slide images (without loading the whole image).
175175 It also reads labels for each patch and provides each patch with its associated class labels.
176176
177177 Args:
178178 data: the list of input samples including image, location, and label (see the note below for more details).
179- size: the size of patch to be extracted from the whole slide image.
180- level: the level at which the patches to be extracted (default to 0).
179+ patch_size: the size of patch to be extracted from the whole slide image.
180+ patch_level: the level at which the patches to be extracted (default to 0).
181+ mask_level: the resolution level at which the mask/map is created (for `ProbMapProducer` for instance).
182+ overlap: the amount of overlap of neighboring patches in each dimension (a value between 0.0 and 1.0).
183+ If only one float number is given, it will be applied to all dimensions. Defaults to 0.0.
181184 offset: the offset of image to extract patches (the starting position of the upper left patch).
182185 offset_limits: if offset is set to "random", a tuple of integers defining the lower and upper limit of the
183186 random offset for all dimensions, or a tuple of tuples that defines the limits for each dimension.
184- overlap: the amount of overlap of neighboring patches in each dimension (a value between 0.0 and 1.0).
185- If only one float number is given, it will be applied to all dimensions. Defaults to 0.0.
186187 transform: transforms to be executed on input data.
188+ include_label: whether to load and include labels in the output
189+ center_location: whether the input location information is the position of the center of the patch
190+ additional_meta_keys: the list of keys for items to be copied to the output metadata from the input data
187191 reader: the module to be used for loading whole slide imaging. Defaults to cuCIM. If `reader` is
188192
189193 - a string, it defines the backend of `monai.data.WSIReader`.
190194 - a class (inherited from `BaseWSIReader`), it is initialized and set as wsi_reader,
191195 - an instance of a class inherited from `BaseWSIReader`, it is set as the wsi_reader.
192196
193- map_level: the resolution level at which the output map is created.
194197 seed: random seed to randomly generate offsets. Defaults to 0.
195198 kwargs: additional arguments to pass to `WSIReader` or provided whole slide reader class
196199
@@ -204,6 +207,7 @@ class SlidingPatchWSIDataset(Randomizable, PatchWSIDataset):
204207 {"image": "path/to/image2.tiff", "patch_size": [20, 20], "patch_level": 2}
205208 ]
206209
210+ Unlike `MaskedPatchWSIDataset`, this dataset does not filter any patches.
207211 """
208212
209213 def __init__ (
@@ -220,7 +224,6 @@ def __init__(
220224 center_location : bool = False ,
221225 additional_meta_keys : Sequence [str ] = (ProbMapKeys .LOCATION , ProbMapKeys .SIZE , ProbMapKeys .COUNT ),
222226 reader = "cuCIM" ,
223- map_level : int = 0 ,
224227 seed : int = 0 ,
225228 ** kwargs ,
226229 ):
@@ -322,8 +325,8 @@ class MaskedPatchWSIDataset(PatchWSIDataset):
322325
323326 Args:
324327 data: the list of input samples including image, location, and label (see the note below for more details).
325- size : the size of patch to be extracted from the whole slide image.
326- level : the level at which the patches to be extracted (default to 0).
328+ patch_size : the size of patch to be extracted from the whole slide image.
329+ patch_level : the level at which the patches to be extracted (default to 0).
327330 mask_level: the resolution level at which the mask is created.
328331 transform: transforms to be executed on input data.
329332 include_label: whether to load and include labels in the output
0 commit comments