com.pixelmed.display

## Class SuperimposedImage

- java.lang.Object
- - com.pixelmed.display.SuperimposedImage

- Direct Known Subclasses:
    SuperimposedDicomImage

      public class SuperimposedImage
      extends java.lang.Object

  A class that supports matching the geometry of a superimposed image and an underlying images, and creating BufferedImages suitable for drawing on an underlying image.

  See Also:
    `SingleImagePanel`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SuperimposedImage.AppliedToUnderlyingImage` A class that supports matching the geometry of a superimposed image and a specified underlying image, and creating a BufferedImage suitable for drawing on that underlying image.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int[]` | `cieLabScaled`
    `static double` | `DEFAULT_CLOSEST_SLICE_TOLERANCE_DISTANCE`
    `protected GeometryOfVolume` | `superimposedGeometry`
    `protected SourceImage` | `superimposedSourceImage`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SuperimposedImage()`
    `` | `SuperimposedImage(SourceImage superimposedSourceImage, GeometryOfVolume superimposedGeometry)`
    `` | `SuperimposedImage(SourceImage superimposedSourceImage, GeometryOfVolume superimposedGeometry, int[] cieLabScaled)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SuperimposedImage.AppliedToUnderlyingImage` | `getAppliedToUnderlyingImage(GeometryOfVolume underlyingGeometry, int underlyingFrame)`
    `SuperimposedImage.AppliedToUnderlyingImage` | `getAppliedToUnderlyingImage(GeometryOfVolume underlyingGeometry, int underlyingFrame, double toleranceDistance)`
    `int[]` | `getIntegerScaledCIELabPCS()`
    `static boolean` | `isSliceCloseEnoughToSuperimpose(GeometryOfSlice geometryOfSuperimposedSlice, GeometryOfSlice geometryOfUnderlyingSlice)` Is the superimposed slice close enough to the underlying slice to superimpose?
    `static boolean` | `isSliceCloseEnoughToSuperimpose(GeometryOfSlice geometryOfSuperimposedSlice, GeometryOfSlice geometryOfUnderlyingSlice, double toleranceDistance)` Is the superimposed slice close enough to the underlying slice to superimpose?

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

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

- - ### Field Detail

    - #### DEFAULT_CLOSEST_SLICE_TOLERANCE_DISTANCE

          public static final double DEFAULT_CLOSEST_SLICE_TOLERANCE_DISTANCE

      See Also:
        Constant Field Values

    - #### superimposedSourceImage

          protected SourceImage superimposedSourceImage

    - #### superimposedGeometry

          protected GeometryOfVolume superimposedGeometry

    - #### cieLabScaled

          protected int[] cieLabScaled

  - ### Constructor Detail

    - #### SuperimposedImage

          protected SuperimposedImage()

    - #### SuperimposedImage

          public SuperimposedImage(SourceImage superimposedSourceImage,
                                   GeometryOfVolume superimposedGeometry,
                                   int[] cieLabScaled)

      Parameters:
        `superimposedSourceImage` -
        `superimposedGeometry` -
        `cieLabScaled` -

    - #### SuperimposedImage

          public SuperimposedImage(SourceImage superimposedSourceImage,
                                   GeometryOfVolume superimposedGeometry)

      Parameters:
        `superimposedSourceImage` -
        `superimposedGeometry` -

  - ### Method Detail

    - #### isSliceCloseEnoughToSuperimpose

          public static boolean isSliceCloseEnoughToSuperimpose(GeometryOfSlice geometryOfSuperimposedSlice,
                                                                GeometryOfSlice geometryOfUnderlyingSlice,
                                                                double toleranceDistance)

      Is the superimposed slice close enough to the underlying slice to superimpose?

      Parameters:
        `geometryOfSuperimposedSlice` -
        `geometryOfUnderlyingSlice` -
        `toleranceDistance` - difference in distance along normal to orientation for underlying and superimposed frames to be close enough to superimpose, in mm

    - #### isSliceCloseEnoughToSuperimpose

          public static boolean isSliceCloseEnoughToSuperimpose(GeometryOfSlice geometryOfSuperimposedSlice,
                                                                GeometryOfSlice geometryOfUnderlyingSlice)

      Is the superimposed slice close enough to the underlying slice to superimpose?

      Assumes a default tolerance factor that is close to zero but allows for floating point rounding error.

      Parameters:
        `geometryOfSuperimposedSlice` -
        `geometryOfUnderlyingSlice` -

    - #### getAppliedToUnderlyingImage

          public SuperimposedImage.AppliedToUnderlyingImage getAppliedToUnderlyingImage(GeometryOfVolume underlyingGeometry,
                                                                                        int underlyingFrame,
                                                                                        double toleranceDistance)

      Parameters:
        `underlyingGeometry` -
        `underlyingFrame` - numbered from 0
        `toleranceDistance` - difference in distance along normal to orientation for underlying and superimposed frames to be close enough to superimpose, in mm
      Returns:
        an instance of AppliedToUnderlyingImage, which will contain a BufferedImage if a superimposed frame that is close enough can be found

    - #### getAppliedToUnderlyingImage

          public SuperimposedImage.AppliedToUnderlyingImage getAppliedToUnderlyingImage(GeometryOfVolume underlyingGeometry,
                                                                                        int underlyingFrame)

      Parameters:
        `underlyingGeometry` -
        `underlyingFrame` - numbered from 0
      Returns:
        an instance of AppliedToUnderlyingImage, which will contain a BufferedImage if a superimposed frame that is close enough can be found

    - #### getIntegerScaledCIELabPCS

          public int[] getIntegerScaledCIELabPCS()