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

Method _get_spatial_shape

monai/data/image_reader.py:1439–1445  ·  view source on GitHub ↗

Get the spatial shape of image data, it doesn't contain the channel dim. Args: img: a PIL Image object loaded from an image file.

(self, img)

Source from the content-addressed store, hash-verified

1437 return {"format": img.format, "mode": img.mode, "width": img.width, "height": img.height}
1438
1439 def _get_spatial_shape(self, img):
1440 """
1441 Get the spatial shape of image data, it doesn't contain the channel dim.
1442 Args:
1443 img: a PIL Image object loaded from an image file.
1444 """
1445 return np.asarray((img.width, img.height))
1446
1447
1448@dataclass

Callers 1

get_dataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected