You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When reading the dicom series with LoadImage(itk backend) in MONAI transforms, it reported a bug shown below.
It only shows errors when there is only one file in the folder.
HDF5-DIAG: Error detected in HDF5 (1.12.1) thread 0:
#000: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Fdeprec.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Fdeprec.c) line 156 in itk_H5Fis_hdf5(): unable to determine if file is accessible as HDF5
major: File accessibility
minor: Not an HDF5 file
#001: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5VLcallback.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5VLcallback.c) line 3769 in itk_H5VL_file_specific(): file specific failed
major: Virtual Object Layer
minor: Can't operate on object
#002: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5VLcallback.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5VLcallback.c) line 3699 in H5VL__file_specific(): file specific failed
major: Virtual Object Layer
minor: Can't operate on object
#003: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5VLnative_file.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5VLnative_file.c) line 384 in itk_H5VL__native_file_specific(): error in HDF5 file check
major: File accessibility
minor: Unable to initialize object
#004: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Fint.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Fint.c) line 1086 in itk_H5F__is_hdf5(): error while trying to locate file signature
major: File accessibility
minor: Not an HDF5 file
#005: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDint.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDint.c) line 113 in itk_H5FD_locate_signature(): unable to read file signature
major: Low-level I/O
minor: Unable to initialize object
#006: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDint.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDint.c) line 189 in itk_H5FD_read(): driver read request failed
major: Virtual File Layer
minor: Read failed
#007: [/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDsec2.c](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62756e646c65222c2273657474696e6773223a7b22686f7374223a227373683a2f2f79756e6c69754031302e31392e3138332e3831227d7d.vscode-resource.vscode-cdn.net/work/ITK-source/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDsec2.c) line 755 in H5FD__sec2_read(): file read failed: time = Tue Sep 5 05:46:15 2023
, filename = '/', file descriptor = 65, errno = 21, error message = 'Is a directory', buf = 0x7fffd2e1da68, total read size = 8, bytes this sub-read = 8, bytes actually read = 18446744073709551615, offset = 0
major: Low-level I/O
minor: Read failed
To Reproduce
Steps to reproduce the behavior:
Install the MONAI dev branch.
Download the attachment dcm file whose md5 is f511acb750076c56ad2d9647dcfe521d, put it in a folder.
Run
from monai.transforms import LoadImage
loader = LoadImage()
loader('./test_data')
Expected behavior
itk can read dicom series successfully.
The text was updated successfully, but these errors were encountered:
Fixes#6942fixes#6944.
### Description
When using itk backend reading dicom series and there is only one file
in the folder, return the first name since itk assuming that there must
be more than one file in the tuple.
https://github.com/InsightSoftwareConsortium/ITK/blob/452cb3f9716e95532200de3196d51cd705a0ec5e/Wrapping/Generators/Python/itk/support/extras.py#L1275-L1284
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
---------
Signed-off-by: KumoLiu <yunl@nvidia.com>
Describe the bug
When reading the dicom series with LoadImage(itk backend) in MONAI transforms, it reported a bug shown below.
It only shows errors when there is only one file in the folder.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
itk can read dicom series successfully.
The text was updated successfully, but these errors were encountered: