Trispark JDT
2.50.13

com.archimed.dicom
Class TagWriteEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.archimed.dicom.TagWriteEvent
All Implemented Interfaces:
java.io.Serializable

public class TagWriteEvent
extends java.util.EventObject

TagWriteEvent is used to notify interested parties that a tag will be written. A TagWriteListener can control how the write operation is further processed with the dataWriteStatus property.

Since:
2.5
See Also:
TagWriteEvent, Serialized Form

Field Summary
static int NEXT_TAG
          the next tag is written.
static int WRITE_TAG
          instructs JDT to write the tag as it is stored in the DicomObject (default)
 
Fields inherited from class java.util.EventObject
source
 
Method Summary
 DataElement getDataElement()
          returns the Data Element that will be written
 int getDataWriteStatus()
          returns the read status (one of WRITE_TAG, NEXT_TAG)
 DicomObject getDicomObject()
          returns the DicomObject of the data element will be written.
 int getElement()
          returns the element value of the tag will be written.
 int getGroup()
          returns the group value of the tag that will be written.
 int getLength()
          returns the length of the data portion of the tag will be written.
 long getOffset()
          returns the offset of the current tag - before the first byte of the tag - starting from the beginning of the stream.
 java.io.OutputStream getOutputStream()
          returns an outputstream positioned at the beginning of the header of the tag
 int getTag()
          returns the DDict constant corresponding to the group,element pair of the data element that will be written.
 int getVRType()
          returns the vr type of the tag will be written.
 boolean isStopWriting()
          returns if writing to the stream should be stopped.
 void setDataWriteStatus(int dataWriteStatus)
          sets the write status.
 void setStopWriting(boolean stopWriting)
          sets whether the DicomWriter should stop writing tags after processing the current tag.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WRITE_TAG

public static final int WRITE_TAG
instructs JDT to write the tag as it is stored in the DicomObject (default)

See Also:
Constant Field Values

NEXT_TAG

public static final int NEXT_TAG
the next tag is written. The DicomWriter assumes that any of the listeners will take care of writing the tag and makes sure that the outputstream is positioned at the start of the next tag. This option is not compatible with writing explicit grouplenghts.

See Also:
Constant Field Values
Method Detail

getDicomObject

public DicomObject getDicomObject()
returns the DicomObject of the data element will be written.


getGroup

public int getGroup()
returns the group value of the tag that will be written.

Returns:

getElement

public int getElement()
returns the element value of the tag will be written.

Returns:

getTag

public int getTag()
returns the DDict constant corresponding to the group,element pair of the data element that will be written.

Returns:
int

getVRType

public int getVRType()
returns the vr type of the tag will be written.

Returns:

getLength

public int getLength()
returns the length of the data portion of the tag will be written. This is the value specified in the tag header. If the length is undefined (= 0xFFFFFFFF) the returned value is -1.

Returns:

getOutputStream

public java.io.OutputStream getOutputStream()
returns an outputstream positioned at the beginning of the header of the tag

Returns:

getDataElement

public DataElement getDataElement()
returns the Data Element that will be written


getDataWriteStatus

public int getDataWriteStatus()
returns the read status (one of WRITE_TAG, NEXT_TAG)

Returns:

setDataWriteStatus

public void setDataWriteStatus(int dataWriteStatus)
sets the write status. The write status determines what will happen after the beforeHeader call of every �{link TagWriteListener} is called.

Parameters:
dataWriteStatus - one of
  • @{link WRITE_TAG} the tag is written normally (default)
  • @{link NEXT_TAG} the tag is skipped

isStopWriting

public boolean isStopWriting()
returns if writing to the stream should be stopped. Default this flag is false and the DicomWriter writes all subsequent tags

Returns:
boolean

setStopWriting

public void setStopWriting(boolean stopWriting)
sets whether the DicomWriter should stop writing tags after processing the current tag. Default this flag is set to false.

Parameters:
stopWriting - boolean

getOffset

public long getOffset()
returns the offset of the current tag - before the first byte of the tag - starting from the beginning of the stream.


Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.