21 #ifndef reg3d_deformer_hh 22 #define reg3d_deformer_hh 25 #include <tbb/parallel_for.h> 26 #include <tbb/blocked_range.h> 60 std::unique_ptr<T3DConvoluteInterpolator<T> > interp(m_ipfac.
create(image.
data()));
61 const auto& rinterp = *interp;
63 auto callback = [
this, &rinterp, &result](
const tbb::blocked_range<size_t>& range){
65 CWeightCache cache = rinterp.create_cache();
66 for (
auto z = range.begin(); z != range.end();++z) {
69 for (
size_t y = 0; y < result.
get_size().
y; ++y)
70 for (
size_t x = 0; x < result.
get_size().
x; ++x, ++r, ++v)
71 *r = rinterp(
C3DFVector(x - v->x, y - v->y, z - v->z), cache);
74 tbb::parallel_for(tbb::blocked_range<size_t>(0, result.
get_size().
z, 1), callback);
const T3DDatafield< T > & data() const
read only access to the underlying data
Specific type of the 3D images that hold real pixel data.
C3DImage::Pointer P3DImage
define a shortcut to the 3D image shared pointer.
a 3D field of floating point single accuracy 3D vectors
const_iterator begin_at(size_t x, size_t y, size_t z) const
base class for all filer type functors.
virtual const C3DBounds & get_size() const
T3DVector< float > C3DFVector
A float 3D Vector.
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
This class is used to handle syncronizized output of logging output in a multi-threaded environment...
T3DConvoluteInterpolator< T > * create(const T3DDatafield< T > &src) const __attribute__((warn_unused_result))
const C3DBounds & get_size() const
const_iterator begin_at(size_t x, size_t y, size_t z) const
constant iterator starting at the given location
A factory to create interpolators of a given type by providing input data.
#define NS_MIA_END
conveniance define to end the mia namespace