aboutsummaryrefslogtreecommitdiff
path: root/src/itrans.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-19 16:25:08 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-19 16:25:08 +0000
commit45864cb5113ec4dde6afe1d23ea53f75402b9ece (patch)
treeb3d4dad81bcfa34037cb067e1356303b32401df1 /src/itrans.c
parent7c4c25f2eda4f0a0780cf2edb087452ceb63f226 (diff)
Refactor image handling code
Remove itrans-lsq git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@158 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/itrans.c')
-rw-r--r--src/itrans.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/itrans.c b/src/itrans.c
index 05d2793..2d99bbb 100644
--- a/src/itrans.c
+++ b/src/itrans.c
@@ -14,24 +14,19 @@
#include <config.h>
#endif
-#include "control.h"
-#include "reflections.h"
+#include "image.h"
#include "itrans-threshold.h"
#include "itrans-zaefferer.h"
-#include "itrans-lsq.h"
#include "itrans-stat.h"
-void itrans_process_image(ImageRecord *image, ControlContext *ctx) {
+ImageFeatureList *itrans_process_image(ImageRecord *image, PeakSearchMode psmode) {
- unsigned int n_reflections;
-
- switch ( ctx->psmode ) {
- case PEAKSEARCH_THRESHOLD : itrans_peaksearch_threshold(image, ctx); break;
- case PEAKSEARCH_ADAPTIVE_THRESHOLD : itrans_peaksearch_adaptive_threshold(image, ctx); break;
- case PEAKSEARCH_LSQ : itrans_peaksearch_lsq(image, ctx); break;
- case PEAKSEARCH_ZAEFFERER : itrans_peaksearch_zaefferer(image, ctx); break;
- case PEAKSEARCH_STAT : itrans_peaksearch_stat(image, ctx); break;
- default: n_reflections = 0;
+ switch ( psmode ) {
+ case PEAKSEARCH_THRESHOLD : return itrans_peaksearch_threshold(image);
+ case PEAKSEARCH_ADAPTIVE_THRESHOLD : return itrans_peaksearch_adaptive_threshold(image);
+ case PEAKSEARCH_ZAEFFERER : return itrans_peaksearch_zaefferer(image);
+ case PEAKSEARCH_STAT : return itrans_peaksearch_stat(image);
+ default: return NULL;
}
}