microscope.h
1.2 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef DETECTORSTRUCT_H
#define DETECTORSTRUCT_H
#include "fieldslice.h"
#include "nearfield.h"
#include <iostream>
using namespace std;
struct sourcePoint
{
bsPoint f;
ptype A;
};
struct microscopeStruct
{
int padding;
int ss;
//field slice at the detector
fieldslice Ufd;
fieldslice Ud;
bool scalarSim;
//detector image
scalarslice* D; //sample
scalarslice* Di; //incident field image
ptype objective[2];
//image position and orientation in world space
rts::rtsQuad<ptype, 3> pos;
vector<sourcePoint> focalPoints;
microscopeStruct();
nearfieldStruct nf;
void init();
void destroy();
//functions for dealing with extended sources
void SimulateExtendedSource();
void LoadExtendedSource(std::string filename);
void SimulateScattering();
void SimulateImaging();
void Simulate();
void setNearfield();
void setRes(int x_res, int y_res, int pad, int supersampling);
void setPos(bsPoint pMin, bsPoint pMax, bsVector normal);
void applyBandpass();
void getFarField();
void integrateDetector();
void clearDetector();
//compute detector measurements
scalarslice getAbsorbance();
scalarslice getTransmittance();
scalarslice getIntensity();
string toStr();
};
#endif