Release Name: 0.8
Notes:
This release features completely rewritten data element handling, improved network compatibility,
full RDoc documentation and a host of small improvements.
The majority of the effort since the last release has been put into a complete rewrite of
the way data elements are handled in ruby-dicom. The old way of storing the information in
arrays in DObject turned out to scale poorly with large data sets, and it was apparent that
a complete rewrite was necessary. In the new implementation all data elements are real objects,
instead of an index in various arrays, and the DICOM object consists of such objects which reference
each other through parent-child relations. Concepts such as class inheritance and module mix-in
has been used to achieve a good result. As an example of the positive effect of this rewrite:
Removing all private data elements in a DICOM file containing ~25.000 tags took a full
21 seconds with version 0.7, but only 0.21 seconds with the new version 0.8!
The network code has had a few compatibility improvements, the most notable being that it is now
able to both send and receive multiple DICOM files (like an entire series or study) in a single association.
Furthermore, it now handles the C-ECHO-RQ properly, and the DServer is more flexible,
allowing the user to select specific abstract/transfer syntaxes that will be accepted.
Another big improvement is the full implementation of RDoc-style documentation for the entire
ruby-dicom library. Previously, documentation was maintained in a separate text file,
which has now been removed. This should be a benefit to users, who can more easily navigate
the documentation with the html documents automatically generated by RDoc. In addition to
the documentation, an effort has been made to clean up the code and make sure it is
consistent with Ruby coding style guidelines.
Not much is new in the Anonymizer class, but as a result of the improvements made to DObject,
anonymizations performed with the new version are actually twice as fast compared to earlier versions.
A side effect of the mentioned rewrite, is that as of now, only top level data elements are anonymized.
Generally, there has been a lot of code cleanup, fixes and small changes too numerous to
mention here (check the changelog for details). With regards to method names and syntax,
this release probably marks the biggest change so far in the gem's history. Therefore,
all existing users upgrading to version 0.8 must carefully check and modify their scripts
to ensure that they work as expected with the new version.
As such this particular upgrade may be a bit of a bumpy road for existing users,
but hopefully the increased compatibility and significant speed improvements will make it worth it!
If you should run into a problem, please create an issue at github (http://github.com/cuthbert/ruby-dicom)
or post at our google groups forum (http://groups.google.no/group/ruby-dicom).
Changes:
= 0.8
=== 1st August, 2010
* Overall changes:
* A complete rewrite of data element handling has resulted in a substantially different syntax and significantly cleaner and simpler code.
* Greatly increased speed in DICOM object interaction. Especially noticeable on larger DICOM files.
* A complete overhaul of the documentation has resulted in a consistent RDoc-style documentation across all classes/modules.
* Increased use of module constants for improved code readability.
* Major cleanup of codes and comments to make it consistent with Ruby 'best practice' guidelines.
* Ready for Rails 3 (compatible with Bundler).
* Resulting from the rewrite is a number of new classes and modules for handling the various data objects:
* DataElement: Ordinary data elements are instances of this class.
* Item: Item elements are instances of this class.
* Sequence: Sequence elements are instances of this class.
* SuperItem: Methods which are shared between DObject and Item (mostly image related methods).
* SuperParent: Methods which are shared between all parent objects (DObject, Item & Sequence).
* Elements: A mix-in module used by all element objects (DataElement, Item & Sequence).
* DObject:
* Completely rewritten data element handling.
* Rewritten print() method with improved tree structure visualization, item indices and the ability to run on any parent element.
* Renamed the print_properties() method to information(), and improved the amount of information outputted.
* Removed the following methods: get_frames(), get_image_pos(), get_pos(), get_value(), get_bin(), set_value()
* Renamed get_pixels() method to decode_pixels().
* Replaced get_value() with value(). The set_value() method is replaced by the new() methods of DataElement, Sequence and Item classes.
* Added the ability to add items at a specific index (shifting any existing items to appear after the inserted item).
* Added the transfer_syntax=() method for changing the transfer syntax of a DICOM object.
* Implemented a more robust padding of data element values with odd length, based on data element VR.
* Added methods for removing all sequences, removing selected groups and returning all data elements of a selected group.
* Optimized the get_image_narray() method to more efficiently return the pixel data.
* Refined the print_all convenience method to call both print() and information().
* DRead:
* More robust against crashing when parsing invalid files by proper use of exception handling.
* Fixed some cases where a failed read where incorrectly marked as successful.
* Increased compatibility (handles DICOM files saved with explicit syntax but no transfer syntax tag).
* Explicit DICOM files with data elements of type "OF" are now handled correctly (both read and write).
* DWrite:
* Simplified code and execution by removing group lengths (deprecated in the DICOM standard) and using undefined length for sequences/items.
* More flexible insertion of missing meta group elements.
* Dictionary:
* Some minor text corrections.
* Anonymizer:
* Anonymizations executes much faster thanks to the work done with DObject data element handling.
* Only top level data elements can be anonymized.
* DClient:
* Can transmit multiple DICOM files at once with the send() method, which now will accept both DObjects and file strings.
* Added the echo() method for performing a C-ECHO-RQ against a SCP.
* DServer:
* Support for role negotiation.
* Properly returns called AE title in association response.
* The lists of acceptable abstract and transfer syntax can now be easily modified by the user.
* Receiving multiple files (like an entire series, or study) in a single association is now supported.
* Properly receives and responds to a C-ECHO-RQ.
= 0.7
=== 28th February, 2010
* Added set_image() and set_image_narray() methods to write pixel data to the DICOM object, complementing set_image_magick().
* Added method get_image() which retrieves pixel data to a standard Ruby Array.
* Added a method for removing all private data elements in the DICOM object.
* Anonymizer class has gained the ability to remove all private data elements when anonymizing.
* Fixed an issue where Anonymizer failed to anonymize tags which had multiple instances in a DICOM file.
* Fixed an issue where Anonymizer failed to honor an expception folder if it ended with a file separation character.
* Private data elements can now be added to a DICOM object.
* Created a new FileHandler class where the user can customize the way incoming DICOM files are handled in DServer.
* Methods set_image_narray() and set_image_magick() takes options :min and :max to rescale pixel values.
* The magick and narray image retrieval methods now takes the option :rescale to convert pixel values to presentation values.
* Method get_pos() now takes the option :parent to narrow a search down.
* Improved the set_value() method to handle the creation of data elements inside sequences/items.
* All DObject methods who return Data Element positions now return an empty array instead of false if no matches are found.
* Improved handling of private tags in the library.
* Network transmissions with implicit encoding are now handled properly.
* Improved the handling of associations in the networking code.
* Some minor formatting improvements to the print() method.
* Improve the logic of updating group/sequence/item lengths to handle changes to Data Elements in sequence hierarchies.
* DLibrary class is permanently loaded when the gem is loaded and no longer needs to be specified by the user.
* Method get_image_magick() now handles pixel representation and window leveling.
* Program files was moved to a sub-directory and a module version string added, in accordance with gem guidelines.
* Renamed DObject attribute :types to :vr in accordance with the terminology of the official DICOM standard.
* Renamed method get_raw() to get_bin() and attribute :raw to :bin.
* Renamed get_pos() option :array to :selection.
* Updated Dictionary in accordance with the 2009 version of the official DICOM base standard.
* Various "under the hood" improvements and code cleanups.
= 0.6.1
=== 23rd August, 2009
* Fixed a bug (introduced in version 0.6) where the creation of new data elements caused an error.
* Fixed a bug (introduced in version 0.6) where compressed pixel data were no longer detected correctly.
* Fixed a bug where writing a DICOM file with no path prefix failed.
* Fixed a bug where creating a new data element in a DICOM file with tag hierarchies gave an invalid DICOM file.
* Fixed a bug where retrieving a RMagick image from DICOM files containing two sets of image data failed.
= 0.6
=== 13th August, 2009
* Complete rewrite of encoding/decoding to reduce code duplication and simplify the code.
* General optimizations to improve speed and reduce code complexity.
* Rewrote Dictionary to use Hash instead of Array. This has significantly improved the read spead of the library.
* Ruby DICOM now automatically strips away trailing whitespace when decoding string values.
* Introducing basic, experimental network functionality.
* The new DClient class enables features such as query, move and send.
* The new DServer class presents the ability to set up a simple storage server (Service Class Provider).
= 0.5
=== 4th May, 2009
* Several small changes have been made to achieve compatibility with both Ruby versions 1.8 and 1.9.
* Implemented a change in syntax for several methods with a goal of simplification.
* Implemented a change in syntax for some methods, variables and messages in order
to better match the terminology used in the official DICOM documents.
* Added a new attr_reader :errors, an array that holds any warnings issued during your
interaction with DObject.
* DObject has received new attr_readers for the arrays holding information on the DICOM object.
See documentation for details.
* Several methods have been cleaned up, making execution in some cases somewhat snappier.
* Several methods have been made more robust.
* Added new option :partial to the get_pos() method, which will enable search for partial string matches.
* Added new option :array to the get_value() and get_raw() methods which enables easy extraction of
multiple values of a given tag to an array (relevant for tags present at multiple places in a DICOM file).
* Fixed a bug where exception folders where ignored in the Anonymizer class.
= 0.4
=== 3rd February, 2009
* Change of syntax: Options are now supplied as hash.
* Method below() renamed to children().
* Added method parents() which returns the position of all items/sequences that are the parent of
the specified tag. This method is only relevant for DICOM tags that exist inside a hierarchy.
* Simplified the code in class Dictionary: load time is ~ 40 times faster!
* Improved the code in class DRead: average read time is reduced by ~ 15 %.
* Improved support for Big Endian DICOM files.
* Added support for the "FL" (floating point single) value representation.
* Fixed a small bug with tag 0028,3006 in Dictionary.
* New method image_to_file() which makes it even easier than before to dump the DICOM pixel data to file.
* Introducing DWrite class which enables writing DICOM objects to file.
* Added several methods in DObject class to take advantage of write capability:
remove_tag()
set_value()
set_image_magick()
set_image_file()
write_file()
* Introducing the Anonymizer class, which takes advantage of the new write capability in Ruby DICOM
to offer a fairly powerful and customizable tool for anonymizing your DICOM files.
= 0.3
=== 12th October, 2008
* The DRead class is now able to keep track of the position of the tags inside the hierarchy of sequences and items.
* DObject class has seen a number of improvements to allow taking advantage of this hierarchy awareness:
* Method get_pos() now can take an array of positions as an argument when searching for tags,
meaning it will only search for hits amongst the positions provided.
* Method print() has been improved with new options to visualize the tree structure of the DICOM file.
* Method print() is able to print to file as well. The text file will be put in the same folder as the DICOM file.
* New method below(), which lets you specify a sequence or item, and this method will return the position
of all tags contained in this sequence/item.
* Method print_properties() have been updated to display more information about the DICOM object.
= 0.2
=== 10th August, 2008
* Data dictionary has been upgraded and is now compliant to the official standard.
* New DLibrary class which handles all interaction with the dictionary.
* Dictionary can be loaded before reading files, which will considerably speed up the process if reading multiple files.
* Reading compressed pixel data into an RMagick object is supported in principle, although it lacks proper testing at this point.
* DRead class is more resistant to breaking if it is handed a faulty file to read, and will return an error message instead of halting execution.
* Added option to load DICOM object in verbose or silent mode.
= 0.1
=== 20th July, 2008
First public release.
The library does have several known issues and lacks some features I would like it to have, but it does
offer basic functionality and should be usable for people interested in working with DICOM files in Ruby.
The reading algorithm has been tested succesfully with some 40 different DICOM files, so it should be fairly robust.
Known issues:
* The retrieve file network functionality (get_image() in DClient class) has not been tested.
* Compressed pixel data is poorly handled.
* Read/Write 12 bit image data not available.
* Color image data is poorly handled.
* Incomplete support for Big endian (Everything but signed short and signed long has been implemented).
* Incomplete support for multiple frame image data to NArray and RMagick objects (partial support already featured).
* Image handling does not take into consideration DICOM tags which specify orientation, samples per pixel and photometric interpretation.
|