aboutsummaryrefslogtreecommitdiff
path: root/src/structure.h
blob: feac924fce4dc656969ad1be222fd28417748c38 (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
46
47
/*
 * structure.h
 *
 * 3D analysis
 *
 * (c) 2007 Gordon Ball <gfb21@cam.ac.uk>
 *  dtr - Diffraction Tomography Reconstruction
 *
 */
 #ifndef REFLECTION_H
 #include "reflection.h"
 #endif
 
#ifndef STRUCTURE_H_
#define STRUCTURE_H_

typedef struct octtree {
	struct octtree *parent;
	struct octtree **child;
	struct reflist *list;
	double ox;
	double oy;
	double oz;
	double halfedge;
	int depth;
	int childnum;
} OctTree;

typedef struct reflist {
	int count;
	struct Reflection **r;
} ReflectionList;

typedef struct octtreelist {
	struct octtree *o;
	struct octtreelist *next;
} OctTreeLinkedList;

extern double get_mask_radius(ReflectionContext *rctx);
extern ReflectionContext *apply_mask_radius(double mask_radius, ReflectionContext *rctx);
extern OctTree *gen_octtree(ReflectionContext *rctx, int depth);
extern void print_octtree(OctTree *tree);
extern void dump_histogram(ReflectionContext *rctx);
extern OctTreeLinkedList *find_sparse_trees(OctTree *o, int req_length, int allow_end, int *count);


#endif /*STRUCTURE_H_*/