Fractal geometry can be used to analyze shape and patterns in brain images. With this study we use fractals to analyze T1 data of patients affected by schizophrenia or bipolar disorder, with the aim of distinguishing between healthy and pathological brains using the complexity of brain structure, in particular of grey matter, as a marker of disease. 39 healthy volunteers, 25 subjects affected by schizophrenia and 11 patients affected by bipolar disorder underwent an MRI session. We evaluated fractal dimension of the brain cortex and its substructures, calculated with an algorithm based on the box-count algorithm. We modified this algorithm, with the aim of avoiding the segmentation processing step and using all the information stored in the image grey levels. Moreover, to increase sensitivity to local structural changes, we computed a value of fractal dimension for each slice of the brain or of the particular structure. To have reference values in comparing healthy subjects with patients, we built a template by averaging fractal dimension values of the healthy volunteers data. Standard deviation was evaluated and used to create a confidence interval. We also performed a slice by slice t-test to assess the difference at slice level between the three groups. Consistent average fractal dimension values were found across all the structures in healthy controls, while in the pathological groups we found consistent differences, indicating a change in brain and structures complexity induced by these disorders.