Iso Surfaces - Creating volumes with a threshold
-
Hello everyone,
I am working on an electrical field simulation with electrodes inside an irregular brain structure, and I’m trying to extract a volume containing only voxels with values above 200 V/m. I attempted using IsoSurface for this purpose, but I’m not getting the desired volume output, possibly due to the brain structure's irregularity and the complex E-field distribution.
Here’s the code I’m using:
simulation_extractor = simulation.Results() em_sensor_extractor = simulation_extractor["Overall Field"] em_sensor_extractor.FrequencySettings.ExtractedFrequency = u"All" document.AllAlgorithms.Add(em_sensor_extractor) inputs = [em_sensor_extractor.Outputs["EM E(x,y,z,f0)"]] iso_surface_viewer = analysis.viewers.IsoSurfaceViewer(inputs=inputs) iso_surface_viewer.DecibelScale = 0 iso_surface_viewer.IsoValues = (200,) iso_surface_viewer.Data.Mode = iso_surface_viewer.Data.Mode.enum.QuantityAbsolute iso_surface_viewer.Data.Component = iso_surface_viewer.Data.Component.enum.ComponentsAll iso_surface_viewer.UpdateAttributes() iso_surface_viewer.Update(0) iso = iso_surface_viewer.raw iso.CreateTriangleMeshFromIsoSurface()
With this setup, I don’t capture all the regions with values below 200 V/m, and I'm not sure if I'm missing a setting or approach. Has anyone faced a similar issue or can suggest adjustments to ensure a more accurate extraction of the desired volume?
Thank you!