In C++ I want to read individual pixel values from DICOM images.
问题:
回答1:
There are in fact quite a few free libraries. If you prefer a higher-level COM envelope and are willing to purchase it, there are a few others - I'm familiar with RZDCX and DicomObjects, and googling around will get you some others.
It's reasonably easy to access pixel values under the free DCMTK. If you want the raw Hounsfield data look here, and if you need the post-LUT (e.g., windowing) values - you can use DicomImage::getOutputData.
回答2:
There this library: http://dicom.offis.de/dcmtk
回答3:
If you're using x86 or x86_64, then the imebra library works well. When on x86_64 you need to use the -m32 argument with g++ so that it compiles as a 32-bit. However you will not be able to compile this on IA-64, as the -m32 argument is not supported.
http://imebra.com/
The library has a dicom2jpeg program which is useful as an example (but doesn't show you how to read pixel values).
If you want to read individual pixels, then read this page from the manual: http://imebra.com/documentation/html/quick_tour.html
回答4:
You should use GDCM.
Grassroots DiCoM is a C++ library for DICOM medical files. It is automatically wrapped to python/C#/Java (using swig). It supports RAW,JPEG (lossy/lossless),J2K,JPEG-LS,RLE and deflated.
It is portable and is known to run on most system (Win32, linux, MacOSX).
http://gdcm.sourceforge.net/