Class TransferSyntax

java.lang.Object
com.pixelmed.dicom.TransferSyntax

public class TransferSyntax extends Object

A class to represent the characteristics of a DICOM Transfer Syntax, which may be instantiated from a UID or from basic characteristics, as well as static UID strings for known Transfer Syntaxes, and static methods for extracting the characteristics of known Transfer Syntaxes.

  • Field Details

  • Constructor Details

    • TransferSyntax

      public TransferSyntax(String uid)

      Construct a Transfer Syntax using the specified UID, automatically determining its characteristics.

      Parameters:
      uid - the UID to use to refer to this transfer syntax
    • TransferSyntax

      public TransferSyntax(String transferSyntaxUID, String description, boolean explicitVR, boolean bigEndian, boolean encapsulatedPixelData, boolean lossy)

      Construct a Transfer Syntax using the specified UID and characteristics.

      Parameters:
      transferSyntaxUID - the UID to use to refer to this transfer syntax
      description - the description of this transfer syntax
      explicitVR - true if an explicit VR transfer syntax
      bigEndian - true if big-endian transfer syntax
      encapsulatedPixelData - true if a pixel data encapsulated transfer syntax
      lossy - true if lossy compression
    • TransferSyntax

      public TransferSyntax(String transferSyntaxUID, String description, boolean explicitVR, boolean bigEndian, boolean encapsulatedPixelData, boolean lossy, String fileNameExtension)

      Construct a Transfer Syntax using the specified UID and characteristics.

      Parameters:
      transferSyntaxUID - the UID to use to refer to this transfer syntax
      description - the description of this transfer syntax
      explicitVR - true if an explicit VR transfer syntax
      bigEndian - true if big-endian transfer syntax
      encapsulatedPixelData - true if a pixel data encapsulated transfer syntax
      lossy - true if lossy compression
      fileNameExtension - fileNameExtension to use if bit stream is to be saved as a file
    • TransferSyntax

      public TransferSyntax(String transferSyntaxUID, String description, boolean explicitVR, boolean bigEndian, boolean encapsulatedPixelData, boolean lossy, String fileNameExtension, boolean jpegFamily)

      Construct a Transfer Syntax using the specified UID and characteristics.

      Parameters:
      transferSyntaxUID - the UID to use to refer to this transfer syntax
      description - the description of this transfer syntax
      explicitVR - true if an explicit VR transfer syntax
      bigEndian - true if big-endian transfer syntax
      encapsulatedPixelData - true if a pixel data encapsulated transfer syntax
      lossy - true if lossy compression
      fileNameExtension - fileNameExtension to use if bit stream is to be saved as a file
      jpegFamily - true if uses JPEG family marker segments
  • Method Details

    • getUID

      public String getUID()

      Get the UID of the Transfer Syntax.

      Returns:
      the UID of the Transfer Syntax
    • getDescription

      public String getDescription()

      Get a human-readable description of the Transfer Syntax.

      Returns:
      the description of the Transfer Syntax
    • isRecognized

      public boolean isRecognized()

      Is the Transfer Syntax recognized ?

      Returns:
      true if recognized
    • isBigEndian

      public boolean isBigEndian()

      Is the Transfer Syntax big endian ?

      Returns:
      true if big endian
    • isLittleEndian

      public boolean isLittleEndian()

      Is the Transfer Syntax little endian ?

      Returns:
      true if little endian
    • isExplicitVR

      public boolean isExplicitVR()

      Is the Transfer Syntax explicit VR ?

      Returns:
      true if explicit VR
    • isImplicitVR

      public boolean isImplicitVR()

      Is the Transfer Syntax implicit VR ?

      Returns:
      true if implicit VR
    • isEncapsulated

      public boolean isEncapsulated()

      Does the Transfer Syntax encapsulate the pixel data ?

      Returns:
      true if encapsulate
    • isNotEncapsulated

      public boolean isNotEncapsulated()

      Does the Transfer Syntax encode the pixel data without encapsulation?

      Returns:
      true if not encapsulated
    • isLossy

      public boolean isLossy()

      Is the Transfer Syntax potentially lossy ?

      Returns:
      true if lossy
    • getFileNameExtension

      public String getFileNameExtension()

      Get the file name extension appropriate for the Transfer Syntax.

      Will be "unk" if unrecognized.

      Returns:
      the fileNameExtension to use if bit stream is to be saved as a file
    • isJPEGFamily

      public boolean isJPEGFamily()

      Is the Transfer Syntax part of the JPEG family of Transfer Syntaxes?

      I.e., those that share the same marker segments, such as the EOI marker used for end of frame in fragment detection.

      Returns:
      true if is JPEG family
    • isDeflated

      public boolean isDeflated()

      Does the Transfer Syntax use deflate compression ?

      Returns:
      true if deflated
    • isBzip2ed

      public boolean isBzip2ed()

      Does the Transfer Syntax use bzip2 compression ?

      Returns:
      true if bzip2
    • toString

      public String toString()

      Get the Transfer Syntax as a string.

      Overrides:
      toString in class Object
      Returns:
      the UID of the Transfer Syntax
    • dump

      public String dump()

      Describe the characteristics of Transfer Syntax.

      Returns:
      a detailed description of the Transfer Syntax
    • isExplicitVR

      public static boolean isExplicitVR(String uid)

      Is the Transfer Syntax with the specified UID explicit VR ?

      Parameters:
      uid -
      Returns:
      true if explicit VR
    • isImplicitVR

      public static boolean isImplicitVR(String uid)

      Is the Transfer Syntax with the specified UID implicit VR ?

      Parameters:
      uid -
      Returns:
      true if explicit VR
    • isBigEndian

      public static boolean isBigEndian(String uid)

      Is the Transfer Syntax with the specified UID big endian ?

      Parameters:
      uid -
      Returns:
      true if big endian
    • isLittleEndian

      public static boolean isLittleEndian(String uid)

      Is the Transfer Syntax with the specified UID little endian ?

      Parameters:
      uid -
      Returns:
      true if little endian
    • isEncapsulated

      public static boolean isEncapsulated(String uid)

      Does the Transfer Syntax encapsulate the pixel data ?

      Parameters:
      uid -
      Returns:
      true if encapsulate
    • isNotEncapsulated

      public static boolean isNotEncapsulated(String uid)

      Does the Transfer Syntax encode the pixel data without encapsulation?

      Parameters:
      uid -
      Returns:
      true if not encapsulated