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 and 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.
|
Modifier and Type | Method and 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.
|
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.
mediaStorageSOPClassUID
- the SOP Class UID of the dataset to which the file meta information will be prependedmediaStorageSOPInstanceUID
- the SOP Instance UID of the dataset to which the file meta information will be prependedtransferSyntaxUID
- the transfer syntax UID that will be used to write the datasetsourceApplicationEntityTitle
- the source AE title of the dataset (may be null)DicomException
- if error in DICOM encodingpublic 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.
list
- the list to be extended with file meta information attributestransferSyntaxUID
- the transfer syntax UID that will be used to write this listsourceApplicationEntityTitle
- the source AE title of the dataset in the list (may be null)DicomException
- if error in DICOM encodingpublic 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.
list
- the list to be extended with file meta information attributesmediaStorageSOPClassUID
- the SOP Class UID of the dataset to which the file meta information will be prependedmediaStorageSOPInstanceUID
- the SOP Instance UID of the dataset to which the file meta information will be prependedtransferSyntaxUID
- the transfer syntax UID that will be used to write the datasetsourceApplicationEntityTitle
- the source AE title of the dataset (may be null)DicomException
- if error in DICOM encodingpublic AttributeList getAttributeList()
Get the attribute list in this instance of the file meat information.
public static void main(java.lang.String[] arg)
For testing.
Generate a dummy file meta information header and test reading and writing it.
arg
- ignored