dicom2stl
dicom2stl copied to clipboard
The output STL file is in the shape of a box
Hi!
I was able to successfully convert the dicom files to a 3d image (.stl) and I tried 2 datasets and I am getting a cube in the output STL file?

Why do you think this might be the case? And how can I fix this? Could this be because the dataset itself had a square outline?
Thanks in advance!
Can you share a data set with me? What command-line settings are you using? It's probably extracting a surface at the extents of the image box. Are you using the tissue type flag with bone setting? You could try the '-I' options with an exact isovalue. The tissue type option makes assumptions about the image, which might not apply to yours.
@dave3d Here is the drive link to the dataset - https://drive.google.com/drive/folders/12QLTYq5B_x7CVW9xV4qh0D_oPd0IftrC?usp=sharing
Also, I tried the other bone option you had mentioned and I still got a very similar output with a cubical box outline. Please check the image below.

I tried the other parameters and the code isn't even running. Do you have a dataset which would work for sure? Also, is there a way I can personally get in touch with you? Me and my team are trying to work on a project and we are still students who do not understand most of this code. I was wondering if you'd be willing to help us :)
Thanks
I put in a patch that should fix the issue. The script pads the volume, and I was using 0 for the pad value, when it should be using the minimum pixel value.
Here's the result I get for your DICOM:

The '-t bone' didn't work well, so I used an isovalue of 250.