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

Method set_data

monai/data/dataset.py:615–621  ·  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

613 read_env.close()
614
615 def set_data(self, data: Sequence):
616 """
617 Set the input data and delete all the out-dated cache content.
618 """
619 self.close()
620 super().set_data(data=data)
621 self._read_env = self._fill_cache_start_reader(show_progress=self.progress)
622
623 def _safe_serialize(self, val):
624 """Serialize the tensor/array `val` using the pickle protocol, and return its bytes object."""

Callers 3

test_shapeMethod · 0.95
set_dataMethod · 0.45
test_shapeMethod · 0.45

Calls 2

closeMethod · 0.95

Tested by 2

test_shapeMethod · 0.76
test_shapeMethod · 0.36