A method and apparatus are disclosed for an image preprocessing device that automatically detects chestwall laterality removes border artifacts and segments breast tissue and pectoral muscle from digital mammograms. The algorithms in the preprocessing device utilize the computer cache, a vertical Sobel filter and a probabilistic Hough transform to detect curved edges. The preprocessing result, along with a pseudo-modality normalized image, can be used as input to a CAD (computer-aided detection) server or to a mammography image review workstation. In the case of workstation input, the preprocessing results improve the protocol for chestwall-to-chestwall image hanging, and support optimal image contrast display of each segmented region.