Atiyah-Singer theorem and the projection of a non-compact space on a compact one Although this question is related to physics, its origin is purely mathematical.
Suppose the formal expression
$$
\tag 1 \text{det}(iD), \quad iD \equiv i\gamma^{\mu}D_{\mu} = \partial_{\mu} - iA_{\mu}P_{L}
$$ 
Here:


*

*$iD$ is elliptic operator called also the Dirac operator. It acts in the space of Dirac spinors realizing the $\left(\frac{1}{2}, 0\right) \oplus \left(0,\frac{1}{2}\right)$ representation of the double covering of the Lorentz group; 

*The actual manifold is the 3+1-dimensional Minkowski space, with the metric $g_{\mu\nu} = \text{diag}(1,-1,-1,-1)$; 

*$\gamma_{\mu}$ is the set of 4 Dirac gamma-matrices realizing 4-dimensional Clifford algebra;

*$\partial_{\mu} = \frac{\partial}{\partial x^{\mu}}$ is the covariant derivative

*$P_{L} = \frac{1}{2}(1 - \gamma_{5})$ is the projector on the sub-space $\left( \frac{1}{2}, 0\right)$, which is also called left chirality projector

*$A_{\mu}$ is the vector field being in adjoint representation of some gauge group ($U(1), SU(2)$ and so on), called the gauge field; it smoothly decreases to the so-called pure gauge $A_{\mu} \to g\partial_{\mu}g^{-1}$, where $g$ is the gauge transformation element;



In order to calculate $(1)$ people usually say following. 
1) Since it is elliptic, then in compact manifolds it has discrete set of eigenfunctions $\psi_{n}(x), \kappa_{n}(x)$ with corresponding eigenvalues $\lambda_{n}, \lambda_{n}^{*}$, defined by
$$
iD\psi_{n} = \lambda_{n}\psi_{n}, \quad (iD)^{\dagger}\kappa_{n} = \lambda_{n}^{*}\kappa_{n};
$$
2) The Minkowski space-time manifold is non-compact; we can also make the so-called Euclidean continuation naively defined by introducing the Euclidean coordinate $x^{E}_{0}= ix_{0}$ and work with Euclidean space $R^{4}$, whose manifold is also non-compact;
3) However, in the theory given above we can project the Euclidean space $R^{4}$ on the 5-dimensional hypersphere $S^{4}$, which is compact manifold;
4) Therefore, $(1)$ can be given as the product of eigenvalues $\lambda_{n}$, which leads to Atiyah-Singer theorem (analytical index is equal to topological index).

My question
Why can we make the projection $R^{4} \to S^{4}$ in the given theory? 
 A: I think the above $\det(iD)$ you wrote is not the Atiyah-Singer index theorem. Rather it is something related, usually referred to under the name of "regularized determinants". The idea is to regularize the determinant of a pseudo-differential operator using zeta functions by extending the case of the compact manifold. 
Now since the regularized determinants are defined by trace of pseudo-differntial operators, which is effectively an integral over $\Delta\subseteq X\times X$, the integral would not change with a 1-point compactification. So the claim then trivially follows. Of course there are other choices available (like identifying it with the upper half hemisphere, etc), but I think this is the only one making sense in your context. 
It should be pointed out that it make no sense to say Atiyah-Singer and "topological index" are involved at here. In its most naive setting, the topological index is reduced to the Euler characteristic, and it should be obvious to you that $\chi(\mathbb{R}^{4})\not=\chi(\mathbb{S}^{4})$. There is no kernel, cokernel or non-compact extension of Fedosov's formula relevant at here. 
