jdcm
Class DicomSequence

java.lang.Object
  extended by jdcm.DicomSequence

public final class DicomSequence
extends java.lang.Object

DicomSequence class handle the sequence of data element with Value Representation SQ or pixel Data Element (0x7FE0,0x0010)in encapsulated format.


Constructor Summary
DicomSequence(java.util.ArrayList<byte[]> fragments)
          Constructs an sequence with an ArrayList of fragment of pixel data Item and an Sequence delimitation Item.
DicomSequence(java.util.ArrayList<DicomSet> dicomSets, boolean undefLength)
          Constructs an sequence with an ArrayList of Data Set Items.
DicomSequence(byte[] fragment)
          Constructs an sequence with single fragment of pixel data Item and an Sequence delimitation Item.
DicomSequence(DicomSet dicomSet, boolean undefLength)
          Constructs an sequence with an single Data Set Item.
 
Method Summary
 void addDicomSet(DicomSet dicomSet)
          Add data set to the DicomSequence
 void addFragment(byte[] fragment)
          Adds a fragment of pixel data to the sequence.
 DicomSet getDicomSet(int index)
          Retrieve an Data Set in this sequence.
 byte[] getFragment(int index)
          Retrieve an fragment of pixel data in this sequence.
 java.util.Iterator<java.lang.Object> iterator()
          Retrieve an iterator over Data Sets or Fragments in this Dicom Sequence
 int size()
          Retrieve the number of items in this sequence.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DicomSequence

public DicomSequence(byte[] fragment)
Constructs an sequence with single fragment of pixel data Item and an Sequence delimitation Item.

Parameters:
fragment - if fragment is null only Sequence Delimitation Item is created.

DicomSequence

public DicomSequence(java.util.ArrayList<byte[]> fragments)
Constructs an sequence with an ArrayList of fragment of pixel data Item and an Sequence delimitation Item.

Parameters:
fragments - if fragment is null only Sequence Delimitation Item is created.

DicomSequence

public DicomSequence(DicomSet dicomSet,
                     boolean undefLength)
Constructs an sequence with an single Data Set Item.

Parameters:
dicomSet -
undefLength - if true length is undefined and Sequence Delimitation Item added.

DicomSequence

public DicomSequence(java.util.ArrayList<DicomSet> dicomSets,
                     boolean undefLength)
Constructs an sequence with an ArrayList of Data Set Items.

Parameters:
dicomSets -
undefLength - if true length is undefined and Sequence Delimitation Item added.
Method Detail

getDicomSet

public DicomSet getDicomSet(int index)
Retrieve an Data Set in this sequence.

Parameters:
index -

getFragment

public byte[] getFragment(int index)
Retrieve an fragment of pixel data in this sequence.

Parameters:
index -

addFragment

public void addFragment(byte[] fragment)
Adds a fragment of pixel data to the sequence.

Parameters:
fragment -

addDicomSet

public void addDicomSet(DicomSet dicomSet)
Add data set to the DicomSequence

Parameters:
dicomSet -

size

public int size()
Retrieve the number of items in this sequence.


iterator

public java.util.Iterator<java.lang.Object> iterator()
Retrieve an iterator over Data Sets or Fragments in this Dicom Sequence

Returns:
iterator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object