Well, in fact image.smooth() this code are slightly different. image.smooth() processes each image independently, whereas this code concatenates all 3D images. Using image.smooth() would require adding a concat_niimgs() somewhere, which would be kind of awkward (lots of conversion between different formats). I think I'll let things like this for the moment, time to think of a cleaner solution.