aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
blob: 38371e41bc1929ee14b85decec1f2fd0e743550c (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
41
42
43
44
45
/*
 * cache.c
 *
 * Save the reflection datablock to save having to recalculate it
 *
 * (c) 2007 Gordon Ball <gfb21@cam.ac.uk>
 *	    Thomas White <taw27@cam.ac.uk>
 *
 *  dtr - Diffraction Tomography Reconstruction
 *
 */
 
#ifndef CACHE_H
#define CACHE_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

typedef struct struct_cacheheader {
	char top[16];
	int count;
	double scale;
} CacheHeader;

/* Can't just use Reflection type because size of a pointer may vary */
typedef struct struct_cachedreflection {

	double x;
	double y;
	double z;
	double intensity;

	signed int h;
	signed int k;
	signed int l;

	ReflectionType type;
	
} CachedReflection;

extern ReflectionContext *cache_load(const char *filename);
extern int cache_save(const char *filename, ReflectionContext *rctx);

#endif /*CACHE_H_*/