org.dicom4j.images.transforms
Class ModalityTransform

java.lang.Object
  extended by org.dicom4j.images.transforms.ModalityTransform

public class ModalityTransform
extends 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.

Author:
dclunie

Constructor Summary
ModalityTransform(DataSet aDataSet)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModalityTransform

public ModalityTransform(DataSet aDataSet)
Parameters:
aDataSet - 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)


Copyright © 2009 dicom4j. All Rights Reserved.