Skip to content

Commit

Permalink
fix casting
Browse files Browse the repository at this point in the history
Signed-off-by: Wei_Chuan, Chiang <[email protected]>
  • Loading branch information
slicepaste committed Dec 23, 2024
1 parent 501bc45 commit c5ebb0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monai/transforms/spatial/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def __call__(
lazy=lazy_,
)
if isinstance(data_array, MetaTensor) and "pixdim" in data_array.meta:
data_array = data_array.clone() # type: MetaTensor
data_array = cast(MetaTensor, data_array.clone())
data_array.set_pixdim()
if self.recompute_affine and isinstance(data_array, MetaTensor):
if lazy_:
Expand Down

0 comments on commit c5ebb0d

Please sign in to comment.