Releases: Enet4/dicom-rs
v0.5.2
DICOM-rs 0.5.2
This update encompasses a few fixes and backwards-compatible API extensions.
New
- [core] New
person_name
module provides utilities for working with DICOM formatted person name values (#262 @jmlaka) - [core] New method
DataElement::items
for easier access to sequence items (#263 @ingwinlu) - [object] New methods and
IntoIterator
implementations for DICOM objects to facilitate iteration through their elements (#268)
Fixes and Enhancements
- [object] Hardened file meta group parsing logic against certain files (#265 @evanrichter)
Miscellaneous
- [core/encoding/object/ul/pixeldata] Cleaned up the code, resolved some Clippy lints (#267)
- [pixeldata] Updated development dependencies (#266)
Updated crates
dicom-core
0.5.1dicom-dump
0.5.2dicom-encoding
0.5.1dicom-fromimage
0.1.1dicom-object
0.5.2dicom-pixeldata
0.1.3dicom-storescu
0.2.1dicom-toimage
0.1.1dicom-ul
0.4.2dicom
0.5.2
Full Changelog: v0.5.1...v0.5.2
v0.5.1
DICOM-rs v0.5.1
This is a patch version intended to fix potential issues in reading and writing DICOM data. It is fully backwards compatible with the past version.
Heavy users of the library are recommended to update their dicom
dependencies.
Fixes and enhancements
- [pixeldata] Fixed third example at crate root (#250)
- [dump] Fixed artificial limit on number of elements dumped (#246)
- [parser] Increased data set reader's robustness to stray item end in DICOM file (#254)
- [ul] Fixed PDU writer errors when writing A-ABORT messages (#257)
- [object] Improved file meta information reading routine so that it consumes unexpected attributes and does not try to allocate inappropriate amounts of memory (#259)
- [ul] Added a safeguard to P-DATA-TF PDU item length against malformed data (#260)
Miscellaneous
- New fuzz test harness (#258 @evanrichter)
- The deprecated subproject
dcmdump
has been removed from the upstream branch (#248) - [CI] Add rust-cache (#256)
- [CI] Use github-actions/checkout v3 (#240)
Updated crates
dicom
0.5.1dicom-dump
0.5.1dicom-object
0.5.1dicom-parser
0.5.1dicom-pixeldata
0.1.2dicom-ul
0.4.1
Thanks
Special thanks to @evanrichter for the fuzz testing initiative.
Full Changelog: v0.5.0...v0.5.1
dicom-pixeldata v0.1.1
This is a patch release intended to resolve known issues in the pixeldata crate.
Fixes and enhancements
- Fix LUT normalization function (#244)
- Improve documentation of
to_ndarray*
methods (#244) - Fix the interpretation of 16bit images in
to_vec*
andto_ndarray*
(#244) - Optimize color space conversions (#245)
Miscellaneous
- Update rstest to 0.12.0 (#247)
v0.5.0
This release marks yet another major milestone for the DICOM-rs project, featuring extended support for DICOM date and time values, a new library crate (dicom-pixeldata
), more tools (dicom-toimage
, dicom-fromimage
, dicom-dump
), and a multitude of improvements and bug fixes across the various crates.
Hopefully the release cycle of future versions will be shorter, so as to make each version bump less overwhelming.
Changes
- [core] The element API has been revamped to provide more accurate support for DICOM time and date values. (#137 #139 #143 #179 #185 #196 @jmlaka) (#213 #214)
- Instead of returning
chrono
instances, most methods now return custom types with awareness of partially defined dates and times (e.g.2014
being different from2014-01-01
). Methods which returnchrono
dates and times are still available under different names. - Date and time ranges can also be retrieved from DICOM primitive values.
- Instead of returning
- [object] The
dicom_object::pixeldata
module has been marked for removal. Seedicom-pixeldata
instead! (#133) - [core]
to_str
methods now automatically trim trailing whitespace from the inner string value (same behavior asto_clean_str
, which is now deprecated). (#198 @mfreeborn) - [dump] The crate
dcmdump
is deprecated in favor of the newdicom-dump
crate (#173 @charbeljc) - Error handling has been updated to use SNAFU version 0.7 (#202)
- [encoding] Some APIs were changed to accommodate pixel data decoding and encoding adapters. (#152 @pevers)
- [ul] The client association API was changed for more reliable control of presentation context handling and negotiation (#217 @natdash)
- [parser] The parser crate was submitted to a clean-up which affected constructors and type parameters of some structs. (#239)
New
- New crate
dicom-pixeldata
gives you APIs for working with pixel data, including turning them into images and multi-dimensional arrays (#112 @pevers) (#153 #220 #229)- Support for some encapsulated pixel data encodings is available as native implementations,
including RLE lossless (#152 @pevers) and various kinds of JPEG (#228 @ingwinlu). - To extend support for other transfer syntaxes, an integration with GDCM is available via the
gdcm
feature (#131 #176) (#222 @yigitsoy) - This crate includes a LUT implementation with common pixel data transformations (#234)
- Support for some encapsulated pixel data encodings is available as native implementations,
- New tool
dicom-fromimage
(#210) - New tool
dicom-toimage
(#203) - New crate
dicom-dump
which functions both as a tool and as a library (#173 @charbeljc) (#227) - Logging is now done project wide using
tracing
(#236) - [parser] A new lazy data set reader abstraction was added. This is still experimental and not yet used by the ecosystem, but will eventually play a key role in future DICOM object implementations (#126)
- [object] New
OpenFileOptions
API for specifying additional options to the file opening process (#199) - [object] New methods for element manipulation were added,
includingelement_opt
,element_by_name_opt
, andremove_element
. (#237 #224) - [dump] Can now dump more than one file at a time (#207 @natdash)
- [dump] Added option
--color=(auto|always|never)
(#161 @charbeljc) - [storescu] Can now send more than one file at a time (#211 @natdash)
Fixes and Enhancements
- Made transfer syntax registry more flexible against UIDs with null characters (#157 @BastienVigneron)
dump
was revamped with width adjustments and format updates (#142)- [object] Clarified magic code check error (invalid DICOM file) #150
- [storescu] Fixed issues in the PData value sending routine (#158 @charbeljc)
- [scpproxy] Fixed PDU transmission issues (#162 @charbeljc)
- [parser] Fixed encoder padding for even length data (#159)
- [parser] Fixed data set sequence reading routine for deeply nested data sets (#168)
- [object] Use length property for in-memory DICOM object construction (#171)
- [parser] Adjusted dataset writer to not trust the length reported in the file header (#172)
- [core] Fixed signature of
PrimitiveValue::new_i32
(#178 @jmlaka) - [parser] Updated text codec of stateful encoder (#156)
- [ul] Solved bugs related with PDU sending and receiving (#165)
- [object]
InMemDicomObject::with_meta
was fixed (#225) - [dictionary-builder] [dictionary-std] Updated data element dictionary and builder (#191)
- Corrected documentation for primitive values by (#197 @mfreeborn)
- [dump] Fixed
set_virtual_terminal
call on Windows (#208) - [dump] Removed control code in text values (#205 @aaronzs)
- Dependendy usage was constrained for faster builds (#235)
Miscellaneous
- [encoding] Converted doc comment and fixed doctest of
SpecificCharacterSet::from_code
(#223) - Updated
inventory
to 0.2 and adjusted the transfer syntax collection factory (#219) - Updated
byteordered
to v0.6 (#186) - Updated deprecations for 0.5.0 (#190)
- Made piece of code more compatible (#192 @jmlaka)
- Added association test for Store SCU/SCP (#218)
- Cargo clippy lint fixes (#195)
- Use patched version of dicom-test-files (#231)
Crates
Updated crates:
dicom
0.5.0dicom-core
0.5.0dicom-encoding
0.5.0dicom-transfer-syntax-registry
0.5.0dicom-dictionary-std
0.5.0dicom-parser
0.5.0dicom-object
0.5.0dicom-dump
0.5.0dcmdump
0.5.0 (deprecated)dicom-ul
0.4.0dicom-scpproxy
0.4.0dicom-dictionary-builder
0.3.0dicom-echoscu
0.2.0dicom-storescu
0.2.0
New crates:
dicom-pixeldata
0.1.0fromimage
0.1.0toimage
0.1.0
Thanks
This major version would not have been made possible with the combined effort of several people. In this version, I would like to add a special thank you to:
- Juráj Mlaka (@jmlaka) for bringing desirable changes to how DICOM date and time values are accessed and manipulated, including support for date-time ranges;
- Peter Evers (@pevers) for driving the much anticipated pixeldata initiative;
Moreover, a warm gratitude to the development efforts done by the following first contributors of DICOM-rs:
Full Changelog: v0.4.0...v0.5.0
v0.5.0-rc.2
This is DICOM-rs 0.5.0 release candidate 2, a new iteration towards the next major version. This version is much closer to a stable release.
The following changelog is auto-generated. Version 0.5.0 will include a better structured list of changes.
What's Changed since 0.5.0-rc.1
- strip trailing whitespace when displaying text by @mfreeborn in #198
- [dump] Fix set_virtual_terminal call on Windows by @Enet4 in #208
- [dump] Remove control code in text value by @aaronzs in #205
- [dump] Enable dumping more than one file by @natdash in #207
- Upgrade SNAFU to v0.7 by @Enet4 in #202
- [core] Admit second-precise times to be converted to a chrono NaiveTime by @Enet4 in #214
- [storescu] Enable sending more than one file by @natdash in #211
- Enhanced pixeldata and pixel data encoding by @Enet4 in #213
- Update to presentation context handling by @natdash in #217
- Add association test for Store SCU/SCP by @Enet4 in #218
- Collect transfer syntax factory - inventory 0.2 by @Enet4 in #219
- Add pixeldata crate to parent library crate by @Enet4 in #220
New Contributors
Full Changelog: v0.5.0-rc.1...v0.5.0-rc.2
v0.5.0-rc.1
This pre-release marks an intermediate step towards the next major version, 0.5.0. Although there are still a few rough edges and breaking changes may still happen, this one comes with a bunch of features and fixes that people may be interested in using now.
The following changelog is auto-generated. Version 0.5.0 will include a better structured list of changes.
What's Changed
- Add dicom-pixeldata by @pevers in #112
- Support RGB, YBR_FULL and YBR_FULL_422 PhotoMetricInterpretation by @pevers in #127
- [parser] Lazy data set reader abstraction by @Enet4 in #126
- [object] Mark pixeldata module as bad by @Enet4 in #133
- Make GDCM compilation optional by @pevers in #131
- Update deserialize.rs by @jmlaka in #137
- simplify UTC offset parsing by @jmlaka in #139
- date and time parsing improvements by @jmlaka in #143
- [dcmdump] clean all strings properly by @Enet4 in #154
- [pixeldata] Fetch the first frame of native pixel data on decode_pixel_data by @Enet4 in #149
- [pixeldata] reexport public dependencies by @Enet4 in #151
- Make transfer syntax registry more flexible against UIDs with null characters by @bastien-solutions in #157
- [dcmdump] Revamping: width adjustments, format updates by @Enet4 in #142
- [object] Clarify magic code check error (invalid DICOM file) by @Enet4 in #150
- [dcmdump] add option --color=(auto|always|never) by @charbeljc in #161
- [storescu] Orthanc PACS interoperability by @charbeljc in #158
- [scpproxy] pynetdicom <-> scpproxy <-> Orthanc interop by @charbeljc in #162
- Decode encapsulated pixel data frame offset table by @Enet4 in #153
- [parser] Fix encoder padding for even length data by @Enet4 in #159
- [parser] Fix data set sequence reading routine for deeply nested data sets by @Enet4 in #168
- [object] Consider encoded length property for in-memory DICOM object construction by @Enet4 in #171
- [parser] Don't trust the length in the header for writing by @Enet4 in #172
- [pixeldata] Remove "gdcm" as a default feature by @Enet4 in #176
- [parser] Update text codec of stateful encoder by @Enet4 in #156
- Update byteordered to v0.6 by @Enet4 in #186
- Null components2 no precision tweaks for time by @jmlaka in #185
- Null date components by @jmlaka in #179
- [ul] Solve bugs related with PDU sending and receiving by @Enet4 in #165
- Integrate with encoding TransferSyntax by @pevers in #152
- [dictionary-builder] [dictionary-std] Update data element dictionary and builder by @Enet4 in #191
- Update deprecations for 0.5.0 by @Enet4 in #190
- Cargo clippy lint fixes by @Enet4 in #195
- correct documentation for primitive values by @mfreeborn in #197
- Dcmdump as a library by @charbeljc in #173
- Remove chrono by @jmlaka in #196
- Update README.md by @Enet4 in #201
- [object] Add OpenFileOptions by @Enet4 in #199
New Contributors
Preliminary thanks to the following contributors (a better word of appreciation will follow once 0.5.0 is released):
- @pevers made their first contribution in #112
- @jmlaka made their first contribution in #137
- @bastien-solutions made their first contribution in #157
- @charbeljc made their first contribution in #161
- @mfreeborn made their first contribution in #197
It is also great to find that the DICOM-rs repository has reached 200 stars on GitHub. 🎉 May the project's outreach continue increasing!
Full Changelog: v0.4.0...v0.5.0-rc.1
dicom-core-v0.4.1
DICOM-rs v0.4
DICOM-rs 0.4 introduces a new API for DICOM network support, as well as a revamped standard data element dictionary, methods for reading and writing bare DICOM datasets, new CLI network tools, and more!
Changes
- [core]
DataElement::new
is now generic over the data value type (this is a minor break, remove.into()
if you had it) (#91) - [core] Primitive value equality has been adjusted so that a single element
Strs
may be equal to aStr
if the two strings within are the same (#110) - [dictionary-builder] The crate has been heavily modified to receive a DCMTK .dic dictionary instead of an XML file from the standard
(#14 @pauldotknopf) - [dictionary-builder] Added a flag to mark retired tags as deprecated (#99)
- [dictionary-std] The
entries
module has been removed. If you were using it, modify the code to use the constant in thetags
module instead. (#14 @pauldotknopf) - [object] Deprecated
RootDicomObject
, useFileDicomObject
instead (#97)
New
- [core] Add
PartialEq
implementations forPrimitiveValue
against standard Rust strings (#110) - [core]
to_clean_string
metho for data element values, returning strings without trailing whitespace (#90 @josepp-moreira) - [object] Add methods for reading and wrintg bare DICOM datasets (#84, #96)
- [object] Add
take_element
methods forInMemDicomObject
(#49 @pjsier) - [dictionary-std] New generated tag constants in the
tags
module. (#14 @pauldotknopf) - [dcmdump] Colored console output (#80 @pjsier)
- [object] type parameter
D
inInMemDicomObject
andInMemDataElement
now defaults toStandardDataDictionary
(#97) - [object] Add
with_meta
andwith_exact_meta
toInMemDicomObject
(#97) - [object] Temporary implementation class UID and implementation version name for DICOM-rs, applied by default if not specified (#97)
- [object] impl
Extend
forInMemDicomObject
(#97) - [ul] Association API, in the
association
module (#98) - New experimental tools
echoscu
andstorescu
(#98 with off-band collaboration of @josepp-moreira)
Fixes
- [core] Trim trailing whitespace in the conversion of more data value primitives (#102)
- [parser] Fixed tokenization of explicit length items, thus presenting a more accurate value length (#85)
- [encoding] Read Overlay Data as OW in Implicit VR Little Endian (#86)
- [ul] Fixed constant mapping into
AssociationRJResult
(#93) - [storescu] Removed
dbg!
call (#113) - [parent] crate
dicom-ul
is now available asul
by default, via the Cargo featureul
(#116)
Enhancements
- [dicom] Re-exported
dicom_core::dicom_value!
in parent crate (#94) - [dictionary-std] More elements were introduced, including those for DICOM commands. (#14 @pauldotknopf)
- [parser] Improved data reader/writer diagnostics (#85)
- [object] More examples in the root documentation (#97)
- [object] Re-export
FileMetaTableBuilder
at crate root (#97) - [core/object/dcmdump] Update
itertools
to 0.10 (#100) - [dcmdump] Clean strings in textual values are printed (#101)
- [ul] Revamped crate documentation (#98)
Chores
- [core/parser/object] Narrow requirement on
smallvec
to 1.6.1, to ensure patch against RUSTSEC-2021-0003 (#104) - Moved CI out of Travis and into GitHub Actions (#95)
- Removed obsolete badges in Cargo manifest (#114)
- Assorted Clippy warning fixes (#103)
Updated crates
dicom
: 0.4.0dicom-core
: 0.4.0dicom-dictionary-std
: 0.4.0dicom-encoding
: 0.4.0dicom-transfer-syntax-registry
: 0.4.0dicom-parser
: 0.4.0dicom-object
: 0.4.0dicom-ul
: 0.3.0dicom-scpproxy
: 0.3.0dcmdump
: 0.4.0dicom-dictionary-builder
: 0.2.0
New crates
dicom-echoscu
: 0.1.0dicom-storescu
: 0.1.0
Thanks
Many thanks to new and continuing contributors for this exciting new milestone. Current plans for the upcoming versions are just as promising, if not more!
DICOM-rs v0.3
The third release of DICOM-rs encompasses a wide spectrum of quality-of-life features and improvements, making the library easier to use and more DICOM compliant. Future versions will hopefully tackle features of larger complexity and visibility.
Major Changes
- [core/encoding/parser/object/ul] Error types have been refactored across the ecosystem of crates. They were completely restructured and designed via SNAFU, becoming more informative and useful. (#62)
- [parser] The main data set reader supports multiple parsing strategies. By default, date, time, and date-time values are no longer parsed into
chrono
data types, thus not compromising the parsing process if they are invalid. (#65) - [core] The
dicom_value!
was given a few syntax changes, please see the respective documentation. (#56) - [code]
PrimitiveValue
'sas_u8
,as_i32
, andas_tags
methods are deprecated, in favor of the getter methodsuint8_slice
,int32_slice
, andtags
. - [encoding] Changes to
TextCodec
: new methodname
, and implementingDebug
is no longer required (#53) - [encoding]
SpecificCharacterSet
has new variants and has been marked as non-exhaustive. (#53) - [transfer-syntax-registry]
JPIP_DEREFERENCED_DEFLATE
was renamed toJPIP_REFERENCED_DEFLATE
(was a typo) (#58)
New
- [core] Extended the public API for retrieving standard Rust values from DICOM
PrimitiveValue
,Value
, andDataElement
. Methods with and without automatic conversions are provided. (#56, #66, #68, #75) - [encoding] More character encodings are now supported: ISO-IR 100, ISO-IR 101, ISO-IR 109, ISO-IR 110, ISO-IR 144. (#53), plus GB18030 (#52 @kira-96)
- [transfer-syntax-registry] Added more transfer syntaxes as described in DICOM PS3.6 2020b Table A-1 (#58)
Fixes and Enhancements
- [core] Fixed an incorrect calculation of multi-valued data's length (#67)
- [encoding] Fixed character set detection by the
SpecificCharacterSet
attribute (#52 @kira-96) - [parser] Fixed the parser not accepting sequence data in unknown attributes (#64)
- [dcmdump] Redesigned the output of the tool, pushing values to the end and attribute names to the middle, and the output width has been adjusted for the terminal width (#45 @robyoung, #74)
- [dcmdump] ImplementationClassUID was printing SOPClassUID by mistake (#61)
- [dcmdump] The alias of the transfer syntax is now reported alongside its UID (#61)
- [dcmdump] Human readable error output (#61)
Chores
- Updated crate manifests: crates.io should now present the readme contents of each crate. (#57, #75)
- Added documents for project conduct, governance, and contribution guidelines (#69)
- Added WebAssembly testing to CI, for some of the components in the library. (#54)
- Added integration test to OB with undefined length (#48 @robyoung)
- dependency updates: [email protected]
Updated crates
dicom
: 0.3.0dicom-core
: 0.3.0dicom-encoding
: 0.3.0dicom-transfer-syntax-registry
: 0.3.0dicom-parser
: 0.3.0dicom-object
: 0.3.0dicom-dictionary-std
: 0.3.0dicom-ul
: 0.2.0dcmdump
: 0.3.0dicom-dictionary-builder
: 0.1.2
Thanks
Special thanks to new and revisiting contributors involved in this version, as well as to users of the library who have contributed with their own real-life use cases of DICOM-rs.
0.2.0
This is the second release of the DICOM-rs ecosytem, encompassing a substantial amount of fixes, new capabilities, and API changes.
The listings presented below may not be exhaustive, please see the documentation and new API signatures for more details.
New features
- [core] New experimental
dicom_value!
macro for constructing DICOM values out of standard Rust values. (#35) - [parser] Extended the API in order to enable printing data tokens into a data source. (#32)
- [core/encoding/parser/object] Encapsulated pixel data can be read, written, and manipulated in memory as a sequence of raw data items. (#42)
- [core/encoding/parser/object] DICOM objects can be saved to a file. (#32 #35)
- [dcmdump] Should now support files with non-natively encoded pixel data
- [ul] A first implementation of the DICOM upper-layer protocol (#4 @pauldotknopf)
- [scpproxy] A proof of concept implementation of a Proxy SCP, which can be used for logging and diagnostics (#4 @pauldotknopf)
- [dictionary-std] Updated data dictionary in accordance to the 2020b standard specification
Major changes
- [encoding] decoders and encoders now provide triple-handshaking traits:
Decode
for decoding from any source,DecodeFrom<S>
for decoding from a specific source, and likewise for encoders (#32) - [parser]
DicomParser
type is now aStatefulReader
type;Printer
type is aStatefulWriter
(#35) - [core] Updated
smallvec
to1.0.0
(#25) - [transfer-syntax-registry] Inventory-based implementation of the transfer syntax registry is now optional
- This allows you to use DICOM-rs in environments which do not yet support
inventory
(e.g. WebAssembly) - [encoding/object/transfer-syntax-registry] disabled by default, enable the
inventory-registry
Cargo feature - [parent]
inventory-registry
is enabled by default in the parentdicom
crate
- This allows you to use DICOM-rs in environments which do not yet support
Fixes
- [parser] Prevent the parsing of empty values (#24)
- [parser] Sequences and items with an explicit length are correctly parsed, without expecting a delimiter (#22)
- [encoding] Fixed the decoding of DA values with only the year specifier (#33 @nicosalvato)
- [object] Made file meta group table reading more robust, allowing a missing meta file version (#29)
- [parser] Fixed the parsing of sequence values with preceding spaces (#7 @pauldotknopf)
Chores & Tweaks
- Removed deprecated uses of
Error#description
and improved error display messages (#41 @robyoung) - Added a bit more documentation to existing crates (#38 @robyoung)
- Added Clippy to CI (#13 @pauldotknopf)
Updated crates:
dicom
: 0.2.0dicom-core
: 0.2.0dicom-encoding
: 0.2.0dicom-transfer-syntax-registry
: 0.2.0dicom-parser
: 0.2.0dicom-object
: 0.2.0dicom-dictionary-std
: 0.2.0dcmdump
: 0.2.0dicom-dictionary-builder
: 0.1.1
New crates:
dicom-ul
: 0.1.0dicom-scpproxy
: 0.1.0
Thanks
Sincere thanks to those who have contributed to this version with pull requests, bug reports and discussion that led to this new pre-release milestone.
Future work according to the roadmap will likely incise on:
- Borrowing and/or off-memory constructs of DICOM information to enable an implementation of efficient and lazy DICOM objects;
- Improving the presentation of errors;
- A first version of the pixel data manipulation API, so that objects can be intuitively interpreted as an image or a multi-dimensional array, as well as an implementation for trivial cases (native encoding with trivial photometric interpretations).