{"id":"image-dicom-rle","mimeType":"image/dicom-rle","name":"DICOM Run-Length Encoding","shortName":"DICOM-RLE","category":"Medical \u0026 Scientific","extensions":[".dcm",".dicom"],"description":"DICOM RLE is a specific transfer syntax within the Digital Imaging and Communications in Medicine (DICOM) standard. It utilizes Run-Length Encoding (RLE) for lossless image compression, commonly used for transmitting and archiving medical imaging data such as ultrasounds, X-rays, and MRIs while perfectly preserving diagnostic quality.","seo":{"title":"image/dicom-rle MIME Type | Complete Developer Reference \u0026 Magic Bytes","description":"Complete reference for the image/dicom-rle MIME type: magic bytes, software support, HTTP headers, developer snippets, and technical specifications for DICOM RLE medical images.","faqs":[{"question":"What is the magic byte for DICOM files?","answer":"All standard DICOM Part 10 files have a 128-byte preamble followed by the 4-byte ASCII signature 'DICM' (hex: 44 49 43 4D) at offset 128."},{"question":"How is image/dicom-rle different from standard DICOM?","answer":"The DICOM standard supports multiple image compression algorithms (Transfer Syntaxes). The image/dicom-rle MIME type specifically denotes a DICOM file where the pixel data is compressed using the lossless Run-Length Encoding (RLE) method (Transfer Syntax UID 1.2.840.10008.1.2.5)."},{"question":"Can web browsers display DICOM images?","answer":"No native web browser supports rendering DICOM files directly. Developers must use JavaScript libraries like Cornerstone.js to parse the DICOM metadata and render the RLE-compressed pixel data onto an HTML5 canvas."}]},"index":{"compression":["Lossless (RLE)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Medical Imaging","Ultrasound","X-Rays / CT / MRI","PACS Archives"]},"technical":{"magicBytes":{"hex":"44 49 43 4D (at byte offset 128)","ascii":"DICM"},"container":"DICOM (PS3.10)","compressionAlgorithm":["Run-Length Encoding (RLE)"],"colorDepth":["8-bit","16-bit","24-bit"],"transparency":false,"animation":true,"metadata":{"exif":false,"xmp":false,"iccProfile":true},"alphaChannel":false,"progressiveLoading":false,"hdrSupport":true},"history":{"developer":"National Electrical Manufacturers Association (NEMA) / ACR","released":"1993","specification":"DICOM PS3.5 (Transfer Syntax 1.2.840.10008.1.2.5)"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"OsiriX","logo":""},{"name":"Horos","logo":""},{"name":"RadiAnt DICOM Viewer","logo":""},{"name":"3D Slicer","logo":""},{"name":"ImageMagick","logo":"image-magic.webp"}],"conversion":{"convertTo":["jpeg","png","nifti","tiff"],"convertFrom":["uncompressed-dicom"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/dicom-rle"}],"htmlAccept":"image/dicom-rle, .dcm","fileDetection":["Skip the first 128 bytes (preamble)","Check bytes 128-131 for 'DICM'","Parse the DICOM header tags to verify the Transfer Syntax UID is 1.2.840.10008.1.2.5 (RLE Lossless)"]},"prosCons":{"pros":["Guarantees lossless preservation of critical medical data necessary for diagnostics","Extremely robust metadata structure containing patient information, modality, and spatial geometry","Faster to encode and decode than complex compression schemes like JPEG 2000"],"cons":["RLE compression offers very low compression ratios compared to modern codecs like JPEG-LS or JPEG 2000","Zero support in web browsers or standard consumer image viewers","Strict data privacy regulations (HIPAA/GDPR) make handling DICOM files complex due to embedded PHI"]},"specifications":{"url":"https://www.dicomstandard.org/","rfc":"RFC 3240","mimeAliases":["application/dicom"]},"developerSnippets":{"python":"import pydicom\n# pydicom handles standard .dcm files\nds = pydicom.dcmread('scan.dcm')\nif ds.file_meta.TransferSyntaxUID == '1.2.840.10008.1.2.5':\n    print('DICOM RLE Lossless')","nodejs":"const dicomParser = require('dicom-parser');\n// Requires reading the file into a Uint8Array and parsing the dataset to check the Transfer Syntax UID","go":"// Custom parsing required to skip 128 bytes and read the 'DICM' string.","php":"$mime = mime_content_type('scan.dcm');\necho $mime; // Standard servers usually return 'application/dicom' rather than 'image/dicom-rle'"},"relatedFormats":["tiff","jpeg-ls"]}
