[DLMED] update doc-string of shape
@@ -49,8 +49,15 @@ class Transform(ABC):
return an updated version of ``data``.
To simplify the input validations, most of the transforms assume that
- - ``data`` is a "channel-first" array,
- - the channel dimension is not omitted even if number of channels is one.
+ - ``data`` is a Numpy ndarray, PyTorch Tensor or string
+ - the data shape can be:
+ #. string data without shape, `LoadNifti` and `LoadPNG` transforms expect file paths
+ #. most of the pre-processing transforms expect: (num_channels, spatial_dim_1[, spatial_dim_2, ...])
+ except that `AddChannel` expects: (spatial_dim_1[, spatial_dim_2, ...]) and
+ `AsChannelFirst` expects: (spatial_dim_1[, spatial_dim_2, ...], num_channels)
+ #. most of the post-processing transforms expect:
+ (batch_size, num_channels, spatial_dim_1[, spatial_dim_2, ...])
+ - the channel dimension is not omitted even if number of channels is one
This method can optionally take additional arguments to help execute transformation operation.
@@ -249,7 +256,14 @@ class MapTransform(Transform):
To simplify the input validations, this method assumes:
- ``data`` is a Python dictionary
- - ``data[key]`` is a "channel-first" array, where ``key`` is an element of ``self.keys``
+ - ``data[key]`` is a Numpy ndarray, PyTorch Tensor or string, where ``key`` is an element
+ of ``self.keys``, the data shape can be:
+ #. string data without shape, `LoadNiftid` and `LoadPNGd` transforms expect file paths
+ #. most of the pre-processing transforms expect: (num_channels, spatial_dim_1[, spatial_dim_2, ...])
+ except that `AddChanneld` expects: (spatial_dim_1[, spatial_dim_2, ...]) and
+ `AsChannelFirstd` expects: (spatial_dim_1[, spatial_dim_2, ...], num_channels)
+ #. most of the post-processing transforms expect:
+ (batch_size, num_channels, spatial_dim_1[, spatial_dim_2, ...])
- the channel dimension is not omitted even if number of channels is one
returns:
