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:-
Class Summary Class Description DatabaseApplicationProperties This class provides common support to applications requiring properties related to database services.DatabaseInformationModel TheDatabaseInformationModel
class is an abstract class that contains the core functionality for storing, accessing and maintaining a persistent representation of selected attributes of composite objects.DatabaseMediaImporter DatabaseTreeBrowser TheDatabaseTreeBrowser
class implements a Swing graphical user interface to browse the contents ofDatabaseInformationModel
.DatabaseTreeModel TheDatabaseTreeModel
class implements aTreeModel
to abstract the contents of a database as a tree in order to provide support for aDatabaseTreeBrowser
.DatabaseTreeRecord Instances of theDatabaseTreeRecord
class represent nodes in a tree of theDatabaseTreeModel
class, which in turn is used by theDatabaseTreeBrowser
class.DateTimeRangeMatch DeleteFromDatabase 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).DicomDatabaseInformationModel TheDicomDatabaseInformationModel
class is an abstract class that specializesDatabaseInformationModel
by adding methods specific to a typical DICOM composite object information model.DicomDictionaryForMinimalPatientStudySeriesInstanceModel TheDicomDictionaryForMinimalPatientStudySeriesInstanceModel
class supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.DicomDictionaryForPatientStudySeriesConcatenationInstanceModel TheDicomDictionaryForPatientStudySeriesConcatenationInstanceModel
class supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.DicomDictionaryForStudySeriesInstanceModel TheDicomDictionaryForStudySeriesInstanceModel
class supports a minimal DICOM Study/Series/Instance model.MapTableBrowser 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.MapTableModel TheMapTableModel
class extends aAbstractTableModel
to abstract the contents of a database as a tree in order to provide support for aMapTableBrowser
.MinimalPatientStudySeriesInstanceModel TheMinimalPatientStudySeriesInstanceModel
class supports a minimal DICOM Patient/Study/Series/Instance model.PatientStudySeriesConcatenationInstanceModel ThePatientStudySeriesConcatenationInstanceModel
class supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.RebuildDatabaseFromInstanceFiles This class allows the reconstruction of a database from the stored instance files, such as when the database schema model has been changed.StudySeriesInstanceModel TheStudySeriesInstanceModel
class supports a minimal DICOM Study/Series/Instance model.StudySeriesInstanceSelectiveMatchModel TheStudySeriesInstanceSelectiveMatchModel
class supports a minimal DICOM Study/Series/Instance model.