Is there a bug in the dicomwrite function, can I work around it?
1 次查看(过去 30 天)
显示 更早的评论
I have MR-DICOM images und i want to change pixel values of the DICOM-Images while maintaining the same Header of the images. I have tried with dicomread und write and info, But it has not worked. In particular, the dicomwrite program messes up the header. Presumably, one can use load dicom headers using:
info_in = dicominfo('infile');
load the data using: data = dicomread('infile');
and then write using: dicomwrite(data,'outfile',info_in,'CreateMode', 'copy');
However, the header field 'LargestImagePixelValue' gets' changed from 4000+ to 255! As far as I can tell, there is no way to avoid this flaw in the writer. Then, no dicom reader's can correctly show the data because the header is wrong. I tried leaving off the 'CreateMode', 'copy' flags in the write command... that didn't help. For all practical purposes, it seems like MATLAB has no useful dicom support
1 个评论
Sean de Wolski
2012-9-10
What does the info_in struct look like? Is it full, empty? Does it contain the 'LargestImagePixelValue' property? It looks like somewhere something non-uint8 is being converted to uint8 but it's kind of hard to tell without being able to see it.
回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!