The release of DICOMHERO 6.1 will include the experimental library DICOMHERO OBJECTS, a set of classes representing all the CIODs, Modules, Macros and Functional Groups described by the DICOM standard (the DICOM standard version 2023c contains 165 CIODs, 357 modules, 293 macros, 29 functional groups).

How was this possible? DICOMHERO_BOOKWORM, a proprietary tool developed for DICOMHERO, scans the DICOM documents made for humans and translates what it sees into C++ code.

What can you do with DICOMHERO OBJECTS?

// Create a Basic Text Structured Report
ciods::BasicTextSR structuredReport(uidImplicitVRLittleEndian_1_2_840_10008_1_2);

// The class and instance UID are filled in automatically.
// We have to fill the fields in the IOD modules,
//  so let's get the Patient module and fill it with info...
structuredReport.addPatientModule()
    .setPatientNameUnicodeValue(UnicodePatientName(L"Test^Patient", L"", L""))
    .setPatientBirthDateValue(Date(2020, 1, 1, 10, 0, 0, 0, 0, 0));

// Now let's add the Patient Study module...
structuredReport.addPatientStudyModule()
    .setPatientAgeValue(Age(32, ageUnit_t::years))
    .setPatientSexNeuteredEnum(modules::PatientStudy::PatientSexNeutered_t::ALTERED)
    .setPatientBodyMassIndexValue(27);
    
//...

std::list<ValidationViolation> violations = structuredReport.validate();

Note that:

  • for each Composite IOD the library knows which modules are allowed and which ones aren’t
  • each setXXX method knows the correct DICOM VR
  • the library can deal with VRs that require an enumeration and convert the enumerated index to and from the proper string value
  • DICOMHERO OBJECTS supplies basic validation of the CIOD’s content

Stay tuned! DICOMHERO OBJECTS will be included in DICOMHERO 6.1, available in the second half of October 2023.

#

Comments are closed