com.pixelmed.dicom

## Class ImageLibrary

- java.lang.Object
- - com.pixelmed.dicom.ImageLibrary

Direct Known Subclasses:
  CrossSectionalImageLibrary, ProjectionXRayImageLibrary

    public class ImageLibrary
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `ImageLibrary.ImageLibraryEntry`

### Field Summary

Fields
`protected CompositeInstanceContext` `compositeInstanceContext`
`protected java.util.Map<java.lang.String,ImageLibrary.ImageLibraryEntry>` `entriesIndexedBySOPInstanceUID`

### Constructor Summary

Constructors
Constructor and Description
`ImageLibrary()`
`ImageLibrary(AttributeList list)`
`ImageLibrary(ContentItem imageLibraryContainer, AttributeList list)`
`ImageLibrary(java.util.Set<java.io.File> files)`

### Method Summary

Methods
`ImageLibrary.ImageLibraryEntry` `addImage(AttributeList list)`
`protected void` `constructImageLibrary(ContentItem imageLibraryContainer, AttributeList list)`
`static ContentItem` `findImageLibraryContainer(ContentItem node)`
`AttributeList` `getAttributeList()`
`SequenceAttribute` `getCommonInstanceReferenceModuleReferencedSeriesSequence(java.lang.String studyInstanceUID)`
`SequenceAttribute` `getHierarchicalEvidenceSequence()`
`protected java.util.Map<java.lang.String,HierarchicalSOPInstanceReference>` `getHierarchicalSOPInstanceReferencesIndexedBySOPInstanceUID(AttributeList list)`
`StructuredReport` `getStructuredReport()`
`ContentItem` `getStructuredReportFragment(ContentItem root)`
`static void` `main(java.lang.String[] arg)` Create an SR Image Library from a bunch of DICOM image instances.
`ImageLibrary.ImageLibraryEntry` `makeImageLibraryEntry(AttributeList list)`
`ImageLibrary.ImageLibraryEntry` `makeImageLibraryEntry(ContentItemFactory.ImageContentItem imageContentItem, java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> hierarchicalSOPInstanceReferencesIndexedBySOPInstanceUID)`
`static ImageLibrary` `read(java.lang.String filename)`
`java.lang.String` `toString()`
`void` `write(java.lang.String filename)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### entriesIndexedBySOPInstanceUID

    protected java.util.Map<java.lang.String,ImageLibrary.ImageLibraryEntry> entriesIndexedBySOPInstanceUID

#### compositeInstanceContext

    protected CompositeInstanceContext compositeInstanceContext

### Constructor Detail

#### ImageLibrary

    public ImageLibrary()

#### ImageLibrary

    public ImageLibrary(AttributeList list)
                 throws DicomException

Throws:
  `DicomException`

#### ImageLibrary

    public ImageLibrary(ContentItem imageLibraryContainer,
                AttributeList list)

#### ImageLibrary

    public ImageLibrary(java.util.Set<java.io.File> files)
                 throws java.io.IOException,
                        DicomException

Throws:
  `java.io.IOException`
  `DicomException`

### Method Detail

#### makeImageLibraryEntry

    public ImageLibrary.ImageLibraryEntry makeImageLibraryEntry(ContentItemFactory.ImageContentItem imageContentItem,
                                                       java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> hierarchicalSOPInstanceReferencesIndexedBySOPInstanceUID)

#### makeImageLibraryEntry

    public ImageLibrary.ImageLibraryEntry makeImageLibraryEntry(AttributeList list)
                                                         throws DicomException

Throws:
  `DicomException`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getCommonInstanceReferenceModuleReferencedSeriesSequence

    public SequenceAttribute getCommonInstanceReferenceModuleReferencedSeriesSequence(java.lang.String studyInstanceUID)
                                                                               throws DicomException

Throws:
  `DicomException`

#### getHierarchicalEvidenceSequence

    public SequenceAttribute getHierarchicalEvidenceSequence()
                                                      throws DicomException

Throws:
  `DicomException`

#### findImageLibraryContainer

    public static ContentItem findImageLibraryContainer(ContentItem node)

#### getHierarchicalSOPInstanceReferencesIndexedBySOPInstanceUID

    protected java.util.Map<java.lang.String,HierarchicalSOPInstanceReference> getHierarchicalSOPInstanceReferencesIndexedBySOPInstanceUID(AttributeList list)

#### constructImageLibrary

    protected void constructImageLibrary(ContentItem imageLibraryContainer,
                             AttributeList list)

#### getStructuredReportFragment

    public ContentItem getStructuredReportFragment(ContentItem root)
                                            throws DicomException

Throws:
  `DicomException`

#### getStructuredReport

    public StructuredReport getStructuredReport()
                                         throws DicomException

Throws:
  `DicomException`

#### getAttributeList

    public AttributeList getAttributeList()
                                   throws DicomException

Throws:
  `DicomException`

#### write

    public void write(java.lang.String filename)
               throws DicomException,
                      java.io.IOException

Throws:
  `DicomException`
  `java.io.IOException`

#### read

    public static ImageLibrary read(java.lang.String filename)
                             throws DicomException,
                                    java.io.IOException

Throws:
  `DicomException`
  `java.io.IOException`

#### addImage

    public ImageLibrary.ImageLibraryEntry addImage(AttributeList list)
                                            throws DicomException

Throws:
  `DicomException`

#### main

    public static void main(java.lang.String[] arg)

Create an SR Image Library from a bunch of DICOM image instances.

Adds a new series (instance UID) to the existing study (instance UID).

Parameters:
  `arg` - the path for the SR Image Library output, then the filenames and/or folder names of files containing the input image files