General template for fiji macro