org.dcm4che.srom
Class SRDocumentFactory

java.lang.Object
  extended by org.dcm4che.srom.SRDocumentFactory

public abstract class SRDocumentFactory
extends java.lang.Object

Factory for DICOM SR Documents.

Version:
1.0.0
Author:
gunter.zeilinger@tiani.com
See Also:
"DICOM Part 3: Information Object Definitions, Annex A.35 Structured Report Document Information Object Definitions"

Constructor Summary
SRDocumentFactory()
           
 
Method Summary
static SRDocumentFactory getInstance()
           
abstract  TCoordContent.Positions.Absolute newAbsolutePositions(java.util.Date[] dateTimes)
          Creates a new srom TCOORD Absolute Position.
abstract  Code newCode(Dataset ds)
           
abstract  Code newCode(java.lang.String spec)
          Creates a Code object from the String representation.
abstract  Code newCode(java.lang.String codeValue, java.lang.String codingSchemeDesignator, java.lang.String codeMeaning)
          Creates a new srom Code object.
abstract  Code newCode(java.lang.String codeValue, java.lang.String codingSchemeDesignator, java.lang.String codingSchemeVersion, java.lang.String codeMeaning)
          Creates a new srom Code object.
abstract  Equipment newEquipment(Dataset ds)
           
abstract  Equipment newEquipment(java.lang.String manufacturer, java.lang.String modelName, java.lang.String stationName)
          Creates a new srom Equipment object.
abstract  HL7SRExport newHL7SRExport(java.lang.String sendingApplication, java.lang.String sendingFacility, java.lang.String receivingApplication, java.lang.String receivingFacility)
           
abstract  IconImage newIconImage(Dataset ds)
           
abstract  IconImage newIconImage(int rows, int columns, byte[] pixelData)
           
abstract  KeyObject newKeyObject(Dataset ds)
           
abstract  KeyObject newKeyObject(Patient patient, Study study, Series series, Equipment equipment, java.lang.String sopInstanceUID, int instanceNumber, java.util.Date obsDateTime, Code title, boolean separate)
          Creates a new srom Key Object Selection document.
abstract  Series newKOSeries(java.lang.String seriesInstanceUID, int seriesNumber, RefSOP refStudyComponent)
          Creates a new srom Series object for DICOM KO.
abstract  Patient newPatient(Dataset ds)
           
abstract  Patient newPatient(java.lang.String patientID, java.lang.String patientName, Patient.Sex patientSex, java.util.Date patientBirthDate)
          Creates a new srom Patient object.
abstract  RefSOP newRefSOP(Dataset ds)
           
abstract  RefSOP newRefSOP(java.lang.String refSOPClassUID, java.lang.String refSOPInstanceUID)
          Creates a new SOP Class/SOP Instance pair.
abstract  TCoordContent.Positions.Relative newRelativePositions(float[] offsets)
          Creates a new srom TCOORD Relative Position.
abstract  Request newRequest(java.lang.String studyInstanceUID, java.lang.String accessionNumber, java.lang.String fillerOrderNumber, java.lang.String placerOrderNumber, java.lang.String procedureID, java.lang.String procedureDescription, Code procedureCode)
          Creates a new srom Request object.
abstract  TCoordContent.Positions.Sample newSamplePositions(int[] indexes)
          Creates a new srom TCOORD Sample Position.
abstract  Series newSeries(Dataset ds)
           
abstract  Series newSeries(java.lang.String modality, java.lang.String seriesInstanceUID, int seriesNumber, RefSOP refStudyComponent)
          Creates a new srom Series object.
abstract  SOPInstanceRef newSOPInstanceRef(java.lang.String refSOPClassUID, java.lang.String refSOPInstanceUID, java.lang.String seriesInstanceUID, java.lang.String studyInstanceUID)
          Creates a new srom SOPInstanceRef object.
abstract  SRDocument newSRDocument(Dataset ds)
           
abstract  SRDocument newSRDocument(Patient patient, Study study, Series series, Equipment equipment, java.lang.String sopClassUID, java.lang.String sopInstanceUID, int instanceNumber, java.util.Date obsDateTime, Template template, Code title, boolean separate)
          Creates a new srom Structured Report document.
abstract  Series newSRSeries(java.lang.String seriesInstanceUID, int seriesNumber, RefSOP refStudyComponent)
          Creates a new srom Series object for DICOM SR.
abstract  Study newStudy(Dataset ds)
           
abstract  Study newStudy(java.lang.String studyInstanceUID, java.lang.String studyID, java.util.Date studyDateTime, java.lang.String referringPhysicianName, java.lang.String accessionNumber, java.lang.String studyDescription, Code[] procCodes)
          Creates a new srom Study object.
abstract  Template newTemplate(Dataset ds)
           
abstract  Template newTemplate(java.lang.String templateIdentifier, java.lang.String mappingResource)
          Creates a new srom Template object.
abstract  Template newTemplate(java.lang.String templateIdentifier, java.lang.String mappingResource, java.util.Date templateVersion, java.util.Date templateLocalVersion)
          Creates a new srom Template object.
abstract  Verification newVerification(java.util.Date time, java.lang.String observerName, java.lang.String observerOrg, Code observerCode)
          Creates a new srom Verification object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SRDocumentFactory

public SRDocumentFactory()
Method Detail

getInstance

public static SRDocumentFactory getInstance()

newRefSOP

public abstract RefSOP newRefSOP(java.lang.String refSOPClassUID,
                                 java.lang.String refSOPInstanceUID)
Creates a new SOP Class/SOP Instance pair.

Parameters:
refSOPClassUID - the DICOM Referenced SOP Class UID.
refSOPInstanceUID - the Referenced SOP Instance UID.
Returns:
a new SOP Class/SOP Instance pair.

newPatient

public abstract Patient newPatient(java.lang.String patientID,
                                   java.lang.String patientName,
                                   Patient.Sex patientSex,
                                   java.util.Date patientBirthDate)
Creates a new srom Patient object.

Parameters:
patientID - the patients ID.
patientName - the DICOM (VR=PN) patient name.
patientSex - the patients sex.
patientBirthDate - the patients birth date.
Returns:
a new srom Patient object.

newStudy

public abstract Study newStudy(java.lang.String studyInstanceUID,
                               java.lang.String studyID,
                               java.util.Date studyDateTime,
                               java.lang.String referringPhysicianName,
                               java.lang.String accessionNumber,
                               java.lang.String studyDescription,
                               Code[] procCodes)
Creates a new srom Study object.

Parameters:
studyInstanceUID - the study instance UID.
studyID - the study ID.
studyDateTime - the study date time.
referringPhysicianName - the referring physician name.
accessionNumber - the accession number.
studyDescription - the study description.
procCodes - the procedure codes.
Returns:
a new srom Study object.

newSeries

public abstract Series newSeries(java.lang.String modality,
                                 java.lang.String seriesInstanceUID,
                                 int seriesNumber,
                                 RefSOP refStudyComponent)
Creates a new srom Series object.

Parameters:
modality - the modality.
seriesInstanceUID - the series instance UID.
seriesNumber - the series number.
refStudyComponent - the referenced Study as SOP Class/SOP Instance pair.
Returns:
a new srom Series object.

newSRSeries

public abstract Series newSRSeries(java.lang.String seriesInstanceUID,
                                   int seriesNumber,
                                   RefSOP refStudyComponent)
Creates a new srom Series object for DICOM SR. A convenience method for DICOM SR. The modality value will be set to SR.

Parameters:
seriesInstanceUID - the series instance UID.
seriesNumber - the series number.
refStudyComponent - the referenced Study as SOP Class/SOP Instance pair.
Returns:
a new srom Series object.

newKOSeries

public abstract Series newKOSeries(java.lang.String seriesInstanceUID,
                                   int seriesNumber,
                                   RefSOP refStudyComponent)
Creates a new srom Series object for DICOM KO. A convenience method for DICOM KO. The modality value will be set to KO.

Parameters:
seriesInstanceUID - the series instance UID.
seriesNumber - the series number.
refStudyComponent - the referenced Study as SOP Class/SOP Instance pair.
Returns:
a new srom Series object.

newEquipment

public abstract Equipment newEquipment(java.lang.String manufacturer,
                                       java.lang.String modelName,
                                       java.lang.String stationName)
Creates a new srom Equipment object.

Parameters:
manufacturer - the manufacturer.
modelName - the model name.
stationName - the station name.
Returns:
a new srom Equipment object.

newCode

public abstract Code newCode(java.lang.String codeValue,
                             java.lang.String codingSchemeDesignator,
                             java.lang.String codingSchemeVersion,
                             java.lang.String codeMeaning)
Creates a new srom Code object.

Parameters:
codeValue - the code value.
codingSchemeDesignator - the coding scheme designator.
codingSchemeVersion - the coding scheme version
codeMeaning - the code meaning.
Returns:
a new srom Code object.

newCode

public abstract Code newCode(java.lang.String codeValue,
                             java.lang.String codingSchemeDesignator,
                             java.lang.String codeMeaning)
Creates a new srom Code object. A convenience method if the conding scheme designator unambiguously identifies this coding scheme.

Parameters:
codeValue - the code value.
codingSchemeDesignator - the coding scheme designator.
codeMeaning - the code meaning.
Returns:
a new srom Code object.

newTemplate

public abstract Template newTemplate(java.lang.String templateIdentifier,
                                     java.lang.String mappingResource,
                                     java.util.Date templateVersion,
                                     java.util.Date templateLocalVersion)
Creates a new srom Template object.

Parameters:
templateIdentifier - the Template identifier.
mappingResource - the mapping resource that defines the template.
templateVersion - the version of the Template
templateLocalVersion - the local version number of the Template.
Returns:
a new srom Template object.

newTemplate

public abstract Template newTemplate(java.lang.String templateIdentifier,
                                     java.lang.String mappingResource)
Creates a new srom Template object. A convenience methods one could use if the Template Identifier and Mapping Resource are sufficient to identify the template unambiguously.

Parameters:
templateIdentifier - the Template identifier.
mappingResource - the mapping resource that defines the template.
Returns:
a new srom Template object.

newVerification

public abstract Verification newVerification(java.util.Date time,
                                             java.lang.String observerName,
                                             java.lang.String observerOrg,
                                             Code observerCode)
Creates a new srom Verification object.

Parameters:
time - date and time of verification by the verifying observer.
observerName - the verifying observer name.
observerOrg - the verifying organization.
observerCode - coded identifier of the verifying observer.
Returns:
a new srom Verification object.

newRequest

public abstract Request newRequest(java.lang.String studyInstanceUID,
                                   java.lang.String accessionNumber,
                                   java.lang.String fillerOrderNumber,
                                   java.lang.String placerOrderNumber,
                                   java.lang.String procedureID,
                                   java.lang.String procedureDescription,
                                   Code procedureCode)
Creates a new srom Request object.

Parameters:
studyInstanceUID - the study instance UID.
accessionNumber - the accession number
fillerOrderNumber - the filler order number.
placerOrderNumber - the placer order number.
procedureID - the procedure ID.
procedureDescription - the procedure description.
procedureCode - the requested procedure code.
Returns:
a new srom Request object.

newSOPInstanceRef

public abstract SOPInstanceRef newSOPInstanceRef(java.lang.String refSOPClassUID,
                                                 java.lang.String refSOPInstanceUID,
                                                 java.lang.String seriesInstanceUID,
                                                 java.lang.String studyInstanceUID)
Creates a new srom SOPInstanceRef object.

Parameters:
refSOPClassUID - the referenced SOP class UID.
refSOPInstanceUID - the referenced SOP instance UID.
seriesInstanceUID - the series instance UID.
studyInstanceUID - the study instance UID.
Returns:
a new srom SOPInstanceRef object.

newIconImage

public abstract IconImage newIconImage(int rows,
                                       int columns,
                                       byte[] pixelData)

newSamplePositions

public abstract TCoordContent.Positions.Sample newSamplePositions(int[] indexes)
Creates a new srom TCOORD Sample Position.

Parameters:
indexes - Array of samples within a multiplex group specifying temporal points of the referenced data.
Returns:
a new srom TCOORD Sample Position.

newRelativePositions

public abstract TCoordContent.Positions.Relative newRelativePositions(float[] offsets)
Creates a new srom TCOORD Relative Position.

Parameters:
offsets - Temporal points for reference by number of seconds after start of data.
Returns:
a new srom TCOORD Relative Position.

newAbsolutePositions

public abstract TCoordContent.Positions.Absolute newAbsolutePositions(java.util.Date[] dateTimes)
Creates a new srom TCOORD Absolute Position.

Parameters:
dateTimes - Temporal points for reference by absolute time.
Returns:
a new srom TCOORD Absolute Position.

newKeyObject

public abstract KeyObject newKeyObject(Patient patient,
                                       Study study,
                                       Series series,
                                       Equipment equipment,
                                       java.lang.String sopInstanceUID,
                                       int instanceNumber,
                                       java.util.Date obsDateTime,
                                       Code title,
                                       boolean separate)
Creates a new srom Key Object Selection document.

Parameters:
patient - the srom Patient object to use with this KO.
study - the srom Study object to use with this KO.
series - the srom Series object to use with this KO.
equipment - the srom Equipment object to use with this KO.
sopInstanceUID - the SOP instance UID.
instanceNumber - the instance number.
obsDateTime - the date time of the observation.
title - the KO title as srom code object.
separate - whether the document content should the interpreted as continuous text or separate sections.
Returns:
a new srom Key Object Selection document.

newSRDocument

public abstract SRDocument newSRDocument(Patient patient,
                                         Study study,
                                         Series series,
                                         Equipment equipment,
                                         java.lang.String sopClassUID,
                                         java.lang.String sopInstanceUID,
                                         int instanceNumber,
                                         java.util.Date obsDateTime,
                                         Template template,
                                         Code title,
                                         boolean separate)
Creates a new srom Structured Report document.

Parameters:
patient - the srom Patient object to use with this SR.
study - the srom Study object to use with this SR.
series - the srom Series object to use with this SR.
equipment - the srom Equipment object to use with this SR.
sopClassUID - the SOP class UID either 1.2.840.10008.5.1.4.1.1.88.11 for Basic Text SR or 1.2.840.10008.5.1.4.1.1.88.22 for Enhanced SR or 1.2.840.10008.5.1.4.1.1.88.33 for Comprehensive SR.
sopInstanceUID - the SOP instance UID.
instanceNumber - the instance number.
obsDateTime - the date time of the observation.
template - the srom Template object to use with this SR.
title - the SR title as srom Code object.
separate - whether the document content should the interpreted as continuous text or separate sections.
Returns:
a new srom Structured Report document.

newPatient

public abstract Patient newPatient(Dataset ds)
                            throws DcmValueException
Throws:
DcmValueException

newStudy

public abstract Study newStudy(Dataset ds)
                        throws DcmValueException
Throws:
DcmValueException

newSeries

public abstract Series newSeries(Dataset ds)
                          throws DcmValueException
Throws:
DcmValueException

newEquipment

public abstract Equipment newEquipment(Dataset ds)
                                throws DcmValueException
Throws:
DcmValueException

newCode

public abstract Code newCode(Dataset ds)

newCode

public abstract Code newCode(java.lang.String spec)
Creates a Code object from the String representation.

The format of the String representation must match:

 (<code-value>, <coding-scheme-designator>, "<coding-meaning>")
 
or with specifying also a coding scheme version:
 (<code-value>, <coding-scheme-designator> [<coding-scheme-version>], "<coding-meaning>")
 

Parameters:
spec - the String to parse as a Code.
Returns:
Code object of the String representation

newRefSOP

public abstract RefSOP newRefSOP(Dataset ds)
                          throws DcmValueException
Throws:
DcmValueException

newIconImage

public abstract IconImage newIconImage(Dataset ds)
                                throws DcmValueException
Throws:
DcmValueException

newTemplate

public abstract Template newTemplate(Dataset ds)
                              throws DcmValueException
Throws:
DcmValueException

newSRDocument

public abstract SRDocument newSRDocument(Dataset ds)
                                  throws DcmValueException
Throws:
DcmValueException

newKeyObject

public abstract KeyObject newKeyObject(Dataset ds)
                                throws DcmValueException
Throws:
DcmValueException

newHL7SRExport

public abstract HL7SRExport newHL7SRExport(java.lang.String sendingApplication,
                                           java.lang.String sendingFacility,
                                           java.lang.String receivingApplication,
                                           java.lang.String receivingFacility)