-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
the output of grid resampling is always float32
MONAI/monai/transforms/lazy/utils.py
Lines 226 to 227 in 6a7f35b
| with resampler.trace_transform(False): # don't track this transform in `img` | |
| return resampler(img=img, **call_kwargs) |
MONAI/monai/transforms/spatial/functional.py
Line 182 in 6a7f35b
| out = _maybe_new_metatensor(img, dtype=torch.float32) |
the crop pad 'resampling' should also output float32
MONAI/monai/transforms/lazy/utils.py
Lines 220 to 222 in 6a7f35b
| img = monai.transforms.crop_or_pad_nd(img, matrix_np, out_spatial_size, mode=call_kwargs["padding_mode"]) | |
| img.affine = call_kwargs["dst_affine"] | |
| return img |
otherwise collating random transforms of different data types can run into exceptions.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working