Path: news.mathworks.com!not-for-mail
From: "Zack Li" <liubebo@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problem with dicomwrite
Date: Thu, 20 May 2010 15:52:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <ht3lr4$ffu$1@fred.mathworks.com>
References: <hp8lkd$roq$1@fred.mathworks.com>
Reply-To: "Zack Li" <liubebo@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1274370724 15870 172.30.248.38 (20 May 2010 15:52:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 20 May 2010 15:52:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2208715
Xref: news.mathworks.com comp.soft-sys.matlab:637655

I have similar problems before and I found that if you convert the data format by uint* and everything will be fine.

"ucd puri" <tanuj.puri@ucd.ie> wrote in message <hp8lkd$roq$1@fred.mathworks.com>...
> Hi, I am trying to write an array in dicom format using dicomwrite as below,  
> 
> a=[1 2 3; 4 5 6; 7 8 9]; % where 'a' is a greyscale image originally.
> dicomwrite( a , 'im1')
> 
> but now if i read this im1 file, i get very strange values something like 
> [ 65535 65535 65535; 65535 65535 65535;65535 65535 65535]
> 
> Please suggest.
> Thx in advance.