Calculating the Dimensionality of the Brain, and Other Applications of an Optimized Generalized Ising Model in Predicting Brain's Spontaneous Functions