|
INFO607
|
#include <stdlib.h>#include <math.h>#include <assert.h>#include <gtk/gtk.h>Go to the source code of this file.
Classes | |
| struct | SContexte |
| struct | Pixel |
Typedefs | |
| typedef struct SContexte | Contexte |
Functions | |
| gboolean | selectInput (GtkWidget *widget, gpointer data) |
| Fonction appelée lorsqu'on clique sur "Input". | |
| gboolean | selectOutput (GtkWidget *widget, gpointer data) |
| Fonction appelée lorsqu'on clique sur "Output". | |
| GtkWidget * | creerIHM (const char *image_filename, Contexte *pCtxt) |
| Charge l'image donnée et crée l'interface. | |
| void | analyzePixbuf (GdkPixbuf *pixbuf) |
| GdkPixbuf * | creerImage (int width, int height) |
| unsigned char | greyLevel (Pixel *data) |
| void | setGreyLevel (Pixel *data, unsigned char g) |
| Pixel * | gotoPixel (GdkPixbuf *pixbuf, int x, int y) |
| void | disk (GdkPixbuf *pixbuf, int r) |
| int | main (int argc, char *argv[]) |
Le contexte contient les informations utiles de l'interface pour les algorithmes de traitement d'image.
| void analyzePixbuf | ( | GdkPixbuf * | pixbuf | ) |
Utile pour vérifier que le GdkPixbuf a un formal usuel: 3 canaux RGB, 24 bits par pixel, et que la machine supporte l'alignement de la structure sur 3 octets.
Definition at line 157 of file union-find.c.
Referenced by creerIHM().
| GtkWidget * creerIHM | ( | const char * | image_filename, |
| Contexte * | pCtxt | ||
| ) |
Charge l'image donnée et crée l'interface.
Definition at line 92 of file union-find.c.
References analyzePixbuf(), creerImage(), disk(), SContexte::height, SContexte::image, SContexte::pixbuf_input, SContexte::pixbuf_output, selectInput(), selectOutput(), and SContexte::width.
Referenced by main().
| GdkPixbuf * creerImage | ( | int | width, |
| int | height | ||
| ) |
Crée un image vide de taille width x height.
Definition at line 187 of file union-find.c.
Referenced by creerIHM().
| void disk | ( | GdkPixbuf * | pixbuf, |
| int | r | ||
| ) |
Crée une image sous forme de disque.
Definition at line 224 of file union-find.c.
References gotoPixel(), and setGreyLevel().
Referenced by creerIHM().
| Pixel * gotoPixel | ( | GdkPixbuf * | pixbuf, |
| int | x, | ||
| int | y | ||
| ) |
Va au pixel de coordonnées (x,y) dans le pixbuf.
Definition at line 214 of file union-find.c.
Referenced by disk().
| unsigned char greyLevel | ( | Pixel * | data | ) |
Retourne le niveau de gris du pixel.
Definition at line 196 of file union-find.c.
References Pixel::bleu, Pixel::rouge, and Pixel::vert.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 49 of file union-find.c.
References creerIHM(), and main().
Referenced by main().
| gboolean selectInput | ( | GtkWidget * | widget, |
| gpointer | data | ||
| ) |
Fonction appelée lorsqu'on clique sur "Input".
Definition at line 68 of file union-find.c.
References SContexte::image, and SContexte::pixbuf_input.
Referenced by creerIHM().
| gboolean selectOutput | ( | GtkWidget * | widget, |
| gpointer | data | ||
| ) |
Fonction appelée lorsqu'on clique sur "Output".
Definition at line 80 of file union-find.c.
References SContexte::image, and SContexte::pixbuf_output.
Referenced by creerIHM().
| void setGreyLevel | ( | Pixel * | data, |
| unsigned char | g | ||
| ) |
Met le pixel au niveau de gris g.
Definition at line 204 of file union-find.c.
References Pixel::bleu, Pixel::rouge, and Pixel::vert.
Referenced by disk().