25 #ifndef IMAGE_STATE_IMPL_HH
26 #define IMAGE_STATE_IMPL_HH
29 #include <boost/shared_ptr.hpp>
39 namespace ost {
namespace img {
43 namespace image_state {
58 template <
typename T,
class D>
147 assert(domain_.GetExtent().Contains(p));
148 return data_.Value(domain_.Point2Index(p));
154 assert(domain_.GetExtent().Contains(p));
155 return data_.Value(domain_.Point2Index(p));
182 const T&
Value(std::size_t i)
const;
Three dimensional vector class, using Real precision.
Defines lower and upper valid indices.
Helper class to handle pixel sampling.
class encapsulating 1D to 3D point
class encapsulating 1D to 3D size
in-place modifying image state const visitor base class
out-of-place modifying image state const visitor base class
virtual ImageStateBase & operator+=(Real v)
const ValueHolder< T > & Data() const
direct access to value holder
ImageStateImpl(const ImageStateImpl< T, D > &s)
virtual void ApplyIP(ImageStateNonModVisitorBase &v) const
T GetCheckedValue(const Point &p) const
retrieve boundary checked value
virtual ImageStateBase & operator-=(Real v)
virtual ImageStateBase & operator*=(Real v)
virtual void SetComplex(const Point &p, const Complex &c)
set complex value at Point
virtual ImageStateBasePtr Apply(ImageStateMorphVisitorBase &v)
virtual const PixelSampling & GetSampling() const
virtual void SetReal(const Point &p, const Real &r)
set real value at Point
T CalcIntpolValue(const Real &v) const
virtual Complex GetComplex(const Point &p) const
virtual std::size_t MemSize() const
virtual ImageStateBase & operator+=(const Complex &v)
void AdjustPhaseOrigin(const Point &p)
virtual Vec3 FractionalIndexToCoord(const Vec3 &p) const
virtual void Apply(ImageStateNonModVisitorBase &v) const
virtual void SetSampling(const PixelSampling &s)
virtual void ApplyIP(ImageStateModIPVisitorBase &v)
T CalcIntpolValue(const Vec3 &v) const
virtual ImageStateBase & operator/=(const Complex &v)
ImageStateImpl(const Extent &e, const PixelSampling &s)
virtual Complex GetIntpolComplex(const Real &d) const
const T & Value(const Index &i) const
const T & Value(const Point &p) const
T CalcIntpolValue(const Vec2 &v) const
virtual ImageStateBasePtr Apply(const ImageStateConstModIPVisitorBase &v) const
void SetCheckedValue(const Point &p, const T &v)
set boundary checked value
virtual void SetAbsoluteOrigin(const Vec3 &c)
SharedPtrType CloneState(bool cc=true) const
virtual void SetSpatialOrigin(const Point &o)
Set spatial origin.
virtual ImageStateBase & operator-=(const Complex &v)
virtual void CenterSpatialOrigin()
virtual Vec3 CoordToIndex(const Vec3 &c) const
virtual ImageStateBase & operator*=(const Complex &v)
ImageStateImpl< T, D > StateType
virtual DataType GetType() const
Retrieve data type: REAL or COMPLEX.
virtual Point GetSpatialOrigin() const
Retrieve spatial origin.
virtual ImageStateBasePtr Apply(ImageStateModIPVisitorBase &v) const
virtual ImageStateBasePtr Apply(ImageStateModOPVisitorBase &v) const
virtual Vec3 IndexToCoord(const Point &p) const
virtual Extent GetLogicalExtent() const
Retrieve logical extent.
boost::shared_ptr< ImageStateImpl< T, D > > SharedPtrType
virtual Real GetReal(const Point &p) const
retrieve value at Point as Real
virtual Complex GetIntpolComplex(const Vec2 &v) const
virtual Extent GetExtent() const
Retrieve Extent.
virtual DataDomain GetDomain() const
Retrieve domain.
ImageStateImpl< T, D > & operator=(const ImageStateImpl< T, D > &s)
ImageStateImpl(const Extent &e, const PixelSampling &s, const Vec3 &c)
virtual Complex GetIntpolComplex(const Vec3 &v) const
virtual ~ImageStateImpl()
virtual PixelSampling & GetSampling()
virtual ImageStateBasePtr Clone(bool cc=true) const
void mul_scalar(const U &v)
virtual ImageStateBase & operator/=(Real v)
const T & Value(std::size_t i) const
virtual void ApplyIP(const ImageStateConstModIPVisitorBase &v)
T & Value(const Point &p)
T & Value(const Index &i)
virtual Vec3 GetAbsoluteOrigin() const
ValueHolder< T > & Data()
direct access to value holder
void add_scalar(const U &v)
virtual ImageStateBasePtr Apply(const ImageStateConstModOPVisitorBase &v) const
virtual Real GetIntpolReal(const Real &d) const
virtual Real GetIntpolReal(const Vec3 &v) const
virtual Real GetIntpolReal(const Vec2 &v) const
in-place modifying image state visitor base class
out-of-place modifying image state visitor base class
morphing image state visitor base class
non-modifying image state visitor base class
std::complex< Real > Complex
boost::shared_ptr< ImageStateBase > ImageStateBasePtr
DataDomain
underlying data type