|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.dicom.ClinicalTrialsAttributes
public abstract class ClinicalTrialsAttributes
An abstract class of static methods to support removing identifying attributes and adding Clinical Trials Patient, Study and Series Modules attributes.
UID attributes are handled specially, in that they may be kept, removed or remapped. Remapping means that any UID that is not standard (e.g., not a SOP Class, etc.) will be replaced consistently with another generated UID, such that when that UID is encountered again, the same replacement value will be used. The replacement mapping persists within the invocation of the JVM until it is explciitly flushed. A different JVM invocation will replace the UIDs with different values. Therefore, multiple instances that need to be remapped consistently must be cleaned within the same invocation.
Note that this map could grow quite large and consumes resources in memory, and hence in a server application should be flushed at appropriate intervals using the appropriate method.
| Nested Class Summary | |
|---|---|
class |
ClinicalTrialsAttributes.HandleUIDs
|
| Field Summary | |
|---|---|
protected static String |
defaultValueForMissingNonZeroLengthStrings
|
protected static String |
defaultValueForMissingPossiblyZeroLengthStrings
|
protected static Map |
mapOfOriginalToReplacementUIDs
|
protected static UIDGenerator |
uidGenerator
|
| Method Summary | |
|---|---|
static void |
addClinicalTrialsAttributes(AttributeList list,
boolean replaceConventionalAttributes,
String clinicalTrialSponsorName,
String clinicalTrialProtocolID,
String clinicalTrialProtocolName,
String clinicalTrialSiteID,
String clinicalTrialSiteName,
String clinicalTrialSubjectID,
String clinicalTrialSubjectReadingID,
String clinicalTrialTimePointID,
String clinicalTrialTimePointDescription,
String clinicalTrialCoordinatingCenterName)
Add the attributes of the Clinical Trials Patient, Study and Series Modules, to a list of attributes. |
static void |
addContributingEquipmentSequence(AttributeList list,
boolean retainExistingItems,
CodedSequenceItem purposeOfReferenceCodeSequence,
String manufacturer,
String institutionName,
String institutionalDepartmentName,
String institutionAddress,
String stationName,
String manufacturerModelName,
String deviceSerialNumber,
String softwareVersion,
String contributionDescription,
String contributionDateTime)
Add the attributes of the Contributing Equipment Sequence to a list of attributes. |
static void |
addContributingEquipmentSequence(AttributeList list,
boolean retainExistingItems,
CodedSequenceItem purposeOfReferenceCodeSequence,
String manufacturer,
String institutionName,
String institutionalDepartmentName,
String institutionAddress,
String stationName,
String manufacturerModelName,
String deviceSerialNumber,
String softwareVersion,
String contributionDescription,
String contributionDateTime,
String[] operatorNames,
PersonIdentification[] operatorIdentifications)
Add the attributes of the Contributing Equipment Sequence to a list of attributes. |
static void |
addContributingEquipmentSequence(AttributeList list,
String manufacturer,
String institutionName,
String institutionalDepartmentName,
String institutionAddress,
String stationName,
String manufacturerModelName,
String deviceSerialNumber,
String softwareVersion)
Add the attributes of the Contributing Equipment Sequence to a list of attributes. |
protected static void |
addType1LongStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
|
protected static void |
addType2LongStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
|
protected static void |
addType3DateTimeAttribute(AttributeList list,
AttributeTag t,
String value)
|
protected static void |
addType3LongStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
|
protected static void |
addType3ShortStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
|
protected static void |
addType3ShortTextAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
|
static void |
flushMapOfUIDs()
Flush (remove all entries in) the map of original UIDs to replacement UIDs. |
static void |
main(String[] arg)
For testing. |
static void |
remapUIDAttributes(AttributeList list)
Remap UID attributes in a list of attributes, recursively iterating through nested sequences. |
static void |
removeOrNullIdentifyingAttributes(AttributeList list,
boolean keepUIDs,
boolean keepDescriptors)
Deidentify a list of attributes, recursively iterating through nested sequences. |
static void |
removeOrNullIdentifyingAttributes(AttributeList list,
int handleUIDs,
boolean keepDescriptors)
Deidentify a list of attributes, recursively iterating through nested sequences. |
protected static void |
removeOrRemapUIDAttributes(AttributeList list,
int handleUIDs)
Remove or remap UID attributes in a list of attributes, recursively iterating through nested sequences. |
static void |
removeUIDAttributes(AttributeList list)
Remove UID attributes in a list of attributes, recursively iterating through nested sequences. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String defaultValueForMissingNonZeroLengthStrings
protected static final String defaultValueForMissingPossiblyZeroLengthStrings
protected static Map mapOfOriginalToReplacementUIDs
protected static UIDGenerator uidGenerator
| Method Detail |
|---|
protected static void addType1LongStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
throws DicomException
DicomException
protected static void addType2LongStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
throws DicomException
DicomException
protected static void addType3ShortTextAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
throws DicomException
DicomException
protected static void addType3ShortStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
throws DicomException
DicomException
protected static void addType3LongStringAttribute(AttributeList list,
AttributeTag t,
String value,
SpecificCharacterSet specificCharacterSet)
throws DicomException
DicomException
protected static void addType3DateTimeAttribute(AttributeList list,
AttributeTag t,
String value)
throws DicomException
DicomException
public static void addContributingEquipmentSequence(AttributeList list,
String manufacturer,
String institutionName,
String institutionalDepartmentName,
String institutionAddress,
String stationName,
String manufacturerModelName,
String deviceSerialNumber,
String softwareVersion)
throws DicomException
Add the attributes of the Contributing Equipment Sequence to a list of attributes.
Attributes are added if supplied string value are added if not null. May be zero length.
Retains any existing items in Contributing Equipment Sequence.
Uses ("109103","DCM","Modifying Equipment") for the Purpose of Reference.
Uses "Deidentified" for the Contribution Description.
Uses the current date and time for the Contribution DateTime.
list - the list of attributes to which to add the Contributing Equipment Sequencemanufacturer - institutionName - institutionalDepartmentName - institutionAddress - stationName - manufacturerModelName - deviceSerialNumber - softwareVersion -
DicomException
public static void addContributingEquipmentSequence(AttributeList list,
boolean retainExistingItems,
CodedSequenceItem purposeOfReferenceCodeSequence,
String manufacturer,
String institutionName,
String institutionalDepartmentName,
String institutionAddress,
String stationName,
String manufacturerModelName,
String deviceSerialNumber,
String softwareVersion,
String contributionDescription,
String contributionDateTime)
throws DicomException
Add the attributes of the Contributing Equipment Sequence to a list of attributes.
Attributes are added if supplied string value are added if not null. May be zero length.
list - the list of attributes to which to add the Contributing Equipment SequenceretainExistingItems - if true, retain any existing items in Contributing Equipment Sequence, otherwise remove thempurposeOfReferenceCodeSequence - manufacturer - institutionName - institutionalDepartmentName - institutionAddress - stationName - manufacturerModelName - deviceSerialNumber - softwareVersion - contributionDescription - contributionDateTime -
DicomException
public static void addContributingEquipmentSequence(AttributeList list,
boolean retainExistingItems,
CodedSequenceItem purposeOfReferenceCodeSequence,
String manufacturer,
String institutionName,
String institutionalDepartmentName,
String institutionAddress,
String stationName,
String manufacturerModelName,
String deviceSerialNumber,
String softwareVersion,
String contributionDescription,
String contributionDateTime,
String[] operatorNames,
PersonIdentification[] operatorIdentifications)
throws DicomException
Add the attributes of the Contributing Equipment Sequence to a list of attributes.
Attributes are added if supplied string value are added if not null. May be zero length.
list - the list of attributes to which to add the Contributing Equipment SequenceretainExistingItems - if true, retain any existing items in Contributing Equipment Sequence, otherwise remove thempurposeOfReferenceCodeSequence - manufacturer - institutionName - institutionalDepartmentName - institutionAddress - stationName - manufacturerModelName - deviceSerialNumber - softwareVersion - contributionDescription - contributionDateTime - operatorNames - an array of Strings of one or more operator's names, or null if not to be addedoperatorIdentifications - an array of PersonIdentification, or null if not to be added
DicomException
public static void addClinicalTrialsAttributes(AttributeList list,
boolean replaceConventionalAttributes,
String clinicalTrialSponsorName,
String clinicalTrialProtocolID,
String clinicalTrialProtocolName,
String clinicalTrialSiteID,
String clinicalTrialSiteName,
String clinicalTrialSubjectID,
String clinicalTrialSubjectReadingID,
String clinicalTrialTimePointID,
String clinicalTrialTimePointDescription,
String clinicalTrialCoordinatingCenterName)
throws DicomException
Add the attributes of the Clinical Trials Patient, Study and Series Modules, to a list of attributes.
list - the list of attributes to which to add the attributesreplaceConventionalAttributes - if true, use the supplied clinical trials attributes in place of the conventional ID attributes as wellclinicalTrialSponsorName - clinicalTrialProtocolID - clinicalTrialProtocolName - clinicalTrialSiteID - clinicalTrialSiteName - clinicalTrialSubjectID - clinicalTrialSubjectReadingID - clinicalTrialTimePointID - clinicalTrialTimePointDescription - clinicalTrialCoordinatingCenterName -
DicomExceptionpublic static void flushMapOfUIDs()
Flush (remove all entries in) the map of original UIDs to replacement UIDs.
public static void remapUIDAttributes(AttributeList list)
throws DicomException
Remap UID attributes in a list of attributes, recursively iterating through nested sequences.
list - the list of attributes to be cleaned up
DicomException
public static void removeUIDAttributes(AttributeList list)
throws DicomException
Remove UID attributes in a list of attributes, recursively iterating through nested sequences.
list - the list of attributes to be cleaned up
DicomException
protected static void removeOrRemapUIDAttributes(AttributeList list,
int handleUIDs)
throws DicomException
Remove or remap UID attributes in a list of attributes, recursively iterating through nested sequences.
list - the list of attributes to be cleaned uphandleUIDs - remove or remap the UIDs
DicomException
public static void removeOrNullIdentifyingAttributes(AttributeList list,
boolean keepUIDs,
boolean keepDescriptors)
throws DicomException
Deidentify a list of attributes, recursively iterating through nested sequences.
list - the list of attributes to be cleaned upkeepUIDs - if true, keep the UIDskeepDescriptors - if true, keep the text description and comment attributes
DicomException
public static void removeOrNullIdentifyingAttributes(AttributeList list,
int handleUIDs,
boolean keepDescriptors)
throws DicomException
Deidentify a list of attributes, recursively iterating through nested sequences.
list - the list of attributes to be cleaned uphandleUIDs - keep, remove or remap the UIDskeepDescriptors - if true, keep the text description and comment attributes
DicomExceptionpublic static void main(String[] arg)
For testing.
Read a DICOM object from the file specified on the command line, and remove identifying attributes, and add sample clinical trials attributes.
arg -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||