com.pixelmed.dicom

## Class DescriptionFactory

- java.lang.Object
- - com.pixelmed.dicom.DescriptionFactory

    public abstract class DescriptionFactory
    extends java.lang.Object

A class of static methods to provide descriptions of images, including image orientation relative to the patient from the mathematical position and orientation attributes, and including other descriptive attributes such as from dicom directory records and images using multi-frame functional groups.

### Field Summary

Fields
`static java.lang.String` `AXIAL_LABEL`
`static java.lang.String` `CORONAL_LABEL`
`static java.lang.String` `OBLIQUE_LABEL`
`static java.lang.String` `SAGITTAL_LABEL`

### Constructor Summary

Constructors
Constructor and Description
`DescriptionFactory()`

### Method Summary

Methods
`static java.lang.String` `getMajorAxisFromPatientRelativeDirectionCosine(double x, double y, double z)` Get a label describing the major axis from a unit vector (direction cosine) as found in ImageOrientationPatient.
`static java.lang.String` `makeImageDescription(AttributeList list)` Get a human readable string meaningfully describing an image from an attribute list such as from a directory record.
`static java.lang.String` `makeImageDescription(java.util.Map attributes)` Get a human readable string meaningfully describing an image from a map of names and values such as from a database.
`static java.lang.String` `makeImageOrientationLabelFromImageOrientationPatient(Attribute aImageOrientationPatient)` Get a label describing the axial, coronal or sagittal plane from row and column unit vectors (direction cosines) in ImageOrientationPatient.
`static java.lang.String` `makeImageOrientationLabelFromImageOrientationPatient(AttributeList list)` Get a label describing the axial, coronal or sagittal plane from row and column unit vectors (direction cosines) found in ImageOrientationPatient in the supplied AttributeList.
`static java.lang.String` `makeImageOrientationLabelFromImageOrientationPatient(double rowX, double rowY, double rowZ, double colX, double colY, double colZ)` Get a label describing the axial, coronal or sagittal plane from row and column unit vectors (direction cosines) as found in ImageOrientationPatient.
`static java.lang.String` `makePatientDescription(java.util.Map attributes)` Get a human readable string meaningfully describing a patient from an attribute list such as from a database or directory record.
`static java.lang.String` `makePatientOrientationFromImageOrientationPatient(double rowX, double rowY, double rowZ, double colX, double colY, double colZ)` Get a PatientOrientation style string from row and column unit vectors (direction cosines) as found in ImageOrientationPatient.
`static java.lang.String` `makePatientOrientationFromPatientRelativeDirectionCosine(double x, double y, double z)` Get a PatientOrientation style string from a unit vector (direction cosine) as found in ImageOrientationPatient.
`static java.lang.String` `makeSeriesDescription(AttributeList list)` Get a human readable string meaningfully describing a series from an attribute list such as from a directory record.
`static java.lang.String` `makeSeriesDescription(java.util.Map attributes)` Get a human readable string meaningfully describing a series from an attribute list such as from a directory record.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### AXIAL_LABEL

    public static final java.lang.String AXIAL_LABEL

See Also:
  Constant Field Values

#### CORONAL_LABEL

    public static final java.lang.String CORONAL_LABEL

See Also:
  Constant Field Values

#### SAGITTAL_LABEL

    public static final java.lang.String SAGITTAL_LABEL

See Also:
  Constant Field Values

#### OBLIQUE_LABEL

    public static final java.lang.String OBLIQUE_LABEL

See Also:
  Constant Field Values

### Constructor Detail

#### DescriptionFactory

    public DescriptionFactory()

### Method Detail

#### getMajorAxisFromPatientRelativeDirectionCosine

    public static final java.lang.String getMajorAxisFromPatientRelativeDirectionCosine(double x,
                                                                  double y,
                                                                  double z)

Get a label describing the major axis from a unit vector (direction cosine) as found in ImageOrientationPatient.

Some degree of deviation from one of the standard orthogonal axes is allowed before deciding no major axis applies and returning null.

Parameters:
  `x` -
  `y` -
  `z` -
Returns:
  the string describing the orientation of the vector, or null if oblique

#### makeImageOrientationLabelFromImageOrientationPatient

    public static final java.lang.String makeImageOrientationLabelFromImageOrientationPatient(double rowX,
                                                                        double rowY,
                                                                        double rowZ,
                                                                        double colX,
                                                                        double colY,
                                                                        double colZ)

Get a label describing the axial, coronal or sagittal plane from row and column unit vectors (direction cosines) as found in ImageOrientationPatient.

Some degree of deviation from one of the standard orthogonal planes is allowed before deciding the plane is OBLIQUE.

Parameters:
  `rowX` -
  `rowY` -
  `rowZ` -
  `colX` -
  `colY` -
  `colZ` -
Returns:
  the string describing the plane of orientation, AXIAL, CORONAL, SAGITTAL or OBLIQUE, or null if undetermined

#### makeImageOrientationLabelFromImageOrientationPatient

    public static final java.lang.String makeImageOrientationLabelFromImageOrientationPatient(Attribute aImageOrientationPatient)

Get a label describing the axial, coronal or sagittal plane from row and column unit vectors (direction cosines) in ImageOrientationPatient.

Some degree of deviation from one of the standard orthogonal planes is allowed before deciding the plane is OBLIQUE.

Parameters:
  `aImageOrientationPatient` -
Returns:
  the string describing the plane of orientation, AXIAL, CORONAL, SAGITTAL or OBLIQUE, or null if undetermined

#### makeImageOrientationLabelFromImageOrientationPatient

    public static final java.lang.String makeImageOrientationLabelFromImageOrientationPatient(AttributeList list)

Get a label describing the axial, coronal or sagittal plane from row and column unit vectors (direction cosines) found in ImageOrientationPatient in the supplied AttributeList.

Some degree of deviation from one of the standard orthogonal planes is allowed before deciding the plane is OBLIQUE.

Parameters:
  `list` -
Returns:
  the string describing the plane of orientation, AXIAL, CORONAL, SAGITTAL or OBLIQUE, or null if undetermined

#### makePatientOrientationFromPatientRelativeDirectionCosine

    public static final java.lang.String makePatientOrientationFromPatientRelativeDirectionCosine(double x,
                                                                            double y,
                                                                            double z)

Get a PatientOrientation style string from a unit vector (direction cosine) as found in ImageOrientationPatient.

Returns letters representing R (right) or L (left), A (anterior) or P (posterior), F (feet) or H (head).

If the orientation is not precisely orthogonal to one of the major axes, more than one letter is returned, from major to minor axes, with up to three letters in the case of a "double oblique".

Parameters:
  `x` -
  `y` -
  `z` -
Returns:
  the string describing the orientation of the vector

#### makePatientOrientationFromImageOrientationPatient

    public static final java.lang.String makePatientOrientationFromImageOrientationPatient(double rowX,
                                                                     double rowY,
                                                                     double rowZ,
                                                                     double colX,
                                                                     double colY,
                                                                     double colZ)

Get a PatientOrientation style string from row and column unit vectors (direction cosines) as found in ImageOrientationPatient.

Returns letters representing R (right) or L (left), A (anterior) or P (posterior), F (feet) or H (head).

If the orientation is not precisely orthogonal to one of the major axes, more than one letter is returned, from major to minor axes, with up to three letters in the case of a "double oblique".

The row and column letters returned are separated by the usual DICOM string delimiter, a backslash.

Parameters:
  `rowX` -
  `rowY` -
  `rowZ` -
  `colX` -
  `colY` -
  `colZ` -
Returns:
  the string describing the row and then the column

#### makeImageDescription

    public static final java.lang.String makeImageDescription(AttributeList list)

Get a human readable string meaningfully describing an image from an attribute list such as from a directory record.

This version is heavily tuned to describe MR multiframe images thoroughly.

Parameters:
  `list` - the list of attributes (such as from an IMAGE level directory record)
Returns:
  a human readable string meaningfully describing the image

#### makeImageDescription

    public static final java.lang.String makeImageDescription(java.util.Map attributes)

Get a human readable string meaningfully describing an image from a map of names and values such as from a database.

This version is heavily tuned to describe MR multiframe images thoroughly.

Parameters:
  `attributes` - the map of upper case named attributes and their values (such as from a database query)
Returns:
  a human readable string meaningfully describing the image

#### makeSeriesDescription

    public static final java.lang.String makeSeriesDescription(AttributeList list)

Get a human readable string meaningfully describing a series from an attribute list such as from a directory record.

Parameters:
  `list` - the list of attributes (such as from a SERIES level directory record)
Returns:
  a human readable string meaningfully describing the series

#### makeSeriesDescription

    public static final java.lang.String makeSeriesDescription(java.util.Map attributes)

Get a human readable string meaningfully describing a series from an attribute list such as from a directory record.

Parameters:
  `attributes` - the map of upper case named attributes and their values (such as from a database query)
Returns:
  a human readable string meaningfully describing the series

#### makePatientDescription

    public static final java.lang.String makePatientDescription(java.util.Map attributes)

Get a human readable string meaningfully describing a patient from an attribute list such as from a database or directory record.

Parameters:
  `attributes` - the map of upper case named attributes and their values (such as from a database query)
Returns:
  a human readable string meaningfully describing the patient