/* * cache.c * * Save the reflection datablock to save having to recalculate it * * (c) 2007 Gordon Ball * Thomas White * * dtr - Diffraction Tomography Reconstruction * */ #ifndef CACHE_H #define CACHE_H #ifdef HAVE_CONFIG_H #include #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_*/