Giter VIP home page Giter VIP logo

Comments (12)

eskeyaar avatar eskeyaar commented on May 28, 2024 1

Understood now. Thanks, will experiment again and come back.

Cheers

from dicom2stl.

dave3d avatar dave3d commented on May 28, 2024

For the pre-set tissue types, the script uses SimpleITK's Double Threshold filter. You can read about it here:
https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1DoubleThresholdImageFilter.html

The middle two values (0, 500) are the narrow threshold range, and the outer two values (-200, 1500) are the wide threshold range. Basically it starts with the narrow threshold, and the grows the region within the wide threshold.

from dicom2stl.

eskeyaar avatar eskeyaar commented on May 28, 2024

thanks dave, will go through it.
I was debugging on how it was working, as soon as it goes to if args.double_threshold : and then it directly goes to else function and prints iso value.
Something wrong am doing?

from dicom2stl.

eskeyaar avatar eskeyaar commented on May 28, 2024

For the pre-set tissue types, the script uses SimpleITK's Double Threshold filter. You can read about it here:
https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1DoubleThresholdImageFilter.html

The middle two values (0, 500) are the narrow threshold range, and the outer two values (-200, 1500) are the wide threshold range. Basically it starts with the narrow threshold, and the grows the region within the wide threshold.

ok, so if I specify just isovalue =200, then it will select regions which have only 200? from any tissue type selected?

from dicom2stl.

dave3d avatar dave3d commented on May 28, 2024

If you specify an isovalue, the double_threshold stuff is ignore. So, yes, like you said, only regions of value 200 are selected.

from dicom2stl.

eskeyaar avatar eskeyaar commented on May 28, 2024

If you specify an isovalue, the double_threshold stuff is ignore. So, yes, like you said, only regions of value 200 are selected.

Thanks, I understand that now.
Ok, so If I don't specify isovalue, then it goes to bone or skin ( depending upon tissue type ), then goes to the double threshold values, and how exactly it extracts the segment? any video demo of that alone I can find?

Thanks

from dicom2stl.

eskeyaar avatar eskeyaar commented on May 28, 2024

For the pre-set tissue types, the script uses SimpleITK's Double Threshold filter. You can read about it here:
https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1DoubleThresholdImageFilter.html

The middle two values (0, 500) are the narrow threshold range, and the outer two values (-200, 1500) are the wide threshold range. Basically it starts with the narrow threshold, and the grows the region within the wide threshold.

Hi Dave,
where to use specify argument for double threshold? for me it shows syntax error as it cant convert from string to float.
If we dont specify --double/-d argument, then it generates based on which threshold value?

Thanks

from dicom2stl.

dave3d avatar dave3d commented on May 28, 2024

The way to specify the double threshold is a bit goofy. You put the four values in a string, separated by semi-colons like this:

dicom2stl.py --double "200;220;230;255"

That's because python's argument parser doesn't really handle multiple arguments.

By default, it doesn't actually use double thresholds. That only comes into effect if you specify tissue type (bone, skin, muscle), then is uses values that I picked just by trial an error.

Normally the script just uses a single iso-value (the "-i" flag) and the default iso-value is 0.0.

from dicom2stl.

eskeyaar avatar eskeyaar commented on May 28, 2024

Ok that makes sense to my why it's not taking those threshold values even when tissue Is selected.
So can I do this? Dicom2stl.py --double - t(select tissue) "200;220;230;255"??
Or not possible?
Because even If I select tissue as bone, looks like its not going for double threshold.
I'm able to get hold of threshold values when selecting bone or skin, but after that, double threshold event is none.

Thanks for you're input.

from dicom2stl.

dave3d avatar dave3d commented on May 28, 2024

Yeah, selecting bone overrides the double threshold values with the ones I picked.

Just set your own double threshold values. Don't set the tissue type.

from dicom2stl.

eskeyaar avatar eskeyaar commented on May 28, 2024

Thanks dave, so I set my own double threshold values, then how come it can able to find whether it's bone or other tissues? Just by manually entering those values for particular type needed?
Again, if it picks up tissue bone, then you're threshold value overrides it, then it means it goes to double threshold value? Then in that case for me it's not going to. When I choose bone, I get stl of patient skin with bones. 🤔

from dicom2stl.

dave3d avatar dave3d commented on May 28, 2024

If you use "-t bone", all it does is set a specific set of double threshold values. You can see it in line 89 of dicom2stl.py.

thresholds = [200., 800., 1300., 1500.]

These values are a bit arbitrary. I selected some values that seemed reasonable to me. They worked reasonably well on the few test CT scans that I had, and the values fall within the described Hounsfield units for bone.

If they don't work for you, experiment with different values to find ones that do a better job of only selecting bone in your CT data. In particular, if you are getting skin, you probably want to raise the lower threshold values.

from dicom2stl.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.