aboutsummaryrefslogtreecommitdiff
path: root/src/mapping.c
blob: c2fed73e5ba49ab057544e35d063f72fc6f617fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * mapping.c
 *
 * 3D Mapping
 *
 * (c) 2007 Thomas White <taw27@cam.ac.uk>
 *
 *  dtr - Diffraction Tomography Reconstruction
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "reflections.h"
#include "control.h"
#include "itrans.h"

ReflectionList *mapping_create(ControlContext *ctx) {

	ReflectionList *reflectionlist;
	int i;
	
	/* Create reflection context */
	reflectionlist = reflectionlist_new();
	
	/* Pass all images through itrans
	 *   (let itrans add the reflections to reflectionlist for now) */
	printf("MP: Processing images..."); fflush(stdout);
	ctx->reflectionlist = reflectionlist;
	for ( i=0; i<ctx->n_images; i++ ) {
		itrans_process_image(&ctx->images[i], ctx);
	}
	printf("done: %i 'measured' reflections\n", ctx->reflectionlist->n_reflections);
	
	return reflectionlist;

}