問題タブ [gdcm]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 「TypeError: a bytes-like object is required, not 'str'」圧縮された DICOM ボリュームを numpy 配列に読み取る
CentOS 7 の Anaconda Spyder で Python 3.7.3 を使用しています。
単一のファイルに 3D DICOM ボリュームがあります:/usr/share/aliza/datasets/DICOM/00_MR/Tra_FLAIR.dcm
戻り値
12 を返します。
次のコードでボリュームを読み取ろうとします。
これにより、
python - pydicom rise AttributeError をインポートする理由: モジュール 'gdcm' に属性 'DataElement' がありません
システムに libgdcm-tools (2.6.6-3) を (経由で) インストールした後、Pythonapt install libgdcm-tools
にインポートできなくなりました。pydicom
実行するimport pydicom as pdc
と、次のエラーが発生しました
AttributeError: module 'gdcm' has no attribute 'DataElement'
.
libgdcm-tools を削除しても問題は解決しません。
Ubuntu 18.04 で Python 3.7 と pydicom 2.0.0 を使用しています。