1
CT, µCT and FIB-SEM / Re: Histogram of Grayscale Values for Material(s) Post Segmentation
« on: Today at 04:12:00 PM »
Hello Jack,
If I understand correctly, you're currently using the Spatial Intensity Histogram within Compute Metrics. Unfortunately, this function does not meet your requirements, as it generates a histogram of all gray values combined and only displays the probability - separate histograms for each material cannot be obtained this way.
To generate the histogram you need, I recommend following the approach using Python scripting previously outlined by my colleague Janine:
Best regards,
Jonas
If I understand correctly, you're currently using the Spatial Intensity Histogram within Compute Metrics. Unfortunately, this function does not meet your requirements, as it generates a histogram of all gray values combined and only displays the probability - separate histograms for each material cannot be obtained this way.
To generate the histogram you need, I recommend following the approach using Python scripting previously outlined by my colleague Janine:
Hello Jack,
there are many options to analyze volume fields with the Compute Metrics command, as described here: https://geodict-userguide.math2market.de/2025/geodict_computemetrics.html
For example, you can compute the mean value and standard deviation for a specific material with it. However, the option to compute the histogram for only one material is not included yet.
But if needed, you can use Python to create your own custom histogram GeoApp.
For example, you get a 3D numpy array of your structure using the command gd.getStructure() as described here:
https://geodict-userguide.math2market.de/2025/automation_api_structure.html?anchor=getstructure
and for your volume field using gd.getVolumefield(volume field index), as described here:
https://geodict-userguide.math2market.de/2025/automation_api-results.html?anchor=getvolumefield
Then, you can for example use numpy methods to get a histogram for only one material ID.
https://numpy.org/doc/stable/index.html
Best regards,
Janine
Best regards,
Jonas