Field3D
Resample.h File Reference

Contains functions for resampling fields. More...

#include "DenseField.h"
#include "SparseField.h"
#include "ns.h"

Go to the source code of this file.

Classes

struct  BoxFilter
 
struct  Filter
 
struct  GaussianFilter
 
struct  MitchellFilter
 
struct  TriangleFilter
 

Namespaces

 detail
 

Functions

V3f detail::getDist (const V3i &doUpres, const V3f &srcP, const V3f &tgtP, const V3f &srcSize, const V3f &tgtSize)
 
float detail::getDist (const bool doUpres, const float &srcP, const float &tgtP, const float &srcSize, const float &tgtSize)
 
template<typename Field_T , typename FilterOp_T >
FIELD3D_NAMESPACE_OPEN bool resample (const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filter)
 Resamples the source field into the target field, such that the new data window is . More...
 
template<typename Field_T , typename FilterOp_T >
bool resample (const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filterOp)
 Resamples the source field into the target field, such that the new data window is . More...
 
template<typename Field_T , typename FilterOp_T >
void detail::separable (const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filterOp, const size_t dim)
 
template<typename Field_T , typename FilterOp_T >
bool detail::separableResample (const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filterOp)
 Resamples the source field into the target field, using separable execution, which is faster than resample(). More...
 
Box3i detail::srcSupportBBox (const V3f &tgtP, const float support, const V3i &doUpres, const V3f &srcSize, const V3f &tgtSize)
 
std::pair< int, int > detail::srcSupportBBox (const float &tgtP, const float support, const bool doUpres, const float &srcSize, const float &tgtSize)
 

Detailed Description

Contains functions for resampling fields.

Definition in file Resample.h.

Function Documentation

template<typename Field_T , typename FilterOp_T >
FIELD3D_NAMESPACE_OPEN bool resample ( const Field_T &  src,
Field_T &  tgt,
const V3i newRes,
const FilterOp_T &  filter 
)

Resamples the source field into the target field, such that the new data window is .

Note
This will query filter.isSeparable() and call separableResample() if possible.
The extents of the field will be reset to match the data window. This should

Definition at line 384 of file Resample.h.

References FIELD3D_NAMESPACE_HEADER_CLOSE, and detail::separableResample().

386 {
387  return detail::separableResample(src, tgt, newRes, filterOp);
388 }
bool separableResample(const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filterOp)
Resamples the source field into the target field, using separable execution, which is faster than res...
Definition: Resample.h:335
template<typename Field_T , typename FilterOp_T >
bool resample ( const Field_T &  src,
Field_T &  tgt,
const V3i newRes,
const FilterOp_T &  filter 
)

Resamples the source field into the target field, such that the new data window is .

Note
This will query filter.isSeparable() and call separableResample() if possible.
The extents of the field will be reset to match the data window. This should

Definition at line 384 of file Resample.h.

References FIELD3D_NAMESPACE_HEADER_CLOSE, and detail::separableResample().

386 {
387  return detail::separableResample(src, tgt, newRes, filterOp);
388 }
bool separableResample(const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filterOp)
Resamples the source field into the target field, using separable execution, which is faster than res...
Definition: Resample.h:335