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],
Index Point2Index(const Point &p) const
DataDomain
underlying data type
std::complex< Real > Complex
SpatialDomain(const Extent &e)
void SetSpatialOrigin(const Point &o)
Point GetSpatialOrigin() const
V & Value(const Index &i)
return direct r/w access to the value without boundary check
Defines lower and upper valid indices.
DataDomain GetDomain() const
void SetComplex(const Point &p, const Complex &c, ValueHolder< V > &data)
void SetReal(const Point &p, const Real &r, ValueHolder< V > &data)
Complex GetComplex(const Point &p, const ValueHolder< V > &data) const
Extent GetLogicalExtent() const
class encapsulating 1D to 3D point
Extent GetPhysicalExtent() const
#define DLLEXPORT_OST_IMG_BASE
Real GetReal(const Point &p, const ValueHolder< V > &data) const