Class FileMetaInformation
- java.lang.Object
-
- com.pixelmed.dicom.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.
-
-
-
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 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)- 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 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)- 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 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)- 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
-
-