I hope you guys can help. I’m relatively new to 3D slicer. I am using the 4.11 version.
My goal is to compute skeletal muscle area in a single CT-slice.
I have loaded the CT and have created a segment using the segment editor. I manually outlined all the muscles in a single segment. If I go to the segment analysis, I can convert the segment to a model and I can calculate the surface area of this segment.
However, I am trying to calculate only the surface area of the pixels that have hounsfield units between -29 and +150, not the area of the entire segment. The main reason is to remove fatty tissue inside muscles from the calculation.
Is there a way in 3d Slicer to achieve this?
We developed a module for this with @hherhold some time ago, now I’ve touched it up and pushed it into Sandbox extension. You can download it tomorrow in latest Slicer Preview Release. The Sandbox extension is in Examples category, after you install it, the “Segment Cross-Section Area” module should show up in Quantification category.
Nightly build was not successful on Windows last night but tomorrow it should be OK. If you want to try it earlier then you can download the repository from github and add the SegmentCrossSectionArea folder to the additional module paths in Slicer application settings.
I get the error that SegmentCrossSectionAreaLogic is not defined.
Unfortunately I cannot make much more of the python script to see how SegmentCrossSectionAreaLogic should be defined or how I can add the right node so that it will work.
The module’s automatic test serves as an example of how to use the module from a script:
If you run the code from a different file then of course you need to import the module or the classes that you use from them. For example, you can import the logic class by calling:
from SegmentCrossSectionArea import SegmentCrossSectionAreaLogic
logic = SegmentCrossSectionAreaLogic()