bioem.h 1.67 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef BIOEM_H
#define BIOEM_H
#include <fstream>
#include <iostream>
#include <complex>

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

class bioem
{
15
16
	friend class bioem_RefMap;

17
public:
18
19
20
21
	bioem();
	virtual ~bioem();

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

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

30
	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);
31

32
33
34
	virtual void* malloc_device_host(size_t size);
	virtual void free_device_host(void* ptr);

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

39
	bioem_Probability pProb;
40
41
42
43
44
45

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

46
47
48
49
50
51
	bioem_param param;
	bioem_model Model;
	bioem_RefMap RefMap;

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

53
54
	int nProjectionMaps;		//Maps in memory at a time
	int nProjectionMapsTotal;	//Maps in total
55

56
	int FFTAlgo;
57
58
59

	mycomplex_t** localCCT;
	myfloat_t** lCC;
60
61
62
};

#endif