MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / set_data

Method set_data

monai/data/dataset.py:323–331  ·  view source on GitHub ↗

Set the input data and delete all the out-dated cache content.

(self, data: Sequence)

Source from the content-addressed store, hash-verified

321 self.transform_hash = transform_hash.decode("utf-8")
322
323 def set_data(self, data: Sequence):
324 """
325 Set the input data and delete all the out-dated cache content.
326
327 """
328 self.data = data
329 if self.cache_dir is not None and self.cache_dir.exists():
330 shutil.rmtree(self.cache_dir, ignore_errors=True)
331 self.cache_dir.mkdir(parents=True, exist_ok=True)
332
333 def _pre_transform(self, item_transformed):
334 """

Callers 1

test_shapeMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_shapeMethod · 0.76