public class Attributes extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
Attributes.Visitor |
Modifier and Type | Field and Description |
---|---|
private boolean |
bigEndian |
private boolean |
containsSpecificCharacterSet |
private boolean |
containsTimezoneOffsetFromUTC |
private SpecificCharacterSet |
cs |
private TimeZone |
defaultTimeZone |
private int |
groupLengthIndex0 |
private int[] |
groupLengths |
private static int |
INIT_CAPACITY |
private long |
itemPosition |
private int |
length |
private static Logger |
LOG |
private Attributes |
parent |
private String |
parentSequencePrivateCreator |
private int |
parentSequenceTag |
private Map<String,Object> |
properties |
private static long |
serialVersionUID |
private int |
size |
private int[] |
tags |
private static int |
TO_STRING_LIMIT |
private static int |
TO_STRING_WIDTH |
private TimeZone |
tz |
private Object[] |
values |
private VR[] |
vrs |
Constructor and Description |
---|
Attributes() |
Attributes(Attributes other) |
Attributes(Attributes other,
Attributes selection) |
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
Attributes.Visitor.visit(org.dcm4che3.data.Attributes, int, org.dcm4che3.data.VR, java.lang.Object) for each attribute in this instance. |
private boolean |
accept(Attributes.Visitor visitor,
boolean visitNestedDatasets,
int start,
int end) |
private boolean |
add(Attributes other,
int[] include,
int[] exclude,
int fromIndex,
int toIndex,
Attributes selection,
boolean merge,
boolean update,
boolean simulate,
Attributes modified) |
boolean |
addAll(Attributes other) |
void |
addBulkDataReference(String privateCreator,
int tag,
VR vr,
BulkData bulkData,
ItemPointer... itemPointers) |
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 |
addWithoutBulkData(Attributes other,
BulkDataDescriptor descriptor) |
private StringBuilder |
appendAttribute(String privateCreator,
int tag,
VR vr,
Object value,
int maxLength,
StringBuilder sb,
String prefix,
Deidentifier deidentifier) |
private int |
appendAttributes(int limit,
int maxWidth,
StringBuilder sb,
String prefix,
Deidentifier deidentifier) |
private int |
appendItems(Sequence sq,
int limit,
int maxWidth,
StringBuilder sb,
String prefix,
Deidentifier deidentifier) |
boolean |
bigEndian() |
int |
calcLength(DicomEncodingOptions encOpts,
boolean explicitVR) |
private int |
calcLength(DicomEncodingOptions encOpts,
boolean explicitVR,
SpecificCharacterSet cs,
int[] groupLengths) |
private IOD[] |
checkforMissingItems(int[] matchingItems,
IOD[] itemIODs) |
private void |
checkInGroup(int i,
int groupLengthTag) |
void |
clear() |
Object |
clearProperty(String key) |
boolean |
contains(int tag) |
boolean |
contains(String privateCreator,
int tag) |
boolean |
containsTimezoneOffsetFromUTC() |
boolean |
containsValue(int tag) |
boolean |
containsValue(String privateCreator,
int tag) |
private int |
countGroups() |
Attributes |
createFileMetaInformation(String tsuid) |
static Attributes |
createFileMetaInformation(String iuid,
String cuid,
String tsuid) |
private int |
creatorIndexOf(String privateCreator,
int groupNumber) |
private int |
creatorTagOf(String privateCreator,
int tag,
boolean reserve) |
private double[] |
decodeDSValue(int index) |
private int[] |
decodeISValue(int index) |
private Object |
decodeStringValue(int index) |
private void |
decodeStringValuesUsingSpecificCharacterSet() |
private void |
ensureCapacity(int minCapacity) |
Sequence |
ensureSequence(int tag,
int initialCapacity) |
Sequence |
ensureSequence(String privateCreator,
int tag,
int initialCapacity) |
private boolean |
equalDSValues(Attributes other,
int index,
int otherIndex) |
private boolean |
equalISValues(Attributes other,
int index,
int otherIndex) |
boolean |
equals(Object o) |
private boolean |
equalStringValues(Attributes other,
int index,
int otherIndex) |
private boolean |
equalValues(Attributes other,
int index,
int otherIndex) |
Attributes |
filter(Attributes selection)
Filters this Attributes object returning an Attributes containing
all the properties found in the selection object and the relative
ancestors, if any.
|
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) |
private int |
getEncodedItemLength(DicomEncodingOptions encOpts,
boolean explicitVR) |
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 |
getModified(Attributes other,
Attributes result)
Add attributes of this data set which were replaced in
the specified other data set into the result data set.
|
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 |
getParentSequencePrivateCreator() |
int |
getParentSequenceTag() |
String |
getPrivateCreator(int tag) |
Map<String,Object> |
getProperties() |
Object |
getProperty(String key,
Object defVal) |
Attributes |
getRemovedOrModified(Attributes other)
Returns attributes of this data set which were removed or replaced in
the specified other data set.
|
Attributes |
getRoot() |
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() |
private int |
indexForInsertOf(int tag) |
private int |
indexOf(int tag) |
private int |
indexOf(String privateCreator,
int tag) |
private void |
init(int initialCapacity) |
private void |
insert(int index,
int tag,
VR vr,
Object value) |
void |
internalizeStringValues(boolean decode) |
boolean |
isEmpty() |
private static boolean |
isEmpty(Object value) |
private boolean |
isOneOf(int val,
int[] is) |
private <T> boolean |
isOneOf(Object val,
T[] ss) |
private static boolean |
isRange(String s) |
boolean |
isRoot() |
private boolean |
isValidValue(int[] val,
int valueNumber,
int[] validVals) |
private boolean |
isValidValue(String[] val,
int valueNumber,
String[] validVals) |
int |
itemIndex() |
ItemPointer[] |
itemPointers() |
private ItemPointer[] |
itemPointers(int n) |
boolean |
matches(Attributes keys,
boolean ignorePNCase,
boolean matchNoValue) |
private boolean |
matches(String privateCreator,
int tag,
boolean ignorePNCase,
boolean matchNoValue,
Sequence keySeq) |
private boolean |
matches(String privateCreator,
int tag,
VR vr,
boolean ignorePNCase,
boolean matchNoValue,
String[] keyVals) |
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) |
private void |
readObject(ObjectInputStream in) |
Object |
remove(int tag) |
Object |
remove(String privateCreator,
int tag) |
int |
removePrivateAttributes() |
int |
removePrivateAttributes(String privateCreator,
int groupNumber) |
private Object |
set(int tag,
VR vr,
Object value) |
private void |
set(String privateCreator,
int tag,
Fragments src) |
private void |
set(String privateCreator,
int tag,
Sequence src,
Attributes selection) |
private Object |
set(String privateCreator,
int tag,
VR vr,
Object value) |
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) |
(package private) Attributes |
setParent(Attributes parent,
String parentSequencePrivateCreator,
int parentSequenceTag) |
void |
setProperties(Map<String,Object> properties) |
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) |
private void |
setWithoutBulkData(String privateCreator,
int tag,
Sequence seq,
BulkDataDescriptor descriptor) |
int |
size() |
private static String[] |
splitRange(String s) |
int |
tagOf(String privateCreator,
int tag)
resolves to the actual private tag,
given a private tag with placeholers (like 0011,xx13)
|
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 |
private DateRange |
toDateRange(String da,
String tm) |
private DateRange |
toDateRange(String s,
VR vr) |
private static String |
toDateRangeString(String start,
String end) |
private static Object |
toggleEndian(VR vr,
Object value,
boolean toggleEndian) |
String |
toString() |
private static String |
toString(DateRange range,
VR vr,
TimeZone tz) |
String |
toString(Deidentifier deidentifier) |
String |
toString(int limit,
int maxWidth) |
String |
toString(int limit,
int maxWidth,
Deidentifier deidentifier) |
StringBuilder |
toStringBuilder(int limit,
int maxWidth,
StringBuilder sb,
Deidentifier deidentifier) |
StringBuilder |
toStringBuilder(StringBuilder sb) |
private static String[] |
toStrings(Object val) |
void |
trimToSize() |
void |
trimToSize(boolean recursive) |
boolean |
update(Attributes newAttrs,
Attributes modified) |
boolean |
updateRecursive(Attributes other)
Updates this Attributes object with all the attributes of
the "other" object, applying the same behaviour recursively
to the items of the Sequences (if the "other" attributes has
a sequence with only a part of the attributes, only those will
be updated in the original Sequence).
|
boolean |
updateSelected(Attributes newAttrs,
Attributes modified,
int... selection)
Add selected attributes from another Attributes object to this.
|
private void |
updateTimezone(TimeZone from,
TimeZone to) |
private void |
updateTimezone(TimeZone from,
TimeZone to,
int tmIndex) |
private String |
updateTimeZoneDT(TimeZone from,
TimeZone to,
String dt) |
void |
updateTimeZoneOfSpecificTag(TimeZone from,
TimeZone to,
String privateCreator,
int tag)
Updates the time zone of a specific standard or private tag
|
private String |
updateTimeZoneTM(TimeZone from,
TimeZone to,
String tm) |
private void |
updateVR(int index,
VR vr) |
void |
validate(IOD.DataElement el,
ValidationResult result) |
private void |
validate(IOD.DataElement el,
ValidationResult result,
Map<String,Boolean> processedConditions) |
ValidationResult |
validate(IOD iod) |
private ValidationResult |
validateCode(Attributes item,
Code[] validVals) |
void |
writeGroupTo(DicomOutputStream out,
int groupLengthTag) |
void |
writeItemTo(DicomOutputStream out) |
private void |
writeObject(ObjectOutputStream out) |
void |
writeTo(DicomOutputStream out) |
private void |
writeTo(DicomOutputStream out,
SpecificCharacterSet cs,
int start,
int end,
int groupLengthIndex) |
private static final int INIT_CAPACITY
private static final int TO_STRING_LIMIT
private static final int TO_STRING_WIDTH
private transient Attributes parent
private transient String parentSequencePrivateCreator
private transient int parentSequenceTag
private transient int[] tags
private transient int size
private transient SpecificCharacterSet cs
private transient int length
private transient int[] groupLengths
private transient int groupLengthIndex0
private final boolean bigEndian
private long itemPosition
private boolean containsSpecificCharacterSet
private boolean containsTimezoneOffsetFromUTC
private Map<String,Object> properties
private TimeZone defaultTimeZone
private static final long serialVersionUID
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, Attributes selection)
public Attributes(Attributes other, boolean bigEndian, Attributes selection)
public void clear()
private void init(int initialCapacity)
public Map<String,Object> getProperties()
public void setProperties(Map<String,Object> properties)
public Object getProperty(String key, Object defVal)
public Object setProperty(String key, Object value)
public Object clearProperty(String key)
public final boolean isRoot()
public Attributes getRoot()
public final int getLevel()
public final boolean bigEndian()
public final Attributes getParent()
public String getParentSequencePrivateCreator()
public int getParentSequenceTag()
public final int getLength()
Attributes setParent(Attributes parent, String parentSequencePrivateCreator, int parentSequenceTag)
public final long getItemPosition()
public final void setItemPosition(long itemPosition)
public final boolean isEmpty()
public final int size()
public ItemPointer[] itemPointers()
private ItemPointer[] itemPointers(int n)
public int itemIndex()
public int[] tags()
public void trimToSize()
public void trimToSize(boolean recursive)
public void internalizeStringValues(boolean decode)
private void decodeStringValuesUsingSpecificCharacterSet()
private void ensureCapacity(int minCapacity)
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)
private int indexForInsertOf(int tag)
private int indexOf(int tag)
public int tagOf(String privateCreator, int tag)
private int creatorTagOf(String privateCreator, int tag, boolean reserve)
private Object decodeStringValue(int index)
public SpecificCharacterSet getSpecificCharacterSet(VR vr)
private double[] decodeDSValue(int index)
private int[] decodeISValue(int index)
public boolean contains(int tag)
public boolean containsValue(int tag)
public boolean containsValue(String privateCreator, int tag)
public String privateCreatorOf(int tag)
public Sequence getSequence(int tag)
public Sequence getSequence(String privateCreator, int tag)
public byte[] getBytes(int tag) throws IOException
IOException
public byte[] getBytes(String privateCreator, int tag) throws IOException
IOException
public byte[] getSafeBytes(int tag)
public byte[] getSafeBytes(String privateCreator, int tag)
public String getString(String privateCreator, int tag, VR vr, int valueIndex, String defVal)
public String[] getStrings(int tag)
public String[] getStrings(String privateCreator, int tag)
public String[] getStrings(String privateCreator, int tag, VR vr)
public int getInt(int tag, int defVal)
public int getInt(int tag, int valueIndex, int defVal)
public int[] getInts(int tag)
public float getFloat(int tag, float defVal)
public float getFloat(int tag, int valueIndex, float defVal)
public float[] getFloats(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, VR vr, int valueIndex, double defVal)
public double[] getDoubles(int tag)
public double[] getDoubles(String privateCreator, int tag)
public double[] getDoubles(String privateCreator, int tag, VR vr)
public Date getDate(int tag, DatePrecision precision)
public Date getDate(int tag, Date defVal, DatePrecision precision)
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, 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, 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, DatePrecisions precisions)
public Date[] getDates(String privateCreator, long tag, DatePrecisions precisions)
public DateRange getDateRange(int tag)
public DateRange getDateRange(int tag, DateRange defVal)
public DateRange getDateRange(String privateCreator, int tag)
public DateRange getDateRange(String privateCreator, int tag, DateRange defVal)
public DateRange getDateRange(String privateCreator, int tag, VR vr)
public DateRange getDateRange(String privateCreator, int tag, VR vr, DateRange defVal)
private DateRange toDateRange(String s, VR vr)
private static String[] splitRange(String s)
public DateRange getDateRange(long tag)
public DateRange getDateRange(long tag, DateRange defVal)
public DateRange getDateRange(String privateCreator, long tag)
public DateRange getDateRange(String privateCreator, long tag, DateRange defVal)
private DateRange toDateRange(String da, String tm)
public void setSpecificCharacterSet(String... codes)
codes
- new value(s) of Specific Character Set (0008,0005)public SpecificCharacterSet getSpecificCharacterSet()
public boolean containsTimezoneOffsetFromUTC()
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 void updateTimeZoneOfSpecificTag(TimeZone from, TimeZone to, String privateCreator, int tag)
from
- Time Zone fromto
- Time Zone toprivateCreator
- private creator - null otherwisetag
- Attribute tag to update time zoneprivate void updateTimezone(TimeZone from, TimeZone to)
private void updateTimezone(TimeZone from, TimeZone to, int tmIndex)
private String updateTimeZoneDT(TimeZone from, TimeZone to, String dt)
private String updateTimeZoneTM(TimeZone from, TimeZone to, String tm)
public String getPrivateCreator(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, DatePrecision precision, Date dt)
public void setDate(String privateCreator, long tag, DatePrecision precision, Date dt)
public Object setDateRange(int tag, VR vr, DateRange range)
public Object setDateRange(String privateCreator, int tag, VR vr, DateRange range)
private static String toDateRangeString(String start, String end)
public void setDateRange(long tag, DateRange dr)
public void setDateRange(String privateCreator, long tag, DateRange range)
public Sequence newSequence(int tag, int initialCapacity)
public Sequence newSequence(String privateCreator, int tag, int initialCapacity)
public Sequence ensureSequence(int tag, int initialCapacity)
public Sequence ensureSequence(String privateCreator, int tag, int initialCapacity)
public Fragments newFragments(int tag, VR vr, int initialCapacity)
public Fragments newFragments(String privateCreator, int tag, VR vr, int initialCapacity)
public void addBulkDataReference(String privateCreator, int tag, VR vr, BulkData bulkData, ItemPointer... itemPointers)
public boolean addAll(Attributes other)
public boolean updateRecursive(Attributes other)
other
- the other Attributes objectpublic Attributes filter(Attributes selection)
selection
- selection filterpublic 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 addWithoutBulkData(Attributes other, BulkDataDescriptor descriptor)
private void setWithoutBulkData(String privateCreator, int tag, Sequence seq, BulkDataDescriptor descriptor)
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)private boolean add(Attributes other, int[] include, int[] exclude, int fromIndex, int toIndex, Attributes selection, boolean merge, boolean update, boolean simulate, Attributes modified)
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 nullselection
- 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 nullselection
- sorted tag valuesprivate static Object toggleEndian(VR vr, Object value, boolean toggleEndian)
private boolean equalValues(Attributes other, int index, int otherIndex)
private boolean equalISValues(Attributes other, int index, int otherIndex)
private boolean equalDSValues(Attributes other, int index, int otherIndex)
private boolean equalStringValues(Attributes other, int index, int otherIndex)
private void set(String privateCreator, int tag, Sequence src, Attributes selection)
public String toString(Deidentifier deidentifier)
public String toString(int limit, int maxWidth, Deidentifier deidentifier)
public StringBuilder toStringBuilder(StringBuilder sb)
public StringBuilder toStringBuilder(int limit, int maxWidth, StringBuilder sb, Deidentifier deidentifier)
private int appendAttributes(int limit, int maxWidth, StringBuilder sb, String prefix, Deidentifier deidentifier)
private int appendItems(Sequence sq, int limit, int maxWidth, StringBuilder sb, String prefix, Deidentifier deidentifier)
private StringBuilder appendAttribute(String privateCreator, int tag, VR vr, Object value, int maxLength, StringBuilder sb, String prefix, Deidentifier deidentifier)
public int calcLength(DicomEncodingOptions encOpts, boolean explicitVR)
private int calcLength(DicomEncodingOptions encOpts, boolean explicitVR, SpecificCharacterSet cs, int[] groupLengths)
private int countGroups()
public void writeTo(DicomOutputStream out) throws IOException
IOException
public void writeItemTo(DicomOutputStream out) throws IOException
IOException
private int getEncodedItemLength(DicomEncodingOptions encOpts, boolean explicitVR)
private void writeTo(DicomOutputStream out, SpecificCharacterSet cs, int start, int end, int groupLengthIndex) throws IOException
IOException
public boolean accept(Attributes.Visitor visitor, boolean visitNestedDatasets) throws Exception
Attributes.Visitor.visit(org.dcm4che3.data.Attributes, int, org.dcm4che3.data.VR, java.lang.Object)
for each attribute in this instance. The
operation will be aborted if visitor.visit()
returns
false
or throws an exception.visitor
- visitNestedDatasets
- controls if visitor.visit()
is also invoked for
attributes in nested datasetstrue
if the operation was not aborted.Exception
- exception thrown by Attributes.Visitor.visit(org.dcm4che3.data.Attributes, int, org.dcm4che3.data.VR, java.lang.Object)
private boolean accept(Attributes.Visitor visitor, boolean visitNestedDatasets, int start, int end) throws Exception
Exception
public void writeGroupTo(DicomOutputStream out, int groupLengthTag) throws IOException
IOException
private void checkInGroup(int i, int groupLengthTag)
public Attributes createFileMetaInformation(String tsuid)
public static Attributes createFileMetaInformation(String iuid, String cuid, String tsuid)
public boolean matches(Attributes keys, boolean ignorePNCase, boolean matchNoValue)
private boolean matches(String privateCreator, int tag, VR vr, boolean ignorePNCase, boolean matchNoValue, String[] keyVals)
private boolean matches(String privateCreator, int tag, boolean ignorePNCase, boolean matchNoValue, Sequence keySeq)
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public ValidationResult validate(IOD iod)
public void validate(IOD.DataElement el, ValidationResult result)
private void validate(IOD.DataElement el, ValidationResult result, Map<String,Boolean> processedConditions)
private IOD[] checkforMissingItems(int[] matchingItems, IOD[] itemIODs)
private ValidationResult validateCode(Attributes item, Code[] validVals)
private boolean isValidValue(String[] val, int valueNumber, String[] validVals)
private boolean isValidValue(int[] val, int valueNumber, int[] validVals)
private boolean isOneOf(int val, int[] is)
public Attributes getModified(Attributes other, Attributes result)
other
- data setresult
- data set or null
public Attributes getRemovedOrModified(Attributes other)
other
- data setprivate int creatorIndexOf(String privateCreator, int groupNumber)
public int removePrivateAttributes(String privateCreator, int groupNumber)
public int removePrivateAttributes()
Copyright © 2017 dcm4che.org. All rights reserved.