It's easy to take compression for granted with the availability of cheap storage. Many of the common file formats used in many applications are intrinsically compressed as well, like JPEGs and PNGs. However, when you get into the Medical Imaging market and the prevalent DICOM file format, it is a very different ballgame. Like any good preschooler, you might be asking, "Why?".
Compressing DICOM Files with LEADTOOLS
Posted on 2017-09-06 15:32:08 by Greg
Categories:
Medical Imaging
How to Load a DICOM File From a Byte Array
Posted on 2016-10-07 10:48:09 by Greg
More often than not, DICOM files are loaded from a location on disk due to the size and complexity of the files. However, no environment and scenario is the same and we periodically get requests regarding how to load DICOM files from memory, more specifically a byte[]
rather than a Stream
. Due to the way that .NET garbage collection works we must use a .NET GCHandle
object when passing an IntPtr
to the overloaded DicomDataSet.Load
function.
private byte[] loadedFile; // byte array for DICOM file from database, server, etc.
private DicomDataSet dicomDS;
private DicomElement element;
// Pin object so it is not garbage collected before work is done.
GCHandle gch = GCHandle.Alloc(loadedFile);
// Load DicomDS from byte[] using IntPtr of array.
dicomDS.Load(Marshal.UnsafeAddrOfPinnedArrayElement(loadedFile, 0),
loadedFile.Length, DicomDataSetFlags.None);
// Unpin object.
gch.Free();
// Get image from DicomDS.
element = dicomDS.FindFirstElement(null, DicomTag.PixelData, true);
rasterImageViewer1.Image = dicomDS.GetImage(element, 0, 0,
Leadtools.RasterByteOrder.Gray, DicomGetImageFlags.None);
To download the entire C# example project for versions 17.5 and 18, check out this forum post.
Using JSON in Android for DICOM Communication
Posted on 2016-10-07 10:01:20 by Greg
We have received several requests regarding PACS and DICOM Communication within our Android imaging SDK. One way of accomplishing this is by using JSON to communicate with the RESTful web services included with the HTML5 Zero Footprint DICOM Viewer.
The snippet below shows a portion of the asynchronous code that calls the RESTful Medical Viewer Service and then parses the JSON response to get the SOP Instance UID. After that, the SOP Instance UID is used to get the image data and put it into an InputStream.
Recent Posts
- Programmatically Format Excel Cell Styles with LEADTOOLS
- Using the LEADTOOLS Excel Web Editor to Implement Functions
- Load an Existing Excel File and Programmatically Change Data with LEADTOOLS
- LEADTOOLS Version 23 is HERE - Overview of What's New!
- Capture it all with LEADTOOLS Multi-Capture Video Support
Categories
- Virtual Printer (2)
- General Imaging (18)
- Multimedia Imaging (35)
- HTML5 (19)
- Video Tutorials (5)
- Speech Recognition (1)
- Document Converter (8)
- Excel (4)
- Image Processing (9)
- Barcode (16)
- OCR (31)
- Analyzer (2)
- News (119)
- .net (4)
- File Formats (3)
- Recognition (2)
- PDF (24)
- Document Imaging (67)
- Annotations (5)
- Cloud Services (1)
- Forms Recognition and Processing (13)
- Medical Imaging (28)
- General (35)
- MICR (1)
- Web Scanning (1)
Tags
- Paperless Office (2)
- Medical Imaging (57)
- Cine (1)
- Credit Card (3)
- SD Times 100 (3)
- Intel Quick Sync Video (1)
- Document Imaging (109)
- Sony (1)
- OCR (103)
- Cloud (18)
- Text Overlay (1)
- XLS (1)
- Bates (1)
- MultiStreamSource (1)
- Swift (3)
- Houston (1)
- iPad (6)
- Micro QR (2)
- Web Editor (1)
- Document (7)
- EML (1)
- Product Review (4)
- ENT (2)
- CORS (1)
- VB.NET (1)
- Cross-Platform (4)
- study (1)
- Product Announcement (48)
- AFP (1)
- Print to PACS (3)
- Scanning (9)
- Vector Imaging (2)
- Bitonal (1)
- Documents SDK (5)
- h.264 (8)
- News (8)
- Scroll (1)
- SANE (1)
- Going Paperless (1)
- HEVC (1)
- topworkplaces (1)
- PST (1)
- 25 projects in 25 days (28)
- AnDevCon (3)
- Alignment (1)
- Windows 10 (1)
- SVCC (1)
- credit card reader (1)
- Windows (1)
- Discontinuity (1)
- LEADTOOLS (7)
- NVIDIA CUDA (1)
- medical web viewer (2)
- DICOM (67)
- Driver's License (6)
- PowerShell (3)
- .NETCore (3)
- LEADTOOLS Cloud Services (4)
- color reduction (1)
- Baseline Profile (1)
- Client (1)
- Jolt (1)
- AIIM Conference (2)
- Recognition (6)
- image conversion (1)
- HTML (2)
- Discount (1)
- Wang (2)
- Web Workers (1)
- NHIT (2)
- Dental (3)
- Push Mode (1)