com.pixelmed.dicom
Class FileMetaInformation

java.lang.Object
  extended by com.pixelmed.dicom.FileMetaInformation

public class FileMetaInformation
extends 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
FileMetaInformation(String mediaStorageSOPClassUID, String mediaStorageSOPInstanceUID, String transferSyntaxUID, String sourceApplicationEntityTitle)
          Construct an instance of the file meta information from the specified parameters.
 
Method Summary
static void addFileMetaInformation(AttributeList list, String transferSyntaxUID, 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, String mediaStorageSOPClassUID, String mediaStorageSOPInstanceUID, String transferSyntaxUID, 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(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(String mediaStorageSOPClassUID,
                           String mediaStorageSOPInstanceUID,
                           String transferSyntaxUID,
                           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
Method Detail

addFileMetaInformation

public static void addFileMetaInformation(AttributeList list,
                                          String mediaStorageSOPClassUID,
                                          String mediaStorageSOPInstanceUID,
                                          String transferSyntaxUID,
                                          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

addFileMetaInformation

public static void addFileMetaInformation(AttributeList list,
                                          String transferSyntaxUID,
                                          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

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(String[] arg)

For testing.

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

Parameters:
arg - ignored