public class MCdicomDirRecord extends MCattributeSet
Modifier and Type | Class and Description |
---|---|
static interface |
MCdicomDirRecord.TraversalHandler
Traversal handler of MCdicomDirRecord instance.
|
static class |
MCdicomDirRecord.TraversalStatus
Enum for controlling directory record traversal when using
TraversalHandler . |
static class |
MCdicomDirRecord.Type
Enumeration of DICOM directory record types.
|
Constructor and Description |
---|
MCdicomDirRecord(int id)
Creates an instance of
MCdicomDirRecord with given id . |
MCdicomDirRecord(MCdicomDirRecord parent,
int id)
Creates an instance of
MCdicomDirRecord with given parent and id . |
Modifier and Type | Method and Description |
---|---|
MCdicomDirRecord |
addRecord(java.lang.String recordType)
Adds a new lower level directory record to this record.
|
void |
copyValues(MCattributeSet source,
int[] tags)
Copies attribute values from the specified attribute set into this record.
|
void |
delete()
Deletes this directory record.
|
void |
dispose()
Disposes this record and its associated native resources.
|
MCdicomDirEx |
getDICOMDIR()
Gets the directory object containing this record.
|
java.lang.String |
getDirectoryRecordType()
Gets the value of the Directory Record Type (0004,1430) attribute of this record.
|
void |
getDirectoryRecordType(java.lang.String type)
Sets the value of the Directory Record Type (0004,1430) attribute of this record.
|
MCdicomDirRecord |
getFirstLowerRecord()
Gets the first lower level directory record of this record.
|
MCdicomDirRecord |
getNextRecord()
Gets the next directory record in the directory entity of the current record.
|
MCdicomDirRecord |
getParentRecord()
Gets the parent record of this record.
|
MCdicomDirRecord.Type |
getRecordType()
Gets an enum representation of the value of the Directory Record Type (0004,1430)
attribute of this record.
|
java.lang.String |
getReferencedFileID()
Gets the value of the Referenced File ID (0004,1500) attribute of this record.
|
java.lang.String |
getReferencedSOPClassUIDinFile()
Gets the value of the Referenced SOP Class UID in File (0004,1510) attribute of this
record.
|
java.lang.String |
getReferencedSOPInstanceUIDinFile()
Gets the value of the Referenced SOP Instance UID in File (0004,1511) attribute of this
record.
|
java.lang.String |
getReferencedTSUIDinFile()
Gets the value of the Referenced Transfer Syntax UID in File (0004,1512) attribute of this record.
|
boolean |
isRoot()
Get
boolean if MCdicomDirRecord is a root record or not. |
void |
setReferencedFileID(java.lang.String id)
Sets the value of the Referenced File ID (0004,1500) attribute of this record.
|
void |
setReferencedSOPClassUIDinFile(java.lang.String uid)
Sets the value of the Referenced SOP Class UID in File (0004,1510) attribute of this record.
|
void |
setReferencedSOPInstanceUIDinFile(java.lang.String uid)
Sets the values of the Referenced SOP Instance UID in File (0004,1511) attribute of this record.
|
void |
setReferencedTSUIDinFile(java.lang.String uid)
Sets the values of the Referenced Transfer Syntax UID in File (0004,1512) attribute of this record.
|
void |
traverse(MCdicomDirRecord.TraversalHandler handler)
Provides easy record traversal and search functionality.
|
addAttribute, addAttribute, addEncapsulatedFrame, addValue, addValue, clear, clear, contains, contains, copyTo, createSignature, createSignature, deleteSignature, duplicate, getBigInteger, getBigInteger, getBulkValue, getBulkValue, getCommand, getDoubleValue, getDoubleValue, getEncapsulatedFrame, getFloatValue, getFloatValue, getFrame, getIntValue, getIntValue, getItem, getItem, getKeyword, getKeyword, getLongValue, getLongValue, getModality, getNextValidationError, getOffsetTable, getService, getShortValue, getShortValue, getSOPClassUID, getSOPInstanceUID, getStringValue, getStringValue, getStringValue, getStringValue, getTransferSyntax, getValue, getValue, getValue, getValue, getValueCount, getValueCount, getValueLength, getValueLength, getValueRepresentation, getValueRepresentation, getValues, getValues, iterator, list, list, readAttributeSetsFromJSON, readAttributeSetsFromJSON, readFromJSON, readFromJSON, readFromStream, readFromStream, readFromXML, readFromXML, readFromXMLNative, readFromXMLNative, removeAttribute, removeAttribute, resetTransferSyntax, setDefaultCompression, setServiceCommand, setTransferSyntax, setValue, setValue, setValueRepresentation, setValueRepresentation, size, validate, validateAttribute, verifySignature, writeAttributeSetsToJSON, writeToJSON, writeToStream, writeToStream, writeToXML, writeToXML, writeToXMLNative
public MCdicomDirRecord(int id)
MCdicomDirRecord
with given id
.id
- C toolkit ID of the record.public MCdicomDirRecord(MCdicomDirRecord parent, int id)
MCdicomDirRecord
with given parent
and id
.parent
- MCdicomDirRecord
record.id
- C toolkit ID of the record.public boolean isRoot()
boolean
if MCdicomDirRecord
is a root record or not.true
if instance is a root record.public void dispose()
This method releases the resources allocated for this record but it does not delete the record from the DICOMDIR file. Subsequent navigation to the record represented by this object will cause the toolkit to reload the content of the record from the file and create a new record object for it.
dispose
in class MCattributeSet
public MCdicomDirRecord getParentRecord()
null
if this record is the root record of the DICOMDIR.MCexception
- The record has been disposed.public MCdicomDirRecord getNextRecord()
null
if the current record is the last in the directory entity.MCexception
- The record has been disposed.public MCdicomDirRecord getFirstLowerRecord()
null
if this record does not have lower level records.MCexception
- The record has been disposed.public MCdicomDirEx getDICOMDIR()
MCexception
- The record has been disposed.public java.lang.String getDirectoryRecordType()
String
object containing the record type.public void getDirectoryRecordType(java.lang.String type)
type
- the value of the Directory Record Type (0004,1430) attribute.public MCdicomDirRecord.Type getRecordType()
public java.lang.String getReferencedFileID()
MCexception
- The record has been disposed.public void setReferencedFileID(java.lang.String id)
id
- the value of the Referenced File ID (0004,1500) attributeMCexception
- The record has been disposed.public java.lang.String getReferencedSOPClassUIDinFile()
null
if the attribute has no value or it is missing.MCexception
- The record has been disposed.public void setReferencedSOPClassUIDinFile(java.lang.String uid)
uid
- the value of the Referenced SOP Class UID in File (0004,1510) attributeMCexception
- The record has been disposed.public java.lang.String getReferencedSOPInstanceUIDinFile()
null
if the attribute has no value or it is missing.MCexception
- The record has been disposed.public void setReferencedSOPInstanceUIDinFile(java.lang.String uid)
uid
- the value of the Referenced SOP Instance UID in File (0004,1511) attributeMCexception
- The record has been disposed.public java.lang.String getReferencedTSUIDinFile()
null
if the attribute has no value or it is missing.MCexception
- The record has been disposed.public void setReferencedTSUIDinFile(java.lang.String uid)
uid
- A string object containing the value of the Referenced Transfer Syntax UID in File (0004,1512)
attribute, or null if the attribute has no value or it is missing.MCexception
- The record has been disposed.public void traverse(MCdicomDirRecord.TraversalHandler handler)
handler
- A delegate to be called for each record traversed.
This method traverses all directory records that are below this directory record, or all records if this record is the root record.
The toolkit makes a depth-first traversal of the record hierarchy calling the record handler delegate for each record. The application can control the traversal through the return value of the delegate.
MCexception
- The record handler argument was null.public void copyValues(MCattributeSet source, int[] tags)
source
- The attribute set to copy values from.tags
- The list of tag numbers of the attributes to be copied. If a tag
is a group length tag, the attributes in the whole group are copied. If this parameter is
null
, all attributes are copied.MCexception
- The source was nullpublic MCdicomDirRecord addRecord(java.lang.String recordType)
This method creates a new directory record object and appends it to the end of the child record list of this record or to the end of the root entity if this record is the root record.
If the type of the record is not specified the toolkit will try to determine it
based on the type of the parent record. For instance level records, the application
can specify the SOP Class UID of the referenced object in the recordType
argument and the toolkit will determine the corresponding record type.
The new record and any values set for its attributes are written to the DICOMDIR file when
the application calls MCdicomDirEx.update
. If the directory object is closed
without calling MCdicomDirEx.update
, changes to the record hierarchy will be
lost.
recordType
- The directory record type name for the new record or
the SOP Class UID of the referenced instance. If this argument is null
the toolkit will set the record type based on the type of this record:
"PATIENT" for root record, "STUDY" if the parent is "PATIENT", "SERIES" if the
parent is "STUDY" and "IMAGE" if the parent is "SERIES". The application can
change the record type on the returned record object before calling MCdicomDirEx
.update()
.MCexception
- The record has been disposed.public void delete()
This method removes this directory record and any lower level record from the record hierarchy.
The changes made by this method are not reflected in the DICOMDIR file until the
application calls MCdicomDir
.update()
on the DICOM directory object.
MCexception
- The record has been disposed.