Why do I receive a "Cannot compress using transfer syntax" error when writing a file using the DICOMWRITE function in MATLAB 7.0 (R14)?
2 views (last 30 days)
Show older comments
When I write to a file using the DICOMWRITE function, using:
info = dicominfo('test1.dcm');
dicomwrite(int16(rand(512, 512)), 'test2.dcm', info);
I receive an error similar to the following:
??? Error using ==> images\private\dicom_compress_pixel_cells>compress_cells
Cannot compress using transfer syntax "1.2.840.10008.1.2.4.57".
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The error occurs because the particular compression method that is being specified by the metadata information "info" is not supported. While the DICOMWRITE function supports many different compression methods, it does not support all of them.
To workaround this issue, specify another compression method in the Transfer Syntax. For example, to set the Transfer Syntax to lossless JPEG endcoding, use the following code:
info.TransferSyntaxUID = '1.2.840.10008.1.2.4.70'
0 Comments
More Answers (0)
See Also
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!