public class Attributes extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
Attributes.Visitor |
| Constructor and Description |
|---|
Attributes() |
Attributes(Attributes other) |
Attributes(Attributes other,
boolean bigEndian) |
Attributes(Attributes other,
boolean bigEndian,
Attributes selection) |
Attributes(Attributes other,
boolean bigEndian,
int... selection) |
Attributes(Attributes other,
int... selection) |
Attributes(boolean bigEndian) |
Attributes(boolean bigEndian,
int initialCapacity) |
Attributes(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Attributes.Visitor visitor,
boolean visitNestedDatasets)
Invokes
Visitor.visit for each attribute in this instance. |
boolean |
addAll(Attributes other) |
boolean |
addNotSelected(Attributes other,
int... selection)
Add not selected attributes from another Attributes object to this.
|
boolean |
addNotSelected(Attributes other,
int[] selection,
int fromIndex,
int toIndex)
Add not selected attributes from another Attributes object to this.
|
boolean |
addSelected(Attributes other,
Attributes selection) |
boolean |
addSelected(Attributes other,
int... selection)
Add selected attributes from another Attributes object to this.
|
boolean |
addSelected(Attributes other,
int[] selection,
int fromIndex,
int toIndex)
Add selected attributes from another Attributes object to this.
|
boolean |
addSelected(Attributes other,
String privateCreator,
int tag) |
boolean |
bigEndian() |
int |
calcLength(DicomEncodingOptions encOpts,
boolean explicitVR) |
Object |
clearProperty(String key) |
boolean |
contains(int tag) |
boolean |
contains(String privateCreator,
int tag) |
boolean |
containsValue(int tag) |
boolean |
containsValue(String privateCreator,
int tag) |
Attributes |
createFileMetaInformation(String tsuid) |
static Attributes |
createFileMetaInformation(String iuid,
String cuid,
String tsuid) |
Sequence |
ensureSequence(int tag,
int initialCapacity) |
Sequence |
ensureSequence(String privateCreator,
int tag,
int initialCapacity) |
boolean |
equals(Object o) |
byte[] |
getBytes(int tag) |
byte[] |
getBytes(String privateCreator,
int tag) |
Date |
getDate(int tag) |
Date |
getDate(int tag,
Date defVal) |
Date |
getDate(int tag,
Date defVal,
DatePrecision precision) |
Date |
getDate(int tag,
DatePrecision precision) |
Date |
getDate(int tag,
int valueIndex) |
Date |
getDate(int tag,
int valueIndex,
Date defVal) |
Date |
getDate(int tag,
int valueIndex,
Date defVal,
DatePrecision precision) |
Date |
getDate(int tag,
int valueIndex,
DatePrecision precision) |
Date |
getDate(long tag) |
Date |
getDate(long tag,
Date defVal) |
Date |
getDate(long tag,
Date defVal,
DatePrecision precision) |
Date |
getDate(long tag,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag) |
Date |
getDate(String privateCreator,
int tag,
Date defVal,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
int valueIndex) |
Date |
getDate(String privateCreator,
int tag,
int valueIndex,
Date defVal) |
Date |
getDate(String privateCreator,
int tag,
int valueIndex,
Date defVal,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
int valueIndex,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
VR vr) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
Date defVal) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
Date defVal,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
int valueIndex) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
int valueIndex,
Date defVal) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
int valueIndex,
Date defVal,
DatePrecision precision) |
Date |
getDate(String privateCreator,
int tag,
VR vr,
int valueIndex,
DatePrecision precision) |
Date |
getDate(String privateCreator,
long tag) |
Date |
getDate(String privateCreator,
long tag,
Date defVal) |
Date |
getDate(String privateCreator,
long tag,
Date defVal,
DatePrecision precision) |
Date |
getDate(String privateCreator,
long tag,
DatePrecision precision) |
DateRange |
getDateRange(int tag) |
DateRange |
getDateRange(int tag,
DateRange defVal) |
DateRange |
getDateRange(long tag) |
DateRange |
getDateRange(long tag,
DateRange defVal) |
DateRange |
getDateRange(String privateCreator,
int tag) |
DateRange |
getDateRange(String privateCreator,
int tag,
DateRange defVal) |
DateRange |
getDateRange(String privateCreator,
int tag,
VR vr) |
DateRange |
getDateRange(String privateCreator,
int tag,
VR vr,
DateRange defVal) |
DateRange |
getDateRange(String privateCreator,
long tag) |
DateRange |
getDateRange(String privateCreator,
long tag,
DateRange defVal) |
Date[] |
getDates(int tag) |
Date[] |
getDates(int tag,
DatePrecisions precisions) |
Date[] |
getDates(long tag) |
Date[] |
getDates(long tag,
DatePrecisions precisions) |
Date[] |
getDates(String privateCreator,
int tag) |
Date[] |
getDates(String privateCreator,
int tag,
DatePrecisions precisions) |
Date[] |
getDates(String privateCreator,
int tag,
VR vr) |
Date[] |
getDates(String privateCreator,
int tag,
VR vr,
DatePrecisions precisions) |
Date[] |
getDates(String privateCreator,
long tag) |
Date[] |
getDates(String privateCreator,
long tag,
DatePrecisions precisions) |
TimeZone |
getDefaultTimeZone() |
double |
getDouble(int tag,
double defVal) |
double |
getDouble(int tag,
int valueIndex,
double defVal) |
double |
getDouble(String privateCreator,
int tag,
double defVal) |
double |
getDouble(String privateCreator,
int tag,
int valueIndex,
double defVal) |
double |
getDouble(String privateCreator,
int tag,
VR vr,
double defVal) |
double |
getDouble(String privateCreator,
int tag,
VR vr,
int valueIndex,
double defVal) |
double[] |
getDoubles(int tag) |
double[] |
getDoubles(String privateCreator,
int tag) |
double[] |
getDoubles(String privateCreator,
int tag,
VR vr) |
float |
getFloat(int tag,
float defVal) |
float |
getFloat(int tag,
int valueIndex,
float defVal) |
float |
getFloat(String privateCreator,
int tag,
float defVal) |
float |
getFloat(String privateCreator,
int tag,
int valueIndex,
float defVal) |
float |
getFloat(String privateCreator,
int tag,
VR vr,
float defVal) |
float |
getFloat(String privateCreator,
int tag,
VR vr,
int valueIndex,
float defVal) |
float[] |
getFloats(int tag) |
float[] |
getFloats(String privateCreator,
int tag) |
float[] |
getFloats(String privateCreator,
int tag,
VR vr) |
int |
getInt(int tag,
int defVal) |
int |
getInt(int tag,
int valueIndex,
int defVal) |
int |
getInt(String privateCreator,
int tag,
int defVal) |
int |
getInt(String privateCreator,
int tag,
int valueIndex,
int defVal) |
int |
getInt(String privateCreator,
int tag,
VR vr,
int defVal) |
int |
getInt(String privateCreator,
int tag,
VR vr,
int valueIndex,
int defVal) |
int[] |
getInts(int tag) |
int[] |
getInts(String privateCreator,
int tag) |
int[] |
getInts(String privateCreator,
int tag,
VR vr) |
long |
getItemPosition() |
int |
getLength() |
int |
getLevel() |
Attributes |
getNestedDataset(int sequenceTag) |
Attributes |
getNestedDataset(int sequenceTag,
int itemIndex) |
Attributes |
getNestedDataset(ItemPointer... itemPointers) |
Attributes |
getNestedDataset(String privateCreator,
int sequenceTag) |
Attributes |
getNestedDataset(String privateCreator,
int sequenceTag,
int itemIndex) |
Attributes |
getParent() |
String |
getPrivateCreator(int tag) |
Object |
getProperty(String key,
Object defVal) |
byte[] |
getSafeBytes(int tag) |
byte[] |
getSafeBytes(String privateCreator,
int tag) |
Sequence |
getSequence(int tag) |
Sequence |
getSequence(String privateCreator,
int tag) |
SpecificCharacterSet |
getSpecificCharacterSet() |
SpecificCharacterSet |
getSpecificCharacterSet(VR vr) |
String |
getString(int tag) |
String |
getString(int tag,
int valueIndex) |
String |
getString(int tag,
int valueIndex,
String defVal) |
String |
getString(int tag,
String defVal) |
String |
getString(String privateCreator,
int tag) |
String |
getString(String privateCreator,
int tag,
int valueIndex) |
String |
getString(String privateCreator,
int tag,
int valueIndex,
String defVal) |
String |
getString(String privateCreator,
int tag,
String defVal) |
String |
getString(String privateCreator,
int tag,
VR vr) |
String |
getString(String privateCreator,
int tag,
VR vr,
int valueIndex) |
String |
getString(String privateCreator,
int tag,
VR vr,
int valueIndex,
String defVal) |
String |
getString(String privateCreator,
int tag,
VR vr,
String defVal) |
String[] |
getStrings(int tag) |
String[] |
getStrings(String privateCreator,
int tag) |
String[] |
getStrings(String privateCreator,
int tag,
VR vr) |
TimeZone |
getTimeZone() |
Object |
getValue(int tag) |
Object |
getValue(int tag,
VR.Holder vr) |
Object |
getValue(String privateCreator,
int tag) |
Object |
getValue(String privateCreator,
int tag,
VR.Holder vr) |
VR |
getVR(int tag) |
VR |
getVR(String privateCreator,
int tag) |
int |
hashCode() |
void |
internalizeStringValues(boolean decode) |
boolean |
isEmpty() |
boolean |
isRoot() |
boolean |
matches(Attributes keys,
boolean ignorePNCase,
boolean matchNoValue) |
boolean |
merge(Attributes other) |
boolean |
mergeSelected(Attributes other,
int... selection)
Merge selected attributes from another Attributes object into this.
|
Fragments |
newFragments(int tag,
VR vr,
int initialCapacity) |
Fragments |
newFragments(String privateCreator,
int tag,
VR vr,
int initialCapacity) |
Sequence |
newSequence(int tag,
int initialCapacity) |
Sequence |
newSequence(String privateCreator,
int tag,
int initialCapacity) |
String |
privateCreatorOf(int tag) |
Object |
remove(int tag) |
Object |
remove(String privateCreator,
int tag) |
Object |
setBytes(int tag,
VR vr,
byte[] b) |
Object |
setBytes(String privateCreator,
int tag,
VR vr,
byte[] b) |
Object |
setDate(int tag,
VR vr,
Date... ds) |
Object |
setDate(int tag,
VR vr,
DatePrecision precision,
Date... ds) |
void |
setDate(long tag,
Date dt) |
void |
setDate(long tag,
DatePrecision precision,
Date dt) |
Object |
setDate(String privateCreator,
int tag,
VR vr,
Date... ds) |
Object |
setDate(String privateCreator,
int tag,
VR vr,
DatePrecision precision,
Date... ds) |
void |
setDate(String privateCreator,
long tag,
Date dt) |
void |
setDate(String privateCreator,
long tag,
DatePrecision precision,
Date dt) |
Object |
setDateRange(int tag,
VR vr,
DateRange range) |
void |
setDateRange(long tag,
DateRange dr) |
Object |
setDateRange(String privateCreator,
int tag,
VR vr,
DateRange range) |
void |
setDateRange(String privateCreator,
long tag,
DateRange range) |
void |
setDefaultTimeZone(TimeZone tz) |
Object |
setDouble(int tag,
VR vr,
double... ds) |
Object |
setDouble(String privateCreator,
int tag,
VR vr,
double... ds) |
Object |
setFloat(int tag,
VR vr,
float... fs) |
Object |
setFloat(String privateCreator,
int tag,
VR vr,
float... fs) |
Object |
setInt(int tag,
VR vr,
int... is) |
Object |
setInt(String privateCreator,
int tag,
VR vr,
int... is) |
void |
setItemPosition(long itemPosition) |
Object |
setNull(int tag,
VR vr) |
Object |
setNull(String privateCreator,
int tag,
VR vr) |
Object |
setProperty(String key,
Object value) |
void |
setSpecificCharacterSet(String... codes)
Set Specific Character Set (0008,0005) to specified code(s) and
re-encode contained LO, LT, PN, SH, ST, UT attributes
accordingly.
|
Object |
setString(int tag,
VR vr,
String... ss) |
Object |
setString(int tag,
VR vr,
String s) |
Object |
setString(String privateCreator,
int tag,
VR vr,
String... ss) |
Object |
setString(String privateCreator,
int tag,
VR vr,
String s) |
void |
setTimezone(TimeZone tz)
Set the Default Time Zone to specified value and adjust contained DA,
DT and TM attributs accordingly.
|
void |
setTimezoneOffsetFromUTC(String utcOffset)
Set Timezone Offset From UTC (0008,0201) to specified value and
adjust contained DA, DT and TM attributs accordingly
|
Object |
setValue(int tag,
VR vr,
Object value) |
Object |
setValue(String privateCreator,
int tag,
VR vr,
Object value) |
int |
size() |
int[] |
tags() |
boolean |
testMerge(Attributes other) |
boolean |
testMergeSelected(Attributes other,
int... selection)
Tests if
mergeSelected(org.dcm4che3.data.Attributes, int...) would modify attributes, without actually
modifying this attributes |
boolean |
testUpdate(Attributes newAttrs,
Attributes modified) |
boolean |
testUpdateSelected(Attributes newAttrs,
Attributes modified,
int... selection)
Tests if
updateSelected(org.dcm4che3.data.Attributes, org.dcm4che3.data.Attributes, int...) would modify attributes, without actually
modifying this attributes |
String |
toString() |
String |
toString(int limit,
int maxWidth) |
StringBuilder |
toStringBuilder(int limit,
int maxWidth,
StringBuilder sb) |
StringBuilder |
toStringBuilder(StringBuilder sb) |
void |
trimToSize() |
void |
trimToSize(boolean recursive) |
boolean |
update(Attributes newAttrs,
Attributes modified) |
boolean |
updateSelected(Attributes newAttrs,
Attributes modified,
int... selection)
Add selected attributes from another Attributes object to this.
|
void |
validate(IOD.DataElement el,
ValidationResult result) |
ValidationResult |
validate(IOD iod) |
void |
writeGroupTo(DicomOutputStream out,
int groupLengthTag) |
void |
writeItemTo(DicomOutputStream out) |
void |
writeTo(DicomOutputStream out) |
public Attributes()
public Attributes(boolean bigEndian)
public Attributes(int initialCapacity)
public Attributes(boolean bigEndian,
int initialCapacity)
public Attributes(Attributes other)
public Attributes(Attributes other, boolean bigEndian)
public Attributes(Attributes other, int... selection)
public Attributes(Attributes other, boolean bigEndian, int... selection)
public Attributes(Attributes other, boolean bigEndian, Attributes selection)
public final boolean isRoot()
public final int getLevel()
public final boolean bigEndian()
public final Attributes getParent()
public final int getLength()
public final long getItemPosition()
public final void setItemPosition(long itemPosition)
public final boolean isEmpty()
public final int size()
public int[] tags()
public void trimToSize()
public void trimToSize(boolean recursive)
public void internalizeStringValues(boolean decode)
public Attributes getNestedDataset(int sequenceTag)
public Attributes getNestedDataset(int sequenceTag, int itemIndex)
public Attributes getNestedDataset(String privateCreator, int sequenceTag)
public Attributes getNestedDataset(String privateCreator, int sequenceTag, int itemIndex)
public Attributes getNestedDataset(ItemPointer... itemPointers)
public SpecificCharacterSet getSpecificCharacterSet(VR vr)
public boolean contains(int tag)
public boolean contains(String privateCreator, int tag)
public boolean containsValue(int tag)
public boolean containsValue(String privateCreator, int tag)
public String privateCreatorOf(int tag)
public Object getValue(int tag)
public VR getVR(int tag)
public Sequence getSequence(int tag)
public byte[] getBytes(int tag)
throws IOException
IOExceptionpublic byte[] getBytes(String privateCreator, int tag) throws IOException
IOExceptionpublic byte[] getSafeBytes(int tag)
public byte[] getSafeBytes(String privateCreator, int tag)
public String getString(int tag)
public String getString(int tag, int valueIndex)
public String getString(String privateCreator, int tag, VR vr, int valueIndex, String defVal)
public String[] getStrings(int tag)
public int getInt(int tag,
int defVal)
public int getInt(int tag,
int valueIndex,
int defVal)
public int getInt(String privateCreator, int tag, int defVal)
public int getInt(String privateCreator, int tag, int valueIndex, int defVal)
public int[] getInts(int tag)
public int[] getInts(String privateCreator, int tag)
public float getFloat(int tag,
float defVal)
public float getFloat(int tag,
int valueIndex,
float defVal)
public float getFloat(String privateCreator, int tag, float defVal)
public float getFloat(String privateCreator, int tag, int valueIndex, float defVal)
public float[] getFloats(int tag)
public float[] getFloats(String privateCreator, int tag)
public double getDouble(int tag,
double defVal)
public double getDouble(int tag,
int valueIndex,
double defVal)
public double getDouble(String privateCreator, int tag, double defVal)
public double getDouble(String privateCreator, int tag, int valueIndex, double defVal)
public double getDouble(String privateCreator, int tag, VR vr, int valueIndex, double defVal)
public double[] getDoubles(int tag)
public double[] getDoubles(String privateCreator, int tag)
public Date getDate(int tag)
public Date getDate(int tag, DatePrecision precision)
public Date getDate(int tag, Date defVal, DatePrecision precision)
public Date getDate(int tag, int valueIndex)
public Date getDate(int tag, int valueIndex, DatePrecision precision)
public Date getDate(int tag, int valueIndex, Date defVal, DatePrecision precision)
public Date getDate(String privateCreator, int tag, DatePrecision precision)
public Date getDate(String privateCreator, int tag, Date defVal, DatePrecision precision)
public Date getDate(String privateCreator, int tag, VR vr, DatePrecision precision)
public Date getDate(String privateCreator, int tag, VR vr, Date defVal, DatePrecision precision)
public Date getDate(String privateCreator, int tag, int valueIndex, DatePrecision precision)
public Date getDate(String privateCreator, int tag, int valueIndex, Date defVal, DatePrecision precision)
public Date getDate(String privateCreator, int tag, VR vr, int valueIndex, DatePrecision precision)
public Date getDate(String privateCreator, int tag, VR vr, int valueIndex, Date defVal, DatePrecision precision)
public Date getDate(long tag)
public Date getDate(long tag, DatePrecision precision)
public Date getDate(long tag, Date defVal, DatePrecision precision)
public Date getDate(String privateCreator, long tag, DatePrecision precision)
public Date getDate(String privateCreator, long tag, Date defVal, DatePrecision precision)
public Date[] getDates(int tag)
public Date[] getDates(int tag, DatePrecisions precisions)
public Date[] getDates(String privateCreator, int tag, DatePrecisions precisions)
public Date[] getDates(String privateCreator, int tag, VR vr, DatePrecisions precisions)
public Date[] getDates(long tag)
public Date[] getDates(long tag, DatePrecisions precisions)
public Date[] getDates(String privateCreator, long tag, DatePrecisions precisions)
public DateRange getDateRange(int tag)
public DateRange getDateRange(long tag)
public void setSpecificCharacterSet(String... codes)
codes - new value(s) of Specific Character Set (0008,0005)public SpecificCharacterSet getSpecificCharacterSet()
public void setDefaultTimeZone(TimeZone tz)
public TimeZone getDefaultTimeZone()
public TimeZone getTimeZone()
public void setTimezoneOffsetFromUTC(String utcOffset)
utcOffset - offset from UTC as (+|-)HHMMpublic void setTimezone(TimeZone tz)
tz - Time ZonesetDefaultTimeZone(TimeZone),
setTimezoneOffsetFromUTC(String)public String getPrivateCreator(int tag)
public Object remove(int tag)
public Object setDate(int tag, VR vr, DatePrecision precision, Date... ds)
public Object setDate(String privateCreator, int tag, VR vr, DatePrecision precision, Date... ds)
public void setDate(long tag,
Date dt)
public void setDate(long tag,
DatePrecision precision,
Date dt)
public void setDate(String privateCreator, long tag, DatePrecision precision, Date dt)
public void setDateRange(long tag,
DateRange dr)
public Sequence newSequence(int tag, int initialCapacity)
public Sequence ensureSequence(int tag, int initialCapacity)
public Fragments newFragments(String privateCreator, int tag, VR vr, int initialCapacity)
public boolean addAll(Attributes other)
public boolean merge(Attributes other)
public boolean testMerge(Attributes other)
public boolean addSelected(Attributes other, Attributes selection)
public boolean addSelected(Attributes other, String privateCreator, int tag)
public boolean addSelected(Attributes other, int... selection)
Arrays.sort(int[]) method) prior to making this call.other - the other Attributes objectselection - sorted tag valuespublic boolean addSelected(Attributes other, int[] selection, int fromIndex, int toIndex)
Arrays.sort(int[], int, int) method) prior to making this call.other - the other Attributes objectselection - sorted tag valuesfromIndex - the index of the first tag (inclusive)toIndex - the index of the last tag (exclusive)public boolean mergeSelected(Attributes other, int... selection)
Arrays.sort(int[]) method) prior to making this call.other - the other Attributes objectselection - sorted tag valuespublic boolean testMergeSelected(Attributes other, int... selection)
mergeSelected(org.dcm4che3.data.Attributes, int...) would modify attributes, without actually
modifying this attributesother - the other Attributes objectselection - sorted tag valuespublic boolean addNotSelected(Attributes other, int... selection)
Arrays.sort(int[]) method) prior to making this call.other - the other Attributes objectselection - sorted tag valuespublic boolean addNotSelected(Attributes other, int[] selection, int fromIndex, int toIndex)
Arrays.sort(int[]) method) prior to making this call.other - the other Attributes objectselection - sorted tag valuesfromIndex - the index of the first tag (inclusive)toIndex - the index of the last tag (exclusive)public boolean update(Attributes newAttrs, Attributes modified)
public boolean testUpdate(Attributes newAttrs, Attributes modified)
public boolean updateSelected(Attributes newAttrs, Attributes modified, int... selection)
Arrays.sort(int[]) method) prior to making this call.newAttrs - the other Attributes objectmodified - Attributes object to collect overwritten non-empty
attributes with original values or nullincludes - sorted tag valuespublic boolean testUpdateSelected(Attributes newAttrs, Attributes modified, int... selection)
updateSelected(org.dcm4che3.data.Attributes, org.dcm4che3.data.Attributes, int...) would modify attributes, without actually
modifying this attributesnewAttrs - the other Attributes objectmodified - Attributes object to collect overwritten non-empty
attributes with original values or nullincludes - sorted tag valuespublic String toString(int limit, int maxWidth)
public StringBuilder toStringBuilder(StringBuilder sb)
public StringBuilder toStringBuilder(int limit, int maxWidth, StringBuilder sb)
public int calcLength(DicomEncodingOptions encOpts, boolean explicitVR)
public void writeTo(DicomOutputStream out) throws IOException
IOExceptionpublic void writeItemTo(DicomOutputStream out) throws IOException
IOExceptionpublic boolean accept(Attributes.Visitor visitor, boolean visitNestedDatasets) throws Exception
Visitor.visit for each attribute in this instance. The
operation will be aborted if visitor.visit() returns false.visitor - visitNestedDatasets - controls if visitor.visit()
is also invoked for attributes in nested datasetstrue if the operation was not aborted.Exceptionpublic void writeGroupTo(DicomOutputStream out, int groupLengthTag) throws IOException
IOExceptionpublic Attributes createFileMetaInformation(String tsuid)
public static Attributes createFileMetaInformation(String iuid, String cuid, String tsuid)
public boolean matches(Attributes keys, boolean ignorePNCase, boolean matchNoValue)
public ValidationResult validate(IOD iod)
public void validate(IOD.DataElement el, ValidationResult result)
Copyright © 2014 dcm4che.org. All rights reserved.