Library Import
In order to access the classes of the Merge DICOM Java Toolkit you should import the com.merge.mcw package in your applications. This gives you visibility not only to the public and protected classes, but it also provides visibility to the tag constants contained in the MCdicom class.
import com.merge.mcw.*;
Library Initialization
The first call to the toolkit must always be the static MC.initialize() method. This method provides the location of the Initialization File (merge.ini) and allows Merge DICOM toolkit to perform essential startup tasks. No other methods may be used before calling this method; the library will throw an exception if other toolkit methods are called before initialization.
The MC.initialize() method allows the Toolkit to perform the following critical processing:
A SecurityException will be thrown if your application does not have the proper rights to access the dynamic link library or any configuration file.
At any time you can check to see if the toolkit has been initialized by using the MC.isInitialized() method.
Releasing the Library
The static MC.release() method is used to release the resources used by the Merge DICOM library. The method performs a graceful shutdown of the library. MC.initialize() must be called again before using the library. This method is normally called before exiting a Merge DICOM application.
Getting the Version of the Toolkit
You can use the static MC.getVersionString() method to retrieve the string identifying the Merge DICOM Library version. The library version string contains version number in the form "n.m.v" where n is major version number, m is minor version number and v is an interim release number.