You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GridPatch adds patches of constant value and 0, 0 location when the number of required patches is bigger than the patches that can be extracted from the image. The patch location returned in this case should be a List [0, 0] ,to be consistent with the type of the otherwise returned types, while it currently is a List of Lists [[0], [0]].
The reason of this behavior can be seen in this line
* Fix the location type returned in GridPatch when padding
This PR fixes this issue #4597
* signing and fixing docstring
Signed-off-by: Valentina Salvatelli <[email protected]>
GridPatch adds patches of constant value and 0, 0 location when the number of required patches is bigger than the patches that can be extracted from the image. The patch location returned in this case should be a List
[0, 0]
,to be consistent with the type of the otherwise returned types, while it currently is a List of Lists[[0], [0]]
.The reason of this behavior can be seen in this line
MONAI/monai/transforms/spatial/array.py
Line 2773 in 23d9b52
The above line should be changed to
np.zeros((len(self.patch_size)))
The text was updated successfully, but these errors were encountered: