00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef MREPATOM_H
00010 #define MREPATOM_H
00011
00012
00013 namespace imaging
00014 {
00016 class MrepAtom
00017 {
00018 static const float_t RADIUS_COEFFICIENT = 5.0;
00019 float_t _radius;
00020 size_t _start_atom;
00021 size_t _connection;
00022
00023 public:
00024 MrepAtom() : _radius(1.0), _start_atom(0), _connection(0) {}
00025
00026 MrepAtom(float_t radius, size_t start_atom, size_t connection) :
00027 _radius(radius), _start_atom(start_atom), _connection(connection)
00028 {}
00029
00030 void assign(float_t radius, size_t start_atom, size_t connection)
00031 {
00032 _radius = radius;
00033 _start_atom = start_atom;
00034 _connection = connection;
00035
00036 }
00037
00038 void set_radius(float_t radius) { _radius = radius; }
00039 void set_start_atom(size_t start_atom) { _start_atom = start_atom; }
00040 void set_connection(size_t connection) { _connection = connection; }
00041
00042 float_t radius() const { return _radius; }
00043 size_t start_atom() const { return _start_atom; }
00044 size_t connection() const { return _connection; }
00045
00046 void exponential(ublas::vector<float_t>::const_iterator & vector, MrepAtom & shape) const
00047 {
00048 shape._radius = _radius * exp(*vector); ++vector;
00049
00050 shape._start_atom = _start_atom;
00051 shape._connection = _connection;
00052 }
00053
00054 void logarithm(const MrepAtom & shape, ublas::vector<float_t>::iterator & vector) const
00055 {
00056 *vector = log( shape._radius /_radius ); ++vector;
00057
00058 }
00059
00060 size_t dimension() const { return 1; }
00061 };
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 }
00078
00079
00080 #endif
00081
00082
00083