In filtering terminology, this can be thought of as "image restoration", i.e. the restoration of an image to its condition before the addition of "noise". In this case, the noise was an intentional blurring or smearing of the image pixels by twirling. It appears that the particular Photoshop filter in question did not alter the pixel values (at least significantly but possibly not at all). Instead, it simply moved the pixels' locations.
To reverse the effect required figuring out where the correct pixel locations should be. In general, this process is known as image deconvolution. Deconvolution can be done completely blind (where the filtering algorithm is operating "in the dark" and has to estimate the pixel relocation parameters automatically) but works best when there is a priori information (i.e. where helpful information is known "prior" to the filtering).
Image deconvolution has been used in astronomy for some years now to reverse the effects of smearing by Earth's atmosphere and motion of the telescope optics, which make the images of the deep space and other objects appear less sharp. In the last eight years or so, deconvolution to deblur images suffering from focus and motion blur has been taken up by the image forensics community, thanks in part to my own efforts (Aside: I hope I don't break my arm off patting myself on the back).
In this case, the Photoshop filter is well known and available, and therefore, once the particular filter was identified, it made it possible to identify how it behaved in order to help in the deconvolution (as a priori information). Very elegant image forensic work indeed.