public class PixelSpacing
extends java.lang.Object
An class to extract and describe pixel spacing related information.
Currently only supports square pixels.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description |
protected double |
spacing |
Constructor and Description |
---|
PixelSpacing(AttributeList list)
Extract the appropriate spacing to use for measurements on projection radiographs or non-enhanced family cross-sectional images.
|
PixelSpacing(AttributeList list,
GeometryOfVolume volumeGeometry)
Extract the appropriate spacing to use for measurements.
|
PixelSpacing(AttributeList list,
GeometryOfVolume volumeGeometry,
boolean preferCalibratedValue,
boolean useMagnificationFactorIfPresent)
Extract the appropriate spacing to use for measurements.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get the description.
|
double |
getSpacing()
Get the spacing.
|
java.lang.String |
toString()
Get the spacing and the description as a String.
|
public PixelSpacing(AttributeList list)
Extract the appropriate spacing to use for measurements on projection radiographs or non-enhanced family cross-sectional images.
Will prefer calibrated values, and ignore magnification factorslist
- where to look for the top level DICOM pixel spacing related attributespublic PixelSpacing(AttributeList list, GeometryOfVolume volumeGeometry)
Extract the appropriate spacing to use for measurements.
Will prefer calibrated values, and ignore magnification factorslist
- where to look for the top level DICOM pixel spacing related attributesvolumeGeometry
- if present, where to get the voxel spacing already derived from the DICOM attributes may be null, if not cross-sectional modality)public PixelSpacing(AttributeList list, GeometryOfVolume volumeGeometry, boolean preferCalibratedValue, boolean useMagnificationFactorIfPresent)
Extract the appropriate spacing to use for measurements.
list
- where to look for the top level DICOM pixel spacing related attributesvolumeGeometry
- if present, where to get the voxel spacing already derived from the DICOM attributes may be null, if not cross-sectional modality)preferCalibratedValue
- if true, in the absence of 3D geometry, and presence of both Pixel Spacing and Imager Pixel Spacing with different values, use the formeruseMagnificationFactorIfPresent
- if true, and preferCalibratedValue is false and there is no Pixel Spacing, adjust Imager Pixel Spacing based on mag factor, if absent, SID and SODpublic java.lang.String getDescription()
Get the description.
public double getSpacing()
Get the spacing.
public java.lang.String toString()
Get the spacing and the description as a String.
toString
in class java.lang.Object