Class FileMetaInformation


  • public class FileMetaInformation
    extends java.lang.Object

    A class to abstract the contents of a file meta information header as used for a DICOM PS 3.10 file, with additional static methods to add to and extract from an existing list of attributes.

    • Constructor Summary

      Constructors 
      Constructor Description
      FileMetaInformation​(java.lang.String mediaStorageSOPClassUID, java.lang.String mediaStorageSOPInstanceUID, java.lang.String transferSyntaxUID, java.lang.String sourceApplicationEntityTitle)
      Construct an instance of the file meta information from the specified parameters.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addFileMetaInformation​(AttributeList list, java.lang.String transferSyntaxUID, java.lang.String sourceApplicationEntityTitle)
      Add the file meta information attributes to an existing list, extracting the known UIDs from that list, and adding the additional parameters supplied.
      static void addFileMetaInformation​(AttributeList list, java.lang.String mediaStorageSOPClassUID, java.lang.String mediaStorageSOPInstanceUID, java.lang.String transferSyntaxUID, java.lang.String sourceApplicationEntityTitle)
      Add the file meta information attributes to an existing list, using only the parameters supplied.
      AttributeList getAttributeList()
      Get the attribute list in this instance of the file meat information.
      static void main​(java.lang.String[] arg)
      For testing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileMetaInformation

        public FileMetaInformation​(java.lang.String mediaStorageSOPClassUID,
                                   java.lang.String mediaStorageSOPInstanceUID,
                                   java.lang.String transferSyntaxUID,
                                   java.lang.String sourceApplicationEntityTitle)
                            throws DicomException

        Construct an instance of the file meta information from the specified parameters.

        Parameters:
        mediaStorageSOPClassUID - the SOP Class UID of the dataset to which the file meta information will be prepended
        mediaStorageSOPInstanceUID - the SOP Instance UID of the dataset to which the file meta information will be prepended
        transferSyntaxUID - the transfer syntax UID that will be used to write the dataset
        sourceApplicationEntityTitle - the source AE title of the dataset (may be null)
        Throws:
        DicomException - if error in DICOM encoding
    • Method Detail

      • addFileMetaInformation

        public static void addFileMetaInformation​(AttributeList list,
                                                  java.lang.String mediaStorageSOPClassUID,
                                                  java.lang.String mediaStorageSOPInstanceUID,
                                                  java.lang.String transferSyntaxUID,
                                                  java.lang.String sourceApplicationEntityTitle)
                                           throws DicomException

        Add the file meta information attributes to an existing list, using only the parameters supplied.

        Note that the appropriate (mandatory) file meta information group length tag is also computed and added.

        Parameters:
        list - the list to be extended with file meta information attributes
        mediaStorageSOPClassUID - the SOP Class UID of the dataset to which the file meta information will be prepended
        mediaStorageSOPInstanceUID - the SOP Instance UID of the dataset to which the file meta information will be prepended
        transferSyntaxUID - the transfer syntax UID that will be used to write the dataset
        sourceApplicationEntityTitle - the source AE title of the dataset (may be null)
        Throws:
        DicomException - if error in DICOM encoding
      • addFileMetaInformation

        public static void addFileMetaInformation​(AttributeList list,
                                                  java.lang.String transferSyntaxUID,
                                                  java.lang.String sourceApplicationEntityTitle)
                                           throws DicomException

        Add the file meta information attributes to an existing list, extracting the known UIDs from that list, and adding the additional parameters supplied.

        Parameters:
        list - the list to be extended with file meta information attributes
        transferSyntaxUID - the transfer syntax UID that will be used to write this list
        sourceApplicationEntityTitle - the source AE title of the dataset in the list (may be null)
        Throws:
        DicomException - if error in DICOM encoding
      • getAttributeList

        public AttributeList getAttributeList()

        Get the attribute list in this instance of the file meat information.

        Returns:
        the attribute list
      • main

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

        For testing.

        Generate a dummy file meta information header and test reading and writing it.

        Parameters:
        arg - ignored