draw muscles with high activity

Hi,

for a publication i would like to draw only those muscles which have a certain activity level. How can this be done?

And another question: With RGBColorScale it is possible to use a color range from blue to red, e. g. Is it possible to use a range red-yellow-green-blue or a HRSColorScale?

Thanks a lot,

Thomaz

Hi Thomaz,

for the visibility you can add a line like


Visible = iffun(gtfun(.Activity, 0.20),1,0);

into AnyDrawMuscle objects to make them disappear for an activity below 0.2.

For the problem with the colors you could have a look at the class AnyStyleDrawMaterialScale where you can define the color range for the drawing of the muscle. In an AnyDrawMuscle you can find the object DrawScale which is one of these objects.

Best regards
Daniel

Hi Daniel,

thanks for the speedy reply. iffun is a good idea.I use the StandingModel. Does this mean i must add your code to every single muscle or can this be done globally in the DrawSettings.any?

Best,

Thomaz

Hi Thomaz,

I hoped that after a fast reply you would figure that out on your own ;).

I had a quick look at the draw settings and found a file MusDrawSettings.any in the human body folder. I think if you change the this you could modify them all at once. But please be aware that this file is in the human folder of the repository, so changing this will change the setting of all models using the body model. So best is probably to make a backup and change it back later whenever you change something in the body model folder.

Best regards
Daniel

i will answer more slow next time so that it looks as if i tried to figure it out myself :).

Your suggestion works perfectly. But :frowning: it does not work, when i load hdf5 results. The decision whether visible or not is made before the results were loaded. Thus it is based on the activity of the Study and not of the loaded h5 file.

Have you also got an idea for this?

Do you mean except for re-running the model?

It looks as unfortunately the system is not saving the draw settings when they are calculated and the visibility is not recalculated for loaded results at the moment. This is something which might be changed in the future. So run and record it is the only way at the moment, sorry for that.

Best regards
Daniel

ok, thanks, your hints were helpful, though.
Kind regards,

Thomaz