This library parses an DCM file into a typed object structure. The object structure represents the complete file including all the comments.
The object structure can be serialized into JSON or can even be written back to the DCM format.
DcmParser parser = new DcmParser("freeTest.dcm");
// optional error handler
parser.setEventHandler((line, position, message) -> {
System.out.println("Line " + line + "@" + position + ": " + message);
});
DcmFile dcm = parser.parse();
DcmParser parser = new DcmParser("freeTest.dcm");
DcmFile dcm = parser.parse();
System.out.println(dcm.toJson());
DcmFile fromJson = DcmFile.fromJson(TESTFILE_A_JSON);
- CLI interface
- equals method for all types
- broader testing with real world data