aboutsummaryrefslogtreecommitdiff
path: root/src/image.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-10-14 18:30:49 +0200
committerThomas White <taw@bitwiz.org.uk>2009-10-14 18:30:49 +0200
commit69b33e88a4ebecc5bc6e2dae8b35643f26cdb22d (patch)
tree4ca274d0990c827486dc2ebfc99ab5723dd382ef /src/image.c
parent4e1e2ef4472e28a146e6c83d053f1fc4d2419f88 (diff)
Write an HDF5 file
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index d3e65685..b7cf4c31 100644
--- a/src/image.c
+++ b/src/image.c
@@ -145,3 +145,20 @@ struct imagefeature *image_feature_closest(ImageFeatureList *flist,
*d = +INFINITY;
return NULL;
}
+
+
+int image_feature_count(ImageFeatureList *flist)
+{
+ if ( flist == NULL ) return 0;
+ return flist->n_features;
+}
+
+
+struct imagefeature *image_get_feature(ImageFeatureList *flist, int idx)
+{
+ /* Sanity check */
+ if ( flist == NULL ) return NULL;
+ if ( idx > flist->n_features ) return NULL;
+
+ return &flist->features[idx];
+}