public class ModalityTransform
extends java.lang.Object
A transformation constructed from a DICOM attribute list that extracts those attributes that define the Modality LUT transformation, specifically the window center and width attributes.
Looks first for a per-frame functional group PixelValueTransformationSequence then looks in the shared functional groups, otherwise tries to find the Rescale Slope and Intercept values in the top level of the dataset.
Note that multiple transformations (for the same frames) are not permitted by the standard.
Does not currently support a LUT in the Modality LUT Sequence, only linear rescale values.
Will default to identity transformation if none present, or if there is an error in what is present (e.g., rescale slope is zerp).
Constructor and Description |
---|
ModalityTransform(AttributeList list) |
Modifier and Type | Method and Description |
---|---|
double |
getRescaleIntercept(int frame)
Get the rescale intercept of the particular transform available for a particular frame.
|
double |
getRescaleSlope(int frame)
Get the rescale slope of the particular transform available for a particular frame.
|
public ModalityTransform(AttributeList list)
list
- the dataset of an image object to be searched for transformationspublic double getRescaleIntercept(int frame)
frame
- numbered from zero; needed to select which transform if frame-specificpublic double getRescaleSlope(int frame)
frame
- numbered from zero; needed to select which transform if frame-specific