Package com.pixelmed.dicom
Class ModalityTransform
- java.lang.Object
-
- com.pixelmed.dicom.ModalityTransform
-
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 Summary
Constructors Constructor Description ModalityTransform(AttributeList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
ModalityTransform
public ModalityTransform(AttributeList list)
- Parameters:
list
- the dataset of an image object to be searched for transformations
-
-
Method Detail
-
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)
-
-