Exporting Simulation Results for Specific Tissues
-
I am trying to export my simulation results (B1 and SAR) to mat files. In order to save disk space, I want to discard some materials (Background, Coil, Shield etc). I am using the following python script to implement field_mask_filter. When I set ent1='Heart_lumen', I can extract the field results for Heart Lumen only. But, I have 357 entities :). I just want to discard PEC and Background regions, but keep all the other materials in my exports. What is the correct way of coding this?
More specifically, I need learn how to use SetMaterial function for this filter:
field_masking_filter_B1.SetMaterial(['Background'], False)
I tried plenty of combinations for the input arguments but not able to figured it out.
Thanks for your help in advance.ents = model.AllEntities()
ent1 = 'Heart_muscle'
ent2 = 'Heart_lumen'
ent3 = 'Coil'
ent4 = 'RF Shield'
ent5 = 'Background'# Adding a new FieldMaskingFilter for B1 inputs = [em_multi_port_sensor_combiner.Outputs["B1(x,y,z,f0)"]] field_masking_filter_B1 = analysis.core.FieldMaskingFilter(inputs=inputs) field_masking_filter_B1.Name = "B1-Mask" field_masking_filter_B1.SetAllMaterials(False) # field_masking_filter_B1.SetMaterial(ents['Heart_lumen'], False) field_masking_filter_B1.SetEntities([ents[ent1]]) field_masking_filter_B1.SetEntities([ents[ent2]]) field_masking_filter_B1.UpdateAttributes() field_masking_filter_B1.Update() document.AllAlgorithms.Add(field_masking_filter_B1) -
I am trying to export my simulation results (B1 and SAR) to mat files. In order to save disk space, I want to discard some materials (Background, Coil, Shield etc). I am using the following python script to implement field_mask_filter. When I set ent1='Heart_lumen', I can extract the field results for Heart Lumen only. But, I have 357 entities :). I just want to discard PEC and Background regions, but keep all the other materials in my exports. What is the correct way of coding this?
More specifically, I need learn how to use SetMaterial function for this filter:
field_masking_filter_B1.SetMaterial(['Background'], False)
I tried plenty of combinations for the input arguments but not able to figured it out.
Thanks for your help in advance.ents = model.AllEntities()
ent1 = 'Heart_muscle'
ent2 = 'Heart_lumen'
ent3 = 'Coil'
ent4 = 'RF Shield'
ent5 = 'Background'# Adding a new FieldMaskingFilter for B1 inputs = [em_multi_port_sensor_combiner.Outputs["B1(x,y,z,f0)"]] field_masking_filter_B1 = analysis.core.FieldMaskingFilter(inputs=inputs) field_masking_filter_B1.Name = "B1-Mask" field_masking_filter_B1.SetAllMaterials(False) # field_masking_filter_B1.SetMaterial(ents['Heart_lumen'], False) field_masking_filter_B1.SetEntities([ents[ent1]]) field_masking_filter_B1.SetEntities([ents[ent2]]) field_masking_filter_B1.UpdateAttributes() field_masking_filter_B1.Update() document.AllAlgorithms.Add(field_masking_filter_B1)This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login