Mammography Dataset

571 views
Skip to first unread message

Praful Agrawal

unread,
Jan 3, 2012, 3:26:33 AM1/3/12
to Mammographic Image Analysis Research Community
Hi all,

I have downloaded DDSM database, but the decompressed images have a
lot of noise in it. I am new to this area. Please help me.

Thanks and Regards,
Praful

Mehul Sampat

unread,
Jan 3, 2012, 3:47:49 AM1/3/12
to mammo...@googlegroups.com, pra...@iiitd.ac.in
Hi Praful,

The uncompressed images should not have a lot of noise. Most likely it could be
a big endian vs. little endian issue. (I believe you need to read it in as big-endian)
here is a snippet of matlab code to read the *.1 file. (you can change it to c if needed)
-------------------------------------------
fid = fopen(fid,'r','ieee-be');
image = fread(fid,[COLS ROWS],'short');
image = image';
image = uint16(image);
-------------------------------------------
where COLS,ROWS is the number of columns/rows in the image; get this info from *.ics file.
Please let the group know if this works for you.
Good luck
Mehul

--
You received this message because you are subscribed to the Google Groups "Mammographic Image Analysis Research Community" group.
To post to this group, send email to mammo...@googlegroups.com.
To unsubscribe from this group, send email to mammoimage+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mammoimage?hl=en.


Mehul Sampat

unread,
Jan 3, 2012, 3:56:30 AM1/3/12
to mammo...@googlegroups.com, pra...@iiitd.ac.in
ps: oops the first line in the code snippet should be: fid = fopen(filename,'r','ieee-be');

Praful Agrawal

unread,
Jan 3, 2012, 4:08:00 AM1/3/12
to Mammographic Image Analysis Research Community
it worked.. thanks a lot

On Jan 3, 1:56 pm, Mehul Sampat <mehul.sam...@ieee.org> wrote:
> ps: oops the first line in the code snippet should be: fid =
> fopen(filename,'r','ieee-be');
>
>
>
>
>
>
>
> On Tue, Jan 3, 2012 at 12:47 AM, Mehul Sampat <mehul.sam...@ieee.org> wrote:
> > Hi Praful,
>
> > The uncompressed images should not have a lot of noise. Most likely it
> > could be
> > a big endian vs. little endian issue. (I believe you need to read it in as
> > big-endian)
> > here is a snippet of matlab code to read the *.1 file. (you can change it
> > to c if needed)
> > -------------------------------------------
> > fid = fopen(fid,'r','ieee-be');
> > image = fread(fid,[COLS ROWS],'short');
> > image = image';
> > image = uint16(image);
> > -------------------------------------------
> > where COLS,ROWS is the number of columns/rows in the image; get this info
> > from *.ics file.
> > Please let the group know if this works for you.
> > Good luck
> > Mehul
>

Praful Agrawal

unread,
Jan 3, 2012, 4:08:34 AM1/3/12
to Mammographic Image Analysis Research Community
It worked..thanks a lot

On Jan 3, 1:56 pm, Mehul Sampat <mehul.sam...@ieee.org> wrote:
> ps: oops the first line in the code snippet should be: fid =
> fopen(filename,'r','ieee-be');
>
>
>
>
>
>
>
> On Tue, Jan 3, 2012 at 12:47 AM, Mehul Sampat <mehul.sam...@ieee.org> wrote:
> > Hi Praful,
>
> > The uncompressed images should not have a lot of noise. Most likely it
> > could be
> > a big endian vs. little endian issue. (I believe you need to read it in as
> > big-endian)
> > here is a snippet of matlab code to read the *.1 file. (you can change it
> > to c if needed)
> > -------------------------------------------
> > fid = fopen(fid,'r','ieee-be');
> > image = fread(fid,[COLS ROWS],'short');
> > image = image';
> > image = uint16(image);
> > -------------------------------------------
> > where COLS,ROWS is the number of columns/rows in the image; get this info
> > from *.ics file.
> > Please let the group know if this works for you.
> > Good luck
> > Mehul
>

SAFI ULLAH Marwat

unread,
Sep 25, 2012, 10:08:29 PM9/25/12
to mammo...@googlegroups.com
Hello guys,
 
I have the same problem in extracting the image files. I found two things while using the matlab script provided in the thread:
 No.1. The read image have less dimentiones than the given ones. for example for the case  benign_01\case0029\C_0029_1.LEFT_CC.LJPEG the ics file reads the lines (rows) as 4648 while columns as 2672 but when I read the file it shows the size of the image as 4648x1772
 
No.2. the decompressed image carries no information, i mean it is just a collection of random texturel dots.
 
any help will be highly counted on.
 
Regards,
 
Safi

Mehul Sampat

unread,
Sep 26, 2012, 1:58:56 AM9/26/12
to mammo...@googlegroups.com, safi...@gmail.com
Safi,
LJPEG is a compressed file (using lossless JPEG compression). 

you need to uncompress it first before trying to load it with the code snippet from my previous email. 
an old version of the un-compression code is available here: 

if the compression works it will create a file called C_0029_1.LEFT_CC.LJPEG.1 
let us know if this works for you. 
good luck, 
Mehul 

Gopal Karemore

unread,
Sep 26, 2012, 5:16:30 AM9/26/12
to mammo...@googlegroups.com, safi...@gmail.com
Hi Safi

I encountered the same problem with a compressed DDSM dataset available in public domain. Please see if the decompression software that Dr. Sampat mentioned in earlier email  works for you otherwise try considering IRMA (link below) repository where they already have DDSM data in PNG format. You can use it as long as you are using it for Non-Commercial purpose.


I hope it helps. Good luck!

Sincerely
Gopal Karemore, PhD
Scientist
Dept. of Cellomics 
Vascular Biology and Inflammation
National Centre for Cardiovascular Research (CNIC)
Madrid, Spain

SAFI ULLAH Marwat

unread,
Sep 26, 2012, 8:45:18 AM9/26/12
to Mehul Sampat, mammo...@googlegroups.com
Thank you all,
 
Dr.Sampat exactly got me. I was reading the files with out decompresing them. But now the problem is that how to decompress these images. I actually have MIAS but I am working on microcalcifications, which the dataset have un sufficient number. I am working on our proprietery dataset, but i want to simulate my result on DDSM images.
 
My machine is running Window and Ubuntu 11.x. Can any one please guide me thru steps for the decompression?
 
Regards,
 
Safi

Reply all
Reply to author
Forward
0 new messages