rbumm / SlicerLungCTAnalyzer

This is a 3D Slicer extension for segmentation and spatial reconstruction of infiltrated, collapsed, and emphysematous areas in lung CT.
Apache License 2.0
71 stars 23 forks source link

Cleanup and real-time 2D/3D thresholding preview #5

Closed lassoan closed 3 years ago

lassoan commented 3 years ago

Added real-time preview of coloring (using dynamically adjusted color transfer functions in slice views and in volume rendering).

Also made the code and GUI simpler and more conform to 3D Slicer conventions, improved performance, and implemented saving of all settings into the scene (so that a study can be saved and reloaded).

Overview of the revamped module:

https://youtu.be/0plsoy94hFE

Have a look at the changed CovidQ computation, I've changed it, as this seemed to be incorrect (it should have been affected/functional, according to the label):

https://github.com/rbumm/SlicerCTLungAnalyzer/blob/1811dd8b0d4f53e43a82e11f50399c06d5429492/CTLungAnalyzer/CTLungAnalyzer.py#L843

rbumm commented 3 years ago

Thank you for the good work, the real-time displays really help. I also think the CovidQ fits better now.

rbumm commented 3 years ago

Used the last week or so to write a lung mask generator (separate module) from scratch. A pull request will follow soon, as it can be used to prepare the lung masks for the CT Lung Analyzer in a few minutes. Should be separate in my view because of the fact that one should always fine-tune the masks before the analysis ...

lassoan commented 3 years ago

Yes, having a separate lung segmentation module makes sense. If necessary, you can create a high-level module layer that uses multiple other modules to implement a specific workflow.

How do you segment the lungs? I've found that Grow from seeds in an intensity range works quite quickly and robustly, with minimal use input.

rbumm commented 3 years ago

I get my best results if I theshold the lungs, then surface cut the upper trachea and bifurcation, then use the "Islands" function and keep right bzw. left lung. In the I smooth the result with a kernel size of 4-5. Packed that into a script (https://github.com/rbumm/SlicerLungMaskGenerator) which helps a lot when I quickly have to analyze a patient. Maybe the grow from seeds function is a better way to do this ?