Building DICOMHERO Objects

DICOMHERO 6.1.0.0 and newer come with DICOMHERO Objects, a library which provides classes for all the DICOM Standard CIODs and NIODs, built on top of DICOMHERO Core.

Because the build of DICOMHERO Objects takes considerable resources and time, it is not built by default: in order to build it you have to set the flag DICOMHERO_OBJECTS to ON when running CMake:

cmake -DDICOMHERO_OBJECTS=ON /path/to/dicomhero_root
cmake --build .

This will produce the two libraries dicomhero6 and dicomheroObjects6: dicomheroObjects6 depends on dicomhero6.

Using DICOMHERO Objects

DICOMHERO Objects brings all the DICOM Standard Composite IODs as C++ classes. For instance, you can create a CTImage IOD like this:

using dicomhero;
CTImage ctImage(uidImplicitVRLittleEndian_1_2_840_10008_1_2);
ctImage.addPatientModule()
    .setPatientNameUnicodeValue(UnicodePersontName(L"Test^Patient", L"", L""))
    .setPatientBirthDateValue(Date(2020, 1, 1, 10, 0, 0, 0, 0, 0));
ctImage.addGeneralStudyModule()
    .setStudyInstanceUIDValue("1.2.3.4.5.6");
    .setStudyDateVale(Date(2020, 1, 1, 10, 0, 0, 0, 0, 0))
    .setReferringPhysicianNameValue(UnicodePersonName(L"Test^Physician^Name", L"", L""));
ctImage.setImage(0, myImage, imageQuality_t::high);

To use DICOMHERO Objects you have to link both the the dicomheroObjects6 and the dicomhero6 libraries to your app.

At the moment DICOMHERO Objects is in C++ only, but future versions of DICOMHERO will also provide it in Java, Python, Objective-C and Swift.

#

Comments are closed