26 #ifndef GRALE_SOURCEPLANE_H
28 #define GRALE_SOURCEPLANE_H
30 #include "graleconfig.h"
33 #include <serut/serializationinterface.h>
34 #include <errut/errorbase.h>
44 class GRALE_IMPORTEXPORT SourcePlane :
public errut::ErrorBase
47 SourcePlane(
double D_s,
double D_ds);
49 double getD_s()
const {
return D_s; }
50 double getD_ds()
const {
return D_ds; }
52 double getSurfaceBrightness(Vector2D<double> beta)
const;
53 void getPointSourceIntensities(Triangle2D<double> area, std::list<Vector2DPlus> &pointSourceInfo)
const;
54 bool isSourceInRange(Vector2D<double> beta,
double radius)
const;
56 const std::map<uint16_t, SourceImage *> &getSources()
const {
return sources; }
58 bool write(serut::SerializationInterface &s,
bool writesources =
false)
const;
59 static bool read(serut::SerializationInterface &si,SourcePlane **sp,std::string &errstr,
bool loadsources =
true);
61 bool registerSource(SourceImage *s, uint16_t sourceID);
62 void unregisterSource(SourceImage *s);
65 std::map<uint16_t, SourceImage *> sources;
67 friend class SourceImage;
72 #endif // GRALE_SOURCEPLANE_H