Hi @jmhuie ! I have a weird behavior happening with SegmentGeometry that I’m hoping you can help me understand.
We are calculating the cross-sectional area and properties of a segment with slices aligned with the green view and setting a custom neutral axis (90 degrees). We set our slices to 1% (which results in 101 data rows).
However, we’d also like to calculate the compactness of each slice. When we add in the compactness measurement, our output is now 201 rows and the calculated compactness value is 1 in every row (which it very clearly should not be). Here’s are two images of the segment in the green window (at two different slice locations):
Any idea what could be going wrong? I’ve tried this in 3 different versions of Slicer in case there was a compatibility issue (results here shown for 5.9.0-2025-09-23).
I also suggest opening an issue on the actual repository of the extension. THere is no guarantee that @jmhuie is actively tracking the forum, but an issue on the github repo will trigger a notification to him (and other developers).
I was able to replicate this issue. I think there might some misunderstanding about how compactness is calculated. To do this with SegmentGeometry, you need to select a second segment that is a solid version of your main segment. You have to make this segment yourself; I typically do it using SurfaceWrapSolidify. For an example of this, if you look at the sample dataset you’ll see there is a segment called “Humerus” and one called “Humerus_solid”. Give that a go and let me know how it works!
These errors were unrelated to your problem and due to SegmentGeometry being out of date with recent versions of 3D Slicer. You’re question prompted me to update the module so you should not get those errors anymore if you update and use Slicer 5.8.
Thanks Murat! I do occasionally check the forum for questions and get notifications when I’m tagged.