1 #ifndef array2dresample_h 2 #define array2dresample_h 29 template <
class T,
class TT>
41 TT* to,
int sz0,
int sz1,
bool fromhasudfs,
60 inline void set(
const Array2D<T>& from, TT*
to,
int sz0,
int sz1,
67 int sz0,
int sz1,
bool fromhasudfs,
73 inline od_int64 nrIterations()
const;
80 {
return tr(
"Data columns resampled"); }
97 template <
class T,
class TT>
inline 102 {
set( from,
to, fromhasudfs, rectinfrom ); }
105 template <
class T,
class TT>
inline 107 TT*
to,
int sz0,
int sz1,
bool fromhasudfs,
110 {
set( from,
to, sz0, sz1, fromhasudfs, rectinfrom ); }
113 template <
class T,
class TT>
inline 118 {
set( from,
to, sz0, sz1, fromhasudfs, rectinfrom ); }
121 #define mUpdateResampler \ 123 func_.set( from, fromhasudfs ); \ 124 updateScale( rectinfromptr ) 126 template <
class T,
class TT>
inline 156 template <
class T,
class TT>
inline 158 int sz0,
int sz1,
bool fromhasudfs,
172 template <
class T,
class TT>
inline 174 int sz0,
int sz1,
bool fromhasudfs,
196 template <
class T,
class TT>
inline 211 if ( rectinfrom.
contains( nrect, 1e-3 ) )
223 template <
class T,
class TT>
inline 231 template <
class T,
class TT>
inline 238 for (
int idx=
mCast(
int,start); idx<=stop; idx++ )
241 for (
int idy=0; idy<ysize; idy++ )
256 to_->
set( idx, idy , val );
261 if ( localnrdone>100 )
275 #undef mUpdateResampler T step
Definition: samplingdata.h:50
bool interpolate_
Definition: array2dresample.h:90
T width() const
Definition: geometry.h:554
T left() const
Definition: geometry.h:564
T to(const F &fr)
Definition: convert.h:33
RT getValue(PT, PT) const
Definition: array2dfunc.h:50
SamplingData< float > ysampling_
Definition: array2dresample.h:89
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: array2dresample.h:79
const ValueSeries< T > * getStorage() const
Definition: arraynd.h:46
#define mCast(tp, v)
Definition: commondefs.h:124
mODTextTranslationClass(Array2DReSampler) public Array2DReSampler(const Array2D< T > &from, TT *to, int sz0, int sz1, bool fromhasudfs, const Geom::PosRectangle< float > *rectinfrom=0)
Definition: array2dresample.h:106
void sortCorners(bool leftislow=true, bool topislow=true)
Definition: geometry.h:614
#define od_int64
Definition: plftypes.h:36
#define mUpdateResampler
Definition: array2dresample.h:121
void updateScale(const Geom::PosRectangle< float > *)
Definition: array2dresample.h:197
Definition: uistring.h:89
virtual void set(int, int, T)=0
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
bool contains(const Point2D< T > &p, T eps) const
Definition: geometry.h:238
T atIndex(IT) const
Definition: samplingdata.h:158
T height() const
Definition: geometry.h:559
#define mNINT32(x)
Definition: commondefs.h:45
const T * getData() const
Definition: arraynd.h:55
#define mYDim
Definition: array2dresample.h:94
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
void set(const Array2D< T > &from, Array2D< TT > &to, bool fromhasudfs, const Geom::PosRectangle< float > *rectinfrom=0)
Definition: array2dresample.h:127
T start
Definition: samplingdata.h:49
Fills an Array2D from another Array2D of another size. Usage:
Definition: array2dresample.h:30
void setInterpolate(bool yn)
Definition: array2dresample.h:74
#define mXDim
Definition: array2dresample.h:93
virtual void setValue(int64_t, T)
Definition: valseries.h:45
Array2D< TT > * to_
Definition: array2dresample.h:83
TT * toptr_
Definition: array2dresample.h:85
virtual bool setSize(int dim, int nsz)
Implementation of Array2DInfo.
Definition: arrayndinfo.h:166
bool doWork(od_int64, od_int64, int)
Definition: array2dresample.h:232
virtual int getSize(int dim) const
Definition: arrayndinfo.h:252
Array2DFunc< TT, float, T > func_
Definition: array2dresample.h:87
#define mClass(module)
Definition: commondefs.h:164
virtual const Array2DInfo & info() const =0
void addToNrDone(int64_t increment)
virtual T * arr()
Definition: valseries.h:55
od_int64 nrIterations() const
Definition: array2dresample.h:224
ValueSeries< TT > * tovs_
Definition: array2dresample.h:86
Floating-point rectangle class.
Definition: geometry.h:225
const Array2D< T > * from_
Definition: array2dresample.h:82
SamplingData< float > xsampling_
Definition: array2dresample.h:88
Array2DInfoImpl toinfo_
Definition: array2dresample.h:84