aboutsummaryrefslogtreecommitdiff
path: root/src/mapping.c
blob: 857096617438e9046721f0271b9a110801f17a7a (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 = reflection_init();
	
	/* 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;

}