On Fri, Oct 02, 2015 at 11:19:44AM +0200, Mark S. Bentley wrote: > I have a series of Gwy files with many (>100) channels, each containing > masked grain data (usually one mask per channel). I want to extract some > basic grain properties (e.g. as calculated from grain measure, for > example equivalent radius) and either save these to a file, or read them > back into python. > > It seems that the relevant functions don't have python wrappers: > > UNIMPLEMENTED_grains_get_distribution > UNIMPLEMENTED_grains_get_quantities > > I also see: > > grains_get_values(grains, quantity) > > but I'm not sure if this is helpful, and what quantity means here?
Quantity is one of the enumerated quantities http://gwyddion.net/documentation/libgwyprocess/libgwyprocess-gwyprocessenums.php#GwyGrainQuantity They are accessible in Python as gwy.GRAIN_VALUE_MEAN, etc. But the main problem with the grain functions in Python is that the C functions separate the numbering of grains and further analysis. This is a good thing because the numbering is not done again and again unnecessarily. However, the grain numbers are passed as a raw C array so the grain functions cannot have automatically generated Python conunterparts. To sum it up, someone has to write explicit Python wrappers for the grain functions. I might look into it but do not hold your breath. Regards, Yeti ------------------------------------------------------------------------------ _______________________________________________ Gwyddion-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gwyddion-users
