Package com.pixelmed.dicom
Class DisplayShutter
java.lang.Object
com.pixelmed.dicom.DisplayShutter
A set of display shutter parameters constructed from the attributes of the DICOM Display Shutter Module.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected boolean
protected boolean
protected boolean
protected int
protected int
protected int
protected int
protected int
protected int[]
protected Point2D[]
-
Constructor Summary
ConstructorsConstructorDescriptionDisplayShutter
(AttributeList list) Extract the display shutter paramaters from a list of attributes -
Method Summary
Modifier and TypeMethodDescriptionint
Get center X value of circular shutter.int
Get center Y value of circular shutter.Get BRHC of rectangle bounding circular shutter.Get TLHC of rectangle bounding circular shutter.int
Get radius of circular shutter.Get BRHC of rectangular shutter.Get TLHC of rectangular shutter.int
Get left vertical edge of rectangular shutter.int
Get lower horizontal edge of rectangular shutter.int
Get right vertical edge of rectangular shutter.int
Get upper horizontal edge of rectangular shutter.int[]
Get vertices of polygonal shutter.Point2D[]
Get vertices of polygonal shutter as Point2D.boolean
Is there a circular shutter.boolean
Is there a polygonal shutter.boolean
Is there a rectangular shutter.void
setCircularDisplayShutter
(int centerOfCircularShutterX, int centerOfCircularShutterY, int radiusOfCircularShutter) Set the parameters of a circular shutter.void
setRectangularDisplayShutter
(int shutterLeftVerticalEdge, int shutterRightVerticalEdge, int shutterUpperHorizontalEdge, int shutterLowerHorizontalEdge) Set the parameters of a rectangular shutter.final String
toString()
-
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
-
-
Constructor Details
-
DisplayShutter
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 edgeshutterRightVerticalEdge
- right vertical edgeshutterUpperHorizontalEdge
- upper horizontal edgeshutterLowerHorizontalEdge
- 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
Get TLHC of rectangular shutter.- Returns:
- top left hand corner
-
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
Get TLHC of rectangle bounding circular shutter. For example, to use to draw as ellipse.- Returns:
- top left hand corner
-
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
Get vertices of polygonal shutter as Point2D. For example, to use to build a 2D Shape.- Returns:
- vertices as array of Point2D
-
toString
-