eidelen / DicomToMesh

A command line tool to transform a DICOM volume into a 3d surface mesh (obj, stl or ply). Several mesh processing routines can be enabled, such as mesh reduction, smoothing or cleaning. Works on Linux, OSX and Windows.
MIT License
437 stars 91 forks source link

No DICOM data in directory #48

Closed Littlewoko closed 7 months ago

Littlewoko commented 7 months ago

Hi. I have downloaded, built and compiled dicom2mesh on windows 10. When passing my arguments I get this error

`Dicom2Mesh Settings

Input directory: W:\DicomImages\CTHeadDCM" Output file path: None Surface segmentation: 400 Mesh reduction: disabled Mesh polygon limitation: disabled Mesh smoothing: disabled Mesh centering: disabled Mesh filtering: disabled Volume cropping: disabled

Using standard DICOM loader Read DICOM images located under W:\DicomImages\CTHeadDCM" Progress: doneNo DICOM data in directory No image data could be created. Maybe wrong directory?`

using arguments > dicom2mesh -i "input directory" -o "output directory"

I am not sure I understand the issue. Initially the files had no extension, but I altered all to be .dcm files and even included a dicomdir.dcm on the off chance that this was causing issues. Nothing seems to affect this output. At times it will give me a different error

"No mesh could be created. Wrong DICOM or wrong iso value"

I have attached a reduced and anonymised example where I see this issue occurring. Any input would be very helpful. We are looking for ways to export Dicom to file formats such as .stl and .obj so this tool would be very handy. B491977F.zip

eidelen commented 7 months ago

Hi, There are several issues with this data

It contains multiple sequences:

Using extended DICOM loader
Read DICOM images located under ../../B491977F/
Nbr of patients = 1, Nbr of studies = 1, Nbr of series = 4
(0)  :  1 files, name = Anonymised
(1)  :  95 files, name = Anonymised
(2)  :  7 files, name = Anonymised
(3)  :  1 files, name = Anonymised
Which DICOM series you wish to load? 1

You need to build d2m with enabled cmake flag USE_VTK_DICOM in order to load data with multiple sets in it.

Further on, the data seems to be compressed, so that not even the external library VTK-Dicom can read it. I have no solution for that. Sorry.

2024-01-30 09:19:46.151 (  22.449s) [    7FD99307AB80]     vtkDICOMReader.cxx:1885   ERR| vtkDICOMReader (0x559a56591800): DICOM file is compressed, cannot read.