Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting data from Digital Database for Screening Mammography (DDSM)

Tags:

matlab

I am trying to get the DDSM dataset in a readable format.

Does anyone have a working version of DDSM’s heathusf program that works on linux or windows with normalization? I know there is a working version of DDSM's jpeg program for linux at http://www.cs.unibo.it/~roffilli/sw.html I compiled and tested it. I used the MATLAB code as described here to view the images. It displays correctly only for some scanners.

As described in the paper http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.111.3846 when properly compiled, the DDSM software outputs the image data as a stream of raw bytes; one then has to normalise these according to the model of digitiser used to image the original films and then create an image file that is readable by one’s image analysis software environment. Does anyone have a solution for normalizing the image data?

Any help is greatly appreciated. Thank You!

Cheng

like image 328
Cheng Avatar asked Nov 13 '12 17:11

Cheng


People also ask

What is digital screening mammography?

Full field digital mammography (FFDM, also known simply as "digital mammography") is a mammography system where the x-ray film used in screen-film mammography is replaced by solid-state detectors, similar to those found in digital cameras, which convert x-rays into electrical signals.

Is 3-D mammography the same as digital?

3-D mammography takes multiple images, or X-rays, of breast tissue to recreate a 3-D picture of the breast. It's different from digital mammography in that digital mammography obtains just a single image. Images from both technologies are read on a computer.

What is the difference between digital and diagnostic mammogram?

There are two kinds of mammograms: digital and conventional. Both use X-ray radiation to produce an image of the breast, but conventional mammograms are read and stored on film, where digital mammograms are read and stored in a computer so the data can be enhanced, magnified, or manipulated for further evaluation.


2 Answers

DDSM images are compressed in .LJPEG format and they need to be decompressed first before processing them.

I've figured out a way to convert DDSM images into raw images, but it is a long way, and I don't have a better way.

  • Reading DDSM dataset images in steps:

    1. Clone the repository at https://github.com/multinormal/ddsm, which contain two executables [ jpeg.exe and ddsmraw2pnm.exe ].

2- Download and install cygwin.

3- Download and setup Matlab pnmreader code.

4- Create a folder and make its contents like the following:

  • jpeg.exe
  • ddsmraw2pnm.exe
  • ConvertDDSMImageToRaw.m [ implementation comes later in answer ]
  • cygwin1.dll [ from "C:\cygwin" or anwhere else where you've installed cygwin ]

5- the ConvertDDSMImageToRaw function implementation.

function ConvertDDSMImageToRaw(filename, columns, rows, digitizer)
%// ConvertDDSMImageToRaw Convert an image of ddsm database to raw image.
%// -------------------------------------------------------------------------
%// Input:-
%//  o filename : String representing ddsm image file name.
%//  o columns  : Double representing number of columns in the image.
%//  o rows     : Double representing number of rows in the image.
%//  o digitizer: String representing image normalization function name,
%//     which differ from one case to another and have the set of 
%//    values ['dba', 'howtek-mgh', 'howtek-ismd' and 'lumisys' ]
%// -------------------------------------------------------------------------
%// Prepare and execute command of image decompression
commandDecompression = [which('jpeg.exe') ' -d -s ' filename];
dos(commandDecompression);
%// -------------------------------------------------------------------------
%// Prepare and execute command that convert the decompressed image to pnm format.
rawFileName          = [ filename '.1'];
columns              = num2str(columns);
rows                 = num2str(rows);
digitizer            = ['"' digitizer '"'];
commandConversion    =[ which('pnm.exe') ,' ',rawFileName,' ',columns,' ',rows,' ',digitizer];
dos(commandConversion);
%// -------------------------------------------------------------------------
%// Wrtie the image into raw format
pnmFileName          = [rawFileName '-ddsmraw2pnm.pnm'];
image                = pnmread(pnmFileName);
imwrite(image,[filename '.raw']);
end

6- get the image information [cols,rows,digitizer] from the .ics file:

.ics file example

if the digitizer is 'howtek' use it as 'howtek-mgh', that's what I've figured out.

7- convert you image now using the function we've impelemented, like the following:

filename  = 'A_1709_1.LEFT_CC.LJPEG';
digitizer = 'howtek-mgh';       
imageSize = [ 5341  2806 ];
ConvertDDSMImageToRaw(filename, imageSize(1) , imageSize(2), digitizer);
like image 178
Sameh K. Mohamed Avatar answered Nov 03 '22 00:11

Sameh K. Mohamed


I found a complete solution that downloads, normalizes (based on the scanner) and converts the DDSM image to PNG format. Dr. Chris Rose wrote that program, and it is available on GitHub at https://github.com/multinormal/ddsm

like image 26
Cheng Avatar answered Nov 03 '22 01:11

Cheng