This is a download for a QuartzComposer Image Filter. Requires OS X 10.4~10.8 and Quartz Composer.app to view the node graph.
If you're using this to try to emulate DOF or tiltshift, tweak the settings carefully to suit your scene. Because of the liberties taken with making this work with fast performance, it can look like a bit like a bloom laying on top of the object, where the mask transition happens. Tweak the inner and outer radii and blur amount to even things out, or try using a different type of mask image.