bioem.h 1.78 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#ifndef BIOEM_H
#define BIOEM_H

#include "defs.h"
#include "bioem.h"
#include "model.h"
#include "map.h"
#include "param.h"

class bioem
{
12
	friend class bioem_RefMap;
David Rohr's avatar
David Rohr committed
13
	friend class bioem_Probability;
14

15
public:
16
17
18
19
	bioem();
	virtual ~bioem();

	int configure(int ac, char* av[]);
20
21
	void cleanup(); //Cleanup everything happening during configure

22
23
24
25
	int precalculate(); // Is it better to pass directly the input File names?
	int dopreCalCrossCorrelation(int iRefMap, int iRefMapLocal);
	int run();
	int doProjections(int iMap);
26
	int createConvolutedProjectionMap(int iOreint, int iMap, mycomplex_t* lproj, myfloat_t* Mapconv, mycomplex_t* localmultFFT, myfloat_t& sumC, myfloat_t& sumsquareC);
27

28
	virtual int compareRefMaps(int iOrient, int iConv, const myfloat_t* conv_map, mycomplex_t* localmultFFT, myfloat_t sumC, myfloat_t sumsquareC, const int startMap = 0);
29

30
31
32
	virtual void* malloc_device_host(size_t size);
	virtual void free_device_host(void* ptr);

33
	int createProjection(int iMap, mycomplex_t* map);
34
	int calcross_cor(myfloat_t* localmap, myfloat_t& sum, myfloat_t& sumsquare);
35
	void calculateCCFFT(int iMap, int iOrient, int iConv, myfloat_t sumC, myfloat_t sumsquareC, mycomplex_t* localConvFFT, mycomplex_t* localCCT, myfloat_t* lCC);
36

37
	bioem_Probability pProb;
38
39
40
41
42
43

protected:
	virtual int deviceInit();
	virtual int deviceStartRun();
	virtual int deviceFinishRun();

44
45
46
47
48
49
	bioem_param param;
	bioem_model Model;
	bioem_RefMap RefMap;

	int nReferenceMaps;			//Maps in memory at a time
	int nReferenceMapsTotal;	//Maps in total
50

51
52
	int nProjectionMaps;		//Maps in memory at a time
	int nProjectionMapsTotal;	//Maps in total
53

54
55
56
	int FFTAlgo;				//Use the FFT Algorithm (Default 1)
	int DebugOutput;			//Debug Output Level (Default 2)
	int nProjectionsAtOnce;		//Number of projections to do at once via OpenMP (Default 1)
57
58
59
};

#endif