Generalized generateVein method