Package com.pixelmed.dicom
Class ModalityTransform
java.lang.Object
com.pixelmed.dicom.ModalityTransform
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
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.
-
Constructor Details
-
ModalityTransform
- Parameters:
list
- the dataset of an image object to be searched for transformations
-
-
Method Details
-
getRescaleSlope
public double getRescaleSlope(int frame) Get the rescale slope of the particular transform available for a particular frame.- Parameters:
frame
- numbered from zero; needed to select which transform if frame-specific- Returns:
- the rescale slope (1.0 if none available)
-
getRescaleIntercept
public double getRescaleIntercept(int frame) Get the rescale intercept of the particular transform available for a particular frame.- Parameters:
frame
- numbered from zero; needed to select which transform if frame-specific- Returns:
- the rescale intercept (0.0 if none available)
-