Class MergeFunctionalGroups
A class containing an application for merging the functional groups of multiple instances for consistency.
The merge can be performed on specified subsets of functional groups, such as those related to spatial information.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
protected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected FunctionalGroupUtilities.Selector
-
Constructor Summary
ConstructorsConstructorDescriptionMergeFunctionalGroups
(FunctionalGroupUtilities.Selector selector, String[] srcs, String dstFolderName, MessageLogger logger) Merge the functional groups of multiple instances for consistency.MergeFunctionalGroups
(FunctionalGroupUtilities.Selector selector, String src, String dstFolderName, MessageLogger logger) Merge the functional groups of multiple instances for consistency. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Merge the functional groups of multiple instances for consistency.protected void
mergeDimensionsModule
(AttributeList newList) protected void
mergeSelectedFunctionalGroup
(SequenceAttribute mergedSharedOrPerFrameFunctionalGroupsSequence, SequenceAttribute newSharedOrPerFrameFunctionalGroupsSequence) protected void
protected void
replaceDimensionsModuleWithMerged
(AttributeList targetList) protected void
replaceFunctionalGroupsWithMerged
(AttributeList targetList)
-
Field Details
-
ourAETitle
-
dstFolderName
-
selector
-
-
Constructor Details
-
MergeFunctionalGroups
public MergeFunctionalGroups(FunctionalGroupUtilities.Selector selector, String src, String dstFolderName, MessageLogger logger) throws IOException, DicomException Merge the functional groups of multiple instances for consistency.
- Parameters:
selector
- selected functional groups to mergesrc
- source folder or DICOMDIRdstFolderName
- destination folderlogger
- logger to send progress, warnings and errors- Throws:
IOException
- if there is a problem reading or writingDicomException
- if there is a problem parsing or extracting required content
-
MergeFunctionalGroups
public MergeFunctionalGroups(FunctionalGroupUtilities.Selector selector, String[] srcs, String dstFolderName, MessageLogger logger) throws IOException, DicomException Merge the functional groups of multiple instances for consistency.
- Parameters:
selector
- selected functional groups to mergesrcs
- source folders or DICOMDIRsdstFolderName
- destination folderlogger
- logger to send progress, warnings and errors- Throws:
IOException
- if there is a problem reading or writingDicomException
- if there is a problem parsing or extracting required content
-
-
Method Details
-
mergeDimensionsModule
- Throws:
DicomException
-
replaceDimensionsModuleWithMerged
-
mergeSelectedFunctionalGroup
protected void mergeSelectedFunctionalGroup(SequenceAttribute mergedSharedOrPerFrameFunctionalGroupsSequence, SequenceAttribute newSharedOrPerFrameFunctionalGroupsSequence) throws DicomException - Throws:
DicomException
-
mergeSelectedFunctionalGroups
- Throws:
DicomException
-
replaceFunctionalGroupsWithMerged
-
main
Merge the functional groups 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 encountered functional group values are used.
Functional group arguments recognized are -all|-spatial|-framecontent|-unclassified.
If -framecontent is specified, the Dimensions Module will also be merged (the earliest encountered will be used).
- Parameters:
arg
- array of 2 or more strings - an optional list of functional groups to merge (if absent, defaults to all), followed by one or more source folders or DICOMDIR (to merge and use as a source of functional groups), and a destination folder
-