Automatic brain tumor grading from MRI data using convolutional neural networks and quality assessment