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
DatabaseInformationModel
class is an abstract class that contains the core functionality for storing, accessing and maintaining a persistent representation of selected attributes of composite objects.TheDatabaseTreeBrowser
class implements a Swing graphical user interface to browse the contents ofDatabaseInformationModel
.TheDatabaseTreeModel
class implements aTreeModel
to abstract the contents of a database as a tree in order to provide support for aDatabaseTreeBrowser
.Instances of theDatabaseTreeRecord
class represent nodes in a tree of theDatabaseTreeModel
class, which in turn is used by theDatabaseTreeBrowser
class.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).TheDicomDatabaseInformationModel
class is an abstract class that specializesDatabaseInformationModel
by adding methods specific to a typical DICOM composite object information model.TheDicomDictionaryForMinimalPatientStudySeriesInstanceModel
class supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.TheDicomDictionaryForPatientStudySeriesConcatenationInstanceModel
class supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.TheDicomDictionaryForStudySeriesInstanceModel
class supports a minimal DICOM Study/Series/Instance model.TheMapTableBrowser
class extends aJTable
to 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.TheMapTableModel
class extends aAbstractTableModel
to abstract the contents of a database as a tree in order to provide support for aMapTableBrowser
.TheMinimalPatientStudySeriesInstanceModel
class supports a minimal DICOM Patient/Study/Series/Instance model.ThePatientStudySeriesConcatenationInstanceModel
class 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.TheStudySeriesInstanceModel
class supports a minimal DICOM Study/Series/Instance model.TheStudySeriesInstanceSelectiveMatchModel
class supports a minimal DICOM Study/Series/Instance model.