25 #ifndef IMAGE_STATE_SPATIAL_DOMAIN_HH
26 #define IMAGE_STATE_SPATIAL_DOMAIN_HH
39 namespace ost {
namespace img {
namespace image_state {
59 extent_=
Extent(o,extent_.GetSize());
63 return extent_.GetStart();
80 if(extent_.Contains(p)) {
81 return Val2Val<V,Real>(data.
Value(Point2Index(p)));
89 if(extent_.Contains(p)) {
90 data.
Value(Point2Index(p))=Val2Val<Real,V>(r);
96 if(extent_.Contains(p)) {
97 return Val2Val<V,Complex>(data.
Value(Point2Index(p)));
103 template <
typename V>
105 if(extent_.Contains(p)) {
106 data.
Value(Point2Index(p))=Val2Val<Complex,V>(c);
111 Point start=extent_.GetStart();
112 return Index(p[0]-start[0],
Defines lower and upper valid indices.
class encapsulating 1D to 3D point
DataDomain GetDomain() const
Extent GetLogicalExtent() const
void SetReal(const Point &p, const Real &r, ValueHolder< V > &data)
Point GetSpatialOrigin() const
Extent GetPhysicalExtent() const
SpatialDomain(const Extent &e)
Complex GetComplex(const Point &p, const ValueHolder< V > &data) const
Real GetReal(const Point &p, const ValueHolder< V > &data) const
void SetComplex(const Point &p, const Complex &c, ValueHolder< V > &data)
void SetSpatialOrigin(const Point &o)
Index Point2Index(const Point &p) const
V & Value(const Index &i)
return direct r/w access to the value without boundary check
#define DLLEXPORT_OST_IMG_BASE
std::complex< Real > Complex
DataDomain
underlying data type