Thank you David, for answering to all this question.
The program gwydump helped a lot too!

 One precision, for example to change the max that is a double value one has
to do:
container.set_double_by_name<http://gwyddion.net/documentation/head/pygwy/gwy.Container-class.html#set_double_by_name>
("/0/max", value) .
As "/0/max" was a string I was trying to use
container.set_string_by_name<http://gwyddion.net/documentation/head/pygwy/gwy.Container-class.html#set_double_by_name>
("/0/max", value) .

2010/3/4 David Necas (Yeti) <[email protected]>

> On Tue, Mar 02, 2010 at 03:13:12PM +0100, Jean-m. a. wrote:
> > 1) I would like to be able to adjust some parameters graphicaly,
> > and I have not found how to create a window with some parameters.
>
> Do
>
> import gtk
>
> and then you can use any Gtk+ widgets and functions.
>
> > 2) I don't know how to create a mask and how to add it to a container.
>
> For instance like this, for the current channel:
>
> container = gwy.gwy_app_data_browser_get_current(gwy.APP_CONTAINER)
> field = gwy.gwy_app_data_browser_get_current(gwy.APP_DATA_FIELD)
> mask = field.new_alike(False)
> mask.fill(1.0)
> i = gwy.gwy_app_data_browser_get_current(gwy.APP_DATA_FIELD_ID)
> container.set_object_by_name("/%d/mask" % i, mask)
>
> > 3) I have tried to change automaticaly the maximum and the minimun of the
> > scale to a given value on an image before saving this one on the jpg
> format.
> > I have seen the tutorial that explain how to change the graphical palette
> > but have not found how to change the scale.
>
> The minimum and maximum value are stored under "/0/base/min" and
> "/0/base/max" (the locations are a bit silly, but they are like this for
> historical reasons).
>
> I admit the location of various things are not properly documented
> anywhere.  If you encounter this, gwydump can often help you by showing
> you the content of .gwy files with the corresponding things present.
>
> > 4) I'm using the last version (2.19) and when I do a module I'm not able
> > to import gwyutils. (But in the pygwy console it's working). Is it
> normal?
>
> I'm not sure why.
>
> > 5) When  utilising my module, I create some datafield and I don't kwon
> how
> > to erase them from the memory.
>
> They are reference-counted.  So they should disappear when they get out
> of scope (of course, if you did not put them into the data container or
> so), also explicit del should work.
>
> Yeti
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Gwyddion-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gwyddion-users
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to