25 #ifndef IMAGE_STATE_SPATIAL_DOMAIN_HH
26 #define IMAGE_STATE_SPATIAL_DOMAIN_HH
39 namespace ost {
namespace img {
namespace image_state {
53 physical_extent_(ExtractPhysicalExtent(e))
60 extent_=
Extent(o,extent_.GetSize());
64 return extent_.GetStart();
76 return physical_extent_;
81 if(extent_.Contains(p)) {
82 return Val2Val<V,Real>(data.
Value(Point2Index(p)));
90 if(extent_.Contains(p)) {
91 data.
Value(Point2Index(p))=Val2Val<Real,V>(r);
97 if(extent_.Contains(p)) {
98 return Val2Val<V,Complex>(data.
Value(Point2Index(p)));
104 template <
typename V>
106 if(extent_.Contains(p)) {
107 data.
Value(Point2Index(p))=Val2Val<Complex,V>(c);
112 return Index(p[0]-extent_.GetStart()[0],
113 p[1]-extent_.GetStart()[1],
114 p[2]-extent_.GetStart()[2]);
126 }
else if(e.
GetDim()==2) {
129 pad=Point(0,0,(e.
GetSize()[2]&0x1) ? 1 : 2);