Imebra open source Dicom library
0.0.48
Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Paolo Brandoli.
The online version of this document can be found here: http://imebra.com/documentation/html/index.html
Please read the
License agreement first!
Imebra is an open source Dicom library. The library has been designed to handle Dicom files, but it includes also some classes that manage jpeg and other image files.
At the moment the library provides the following features:
- multi platform
- self contained (the library uses only functions from the standard C library and the standard template library)
- dicom files parser and builder
- jpeg files parser and builder
- image decompression and compression in the following formats:
- jpeg baseline (8 bits per color channel lossy)
- jpeg baseline extended (12 bits per color channel lossy)
- jpeg lossless (up to 16 bits per color channel lossless)
- raw dicom (up to 16 bits per color channel lossless)
- rle dicom (up to 16 bits per color channel lossless)
All the formats are supported both in compression and decompression mode - color space conversion
- support for nested datasets (sequences)
- support for Unicode and different Dicom charsets
- DICOMDIR parser and writer
- support for transactions
- load the larger tags only when necessary
Other features have been planned but have not been included in this release. The missed features are the following:
- support for dicom objects (like patient, procedure, image, and so on)
- network support for communication between Dicom devices
The library doesn't check for a Dicom stream validity; this feature will be introduced with the support for dicom objects.
After reading the
License agreement, you should read the
Quick tour and the section
The imebra's structure.
A guide that will help you to include Imebra in your project can be found in Adding Imebra to your project.
A detailed reference of the C++ classes that compose Imebra is included in this manual.
- Fixes #44 (Add the "const" modifier to all the relevant functions in the data handlers)
- Fixes #55 (Add const qualifier to functions that require them)
- Fixes #56 (The external lock in baseObject may create circular references)
- Fixes #57 (RGBToPALETTECOLOR causes memory leaks)
- Fixes #58 (The destructors of objects derived from baseObject must be protected, since they can be deleted only by themself)
- Increased the speed of CopyFromInt32Interleaved
- Increased the speed of dicomCodec::ReadPixel when bitsAllocated == 8 or 16
- Improved the speed of streamWriter::write()
- Increased the speed of streamWriter::writeBits
- The file reading related function now return the read byte or bits by value
- Makefiles for the example applications are being provided
- Fixes #33 (When launched without parameters, dicomdirItems should display the version)
- Fixes #42 (When a dicomdir destructor is called, the it delete all the children elements. This may cause a stack overflow when an element call release on the next sibling item and the number of siblings is high)
- Fixes #46 (Checking for LUT validity will help dicom2jpeg to ignore the LUT if it contains invalid data)
- Fixes #49 (The codepage "CHAR" used to indicate the locale charset in charsetConversion.cpp causes an exception during the initialization of ICONV. The usage of "" instead of "char" works properly)
- Fixes #50 (mbxInt32 and imbxUint32 are wrongly mapped to long and unsigned long. It should be mapped to int and unsigned int)
- Fixes #51 (wrong parameters in memset)
- Fixes #52 (The charset conversion uses different error reporting in ICONV and Windows API)
- Fixes #32 (When launched without parameters, dicom2jpeg should display the version)
- Fixes #34 (The on-line documentation should have to Google Analytics tracking code)
- Fixes #37 (Change the title of the documentation to: Imebra - Open source dicom library)
- Fixes #39 (The class dataHandlerNumeric calculates the wrong size)
- Fixes #1 (The library's version should be visible in the source code)
- Added DICOMDIR creator/parser
- Added an example that extract a DICOMDIR to an XML file
- Fixes #4 (A sequence tag should have the type set to SQ, but the writer uses the first buffer's type, therefore the data type is incorrect)
- Fixes #5 (When writing sequences, the tag's length is not calculated correctly)
- Fixes #6 (dicomCodec::getDataSetLength doesn't calculate the correct size)
- dicom2jpeg can now invoke ffmpeg and create movies
- Mercurial is now used as version control (was SVN)
- Corrected documentation
- Changed open source license to Affero GPL 3
- Added the function puntoexe::imebra::transforms::VOILUT::getCenterWidth()
- The jpegCodec returns an image with color space "YBR_FULL" when the image is compressed in lossy mode and the dataset specifies the color space "RGB"
- Enhanced precision in the RGB to YBR_FULL color conversion
- Enhanced precision in the YBR_FULL to RGB color conversion
- Several optimization in the uncompressed Dicom image decoder
- Added the class puntoexe::imebra::trasforms::transformBuffersInPlace
- puntoexe::imebra::VOILUT and puntoexe::imebra::modalityVOILUT now derive from puntoexe::imebra::trasforms::transformBuffersInPlace
- puntoexe::imebra::viewHelper releases the dataset when no images are displayed
- Several optimizations in the Jpeg image decoder
- puntoexe::streamReader::read() throws an exception when the end of file is reached
- added puntoexe::streamReader::endReached()
- Several optimizations in puntoexe::streamReader
- Several optimizations in the Huffman decoder
- Added the example dicom2jpeg
- Closes #12 (Subsampled images are saved/loaded incorrectly by the jpeg codec)
- Closes #13 (When saving a jpeg image from a dataset and it doesn't need to be converted an exception is thrown)
- Closes #14 (When saving an image the subsampling flags don't match the quality)
- Removed dependence from charsetsList in data, buffer, dataSet, dataGroup, dataHandler
- Closes #9 (The lossless jpeg codec saves corrupted images)
- Closes #10 (A basic offset table is added even when it shouldn't)
- Now non encapsulated images are saved one after another even when their length is odd: no padding bytes are inserted
- closes #11 (The 32 bits tag's length is truncated (only the lower 16 bits are correct) )
- The images build during the test units had a reduced range. Corrected
- Now the jpeg codec creates the offset table when loading an image
- Closes #7 (memoryPool isn't thread safe)
- The memory string now is managed by an auto_ptr
- In the memoryPool minimized the number of moved pointers when a memory object is reused
- The dataSet doesn't need to retrieve the images handlers anymore when updating the offsets table
- The dicom codec doesn't need to retrieve the handlers anymore when calculating the tag size
- viewHelper now accepts a null pointer as image
- VOILUT now returns the right voilut description
- puntoexe::memory hides the string of bytes
- Added the class puntoexe::imebra::waveform to handle waveforms embedded in puntoexe::imebra::dataSet
- Added SWIG headers (partial)
- Closes #2 (The code assumes that wchar_t is 2 bytes long, while some systems have wchar_t=4 bytes long)
- Closes #3 (Usage of ICONV should check for return value E2BIG)
- Added casting operators () to puntoexe::ptr
- Corrected the ptr class so baseObject compiles on GCC
- Corrected thread (removed orphan functions)
- Now charsetConversion throws an exception if a charset is not supported by the system
- The PDF documentation is back
- Now the library doesn't fail when the dataset has an empty images' offset table
- Now the Dicom codec doesn't switch to implicit datatype when a tag without datatype is found in the group 0x0002.
The tag without datatype is still recognized. This solves a problem with dicom files generated by DicomWorks
- Corrected the sample Let's read an image
- Corrected a bug in the memoryManager's destructor
- Now the memory manager's parameters can be configured with preprocessor definitions
- Replaced "informations" with "information" and "infos" with "info"
The function exceptionsManager::getExceptionInfos became exceptionsManager::getExceptionInfo
The function exceptionsManager::clearExceptionInfos became exceptionsManager::clearExceptionInfo - Corrected an issue in the RLE Dicom codec:
after reading a segment the decoder was seeking to the wrong position in the dicom file, while writing it was writing wrong offsets - Improved performances in the Jpeg IDCT function
- Introduced common lock objects
- Introduced the transactions
- Compiles also on Embedded Visual C++ 4 (requires STLPORT, see sourceforge.net/projects/stlport)
- Introduced the view helper class
- Introduced support for Unicode and different dicom charsets
- Modified several files to solve problems with Borland C++ Builder 2006
- The dicom codec now uses a dataHandlerRaw to read the tags from the file (previously it was using a normal dataHandler)
- Updated the documentation
- Modified the exceptionManager: now it store a list of objects instead of a list of strings
- Corrected the transformHighBit class
- Modified the exceptionsManager (now it stores the messages per thread and not per exception)
Several users had difficulties in understanding the behaviour of the smart pointer implemented by the
puntoexe::ptr class and the reference count mechanism in the
puntoexe::baseObject. To solve the reported problems the reference counter mechanism has been changed from the version 0.0.31.
Up to the version 0.0.30 the reference counter was initialized to 1 by the constructor of puntoexe::baseObject, so a call to puntoexe::baseObject::addRef() wasn't necessary after the construction of a baseObject.
This was intended to simplify the usage of the reference counter (one less call to addRef()), but ended up adding more complications to the product. Anyway the final application shouldn't had made any call to addRef() and release() if the proper smart pointer was used.
Also, the smart pointer wasn't able to cast the objects' types when copying data from other smart pointer: in the beginning this behaviour was intentional (I wanted the end programmer to specify his intentions and use the casting operators when needed), but most of the users expected the smart pointer to take care of this.
Now the reference counter is initialized to 0 and not to 1 during the baseObject's construction: this implies that puntoexe::baseObject::addRef() has to be called immediatly after the object construction: anyway this operation is performed automatically by the smart pointer puntoexe::ptr.
This simplified the behaviour of other functions in the ptr class: for instance the function puntoexe::ptr::get() doesn't need to increase the reference counter anymore.
Also the user is now forced to use the smart pointer because more baseObject's functions have been made protected or private (addRef() and release() now are callable by the smart pointers only).
The smart pointer is now able to cast the object containing in other smart pointers during the assignment or the construction of a new pointer.
The changes shouldn't affect your old source code if you used the puntoexe::ptr class to control the puntoexe::baseObject derived objects.