dicom2stl icon indicating copy to clipboard operation
dicom2stl copied to clipboard

The output STL file is in the shape of a box

Open vsriaditya opened this issue 4 years ago • 3 comments

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?

image image

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!

vsriaditya avatar Jan 16 '21 19:01 vsriaditya

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 avatar Feb 04 '21 16:02 dave3d

@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.

image

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

vsriaditya avatar Feb 06 '21 12:02 vsriaditya

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: Screen Shot 2021-02-08 at 10 43 21 AM

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

dave3d avatar Feb 08 '21 15:02 dave3d