19 -1, -1, -1, 5, 0, -1, -1, 4, 1, -1, -1, 5, -1, 0, -1, 4, 0, 0, -1,
20 3, 1, 0, -1, 4, -1, 1, -1, 5, 0, 1, -1, 4, 1, 1, -1, 5, -1, -1,
21 0, 4, 0, -1, 0, 3, 1, -1, 0, 4, -1, 0, 0, 3, 0, 0, 0, 0};
25 0, 0, 0, 0, 1, 0, 0, 3, -1, 1, 0, 4, 0, 1, 0, 3, 1, 1, 0,
26 4, -1, -1, 1, 5, 0, -1, 1, 4, 1, -1, 1, 5, -1, 0, 1, 4, 0, 0,
27 1, 3, 1, 0, 1, 4, -1, 1, 1, 5, 0, 1, 1, 4, 1, 1, 1, 5};
31 -1, -1, -1, 1, 0, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, 1, 0, 0, -1,
32 1, 1, 0, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1,
33 0, 1, 0, -1, 0, 1, 1, -1, 0, 1, -1, 0, 0, 1, 0, 0, 0, 0};
37 0, 0, 0, 0, 1, 0, 0, 1, -1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0,
38 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 0, 0,
39 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1};
119 const signed char* fwNeighbours =
nullptr;
120 const signed char* bwNeighbours =
nullptr;
157 int neighborShift[14];
159 for (
unsigned char v = 0; v < 14; ++v) {
160 const signed char* fwNeighbour = fwNeighbours + 4 * v;
161 neighborShift[v] =
static_cast<int>(fwNeighbour[0]) +
162 static_cast<int>(fwNeighbour[1]) *
164 static_cast<int>(fwNeighbour[2]) *
173 _grid[neighborShift[0]] +
176 for (
unsigned char v = 1; v < 14; ++v) {
177 const signed char* fwNeighbour = fwNeighbours + 4 * v;
179 _grid[neighborShift[v]] +
181 minVal =
std::min(minVal, neighborVal);
188 if (progressCb && !normProgress.
oneStep()) {
201 int neighborShift[14];
203 for (
unsigned char v = 0; v < 14; ++v) {
204 const signed char* bwNeighbour = bwNeighbours + 4 * v;
205 neighborShift[v] =
static_cast<int>(bwNeighbour[0]) +
206 static_cast<int>(bwNeighbour[1]) *
208 static_cast<int>(bwNeighbour[2]) *
222 _grid[neighborShift[0]] +
225 for (
unsigned char v = 1; v < 14; ++v) {
226 const signed char* bwNeighbour = bwNeighbours + 4 * v;
228 _grid[neighborShift[v]] +
230 minVal =
std::min(minVal, neighborVal);
236 if (minVal > maxDist) {
242 if (progressCb && !normProgress.
oneStep()) {
251 return static_cast<int>(maxDist);
CHAMFER_DISTANCE_TYPE
Chamfer distances types.
virtual void setInfo(const char *infoStr)=0
Notifies some information about the ongoing process.
virtual void setMethodTitle(const char *methodTitle)=0
Notifies the algorithm title.
virtual bool textCanBeEdited() const
Returns whether the dialog title and info can be updated or not.
virtual void update(float percent)=0
Notifies the algorithm progress.
int64_t pos2index(int i, int j, int k) const
Converts a 3D position to an absolute index.
int64_t m_rowSize
1D row size (with margin)
Tuple3ui m_innerSize
Dimensions of the grid (without margin)
unsigned short GridElement
Cell type.
int64_t m_sliceSize
2D slice size (with margin)
std::vector< GridElement > m_grid
Grid data.
bool oneStep()
Increments total progress value of a single unit.
Generic file read and write utility for python interface.