OpenStructure
ConstData Class Referenceabstract

#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
 

Protected Member Functions

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
 
void CalcIntpolWeights (Vec3 v, Real w[8], Point p[8]) 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
 
 ConstData (const ConstData &d)
 
ConstDataoperator= (const ConstData &d)
 

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() [1/2]

ConstData ( )

◆ ~ConstData()

virtual ~ConstData ( )
virtual

◆ ConstData() [2/2]

ConstData ( const ConstData d)
protected

Member Function Documentation

◆ Apply()

virtual void Apply ( NonModAlgorithm a) const
pure virtual

Algorithm interface: NonModAlgorithm.

Implemented in Data, NullData, ConstImageHandle, and ImageHandle.

◆ ApplyIP()

virtual void ApplyIP ( NonModAlgorithm a) const
pure virtual

Implemented in Data, NullData, ConstImageHandle, and ImageHandle.

◆ Attach()

virtual void Attach ( DataObserver o) const
pure virtual

DataObserver interface: attach observer.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ CalcIntpolWeights()

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

implements interpolation

◆ Detach()

virtual void Detach ( DataObserver o) const
pure virtual

DataObserver interface: detach observer.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetComplex()

virtual Complex GetComplex ( const Point p) const
pure virtual

Get explicit complex value.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetDomain()

virtual DataDomain GetDomain ( ) const
pure virtual

Return domain: SPATIAL, FREQUENCY or HALF_FREQUENCY.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetExtent()

virtual Extent GetExtent ( ) const
pure virtual

Return (logical) extent of data.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetFrequencySampling()

Vec3 GetFrequencySampling ( ) const

return frequency pixel dimensions

◆ GetIntpolComplex() [1/3]

virtual Complex GetIntpolComplex ( const Real d) const
pure virtual

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetIntpolComplex() [2/3]

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

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetIntpolComplex() [3/3]

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

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

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetIntpolReal() [1/3]

virtual Real GetIntpolReal ( const Real d) const
pure virtual

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetIntpolReal() [2/3]

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

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetIntpolReal() [3/3]

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

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

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetPixelSampling()

Vec3 GetPixelSampling ( ) const

return pixel sampling of the current domain

◆ GetReal()

virtual Real GetReal ( const Point p) const
pure virtual

Get explicit real value.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetSize()

Size GetSize ( ) const
inline

Return Size.

Convenience method

Definition at line 124 of file data.hh.

◆ GetSpatialOrigin()

virtual Point GetSpatialOrigin ( ) const
pure virtual

Retrieve spatial origin.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ GetSpatialSampling()

Vec3 GetSpatialSampling ( ) const

return spatial pixel dimensions

◆ GetType()

virtual DataType GetType ( ) const
pure virtual

Return type of data: REAL or COMPLEX.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ IsComplex()

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.

◆ IsFrequency()

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.

◆ IsReal()

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.

◆ IsSpatial()

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.

◆ NormDifference()

virtual Real NormDifference ( const ConstData d) const
virtual

◆ Notify()

virtual void Notify ( ) const
pure virtual

Notify each observer that state has changed.

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ operator=()

ConstData& operator= ( const ConstData d)
protected

◆ OverallDifference()

virtual Real OverallDifference ( const ConstData d) const
virtual

◆ Sampling() [1/2]

virtual const PixelSampling& Sampling ( ) const
protectedpure virtual

Implemented in NullData, ConstImageHandle, and ImageHandle.

◆ Sampling() [2/2]

virtual PixelSampling& Sampling ( )
protectedpure virtual

Implemented in NullData, ConstImageHandle, and ImageHandle.


The documentation for this class was generated from the following file: