Class DisplayShutter

java.lang.Object
com.pixelmed.dicom.DisplayShutter

public class DisplayShutter extends Object

A set of display shutter parameters constructed from the attributes of the DICOM Display Shutter Module.

  • Field Details

    • hasCircularShutter

      protected boolean hasCircularShutter
    • centerOfCircularShutterY

      protected int centerOfCircularShutterY
    • centerOfCircularShutterX

      protected int centerOfCircularShutterX
    • radiusOfCircularShutter

      protected int radiusOfCircularShutter
    • hasRectangularShutter

      protected boolean hasRectangularShutter
    • shutterLeftVerticalEdge

      protected int shutterLeftVerticalEdge
    • shutterRightVerticalEdge

      protected int shutterRightVerticalEdge
    • shutterUpperHorizontalEdge

      protected int shutterUpperHorizontalEdge
    • shutterLowerHorizontalEdge

      protected int shutterLowerHorizontalEdge
    • hasPolygonalShutter

      protected boolean hasPolygonalShutter
    • verticesOfPolygonalShutter

      protected int[] verticesOfPolygonalShutter
    • verticesOfPolygonalShutterAsPoints

      protected Point2D[] verticesOfPolygonalShutterAsPoints
  • Constructor Details

    • DisplayShutter

      public DisplayShutter(AttributeList list)
      Extract the display shutter paramaters from a list of attributes
      Parameters:
      list - list of attributes
  • Method Details

    • setRectangularDisplayShutter

      public void setRectangularDisplayShutter(int shutterLeftVerticalEdge, int shutterRightVerticalEdge, int shutterUpperHorizontalEdge, int shutterLowerHorizontalEdge)
      Set the parameters of a rectangular shutter.
      Parameters:
      shutterLeftVerticalEdge - left vertical edge
      shutterRightVerticalEdge - right vertical edge
      shutterUpperHorizontalEdge - upper horizontal edge
      shutterLowerHorizontalEdge - lower horizontal edge
    • isRectangularShutter

      public boolean isRectangularShutter()
      Is there a rectangular shutter.
      Returns:
      true if is a rectangular shutter
    • getShutterLeftVerticalEdge

      public int getShutterLeftVerticalEdge()
      Get left vertical edge of rectangular shutter.
      Returns:
      left vertical edge
    • getShutterRightVerticalEdge

      public int getShutterRightVerticalEdge()
      Get right vertical edge of rectangular shutter.
      Returns:
      right vertical edge
    • getShutterUpperHorizontalEdge

      public int getShutterUpperHorizontalEdge()
      Get upper horizontal edge of rectangular shutter.
      Returns:
      upper horizontal edge
    • getShutterLowerHorizontalEdge

      public int getShutterLowerHorizontalEdge()
      Get lower horizontal edge of rectangular shutter.
      Returns:
      lower horizontal edge
    • getRectangularShutterTLHC

      public Point2D getRectangularShutterTLHC()
      Get TLHC of rectangular shutter.
      Returns:
      top left hand corner
    • getRectangularShutterBRHC

      public Point2D getRectangularShutterBRHC()
      Get BRHC of rectangular shutter.
      Returns:
      bottom right hand corner
    • setCircularDisplayShutter

      public void setCircularDisplayShutter(int centerOfCircularShutterX, int centerOfCircularShutterY, int radiusOfCircularShutter)
      Set the parameters of a circular shutter.
      Parameters:
      centerOfCircularShutterX - center X value (column)
      centerOfCircularShutterY - center Y value (row)
      radiusOfCircularShutter - radius
    • isCircularShutter

      public boolean isCircularShutter()
      Is there a circular shutter.
      Returns:
      true if is a circular shutter
    • getCenterOfCircularShutterX

      public int getCenterOfCircularShutterX()
      Get center X value of circular shutter.
      Returns:
      center X value
    • getCenterOfCircularShutterY

      public int getCenterOfCircularShutterY()
      Get center Y value of circular shutter.
      Returns:
      center Y value
    • getRadiusOfCircularShutter

      public int getRadiusOfCircularShutter()
      Get radius of circular shutter.
      Returns:
      radius
    • getCircularShutterTLHC

      public Point2D getCircularShutterTLHC()
      Get TLHC of rectangle bounding circular shutter. For example, to use to draw as ellipse.
      Returns:
      top left hand corner
    • getCircularShutterBRHC

      public Point2D getCircularShutterBRHC()
      Get BRHC of rectangle bounding circular shutter. For example, to use to draw as ellipse.
      Returns:
      bottom right hand corner
    • isPolygonalShutter

      public boolean isPolygonalShutter()
      Is there a polygonal shutter.
      Returns:
      true if is a polygonal shutter
    • getVerticesOfPolygonalShutter

      public int[] getVerticesOfPolygonalShutter()
      Get vertices of polygonal shutter.
      Returns:
      vertices as pairs of row (y) and column (x) values, as encoded in the DICOM attributes
    • getVerticesOfPolygonalShutterAsPoint2D

      public Point2D[] getVerticesOfPolygonalShutterAsPoint2D()
      Get vertices of polygonal shutter as Point2D. For example, to use to build a 2D Shape.
      Returns:
      vertices as array of Point2D
    • toString

      public final String toString()
      Overrides:
      toString in class Object