29 #ifndef IMG_IMAGE_HANDLE_H
30 #define IMG_IMAGE_HANDLE_H
32 #include <boost/shared_ptr.hpp>
49 namespace test_image {
53 namespace ost {
namespace img {
55 using image_state::ImageStateBase;
57 using image_state::ImageStateNonModVisitorBase;
58 using image_state::ImageStateModIPVisitorBase;
59 using image_state::ImageStateConstModIPVisitorBase;
60 using image_state::ImageStateModOPVisitorBase;
61 using image_state::ImageStateConstModOPVisitorBase;
62 using image_state::ImageStateMorphVisitorBase;
68 class NonModAlgorithm;
70 class ConstModIPAlgorithm;
72 class ConstModOPAlgorithm;
81 class ConstImageHandle;
122 typedef boost::shared_ptr<DataObservable> ObsPtr;
124 typedef boost::shared_ptr<ImageStateBasePtr> StatePtrPtr;
170 void Paste(
const Data& d);
197 bool IsValid()
const;
200 long MemSize()
const;
217 virtual Extent GetExtent()
const;
225 virtual Point GetSpatialOrigin()
const;
232 void SetSpatialOrigin(
const Point& p);
242 void CenterSpatialOrigin();
250 Vec3 GetAbsoluteOrigin()
const;
257 void SetAbsoluteOrigin(
const Vec3& c) ;
265 Vec3 IndexToCoord(
const Point &p)
const;
274 Vec3 CoordToIndex(
const Vec3& c)
const;
283 Vec3 FractionalIndexToCoord(
const Vec3 &p)
const;
292 virtual Real GetReal(
const Point& p)
const;
306 virtual Real GetIntpolReal(
const Vec3 &v)
const;
307 virtual Real GetIntpolReal(
const Vec2 &v)
const;
308 virtual Real GetIntpolReal(
const Real &d)
const;
311 virtual Complex GetIntpolComplex(
const Vec3 &v)
const;
312 virtual Complex GetIntpolComplex(
const Vec2 &v)
const;
313 virtual Complex GetIntpolComplex(
const Real &d)
const;
328 virtual void Notify()
const;
329 virtual void Notify(
const Extent& e)
const;
330 virtual void Notify(
const Point& p)
const;
411 void StateApply(ImageStateNonModVisitorBase& v)
const;
414 void StateApplyIP(ImageStateModIPVisitorBase& v);
416 ImageHandle StateApply(ImageStateModIPVisitorBase& v)
const;
418 void StateApplyIP(
const ImageStateConstModIPVisitorBase& v);
420 ImageHandle StateApply(
const ImageStateConstModIPVisitorBase& v)
const;
422 void StateApplyIP(ImageStateModOPVisitorBase& v);
424 ImageHandle StateApply(ImageStateModOPVisitorBase& v)
const;
426 void StateApplyIP(
const ImageStateConstModOPVisitorBase& v);
428 ImageHandle StateApply(
const ImageStateConstModOPVisitorBase& v)
const;
430 void StateApplyIP(ImageStateMorphVisitorBase& v);
432 ImageHandle StateApply(ImageStateMorphVisitorBase& v)
const;
526 operator const Data& ()
const {
return handle_;}
565 bool IsValid()
const;
568 long MemSize()
const;
584 Point GetSpatialOrigin()
const;
588 Vec3 GetAbsoluteOrigin()
const;
591 Vec3 IndexToCoord(
const Point &p)
const;
594 Vec3 CoordToIndex(
const Vec3& c)
const;
597 Vec3 FractionalIndexToCoord(
const Vec3 &p)
const;
610 virtual Real GetIntpolReal(
const Vec3 &v)
const;
611 virtual Real GetIntpolReal(
const Vec2 &v)
const;
612 virtual Real GetIntpolReal(
const Real &d)
const;
615 virtual Complex GetIntpolComplex(
const Vec3 &v)
const;
616 virtual Complex GetIntpolComplex(
const Vec2 &v)
const;
617 virtual Complex GetIntpolComplex(
const Real &d)
const;
630 void Notify(
const Extent& e)
const;
631 void Notify(
const Point& p)
const;
661 void StateApply(ImageStateNonModVisitorBase& v)
const;
664 ImageHandle StateApply(ImageStateModIPVisitorBase& v)
const;
667 ImageHandle StateApply(
const ImageStateConstModIPVisitorBase& v)
const;
670 ImageHandle StateApply(ImageStateModOPVisitorBase& v)
const;
673 ImageHandle StateApply(
const ImageStateConstModOPVisitorBase& v)
const;
676 ImageHandle StateApply(ImageStateMorphVisitorBase& v)
const;