In this article, we propose a new definition of the E 2 DT (Squared Euclidean Distance Transformation) on irregular isothetic grids such as quadtree/octree or run-length encoded d-dimensional images. We describe a new separable algorithm to compute this transformation on every grids, which is independent of the background representation. We show that our proposal is able to efficiently handle various kind of classical irregular two-dimensional grids in imagery, and that it can be easily extended to higher dimensions. 1 for j = 0 to n2 − 1 do {First stage along X} 2 if A(0, j) = 0 then B(0, j) ← 0; 3 else B(0, j) ← ∞; 4 for i = 1 to n1 − 1 do 5 if A(i, j) = 0 then B(i, j) ← 0; 6 else 7 if B(i − 1, j) = 0 then B(i, j) ← TX (i) − TX(i − 1) − HR(i − 1, j); 8 else B(i, j) ← TX (i) − TX (i − 1) + B(i − 1, j); 9 for i = n1 − 2 to 0 do 10 if B(i + 1, j) < B(i, j) then 11 if B(i + 1, j) = 0 then B(i, j) ← TX (i + 1) − TX (i) − HL(i, j);