Class PixelSpacing

java.lang.Object
com.pixelmed.dicom.PixelSpacing

public class PixelSpacing extends Object

An class to extract and describe pixel spacing related information.

Currently only supports square pixels.

  • Field Details

    • spacing

      protected double spacing
    • description

      protected String description
  • Constructor Details

    • PixelSpacing

      public PixelSpacing(AttributeList list, GeometryOfVolume volumeGeometry, boolean preferCalibratedValue, boolean useMagnificationFactorIfPresent)

      Extract the appropriate spacing to use for measurements.

      Parameters:
      list - where to look for the top level DICOM pixel spacing related attributes
      volumeGeometry - 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 former
      useMagnificationFactorIfPresent - if true, and preferCalibratedValue is false and there is no Pixel Spacing, adjust Imager Pixel Spacing based on mag factor, if absent, SID and SOD
    • PixelSpacing

      public PixelSpacing(AttributeList list, GeometryOfVolume volumeGeometry)

      Extract the appropriate spacing to use for measurements.

      Will prefer calibrated values, and ignore magnification factors
      Parameters:
      list - where to look for the top level DICOM pixel spacing related attributes
      volumeGeometry - if present, where to get the voxel spacing already derived from the DICOM attributes may be null, if not cross-sectional modality)
    • PixelSpacing

      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 factors
      Parameters:
      list - where to look for the top level DICOM pixel spacing related attributes
  • Method Details

    • getSpacing

      public double getSpacing()

      Get the spacing.

      Returns:
      the spacing
    • getDescription

      public String getDescription()

      Get the description.

      Returns:
      the description
    • toString

      public String toString()

      Get the spacing and the description as a String.

      Overrides:
      toString in class Object
      Returns:
      a string describing the spacing and the description