thresholdPlugin: threshold only when needed, affineTransform: save settings, guidelines fix