On Wed, Oct 30, 2013 at 02:39:02PM -0400, Ramsey Hazbun wrote:
> - the mark grains dialog doesn't seem to run in NONINTERACTIVE mode.
The run mode nomenclature is a bit confusing. NONINTERACTIVE is used
for file modules; IMMEDIATE is the more or less equivalent for
processing modules, see
http://gwyddion.net/documentation/libgwymodule/libgwymodule-gwymoduleenums.php#GwyRunType
> it does not remember the color for the mask.
Mask colour can be set by setting "/0/mask/red", "/0/mask/green" and
"/0/mask/blue" (for channel 0).
> This is critical for my work (I am trying to count the grains).
Grain counting is done by gwy_data_field_number_grains().
Unfortunately, this has a C interface that does not automatically
translate to Python as it works with plain C arrays. So someone would
have to write a wrapper function...
> - In general it seems really difficult to pass parameters to these
> functions. I'm guessing there are some more direct functions I should be
> using and so far I've been using GUI/front-end version. I tried to get
> gwy_data_field_grains_mark_slope () to work, but apparently I don't have it
> quite right. Either I'm a bit clueless (likely), or the function is for C
> and hasn't made it into the python implementation.
This one should work fine in Python. This marks slopes above 50% for
me in the console:
f = gwy.gwy_app_data_browser_get_current(gwy.APP_DATA_FIELD)
m = gwy.gwy_app_data_browser_get_current(gwy.APP_MASK_FIELD)
f.grains_mark_slope(m, 50.0, False)
m.data_changed()
> - I have no idea how to get grain counts or statistics into a text file of
> some sort. I've been relying on another program I have that is great for
> export dot/grain counts, but lacks the image processing that gwyddion has.
The raw grain data export of grain_dist requires to enter the file name
in the GUI. Doing the same thing this module does manually again
apparently fails due to the unavailability of number_grains() (and
apparently at least also gwy_grain_values_calculate() which also does
not translate automatically to Python).
The Python interface suffers from the fact I don't use it as I'm happy
with C. So only rarely missing functions which do not translate
automatically from C and need wrappers in wrap_calls.c are added...
Regards,
Yeti
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users