Skip to content

Parser for DAMOS DCM calibration data conservation format files

License

Notifications You must be signed in to change notification settings

emmtrix/DCMParser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DCMParser

Build Status

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.

Java samples

Parse DCM

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();

DCM to JSON

DcmParser parser = new DcmParser("freeTest.dcm");
DcmFile dcm = parser.parse();

System.out.println(dcm.toJson());

Parse JSON

DcmFile fromJson = DcmFile.fromJson(TESTFILE_A_JSON);

Roadmap

  • CLI interface
  • equals method for all types
  • broader testing with real world data

About

Parser for DAMOS DCM calibration data conservation format files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.1%
  • ANTLR 5.9%