NLTE radiative transfer in plane-parallel and spherical geometry