Package com.pixelmed.database
Abstracts any underlying database support for applications using the DICOM toolkit and needing access to persistent storage of entities in the DICOM information model.
The primary class of this package is the abstract DatabaseInformationModel. It
provides general facilities for connecting to the underlying database, creating
tables, inserting, modifying, deleting and selecting records. In addition it
provdes abstract methods for describing the types of entities mapped to
records in tables and their relationships.
Concrete implementations of the DatabaseInformationModel are provided for
commonly used models, including the PatientStudySeriesConcatenationInstanceModel
and the StudySeriesInstanceModel.
The models make use of specialized forms of the generic com.pixelmed.dicom.DicomDictionary
in order to make sure particular DICOM attributes are mapped to the correct
information entity (i.e. database table) appropriate to the model in use.
Tree and table browsers and models are provided that may be used to form the basis of application specific browsers.
The following is a simple example of how a database is created, populated by one or more DICOM files, and a browser created:
public static void main(String arg[]) {
try {
final DatabaseInformationModel d = new PatientStudySeriesConcatenationInstanceModel("test");
for (int j=0; j<arg.length; ++j) {
String fileName = arg[j];
DicomInputStream dfi = new DicomInputStream(new BufferedInputStream(new FileInputStream(fileName)));
AttributeList list = new AttributeList();
list.read(dfi);
dfi.close();
d.insertObject(list,fileName);
}
final JFrame frame = new JFrame();
frame.setSize(400,800);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
frame.dispose();
d.close();
System.exit(0);
}
});
DatabaseTreeBrowser tree = new DatabaseTreeBrowser(d,frame);
frame.show();
} catch (Exception e) {
System.out.println(e);
e.printStackTrace();
System.exit(0);
}
}
Package Specification
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:-
ClassesClassDescriptionThis class provides common support to applications requiring properties related to database services.The
DatabaseInformationModelclass is an abstract class that contains the core functionality for storing, accessing and maintaining a persistent representation of selected attributes of composite objects.TheDatabaseTreeBrowserclass implements a Swing graphical user interface to browse the contents ofDatabaseInformationModel.TheDatabaseTreeModelclass implements aTreeModelto abstract the contents of a database as a tree in order to provide support for aDatabaseTreeBrowser.Instances of theDatabaseTreeRecordclass represent nodes in a tree of theDatabaseTreeModelclass, which in turn is used by theDatabaseTreeBrowserclass.This class provides methods for removing entries from a database, all its children and any associated files that were copied into the database (rather than referenced).TheDicomDatabaseInformationModelclass is an abstract class that specializesDatabaseInformationModelby adding methods specific to a typical DICOM composite object information model.TheDicomDictionaryForMinimalPatientStudySeriesInstanceModelclass supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.TheDicomDictionaryForPatientStudySeriesConcatenationInstanceModelclass supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.TheDicomDictionaryForStudySeriesInstanceModelclass supports a minimal DICOM Study/Series/Instance model.TheMapTableBrowserclass extends aJTableto browse a list of attributes and their values as a single row table with columns headed by the attribute descriptions (if supplied) or their names.TheMapTableModelclass extends aAbstractTableModelto abstract the contents of a database as a tree in order to provide support for aMapTableBrowser.TheMinimalPatientStudySeriesInstanceModelclass supports a minimal DICOM Patient/Study/Series/Instance model.ThePatientStudySeriesConcatenationInstanceModelclass supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.This class allows the reconstruction of a database from the stored instance files, such as when the database schema model has been changed.TheStudySeriesInstanceModelclass supports a minimal DICOM Study/Series/Instance model.TheStudySeriesInstanceSelectiveMatchModelclass supports a minimal DICOM Study/Series/Instance model.