diff options
author | Thomas White <taw@physics.org> | 2010-01-21 11:01:07 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-01-21 11:06:04 +0100 |
commit | a988540d804e46becd904e894f739423240e0937 (patch) | |
tree | 24d237b2e466843e5bf30e0a784b0649c8a011a0 /src/image.c | |
parent | 4f8424fd5406cdfd05a38b101f386fd6d57a2d8a (diff) |
Filter peaks which are obviously due to common mode streaks
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c index b2eaa6e3..b0869cce 100644 --- a/src/image.c +++ b/src/image.c @@ -88,6 +88,7 @@ void image_add_feature(ImageFeatureList *flist, double x, double y, flist->features[flist->n_features].parent = parent; flist->features[flist->n_features].partner = NULL; flist->features[flist->n_features].partner_d = 0.0; + flist->features[flist->n_features].valid = 1; flist->n_features++; @@ -161,5 +162,13 @@ struct imagefeature *image_get_feature(ImageFeatureList *flist, int idx) if ( flist == NULL ) return NULL; if ( idx > flist->n_features ) return NULL; + if ( flist->features[idx].valid == 0 ) return NULL; + return &flist->features[idx]; } + + +void image_remove_feature(ImageFeatureList *flist, int idx) +{ + flist->features[idx].valid = 0; +} |