Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable gpu load nifti #8188

Open
wants to merge 21 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add filename
Signed-off-by: Yiheng Wang <[email protected]>
  • Loading branch information
yiheng-wang-nv committed Nov 2, 2024
commit 1baa31b85fc887dd009f600c9db69964669c0dc7
2 changes: 2 additions & 0 deletions monai/transforms/io/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def __call__(self, filename: Sequence[PathLike] | PathLike, reader: ImageReader
# TODO: handle multiple filenames later
buffer = reader.read(filename[0])
img = reader.get_data(buffer)
img.meta[Key.FILENAME_OR_OBJ] = filename[0]
# TODO: check ensure channel first
if self.ensure_channel_first:
img = EnsureChannelFirst()(img)
Expand All @@ -281,6 +282,7 @@ def __call__(self, filename: Sequence[PathLike] | PathLike, reader: ImageReader
# TODO: handle multiple filenames later
buffer = reader.read(filename[0])
img = reader.get_data(buffer)
img.meta[Key.FILENAME_OR_OBJ] = filename[0]
# TODO: check ensure channel first
if self.ensure_channel_first:
img = EnsureChannelFirst()(img)
Expand Down
Loading