public class MergeCompositeContextForOneEntitySelectively
extends java.lang.Object
A class containing an application for merging the composite context of multiple instances for consistency.
The merge can be performed at a specified entity/module level or the default patient level.
All source files are presumed to be of the same entity at the specified or default level (e.g., the same patient) and no cross-references between instances are required.
Various known dummy values are treated as if they were zero length or absent if conflicting with non-dummy values.
MergeCompositeContext
Modifier and Type | Class and Description |
---|---|
protected class |
MergeCompositeContextForOneEntitySelectively.OurFirstPassMediaImporter |
protected class |
MergeCompositeContextForOneEntitySelectively.OurSecondPassMediaImporter |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
dstFolderName |
protected java.lang.String |
ourAETitle |
protected CompositeInstanceContext.Selector |
selector |
Constructor and Description |
---|
MergeCompositeContextForOneEntitySelectively(CompositeInstanceContext.Selector selector,
java.lang.String[] srcs,
java.lang.String dstFolderName,
MessageLogger logger)
Merge the composite context of multiple instances for consistency.
|
MergeCompositeContextForOneEntitySelectively(CompositeInstanceContext.Selector selector,
java.lang.String src,
java.lang.String dstFolderName,
MessageLogger logger)
Merge the composite context of multiple instances for consistency.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isNonZeroLengthDummyValue(java.lang.String value) |
static void |
main(java.lang.String[] arg)
Merge the composite context of multiple instances for consistency.
|
protected CompositeInstanceContext |
mergeSelectedContext(CompositeInstanceContext newContext) |
protected java.lang.String dstFolderName
protected java.lang.String ourAETitle
protected CompositeInstanceContext.Selector selector
public MergeCompositeContextForOneEntitySelectively(CompositeInstanceContext.Selector selector, java.lang.String[] srcs, java.lang.String dstFolderName, MessageLogger logger) throws java.io.IOException, DicomException
Merge the composite context of multiple instances for consistency.
selector
- selected entities/modules to mergesrcs
- source folders or DICOMDIRsdstFolderName
- destination folderlogger
- logger to send progress, warnings and errorsjava.io.IOException
- if there is a problem reading or writingDicomException
- if there is a problem parsing or extracting required contentpublic MergeCompositeContextForOneEntitySelectively(CompositeInstanceContext.Selector selector, java.lang.String src, java.lang.String dstFolderName, MessageLogger logger) throws java.io.IOException, DicomException
Merge the composite context of multiple instances for consistency.
selector
- selected entities/modules to mergesrc
- source folder or DICOMDIRdstFolderName
- destination folderlogger
- logger to send progress, warnings and errorsjava.io.IOException
- if there is a problem reading or writingDicomException
- if there is a problem parsing or extracting required contentprotected boolean isNonZeroLengthDummyValue(java.lang.String value)
public static void main(java.lang.String[] arg)
Merge the composite context of multiple instances for consistency.
The files are processed in the order in which they are specified on the command line, and when there is a conflict, the first values are used. This can be used to make sure that all PatientIDs, for example are coerced to the first one specified.
For example, if a folder of images for a patient is specified first, and then a folder of structured reports or presentation states corresponding to those images but with different patient level identifiers is specified second, then the latter (the reports or presentation states) will be cooerced to have the same patient context as the former (the images).
Entity/module arguments recognized are -patient|-study|-equipment|-frameofreference|-series|-instance|srdocumentgeneral.
If no entity/module argument is specified, only the patient context will be merged.
arg
- array of 2 or more strings - an optional list of entities/modules to merge,
followed by one or more source folders or DICOMDIR (to merge and use as a source of context),
and a destination folderprotected CompositeInstanceContext mergeSelectedContext(CompositeInstanceContext newContext)