ConstData Class Reference

Abstract base class for read-only data. More...

#include <data.hh>

Inherited by ConstImageHandle, and Data.

Public Member Functions

Initialization and Deconstruction



 ConstData ()
virtual ~ConstData ()
Properties



virtual DataType GetType () const =0
virtual DataDomain GetDomain () const =0
bool IsSpatial () const
bool IsFrequency () const
bool IsReal () const
bool IsComplex () const
virtual Extent GetExtent () const =0
virtual Point GetSpatialOrigin () const =0
Size GetSize () const
Value retrieval

The pure virtual methods GetReal() and GetComplex() form the basis for the interpolation and normalization methods.



virtual Real GetReal (const Point &p) const =0
virtual Complex GetComplex (const Point &p) const =0
virtual Real GetIntpolReal (const Vec3 &v) const =0
virtual Real GetIntpolReal (const Vec2 &v) const =0
virtual Real GetIntpolReal (const Real &d) const =0
virtual Complex GetIntpolComplex (const Vec3 &v) const =0
virtual Complex GetIntpolComplex (const Vec2 &v) const =0
virtual Complex GetIntpolComplex (const Real &d) const =0
Algorithm interface

On the level of Data, only NonModAlgorithms may be applied



virtual void Apply (NonModAlgorithm &a) const =0
virtual void ApplyIP (NonModAlgorithm &a) const =0
Observer interface



virtual void Attach (DataObserver *o) const =0
virtual void Detach (DataObserver *o) const =0
virtual void Notify () const =0
Misc

should really be located somewhere else...



virtual Real OverallDifference (const ConstData &d) const
virtual Real NormDifference (const ConstData &d) const
Sampling interface

The pixel sampling depends on the current domain (SPATIAL or FREQUENCY ) and may change, e.g. after a fourier-transform. Domain-independent access to the sampling is provided by the Set/GetSpatialSampling methods. The IndexToCoord() and CoordToIndex() methods can be used for conversion between pixel values and coordinates; they honour the current domain.



Vec3 GetPixelSampling () const
Vec3 GetSpatialSampling () const
Vec3 GetFrequencySampling () const

Protected Member Functions

 ConstData (const ConstData &d)
ConstDataoperator= (const ConstData &d)
void CalcIntpolWeights (Vec3 v, Real w[8], Point p[8]) const
Sampling implementation

A reference to a PixelSampling instance must be provided by subclasses in order for the sampling interface to work.



virtual PixelSamplingSampling ()=0
virtual const PixelSamplingSampling () const =0

Detailed Description

Abstract base class for read-only data.

This class represents the abstract concept of a read-only (const) data source which allows:

In addition, a meta-info (InfoHandle) is associated with this data

Definition at line 70 of file data.hh.


Constructor & Destructor Documentation

ConstData (  ) 
virtual ~ConstData (  )  [virtual]
ConstData ( const ConstData d  )  [protected]

Member Function Documentation

virtual void Apply ( NonModAlgorithm a  )  const [pure virtual]

Algorithm interface: NonModAlgorithm.

Implemented in Data, ImageHandle, ConstImageHandle, and NullData.

virtual void ApplyIP ( NonModAlgorithm a  )  const [pure virtual]

Implemented in Data, ImageHandle, ConstImageHandle, and NullData.

virtual void Attach ( DataObserver o  )  const [pure virtual]

DataObserver interface: attach observer.

Implemented in ImageHandle, ConstImageHandle, and NullData.

void CalcIntpolWeights ( Vec3  v,
Real  w[8],
Point  p[8] 
) const [protected]

implements interpolation

virtual void Detach ( DataObserver o  )  const [pure virtual]

DataObserver interface: detach observer.

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Complex GetComplex ( const Point p  )  const [pure virtual]

Get explicit complex value.

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual DataDomain GetDomain (  )  const [pure virtual]

Return domain: SPATIAL, FREQUENCY or HALF_FREQUENCY.

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Extent GetExtent (  )  const [pure virtual]

Return (logical) extent of data.

Implemented in ImageHandle, ConstImageHandle, and NullData.

Vec3 GetFrequencySampling (  )  const

return frequency pixel dimensions

virtual Complex GetIntpolComplex ( const Real d  )  const [pure virtual]

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Complex GetIntpolComplex ( const Vec2 &  v  )  const [pure virtual]

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Complex GetIntpolComplex ( const Vec3 &  v  )  const [pure virtual]

Get interpolated complex value from 3D,2D or 1D vec.

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Real GetIntpolReal ( const Real d  )  const [pure virtual]

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Real GetIntpolReal ( const Vec2 &  v  )  const [pure virtual]

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual Real GetIntpolReal ( const Vec3 &  v  )  const [pure virtual]

Get interpolated real value from 3D,2D or 1D vec.

Implemented in ImageHandle, ConstImageHandle, and NullData.

Vec3 GetPixelSampling (  )  const

return pixel sampling of the current domain

virtual Real GetReal ( const Point p  )  const [pure virtual]

Get explicit real value.

Implemented in ImageHandle, ConstImageHandle, and NullData.

Size GetSize (  )  const [inline]

Return Size.

Convenience method

Definition at line 124 of file data.hh.

virtual Point GetSpatialOrigin (  )  const [pure virtual]

Retrieve spatial origin.

Implemented in ImageHandle, ConstImageHandle, and NullData.

Vec3 GetSpatialSampling (  )  const

return spatial pixel dimensions

virtual DataType GetType (  )  const [pure virtual]

Return type of data: REAL or COMPLEX.

Implemented in ImageHandle, ConstImageHandle, and NullData.

bool IsComplex (  )  const [inline]

Returns true if data is currently of complex type.

Convenience wrapper around GetType()

Definition at line 112 of file data.hh.

bool IsFrequency (  )  const [inline]

Returns true if data is currently in frequency domain.

Convenience wrapper around GetDomain()

Definition at line 98 of file data.hh.

bool IsReal (  )  const [inline]

Returns true if data is currently of real type.

Convenience wrapper around GetType()

Definition at line 106 of file data.hh.

bool IsSpatial (  )  const [inline]

Returns true if data is currently in spatial domain.

Convenience wrapper around GetDomain()

Definition at line 92 of file data.hh.

virtual Real NormDifference ( const ConstData d  )  const [virtual]
virtual void Notify (  )  const [pure virtual]

Notify each observer that state has changed.

Implemented in ImageHandle, ConstImageHandle, and NullData.

ConstData& operator= ( const ConstData d  )  [protected]

Reimplemented in Data, ImageHandle, and ConstImageHandle.

virtual Real OverallDifference ( const ConstData d  )  const [virtual]
virtual const PixelSampling& Sampling (  )  const [protected, pure virtual]

Implemented in ImageHandle, ConstImageHandle, and NullData.

virtual PixelSampling& Sampling (  )  [protected, pure virtual]

Implemented in ImageHandle, ConstImageHandle, and NullData.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 6 Dec 2017 for OpenStructure by  doxygen 1.6.1