Definition at line 211 of file MIPUtil.h.
216 typedef typename Field_T::value_type Data_T;
223 const float tgtToSrcMult = 2.0;
224 const float filterCoordMult = 1.0f / (tgtToSrcMult);
232 boost::mutex::scoped_lock lock(
m_mutex);
243 for (
int k = box.min.z; k <= box.max.z; ++k) {
244 for (
int j = box.min.y; j <= box.max.y; ++j) {
245 for (
int i = box.min.x; i <= box.max.x; ++i) {
246 Value_T accumValue(
m_filterOp.initialValue());
249 const int curTgt =
V3i(i, j, k)[
m_dim];
253 static_cast<int>(
std::floor(curSrc - support * tgtToSrcMult));
255 static_cast<int>(
std::ceil(curSrc + support *
261 for (
int s = startSrc; s <= endSrc; ++s) {
263 const int xIdx =
m_dim == 0 ? s : i;
264 const int yIdx =
m_dim == 1 ? s : j;
265 const int zIdx =
m_dim == 2 ? s : k;
269 const float weight =
m_filterOp.eval(std::abs(srcP - curSrc) *
272 const Value_T value =
m_src.fastValue(xIdx, yIdx, zIdx);
275 FilterOp_T::op(accumValue, value);
280 static_cast<Value_T>(
m_filterOp.initialValue())) {
281 m_tgt.fastLValue(i, j, k) = accumValue;
284 float accumWeight = 0.0f;
286 const int curTgt =
V3i(i, j, k)[
m_dim];
290 static_cast<int>(
std::floor(curSrc - support * tgtToSrcMult));
292 static_cast<int>(
std::ceil(curSrc + support *
298 for (
int s = startSrc; s <= endSrc; ++s) {
300 const int xIdx =
m_dim == 0 ? s : i;
301 const int yIdx =
m_dim == 1 ? s : j;
302 const int zIdx =
m_dim == 2 ? s : k;
306 const float weight =
m_filterOp.eval(std::abs(srcP - curSrc) *
309 const Value_T value =
m_src.fastValue(xIdx, yIdx, zIdx);
311 accumWeight += weight;
312 accumValue += value * weight;
315 if (accumWeight > 0.0f &&
316 accumValue != static_cast<Value_T>(0.0)) {
317 m_tgt.fastLValue(i, j, k) = accumValue / accumWeight;
326 boost::mutex::scoped_lock lock(
m_mutex);
References detail::ceil(), detail::checkInputEmpty(), discToCont(), detail::floor(), detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_add, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_blocks, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_dim, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_filterOp, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_mutex, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_nextIdx, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_numBlocks, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_src, detail::MIPSeparableThreadOp< Field_T, FilterOp_T, IsAnalytic_T >::m_tgt, detail::max(), and detail::min().