169 float depth = thrust::get<0> (t);
170 int idx = thrust::get<1> (t);
172 int nr = (int) dhel.x;
173 float min_d = dhel.y;
174 float max_d = dhel.z;
176 if (depth == 0 | isnan(depth) | isinf(depth))
179 if (depth == 0 | std::isnan(depth) | std::isinf(depth))
186 int4 bounds = make_int4 (
194 bounds.x = clamp (bounds.x, 0,
width_-1);
195 bounds.y = clamp (bounds.y, 0,
width_-1);
196 bounds.z = clamp (bounds.z, 0,
height_-1);
197 bounds.w = clamp (bounds.w, 0,
height_-1);
200 for (
int y = bounds.z; y <= bounds.w; ++y)
202 for (
int x = bounds.x; x <= bounds.y; ++x)
205 int otherIdx = ((int)y) *
width_ + ((int)x);
206 depth +=
data_[otherIdx];
210 return clamp (depth / nr, min_d, max_d);