Skip to content

Commit

Permalink
gpu test
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Li <[email protected]>
  • Loading branch information
wyli committed Jun 6, 2022
1 parent 9a92b26 commit 6c56810
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions monai/transforms/croppad/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
look_up_option,
)
from monai.utils.enums import TraceKeys, TransformBackends
from monai.utils.type_conversion import convert_data_type
from monai.utils.type_conversion import convert_data_type, convert_to_dst_type

__all__ = [
"BorderPad",
Expand Down Expand Up @@ -120,7 +120,7 @@ def _forward_meta(self, out, img, to_pad):
to_shift = [-s[0] for s in to_pad[1:]] # skipping the channel pad
mat = create_translate(spatial_rank, to_shift)
out.meta = meta_dict
out.meta["affine"] = img.affine @ mat
out.meta["affine"] = img.affine @ convert_to_dst_type(mat, img.affine)[0]
# out.meta["original_affine"] = img.affine
# out.meta["spatial_shape"] = out.shape[1:]
return out
Expand Down Expand Up @@ -506,7 +506,7 @@ def _forward_meta(self, out, img, slices):
to_shift = [s.start if s.start is not None else 0 for s in ensure_tuple(slices)[1:]] # skipping the channel pad
mat = create_translate(spatial_rank, to_shift)
out.meta = meta_dict
out.meta["affine"] = img.affine @ mat
out.meta["affine"] = img.affine @ convert_to_dst_type(mat, img.affine)[0]
# out.meta["original_affine"] = img.affine
# out.meta["spatial_shape"] = out.shape[1:]f
return out
Expand Down

0 comments on commit 6c56810

Please sign in to comment.