Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>DDSM images are compressed in .LJPEG format and they need to be decompressed first before processing them.</p> <p>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.</p> <ul> <li><p><strong>Reading DDSM dataset images in steps:</strong></p> <ol> <li>Clone the repository at <a href="https://github.com/multinormal/ddsm" rel="nofollow noreferrer">https://github.com/multinormal/ddsm</a>, which contain two executables [ <code>jpeg.exe</code> and <code>ddsmraw2pnm.exe</code> ].</li> </ol></li> </ul> <p>2- Download and install <a href="http://cygwin.com/setup.exe" rel="nofollow noreferrer">cygwin</a>.</p> <p>3- Download and setup <a href="http://www.mathworks.com/matlabcentral/fileexchange/4176-pnm-toolbox-3-01?download=true" rel="nofollow noreferrer">Matlab pnmreader code</a>.</p> <p>4- Create a folder and make its contents like the following:<br></p> <ul> <li>jpeg.exe</li> <li>ddsmraw2pnm.exe</li> <li>ConvertDDSMImageToRaw.m [ <em>implementation comes later in answer</em> ]</li> <li>cygwin1.dll [ <em>from "C:\cygwin" or anwhere else where you've installed cygwin</em> ]<br></li> </ul> <p>5- the <code>ConvertDDSMImageToRaw</code> function implementation.</p> <pre><code>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 </code></pre> <p>6- get the image information <code>[cols,rows,digitizer]</code> from the .ics file:</p> <p><img src="https://i.stack.imgur.com/pbuJd.png" alt=".ics file example"></p> <p>if the digitizer is 'howtek' use it as 'howtek-mgh', that's what I've figured out.</p> <p>7- convert you image now using the function we've impelemented, like the following:</p> <pre><code>filename = 'A_1709_1.LEFT_CC.LJPEG'; digitizer = 'howtek-mgh'; imageSize = [ 5341 2806 ]; ConvertDDSMImageToRaw(filename, imageSize(1) , imageSize(2), digitizer); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload