aboutsummaryrefslogtreecommitdiff
path: root/src/mapping.c
blob: cac1ce51c2d3c2e9cc58716cf57bb792e78708d7 (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"

ReflectionContext *mapping_create(ControlContext *ctx) {

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

}