Skip to content

Luncher91/DCMParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 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

Topics

Resources

License

Stars

Watchers

Forks

Packages