Some wrong happen when I run prep.py.
xwt11 opened this issue · 0 comments
xwt11 commented
- The specific errors are as follows:
D:\Anaconda\envs\pytorch\python.exe E:\Project\denoseing\WGAN-VGG-master\WGAN-VGG-master\prep.py
D:\Anaconda\envs\pytorch\lib\site-packages\pydicom\filereader.py:353: UserWarning: Expected implicit VR, but found explicit VR - using explicit VR for reading
warnings.warn(msg + f" - using {found_vr} VR for reading", UserWarning)
Traceback (most recent call last):
File "E:\Project\denoseing\WGAN-VGG-master\WGAN-VGG-master\prep.py", line 92, in
save_dataset(args)
File "E:\Project\denoseing\WGAN-VGG-master\WGAN-VGG-master\prep.py", line 21, in save_dataset
full_pixels = get_pixels_hu(load_scan(path_))
File "E:\Project\denoseing\WGAN-VGG-master\WGAN-VGG-master\prep.py", line 39, in load_scan
slices.sort(key=lambda x: float(x.ImagePositionPatient[2]))
File "E:\Project\denoseing\WGAN-VGG-master\WGAN-VGG-master\prep.py", line 39, in
slices.sort(key=lambda x: float(x.ImagePositionPatient[2]))
File "D:\Anaconda\envs\pytorch\lib\site-packages\pydicom\dataset.py", line 834, in getattr
return object.getattribute(self, name)
AttributeError: 'FileDataset' object has no attribute 'ImagePositionPatient'
Process finished with exit code 1
- My environment configuration
windows
pydicom =2.3.0
python=3.9
pytorch=1.10.0
numpy = 1.23.3