Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
DICOM data type cannot parse files with certain control characters in tags #3041
If a DICOM file contains control characters that are invalid for XML (other than pixel data that should already have been taken out by the attachment handler), and the channel has an active transformer, serialization will fail:
We're currently using SAX to parse the DICOM data to and from XML, and it doesn't allow those invalid characters. We could use XPP instead, but then we'd probably have to recreate the ContentHandlerAdapter from dcm4che that is being used with SAX, and we'd be creating technically invalid XML anyway so that's not really a good option. Maybe a better option is to add a custom ContentHandler that can detect invalid characters and encode to Base64 automatically. Might not be feasible since SAX streams the character data, not sure.
Imported Issue. Original Details:
*This has performance issues but does work to avoid the main issue above. *
As a workaround for 3.5.2. 3.6.x and later should be able to use Addis' fix below via his attachment channel XML.
Imported Comment. Original Details: