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

Method _apply

monai/apps/deepgrow/transforms.py:956–962  ·  view source on GitHub ↗
(self, image, guidance)

Source from the content-addressed store, hash-verified

954 self.meta_key_postfix = ensure_tuple_rep(meta_key_postfix, len(self.keys))
955
956 def _apply(self, image, guidance):
957 slice_idx = guidance[2] # (pos, neg, slice_idx)
958 idx = []
959 for i, size_i in enumerate(image.shape):
960 idx.append(slice_idx) if i == self.axis else idx.append(slice(0, size_i))
961
962 return image[tuple(idx)], tuple(idx)
963
964 def __call__(self, data):
965 d = dict(data)

Callers 1

__call__Method · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected