Automated pathological imaging and detection of cancer