DDSM 画像は .LJPEG 形式で圧縮されており、処理する前にまず解凍する必要があります。
DDSM イメージを生のイメージに変換する方法を見つけましたが、それは長い道のりであり、より良い方法はありません。
2- cygwinをダウンロードしてインストールします。
3- Matlab pnmreader コードをダウンロードしてセットアップします。
4- フォルダーを作成し、その内容を次のようにします。
- jpeg.exe
- ddsmraw2pnm.exe
- ConvertDDSMImageToRaw.m [実装は後で回答します]
- cygwin1.dll [ 「C:\cygwin」または cygwin をインストールした場所から]
5-ConvertDDSMImageToRaw
関数の実装。
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
[cols,rows,digitizer]
6- .ics ファイルから画像情報を取得します。

デジタイザが「howtek」の場合、「howtek-mgh」として使用してください。それが私が理解したことです。
7- 次のように、実装した関数を使用して画像を変換します。
filename = 'A_1709_1.LEFT_CC.LJPEG';
digitizer = 'howtek-mgh';
imageSize = [ 5341 2806 ];
ConvertDDSMImageToRaw(filename, imageSize(1) , imageSize(2), digitizer);