Hi David,
I would to implement this module. It seems to be a simple   task. 
Do you have an empty  C file from which I can start? I read that a starting 
point can be the threshold-example module...but I suppose aren't written useful 
operation for my task  in it .
Where can I find something in which I have only to add your suggested code?
Then, as I read, the only manner to add the module is to execute "nmake" in the 
CMD command line (on windows).. is it exact?
thanks a lot
Angelo
P.S. Excuse me for my pour english


________________________________
From: David
 Necas (Yeti) <[email protected]>
To: Gwyddion use discussion <[email protected]>
Sent: Sunday, December 28, 2008 1:58:19 PM
Subject: Re: [Gwyddion-users] Finding images with grains in a big set


On Fri, Dec 26, 2008 at 03:17:56AM -0800, Angelo Ulivieri wrote:
> Given a set of some thousand of images, I have to find only these in which is 
> present a grain. I believe that is necessary to know the parameters to have a 
> meaningful result with a Watershed analysis. So, how can I send the 
> parameters to the appropriate module to have the result I want?
> Or, in alternative, how is possible an automatic execution of the Grain 
> Watershed analysis on more than one images?

Hi, I would probably implement this as a standalone program, as it needs
to manage files itself, so the rest of Gwyddion would be just baggage.

For each file you can

1) Load the file with
   container = gwy_file_load(...);
  
http://gwyddion.net/documentation/libgwymodule/libgwymodule-gwymodule-file.php#gwy-file-load

2a) If the file structure can vary, use data browser functions to find
    what channels are in, see gwyiew source code for an example.
    
2b) If you know there is just one channel, you can simply obtain it with
    data_field = gwy_container_get_object(container,
                                          gwy_app_get_data_key_for_id(0));

3) Process it with gwy_data_field_grains_mark_watershed()
  
http://gwyddion.net/documentation/libgwyprocess/libgwyprocess-grains.php#gwy-data-field-grains-mark-watershed`

   and/or other functions in libgwyprocess-grains.

4) Do something with the result (e.g. save it with gwy_file_save())

5) g_object_unref(container); and free other temporary data
   (with a thounsand of files you'd quickly get into troubles
   otherwise...)

An example of completely GUI-less Gwyddion initialization and
non-interactive processing code (though only of a single file) can also
be seen in the new thumbnailer code

http://gwyddion.svn.sourceforge.net/viewvc/gwyddion/trunk/gwyddion/thumbnailer/gwyddion-thumbnailer.c?view=markup

This stuff is unfortunately a bit hairy...  I should write a sample
non-interactive processing program that would be really meant to be used
as a template; real-world programs tend to do weird things that are
unnecessary or even confusing in simple cases.

I hope this helps,

Yeti


------------------------------------------------------------------------------
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users



      
------------------------------------------------------------------------------
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to