Package com.pixelmed.dicom
Class FunctionalGroupUtilities
java.lang.Object
com.pixelmed.dicom.FunctionalGroupUtilities
A class contain useful methods for manipulating Functional Group Sequences.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A class to select which functional groups are copied or propagated or removed or not during operations on functional groups. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeList
createFunctionalGroupsIfNotPresent
(AttributeList list, int numberOfFrames) Create shared and per-frame functional group sequences if not already present.static AttributeList
Create shared functional group sequences if not already present.static AttributeList
generateFrameTypeSharedFunctionalGroup
(AttributeList list, AttributeTag tFrameTypeSequence, Attribute aFrameType) Insert a shared functional group sequence FrameTypeSequence entry.static AttributeList
generatePixelValueTransformationFunctionalGroup
(AttributeList list, int numberOfFrames, double rescaleSlope, double rescaleIntercept, String rescaleType) Insert a shared functional group sequence Pixel Value Transformation Sequence entry.static AttributeList
generateUnassignedConvertedAttributesSequenceFunctionalGroups
(AttributeList list, int numberOfFrames) Create shared and per-frame Unassigned Converted Attributes functional group sequences if not already present.static AttributeList
generateVOILUTFunctionalGroup
(AttributeList list, int numberOfFrames, double windowWidth, double windowCenter, String voiLUTFunction) Insert a shared functional group sequence Frame VOI LUT Sequence entry.static boolean
static boolean
isSpatial
(AttributeTag tag) static boolean
static void
removeAllButSelected
(AttributeList list, FunctionalGroupUtilities.Selector selector) Remove the unselected functional groups.static void
removeAllButSelected
(SequenceAttribute functionalGroupsSequence, FunctionalGroupUtilities.Selector selector) Remove the unselected functional groups.static void
removeFunctionalGroup
(AttributeList list, AttributeTag functionalGroupSequenceTag) Remove a specified functional group sequences from the shared and per-frame functional group sequences.
-
Constructor Details
-
FunctionalGroupUtilities
public FunctionalGroupUtilities()
-
-
Method Details
-
createFunctionalGroupsIfNotPresent
public static AttributeList createFunctionalGroupsIfNotPresent(AttributeList list, int numberOfFrames) Create shared and per-frame functional group sequences if not already present.
- Parameters:
list
- an existing (possibly empty) attribute list, if null, a new one will be created; may already shared and per-frame functional group sequences or they will be addednumberOfFrames
- number of frames- Returns:
- attribute list with empty per-frame and shared functional group sequences added
-
generateUnassignedConvertedAttributesSequenceFunctionalGroups
public static AttributeList generateUnassignedConvertedAttributesSequenceFunctionalGroups(AttributeList list, int numberOfFrames) Create shared and per-frame Unassigned Converted Attributes functional group sequences if not already present.
- Parameters:
list
- an existing (possibly empty) attribute list, if null, a new one will be created; may already shared and per-frame functional group sequences or they will be addednumberOfFrames
- number of frames- Returns:
- attribute list with functional group sequences added
-
generatePixelValueTransformationFunctionalGroup
public static AttributeList generatePixelValueTransformationFunctionalGroup(AttributeList list, int numberOfFrames, double rescaleSlope, double rescaleIntercept, String rescaleType) throws DicomException Insert a shared functional group sequence Pixel Value Transformation Sequence entry.
- Parameters:
list
- an existing (possibly empty) attribute list, if null, a new one will be created; may already shared and per-frame functional group sequences or they will be addednumberOfFrames
- number of framesrescaleSlope
- rescale sloperescaleIntercept
- rescale interceptrescaleType
- rescale type- Returns:
- attribute list with per-frame and shared functional group sequences for VOI added
- Throws:
DicomException
- if error in DICOM encoding
-
generateVOILUTFunctionalGroup
public static AttributeList generateVOILUTFunctionalGroup(AttributeList list, int numberOfFrames, double windowWidth, double windowCenter, String voiLUTFunction) throws DicomException Insert a shared functional group sequence Frame VOI LUT Sequence entry.
- Parameters:
list
- an existing (possibly empty) attribute list, if null, a new one will be created; may already shared and per-frame functional group sequences or they will be addednumberOfFrames
- number of frameswindowWidth
- window widthwindowCenter
- window centervoiLUTFunction
- VOI LUT function- Returns:
- attribute list with per-frame and shared functional group sequences for VOI added
- Throws:
DicomException
- if error in DICOM encoding
-
removeFunctionalGroup
public static void removeFunctionalGroup(AttributeList list, AttributeTag functionalGroupSequenceTag) Remove a specified functional group sequences from the shared and per-frame functional group sequences.
- Parameters:
list
- an attribute listfunctionalGroupSequenceTag
- functional group to remove
-
removeAllButSelected
public static void removeAllButSelected(SequenceAttribute functionalGroupsSequence, FunctionalGroupUtilities.Selector selector) Remove the unselected functional groups.
- Parameters:
functionalGroupsSequence
- the Shared or Per-Frame functional group Attribute to editselector
- the functional groups to keep
-
removeAllButSelected
public static void removeAllButSelected(AttributeList list, FunctionalGroupUtilities.Selector selector) Remove the unselected functional groups.
- Parameters:
list
- the top level data set list of attributes containing the Shared and Per-Frame functional groups to editselector
- the functional groups to keep
-
isSpatial
-
isFrameContent
-
isUnclassified