-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Failed to import DICOM (containing JPG slices) #36
Comments
Hi! Thanks for reporting this issue. Do you know if your dataset uses JPEG format? By the way, is this an open dataset that you can share with me? |
Hi @mlavik1, Thanks for the help! |
@chiaradivece Thanks for sharing! For now, you can import your dataset if you export it as an image sequence like this: I'll let you know if/when I have fixed the DICOM issue. |
Many thanks, @mlavik1! It works with png! |
@chiaradivece Good to hear! |
Hey @mlavik1, I wanted to point out another problem. I tried to upload another DICOM dataset (it works fine when I try to open in Slicer or similar). However, I get the following error: Insufficient number of slices. |
Hello again! Also, is this a dataset that can be shared? |
Hi @mlavik1! Mmm no, this is the first error that appears. I could try to share it with you. Thanks |
Thanks @chiaradivece ! That would be great. |
Fixed by #95 |
Hi! First, thanks for this amazing work! I'm struggling to import DICOM models. I have a folder with .dcm files (each one corresponding to a CT slice). When I select the folder in which the files are, I get this error:
InvalidCastException: Specified cast is not valid.
System.Convert.ToInt32 (System.Object value) (at <9577ac7a62ef43179789031239ba8798>:0)
UnityVolumeRendering.DICOMImporter.ToPixelArray (openDicom.Image.PixelData pixelData) (at Assets/Scripts/Importing/DICOMImporter.cs:202)
UnityVolumeRendering.DICOMImporter.Import () (at Assets/Scripts/Importing/DICOMImporter.cs:94)
UnityVolumeRendering.VolumeRendererEditorFunctions.ShowDICOMImporter () (at Assets/Editor/VolumeRendererEditorFunctions.cs:30)
I've also tried with another dataset, and the error is this:
Problems processing the DICOM file /Users/chiara/Downloads/TRAUMA/trauma0730.dcm :
System.ArgumentException: Item has already been added. Key in dictionary: '(0002,0002)' Key being added: '(0002,0002)'
at System.Collections.Hashtable.Insert (System.Object key, System.Object nvalue, System.Boolean add) [0x001d4] in <9577ac7a62ef43179789031239ba8798>:0
at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
at openDicom.DataStructure.DataSet.DataSet.Add (openDicom.DataStructure.DataSet.DataElement dataElement) [0x00009] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/3rdparty/openDicom/DataStructure/DataSet/DataSet.cs:113
at openDicom.DataStructure.DataSet.DataSet.Add (openDicom.DataStructure.DataSet.DataSet dataSet) [0x00017] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/3rdparty/openDicom/DataStructure/DataSet/DataSet.cs:126
at openDicom.File.DicomFile.GetJointDataSets () [0x00014] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/3rdparty/openDicom/File/DicomFile.cs:157
at openDicom.File.DicomFile.LoadFrom (System.IO.Stream stream) [0x00042] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/3rdparty/openDicom/File/DicomFile.cs:133
at openDicom.File.AcrNemaFile..ctor (System.String fileName, System.Boolean useStrictDecoding) [0x00028] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/3rdparty/openDicom/File/AcrNemaFile.cs:131
at openDicom.File.DicomFile..ctor (System.String fileName, System.Boolean useStrictDecoding) [0x00007] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/3rdparty/openDicom/File/DicomFile.cs:83
at UnityVolumeRendering.DICOMImporter.LoadFile (System.String filePath) [0x0000e] in /Users/chiara/GitHub/UnityVolumeRendering/Assets/Scripts/Importing/DICOMImporter.cs:180
UnityEngine.Debug:LogError(Object)
UnityVolumeRendering.DICOMImporter:LoadFile(String) (at Assets/Scripts/Importing/DICOMImporter.cs:188)
UnityVolumeRendering.DICOMImporter:ReadDICOMFile(String) (at Assets/Scripts/Importing/DICOMImporter.cs:125)
UnityVolumeRendering.DICOMImporter:Import() (at Assets/Scripts/Importing/DICOMImporter.cs:61)
UnityVolumeRendering.VolumeRendererEditorFunctions:ShowDICOMImporter() (at Assets/Editor/VolumeRendererEditorFunctions.cs:30)
I tried to open the datasets in a DICOM visualization system and they seem just fine. Many thanks in advance!
The text was updated successfully, but these errors were encountered: