org.dicom4j.data
Class FileMetaInformation

java.lang.Object
  extended by org.dicom4j.data.DataSet
      extended by org.dicom4j.data.FileMetaInformation

public class FileMetaInformation
extends DataSet

File Meta Information (see DICOM PS 3.10)


extends a DataSet by adding specific methods related to FMI

Since:
0.0.0
Author:
Laurent Lecomte

Field Summary
static String DicomPrefix
          the Dicom Prefix
static int PREAMBLE_LENGTH
           
 
Constructor Summary
FileMetaInformation()
           
FileMetaInformation(boolean mustAddElements)
          creates a new FileMetaInformation.
FileMetaInformation(byte[] aPreambule, DataSet aDataSet)
          create a FMI from a DataSet
 
Method Summary
 void addElementsAndPreambule()
          add all elements and the preamble (see PS 3.10 for more details)
 UnsignedLong getFileMetaInformationGroupLengthElement()
          Retrun the File Meta Information Group Length
 OtherByteString getFileMetaInformationVersionElement()
          Retrun the File Meta Information Version
 String getImplementationClassUID()
           
 UniqueIdentifier getImplementationClassUIDElement()
          return the Implementation Class UID Element
 String getImplementationVersionName()
           
 ShortString getImplementationVersionNameElement()
          Retrun the Implementation Version Name Element
 UniqueIdentifier getMediaStorageSOPClassUIDElement()
          Retrun the Media Storage SOP Class UID
 UniqueIdentifier getMediaStorageSOPInstanceUIDElement()
           
 byte[] getPreambule()
          Return the Preambule
 UniqueIdentifier getPrivateInformationCreatorUID()
          Retrun the Private Information Creator UID
 String getSourceApplicationEntityTitle()
           
 ApplicationEntity getSourceApplicationEntityTitleElement()
          Retrun the Implementation Version Name Element
 String getTransferSyntaxUID()
           
 UniqueIdentifier getTransferSyntaxUIDElement()
          Retrun the Transfer Syntax UID
 boolean hasImplementationClassUIDElement()
           
 boolean hasImplementationVersionNameElement()
           
 boolean hasMediaStorageSOPClassUIDElement()
           
 boolean hasMediaStorageSOPInstanceUIDElement()
           
 boolean hasPrivateInformationCreatorUID()
          Return true is the DataSet have the PrivateInformationCreatorUID tag
 boolean hasSourceApplicationEntityTitleElement()
           
 boolean hasTransferSyntaxUIDElement()
          Return true is the DataSet have the TransferSyntaxUID tag
 void setImplementationClassUID(String aImplementationClassUID)
           
 void setImplementationVersionName(String aImplementationVersionName)
           
 void setMediaStorageSOPClassUID(String aMediaStorageSOPClass)
           
 void setMediaStorageSOPInstanceUID(String aMediaStorageSOPInstanceUID)
           
 void setPreambule(byte[] aPreambule)
          Set the value for the Dicom Premabule
 void setSourceApplicationEntityTitle(String aSourceApplicationEntityTitle)
           
 void setTransferSyntaxUID(String aTransferSyntaxUID)
           
 
Methods inherited from class org.dicom4j.data.DataSet
addApplicationEntity, addCodeString, addDataSet, addElement, addIntegerString, addModule, addPersonName, addPersonName, addShortString, addUniqueIdentifier, clear, count, getApplicationEntity, getApplicationEntityOrNull, getAttribute, getCodeString, getDataElementsOfSameGroup, getDate, getDoubleValues, getElement, getElementOrNull, getIntegerString, getIterator, getLongString, getLongStringOrNull, getLongText, getLongTextOrNull, getOtherByteString, getOtherByteStringOrNull, getPersonName, getPersonNameOrNull, getSequenceOfItems, getSequenceOfItemsOrNull, getShortString, getTime, getUniqueIdentifier, getUniqueIdentifierOrNull, getUnsignedLong, getUnsignedLongOrNull, getUnsignedShort, hasElement, read, read, removeAll, removeElement, removeElement, toArray, toBytes, toString, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DicomPrefix

public static final String DicomPrefix
the Dicom Prefix

See Also:
Constant Field Values

PREAMBLE_LENGTH

public static final int PREAMBLE_LENGTH
See Also:
Constant Field Values
Constructor Detail

FileMetaInformation

public FileMetaInformation(boolean mustAddElements)
creates a new FileMetaInformation. If true is supplied dicom norms elements will be add, otherwise the FileMetaInformation will be empty

Parameters:
mustAddElements - true if must contain element

FileMetaInformation

public FileMetaInformation()

FileMetaInformation

public FileMetaInformation(byte[] aPreambule,
                           DataSet aDataSet)
                    throws DicomViolationException
create a FMI from a DataSet

Parameters:
aPreambule -
aDataSet -
Throws:
DicomViolationException
Method Detail

addElementsAndPreambule

public void addElementsAndPreambule()
                             throws Exception
add all elements and the preamble (see PS 3.10 for more details)

Throws:
Exception

getFileMetaInformationGroupLengthElement

public UnsignedLong getFileMetaInformationGroupLengthElement()
Retrun the File Meta Information Group Length

Returns:
the File Meta Information Group Length

getFileMetaInformationVersionElement

public OtherByteString getFileMetaInformationVersionElement()
Retrun the File Meta Information Version

Returns:
the File Meta Information Version

getImplementationClassUID

public String getImplementationClassUID()

getImplementationClassUIDElement

public UniqueIdentifier getImplementationClassUIDElement()
                                                  throws DicomException
return the Implementation Class UID Element

Returns:
the Implementation Class UID
Throws:
DicomException
Since:
0.0.3

getImplementationVersionName

public String getImplementationVersionName()
Returns:
Since:
0.0.3

getImplementationVersionNameElement

public ShortString getImplementationVersionNameElement()
Retrun the Implementation Version Name Element

Returns:
the Element
Since:
0.0.3

getMediaStorageSOPClassUIDElement

public UniqueIdentifier getMediaStorageSOPClassUIDElement()
                                                   throws DicomException
Retrun the Media Storage SOP Class UID

Returns:
the Media Storage SOP Class UID
Throws:
DicomException

getMediaStorageSOPInstanceUIDElement

public UniqueIdentifier getMediaStorageSOPInstanceUIDElement()
                                                      throws DicomException
Throws:
DicomException

getPreambule

public byte[] getPreambule()
Return the Preambule

Returns:
the Preambule

getPrivateInformationCreatorUID

public UniqueIdentifier getPrivateInformationCreatorUID()
                                                 throws DicomException
Retrun the Private Information Creator UID

Returns:
the Private Information Creator UID
Throws:
DicomException

getSourceApplicationEntityTitle

public String getSourceApplicationEntityTitle()
Returns:
Since:
0.0.3

getSourceApplicationEntityTitleElement

public ApplicationEntity getSourceApplicationEntityTitleElement()
                                                         throws NoSuchElementException,
                                                                WrongDataElementTypeException
Retrun the Implementation Version Name Element

Returns:
the Element
Throws:
NoSuchElementException
WrongDataElementTypeException
Since:
0.0.3

getTransferSyntaxUID

public String getTransferSyntaxUID()

getTransferSyntaxUIDElement

public UniqueIdentifier getTransferSyntaxUIDElement()
                                             throws DicomException
Retrun the Transfer Syntax UID

Returns:
the Transfer Syntax UID
Throws:
DicomException

hasImplementationClassUIDElement

public boolean hasImplementationClassUIDElement()

hasImplementationVersionNameElement

public boolean hasImplementationVersionNameElement()
Returns:
Since:
0.0.3

hasMediaStorageSOPClassUIDElement

public boolean hasMediaStorageSOPClassUIDElement()

hasMediaStorageSOPInstanceUIDElement

public boolean hasMediaStorageSOPInstanceUIDElement()

hasPrivateInformationCreatorUID

public boolean hasPrivateInformationCreatorUID()
Return true is the DataSet have the PrivateInformationCreatorUID tag

Returns:
true if tag present

hasSourceApplicationEntityTitleElement

public boolean hasSourceApplicationEntityTitleElement()
Returns:
Since:
0.0.3

hasTransferSyntaxUIDElement

public boolean hasTransferSyntaxUIDElement()
Return true is the DataSet have the TransferSyntaxUID tag

Returns:
true if the tag is present

setImplementationClassUID

public void setImplementationClassUID(String aImplementationClassUID)

setImplementationVersionName

public void setImplementationVersionName(String aImplementationVersionName)
Parameters:
aImplementationVersionName -
Since:
0.0.3

setMediaStorageSOPClassUID

public void setMediaStorageSOPClassUID(String aMediaStorageSOPClass)

setMediaStorageSOPInstanceUID

public void setMediaStorageSOPInstanceUID(String aMediaStorageSOPInstanceUID)

setPreambule

public void setPreambule(byte[] aPreambule)
                  throws DicomViolationException
Set the value for the Dicom Premabule

Parameters:
aPreambule -
Throws:
DicomViolationException

setSourceApplicationEntityTitle

public void setSourceApplicationEntityTitle(String aSourceApplicationEntityTitle)
Parameters:
aImplementationVersionName -
Since:
0.0.3

setTransferSyntaxUID

public void setTransferSyntaxUID(String aTransferSyntaxUID)


Copyright © 2009 dicom4j. All Rights Reserved.