70 template <
typename PixelType>
72 PixelType foreColor, PixelType backColor);
76 static void DrawLine(
int x0,
int y0,
int z0,
int x1,
int y1,
int z1,
77 std::function<
void(
int,
int,
int)>
const& callback);
81 static void Dilate(
int numNeighbors, std::array<int, 3>
const* delta,
85 static void GetComponents(
int numNeighbors,
int const* delta,
90 template <
typename PixelType>
92 int z, PixelType foreColor, PixelType backColor)
107 std::vector<int> xStack(numVoxels), yStack(numVoxels), zStack(numVoxels);
125 image(x, y, z) = foreColor;
128 if (xp1 < dim0 &&
image(xp1, y, z) == backColor)
139 if (0 <= xm1 &&
image(xm1, y, z) == backColor)
150 if (yp1 < dim1 &&
image(x, yp1, z) == backColor)
161 if (0 <= ym1 &&
image(x, ym1, z) == backColor)
172 if (zp1 < dim2 &&
image(x, y, zp1) == backColor)
183 if (0 <= zm1 &&
image(x, y, zm1) == backColor)
int GetDimension(int d) const
GLenum GLenum GLsizei void * image
size_t GetNumPixels() const
static void FloodFill6(Image3< PixelType > &image, int x, int y, int z, PixelType foreColor, PixelType backColor)
GLdouble GLdouble GLdouble z
GLuint GLfloat GLfloat GLfloat x1
GLenum GLenum GLuint components
GLuint GLfloat GLfloat y0
GLdouble GLdouble GLdouble GLdouble top