mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
274 stars 182 forks source link

calling grains.volume from grain3d/display is slow #2092

Open kilir opened 4 months ago

kilir commented 4 months ago

The function grain3d/display computes grains.volume every time it is called which is fine for a few grains but may become quite annoying with many grains. Would eventually storing the value within grains and deleting only when subsetting/modifying be an option?

https://github.com/mtex-toolbox/mtex/blob/59d8b4db049d26e2b091b4e87459e5226acabb7f/EBSDAnalysis/%40grain3d/display.m#L12C1-L12C27

Cheers,

Rüdiger