Public Member Functions | Private Member Functions | Private Attributes

Array2DReSampler< T, TT > Class Template Reference

Inheritance diagram for Array2DReSampler< T, TT >:
ParallelTask Task NamedObject CallBacker

List of all members.

Public Member Functions

 Array2DReSampler (const Array2D< T > &from, Array2D< TT > &to, bool fromhasudfs, const Geom::PosRectangle< float > *rectinfrom=0)
 Array2DReSampler (const Array2D< T > &from, TT *to, int sz0, int sz1, bool fromhasudfs, const Geom::PosRectangle< float > *rectinfrom=0)
void set (const Array2D< T > &from, Array2D< TT > &to, bool fromhasudfs, const Geom::PosRectangle< float > *rectinfrom=0)
void set (const Array2D< T > &from, TT *to, int sz0, int sz1, bool fromhasudfs, const Geom::PosRectangle< float > *rectinfrom=0)
od_int64 nrIterations () const
void setInterpolate (bool yn)

Private Member Functions

void updateScale (const Geom::PosRectangle< float > *)
bool doWork (od_int64, od_int64, int)

Private Attributes

const Array2D< T > * from_
Array2D< TT > * to_
Array2DInfoImpl toinfo_
TT * toptr_
Array2DFunc< TT, float, T > func_
SamplingData< float > xsampling_
SamplingData< float > ysampling_
bool interpolate_

Detailed Description

template<class T, class TT>
class Array2DReSampler< T, TT >

Fills an Array2D from another Array2D of another size. Usage: 1. Create 2. call execute(); 3. (optional) call set with new arrays, and call execute() again.


Constructor & Destructor Documentation

template<class T , class TT >
Array2DReSampler< T, TT >::Array2DReSampler ( const Array2D< T > &  from,
Array2D< TT > &  to,
bool  fromhasudfs,
const Geom::PosRectangle< float > *  rectinfrom = 0 
) [inline]
Parameters:
rectinfrom specifies a part of from that should serve as source. If ommitted, the entire from array is used.
template<class T , class TT >
Array2DReSampler< T, TT >::Array2DReSampler ( const Array2D< T > &  from,
TT *  to,
int  sz0,
int  sz1,
bool  fromhasudfs,
const Geom::PosRectangle< float > *  rectinfrom = 0 
) [inline]
Parameters:
rectinfrom specifies a part of from that should serve as source. If ommitted, the entire from array is used.

Member Function Documentation

template<class T , class TT >
bool Array2DReSampler< T, TT >::doWork ( od_int64  start,
od_int64  stop,
int   
) [inline, private]
template<class T , class TT >
od_int64 Array2DReSampler< T, TT >::nrIterations (  )  const [inline, virtual]

Implements ParallelTask.

template<class T , class TT >
void Array2DReSampler< T, TT >::set ( const Array2D< T > &  from,
TT *  to,
int  sz0,
int  sz1,
bool  fromhasudfs,
const Geom::PosRectangle< float > *  rectinfrom = 0 
) [inline]
Parameters:
rectinfrom specifies a part of from that should serve as source. If ommitted, the entire from array is used.
template<class T , class TT >
void Array2DReSampler< T, TT >::set ( const Array2D< T > &  from,
Array2D< TT > &  to,
bool  fromhasudfs,
const Geom::PosRectangle< float > *  rectinfrom = 0 
) [inline]
Parameters:
rectinfrom specifies a part of from that should serve as source. If ommitted, the entire from array is used.
template<class T , class TT >
void Array2DReSampler< T, TT >::setInterpolate ( bool  yn  )  [inline]
template<class T , class TT >
void Array2DReSampler< T, TT >::updateScale ( const Geom::PosRectangle< float > *  rectinfromptr  )  [inline, private]

Member Data Documentation

template<class T , class TT >
const Array2D<T>* Array2DReSampler< T, TT >::from_ [private]
template<class T , class TT >
Array2DFunc<TT,float,T> Array2DReSampler< T, TT >::func_ [private]
template<class T , class TT >
bool Array2DReSampler< T, TT >::interpolate_ [private]
template<class T , class TT >
Array2D<TT>* Array2DReSampler< T, TT >::to_ [private]
template<class T , class TT >
Array2DInfoImpl Array2DReSampler< T, TT >::toinfo_ [private]
template<class T , class TT >
TT* Array2DReSampler< T, TT >::toptr_ [private]
template<class T , class TT >
SamplingData<float> Array2DReSampler< T, TT >::xsampling_ [private]
template<class T , class TT >
SamplingData<float> Array2DReSampler< T, TT >::ysampling_ [private]