Sweep all pixels at 0 or 1 neighbours, whether damaged or not. Intended to handled output of Smooth, might be nice to cut down on the counting somehow though.
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}