blob: 5cff4b022cf350cf2455c1761bf0505df9807b97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*
* imagedisplay.h
*
* Show raw and processed images
*
* (c) 2007 Thomas White <taw27@cam.ac.uk>
*
* dtr - Diffraction Tomography Reconstruction
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef IMAGEDISPLAY_H
#define IMAGEDISPLAY_H
#include <stdint.h>
#include <gtk/gtk.h>
#include "control.h"
typedef enum {
IMAGEDISPLAY_NONE = 0,
IMAGEDISPLAY_SHOW_CENTRE = 1<<1,
IMAGEDISPLAY_SHOW_TILT_AXIS = 1<<2,
IMAGEDISPLAY_QUIT_IF_CLOSED = 1<<3
} ImageDisplayFlags;
typedef enum {
IMAGEDISPLAY_MARK_CIRCLE
} ImageDisplayMarkType;
typedef struct struct_imagedisplaymark {
double x;
double y;
ImageDisplayMarkType type;
struct struct_imagedisplaymark *next;
} ImageDisplayMark;
typedef struct struct_imagedisplay {
ImageRecord imagerecord;
ImageDisplayFlags flags;
ImageDisplayMark *marks;
const char *title;
const char *message;
guchar *data;
GtkWidget *window;
GdkPixbuf *pixbuf;
GdkPixbuf *pixbuf_scaled;
GtkWidget *drawingarea;
GtkWidget *vbox;
GCallback mouse_click_func;
GdkGC *gc_centre;
GdkGC *gc_tiltaxis;
GdkGC *gc_marks;
unsigned int drawingarea_width;
unsigned int drawingarea_height; /* Size of the drawing area */
unsigned int view_width;
unsigned int view_height; /* Size of the picture inside the drawing area */
} ImageDisplay;
extern ImageDisplay *imagedisplay_open(ImageRecord image, const char *title, ImageDisplayFlags flags);
extern ImageDisplay *imagedisplay_open_with_message(ImageRecord image, const char *title, const char *message,
ImageDisplayFlags flags, GCallback mouse_click_func);
extern void imagedisplay_mark_circle(ImageDisplay *imagedisplay, double x, double y);
#endif /* IMAGEDISPLAY_H */
|