Fractal dimension of spatially extended systems