Skip to content

Commit

Permalink
fix format issue
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 1aabdae commit fe05f59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion monai/transforms/spatial/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ def __call__(self, data: Mapping[Hashable, torch.Tensor], lazy: bool | None = No
lazy=lazy_,
)
if isinstance(d[key], MetaTensor) and f"{key}_meta_dict" in d:
if 'filename_or_obj' in d[key].meta and is_supported_format(d[key].meta['filename_or_obj'], ["nii", "nii.gz"]):
if "filename_or_obj" in d[key].meta and is_supported_format(
d[key].meta["filename_or_obj"], ["nii", "nii.gz"]
):
d = transforms.sync_meta_info(key, d)
if output_shape_k is None:
output_shape_k = d[key].peek_pending_shape() if isinstance(d[key], MetaTensor) else d[key].shape[1:]
Expand Down

0 comments on commit fe05f59

Please sign in to comment.