Skip to content
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Python API
  4. Iso Surfaces - Creating volumes with a threshold

Iso Surfaces - Creating volumes with a threshold

Scheduled Pinned Locked Moved Python API
1 Posts 1 Posters 121 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    andrea_h
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Search