25 #ifndef IMAGE_STATE_HALF_FREQUENCY_DOMAIN_HH
26 #define IMAGE_STATE_HALF_FREQUENCY_DOMAIN_HH
37 #define CONJPOINT(a) ((a)[2]==0 ?((a)[1]==0?(a)[0]>0:(a)[1]>0):(a)[2]>0) ? (a) : -(a)
39 namespace ost {
namespace img {
namespace image_state {
45 return (d&0x1) ? (d-1)/2 : d/2;
50 return (d&0x1) ? -((d-1)/2) : -(d/2-1);
107 logical_extent_(ExtractLogicalExtent(e)),
108 physical_extent_(ExtractPhysicalExtent(e)),
112 assert(dim_>=1 && dim_<=3);
128 template <
typename V>
130 if(logical_extent_.Contains(p)) {
136 template <
typename V>
138 if(logical_extent_.Contains(p)) {
141 data.
Value(Point2Index(cp))=Val2Val<Real,V>(r);
146 template <
typename V>
148 if(logical_extent_.Contains(p)) {
151 return Val2Val<V,Complex>(data.
Value(Point2Index(cp)));
153 return conj(Val2Val<V,Complex>(data.
Value(Point2Index(cp))));
159 template <
typename V>
161 if(logical_extent_.Contains(p)) {
164 data.
Value(Point2Index(cp))=Val2Val<Complex,V>(c);
170 const Size& size=physical_extent_.GetSize();
171 return Index(p[0]>=0?p[0]:size[0]+p[0],
172 p[1]>=0?p[1]:size[1]+p[1],
184 }
else if(e.
GetDim()==2) {
197 }
else if(e.
GetDim()==2) {