  Defects which appear in heterostructure junctions involving topological
insulators are sources of gapless modes governing the low energy properties of
the systems, as recently elucidated by Teo and Kane [Physical Review B82,
115120 (2010)]. A standard approach for the calculation of topological
invariants associated with defects is to deal with the spatial inhomogeneity
raised by defects within a semiclassical approximation. In this paper, we
propose a full quantum formulation for the topological invariants
characterizing line defects in three-dimensional insulators with no symmetry by
using the Green's function method. On the basis of the full quantum treatment,
we demonstrate the existence of a nontrivial topological invariant in the
topological insulator-ferromagnet tri-junction systems, for which a
semiclassical approximation fails to describe the topological phase. Also, our
approach enables us to study effects of electron-electron interactions and
impurity scattering on topological insulators with spatial inhomogeneity which
gives rise to the Axion electrodynamics responses.
