aboutsummaryrefslogtreecommitdiff
path: root/src/image.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-10-14 11:23:41 +0200
committerThomas White <taw@bitwiz.org.uk>2009-10-14 11:23:41 +0200
commit58d51685fbaad1cdfce7fcbd15ab70456f9ef328 (patch)
tree92116bab86b3789259613135913783c664a2124d /src/image.h
parentbea1c6e44c2fcce080a1a91c0490f3eb5d01146d (diff)
Tidy up structure definitions
Make ImageList and ImageFeatureList opaque Remove image_feature_second_closest Fix declarations as necessary
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/image.h b/src/image.h
index f53f7d92..69b8cc79 100644
--- a/src/image.h
+++ b/src/image.h
@@ -20,13 +20,15 @@
#include <stdint.h>
+/* How is the scaling of the image described? */
typedef enum {
FORMULATION_CLEN,
FORMULATION_PIXELSIZE
} FormulationMode;
-typedef struct imagefeature_struct {
+/* Structure describing a feature in an image */
+struct imagefeature {
struct image *parent;
double x;
@@ -39,20 +41,12 @@ typedef struct imagefeature_struct {
/* Distance between this feature and its partner, if any. */
double partner_d;
- /* The reflection this was projected from, if any */
- struct reflection_struct *reflection;
-
-} ImageFeature;
-
-
-typedef struct {
-
- ImageFeature *features;
- int n_features;
-
-} ImageFeatureList;
+};
+/* An opaque type representing a list of image features */
+typedef struct _imagefeaturelist ImageFeatureList;
+/* Structure describing an image */
struct image {
uint16_t *data;
@@ -84,13 +78,8 @@ struct image {
};
-
-typedef struct imagelist_struct {
-
- int n_images;
- struct image *images;
-
-} ImageList;
+/* An opaque type representing a list of images */
+typedef struct _imagelist ImageList;
extern ImageList *image_list_new(void);
@@ -109,11 +98,7 @@ extern void image_add_feature_reflection(ImageFeatureList *flist,
struct image *parent,
double intensity);
-extern ImageFeature *image_feature_closest(ImageFeatureList *flist,
- double x, double y, double *d,
- int *idx);
-
-extern ImageFeature *image_feature_second_closest(ImageFeatureList *flist,
+extern struct imagefeature *image_feature_closest(ImageFeatureList *flist,
double x, double y, double *d,
int *idx);