mightymandel v16

GPU-based Mandelbrot set explorer

blob_set.h
Go to the documentation of this file.
1 // mightymandel -- GPU-based Mandelbrot Set explorer
2 // Copyright (C) 2012,2013,2014,2015 Claude Heiland-Allen
3 // License GPL3+ http://www.gnu.org/licenses/gpl.html
4 
5 #ifndef BLOB_SET_H
6 #define BLOB_SET_H 1
7 
13 #include <stdbool.h>
14 #include <stdint.h>
15 
19 struct blob {
20  int label;
21  int count;
22  int64_t i;
23  int64_t j;
24  int min_i;
25  int max_i;
26  int min_j;
27  int max_j;
28  float error;
29 };
30 
34 struct blob_set;
35 
41 struct blob_set *blob_set_new();
42 
48 void blob_set_delete(struct blob_set *s);
49 
56 void blob_set_insert(struct blob_set *s, const struct blob *blob);
57 
65 bool blob_set_contains(const struct blob_set *s, const struct blob *blob);
66 
73 };
74 
89 struct blob *find_blobs0(int *blob_count, int width, int height, const float *glitched, enum blob_strategy strategy, int i0, int i1, int j0, int j1);
90 
100 struct blob *find_blobs1(int *blob_count, int width, int height, const float *glitched);
101 
112 struct blob *find_blobs2(int *blob_count, int width, int height, const float *glitched, const struct blob *blob);
113 
114 #endif