ImageGear for Java
Resolving JAR File Cross-Dependencies
ImageGear provides the following interfaces and abstract classes to help avoid cross-dependencies between JAR files.

IImGearDICOMDisplaySettings Interface

The getDICOMDisplaySettings and setDICOMDisplaySettings methods of the ImGearRasterPage Class, as well as the ImGearPageDisplay Class, use the IImGearDICOMDisplaySettings Interface type. IImGearDICOMDisplaySettings Interface has a small set of public members that are used for displaying a DICOM image. If the application needs to retrieve or modify DICOM Display Settings, it shall cast IImGearDICOMDisplaySettings Interface to the actual class ImGearDICOMDisplaySettings Class, which is defined in the imagegear2.formats.dicom.jar. The following two examples demonstrate this:

Java Example
Copy Code
ImGearRasterPage rasterPage;

// Load an image into rasterPage.
// If the image does not have a DICOMDisplaySettings object attached, create and add one.

if (rasterPage.getDICOMDisplaySettings() == null) {
        rasterPage.setDICOMDisplaySettings(new ImGearDICOMDisplaySettings());
}
ImGearDICOMDisplaySettings displaySettings = (ImGearDICOMDisplaySettings) rasterPage.getDICOMDisplaySettings();

ImGearAnnotationPage Class

ImGearAnnotationPage Class is an abstract class that does not have any public members. If the application works with annotations, it shall cast an ImGearAnnotationPage to the actual class ImGearARTPage Class, defined in the imagegear2.art.jar archive.

ImGearFormatMetadata Class

The getTIFF, setTIFF, getEXIF, setEXIF, getIPTC, setIPTCgetXMP, and setXMP methods of ImGearMetadataHead Class, defined in the imagegear2.core.jar file, use ImGearFormatMetadata Class type. ImGearFormatMetadata Class does not have any public members. If the application uses Simplified Metadata API, it shall cast the results of getTIFF, getEXIF, getIPTC, getDICOM and getXMP properties to actual classes ImGearTIFFMetadata class, ImGearEXIFMetadata class, ImGearIPTCMetadata class, ImGearDICOMMetadata class and ImGearXMPMetadataRoot class, respectively. These classes are defined in the imagegear2.formats.simplifiedmetadata.jar file. The following two examples demonstrate this:

Java Example
Copy Code
ImGearPage imGearPage;

// Load an image into ImGearPage
       
String description = "<Empty>";
if (imGearPage.getMetadata().getXMP() != null) {
       ImGearXMPMetadataRoot xmp = (ImGearXMPMetadataRoot) imGearPage.getMetadata().getXMP();
       if ((xmp.getDublinCore() != null)
            && (xmp.getDublinCore().getDescription() != null)
            && (xmp.getDublinCore().getDescription().getDefault() != null))
       {
            description = xmp.getDublinCore().getDescription().getDefault();
       }
}

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback