Class Viewer.Presentation.PresentationStateGraphicsHandler
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Viewer.Presentation.PresentationStateGraphicsHandler

Object
   |
   +----Viewer.Presentation.PresentationStateGraphicsHandler

public class PresentationStateGraphicsHandler
extends Object
This class manages the Presentation State.

Author:
Klaus Kleber
Since:
30.04.1999

Variable Index

 o dvi
A jDVInterface represents the relating C++-Class DVInterface in Java.
 o enablePresentationState
Toggle PS on/off.
 o havePresentationState
Contains true if the PresentationStateGraphicsHandler have a jDVPresentationState.
 o listPresentationStateGraphicLayer
Vector which contains the layers of the presentation state.
 o overlayList
This object manages the overlays.
 o ps
Contains the data of the Presentation State in a c++ Interface.
 o shutterList
This object manages the Shutters.

Constructor Index

 o Viewer.Presentation.PresentationStateGraphicsHandler(jDVInterface)
Constructs the paintStructure from the specified jDVInterface.

Method Index

 o buildPresentationState()
Builds the internal structure of the PresentationStateGraphicsHandler if a new jDVPresentationState will be received.
 o calculateFirstZoomValue()
Calculates the zoom value if the image should displayed first time.
 o containsObject(Point2D. Float)
Searched for the PresentationStateLayerObject containing the specified point.
 o deleteAll()
Deletes all objects of the PresentationStateGraphicsHandler.
 o deleteCurrentObject()
Deletes the currently active PresentationStateLayerObject, specified with the currentLayerObjectIndex.
 o deleteLayer(int)
Deletes the PresentationStateGraphicLayer with the specified index
 o deleteObjectAtIndex(int)
Deletes the specified PresentationStateLayerObject in the currently active PresentationStateGraphicLayer.
 o drawPaintStructure(BufferedImage, AffineTransform, AffineTransform)
Draws the all PresentationStateGraphicLayer in listPresentationStateGraphicLayer and all Overlays defined in OverlayList after the sprecified transformation aff in the specified BufferedImage.
 o getCurrentColor()
Gets the Color of the currently active PresentationStateGraphicLayer.
 o getCurrentImageHeight()
Gets the height of the image after rotation.If rotation == 90-deg or 270 deg height and width of the image will be exchanged.
 o getCurrentImageWidth()
Gets the height of the image after rotation.If rotation == 90-deg or 270 deg height and width of the image will be exchanged.
 o getCurrentLayer()
Gets the current active PresentationStateGraphicLayer.
 o getCurrentLayerIndex()
Gets the currentLayerObjectIndex.
 o getCurrentLayerObject()
Gets the current active PresentationStateLayerObject.
 o getCurrentLayerObjectIndex()
Gets the currentLayerObjectIndex.
 o getCurrentScalingX()
Gets the horizontal scaling factor after the rotation.
 o getCurrentScalingY()
Gets the vertical scaling factor after rotation.
 o getCurrentVOIDescription()
Returns the description of the currently active VOI window.
 o getCurrentWindowCenter()
Returns the center of the currently active VOI window.
 o getCurrentWindowWidth()
Returns the width of the currently active VOI window.
 o getImageHeight()
Gets the height of the image.
 o getImageWidth()
Gets the width of the image.
 o getInfo()
Returns a String representing this object.
 o getLayerAtIndex(int)
Gets the PresentationStateGraphicLayer with the specified index.
 o getListPresentationStateGraphicLayer()
The Vector of PresentationStateGraphicLayers.
 o getPixelAspectRatio()
Gets the pixel aspect ratio of the attached image.
 o getPresentationCreatorsName()
Gets the creators name of the presentation state.
 o getPresentationDescription()
Gets the description of the presentation state.
 o getPresentationLabel()
Gets the label of the presentation state.
 o getRotation()
Gets the rotation status of the presentation state.
 o getScalingX()
Gets the horizontal scaling factor of the image.
 o getScalingY()
Gets the vertical scaling factor of the image.
 o getTLHC()
Gets the top left hand corner of the displayed area of the presentation state.
 o getZoomValue()
Returns the zoom value.
 o haveActiveVOILUT()
Checks if a VOI LUT is active.
 o haveActiveVOIWindow()
Checks if a VOI window is active.
 o insertNewColorLayer(String, String, int, int, int)
Insert a new PresentationStateGraphicLayer with a RGB -Color.
 o insertNewMonochromeLayer(String, String, float)
Insert a new PresentationStateGraphicLayer with a Gray -Color.
 o moveToLayer(int, int, int)
Moves a PresentationStateLayerObject form one PresentationStateGraphicLayer to an other.
 o newPaintObject(PaintObject, AffineTransform)
Inserts a PaintObject as a new PresentationStateGraphicObject in the currently active PresentationStateGraphicLayer or as a new shutter in the ShutterList.
 o reset()
Resets the currentLayerObjectIndex.
 o resetPresentationState()
Resets the presentation state to the last saved status.
 o setCurrentLayerIndex(int)
Sets the currentLayerIndex.
 o setCurrentLayerObjectIndex(int)
Sets the currentLayerObjectIndex.
 o setFlip()
Flips the image of the presentation state.
 o setNewPresentationState(Dimension)
Deletes all objects of the PresentationStateGraphicsHandler and rebuilds them.
 o setNewText(String, boolean, boolean, boolean, boolean, boolean, boolean)
Sets a new PresentationStateTextObject to the currently active PresentationStateGraphicLayer.
 o setRotation(int)
Sets rotation status of the presentation state.
 o setScreenSize(Dimension)
Sets the new available size for displaying the image.
 o setZoomValue(double)
Sets the zoom value.
 o updatePresentationState()
Updates the PresentationStateGraphicsHandler without changing the enablePresentationState status.

Variables

 o dvi
public J2Ci.jDVInterface dvi
A jDVInterface represents the relating C++-Class DVInterface in Java.

Since: 30.04.1999
See Also:
jDVInterface
 o enablePresentationState
public boolean enablePresentationState
Toggle PS on/off. If true the Presentation State is visible, if only the image without the Presentation State is visible.

Since: 30.04.1999
 o havePresentationState
public boolean havePresentationState
Contains true if the PresentationStateGraphicsHandler have a jDVPresentationState.

Since: 30.04.1999
 o listPresentationStateGraphicLayer
public java.util.Vector listPresentationStateGraphicLayer
Vector which contains the layers of the presentation state.

Since: 30.04.1999
 o overlayList
public Viewer.Presentation.OverlayList overlayList
This object manages the overlays.

Since: 30.04.1999
See Also:
OverlayList
 o ps
public J2Ci.jDVPresentationState ps
Contains the data of the Presentation State in a c++ Interface.

Since: 30.04.1999
 o shutterList
public Viewer.Presentation.ShutterList shutterList
This object manages the Shutters. *

Since: 30.04.1999
See Also:
ShutterList

Constructors

 o PresentationStateGraphicsHandler
public PresentationStateGraphicsHandler(jDVInterface dvi)
Constructs the paintStructure from the specified jDVInterface.

Parameters:
dvi - Contains the current jDCInterface
Since:
30.04.1999
See Also:
jDVInterface

Methods

 o buildPresentationState
public void buildPresentationState()
Builds the internal structure of the PresentationStateGraphicsHandler if a new jDVPresentationState will be received. The overlayList, the shutterList and the listPresentationStateGraphicLayer will be create from the jDVPresentationState obejct.

Since:
30.04.1999
See Also:
jDVPresentationState
 o calculateFirstZoomValue
public void calculateFirstZoomValue()
Calculates the zoom value if the image should displayed first time. The zoom value must be caluclated because the presnetations state do not contain this. There are only the top left hand corner and the bottom right hand corner of the displaying part of the image available.

Since:
30.04.1999
 o containsObject
public void containsObject(Point2D.Float point)
Searched for the PresentationStateLayerObject containing the specified point. The result is a new active PresentationStateLayerObject (specified with a new currentLayerObjectIndex) and a new active PresentationStateGraphicLayer (specified with a new currentLayerIndex.

Parameters:
point - Contains the searched point.
Since:
30.04.1999
See Also:
buildImageBuffer
 o deleteAll
public void deleteAll()
Deletes all objects of the PresentationStateGraphicsHandler.

Since:
30.04.1999
 o deleteCurrentObject
public void deleteCurrentObject()
Deletes the currently active PresentationStateLayerObject, specified with the currentLayerObjectIndex.

Since:
30.04.1999
 o deleteLayer
public void deleteLayer(int index)
Deletes the PresentationStateGraphicLayer with the specified index

Parameters:
index - The index of the deleting PresentationStateGraphicLayer
Since:
30.04.1999
 o deleteObjectAtIndex
public void deleteObjectAtIndex(int index)
Deletes the specified PresentationStateLayerObject in the currently active PresentationStateGraphicLayer.

Parameters:
index - The index of the deleting PresentationStateLayerObject in the currently active PresentationStateGraphicLayer.
Since:
30.04.1999
 o drawPaintStructure
public void drawPaintStructure(BufferedImage bufferedImage,
                               AffineTransform aff,
                               AffineTransform overlayAff)
Draws the all PresentationStateGraphicLayer in listPresentationStateGraphicLayer and all Overlays defined in OverlayList after the sprecified transformation aff in the specified BufferedImage. All PresntationStateLayerObjects in each PresentationStateGraphicLayer will be drawn.

Parameters:
bufferedImage - Specifies the BufferedImage in which you can draw.
aff - Specifies the transformation which will be used for PresentationStateAnnotationObjects.
aff - Specifies the transformation which will be used for PresentationStateOverlayObjects.
Since:
30.04.1999
See Also:
buildImageBuffer
 o getCurrentColor
public java.awt.Color getCurrentColor()
Gets the Color of the currently active PresentationStateGraphicLayer. Returns null if no PresentationStateGraphicLayer is active.

Returns:
The color of the currently active PresentationStateGraphicLayer.
Since:
30.04.1999
See Also:
PresentationStateGraphicLayer
 o getCurrentImageHeight
public int getCurrentImageHeight()
Gets the height of the image after rotation.If rotation == 90-deg or 270 deg height and width of the image will be exchanged.

Returns:
Heigth of the image after rotation..
Since:
30.04.1999
See Also:
jDVPresentationState
 o getCurrentImageWidth
public int getCurrentImageWidth()
Gets the height of the image after rotation.If rotation == 90-deg or 270 deg height and width of the image will be exchanged.

Returns:
Heigth of the image after rotation..
Since:
30.04.1999
See Also:
jDVPresentationState
 o getCurrentLayer
public Viewer.Presentation.PresentationStateGraphicLayer getCurrentLayer()
Gets the current active PresentationStateGraphicLayer. This PresentationStateGraphicLayer is specified form the.currentLayerIndex.

Returns:
The current active PresentationStateGraphicLayer.
Since:
30.04.1999
 o getCurrentLayerIndex
public int getCurrentLayerIndex()
Gets the currentLayerObjectIndex.

Returns:
The currentLayerObjectIndex.
Since:
30.04.1999
 o getCurrentLayerObject
public Viewer.Presentation.PresentationStateLayerObject getCurrentLayerObject()
Gets the current active PresentationStateLayerObject. This PresentationStateLayerObject is specified form the currentLayerObjectIndex and the currentLayerIndex.

Returns:
The current active PresentationStateLayerObject.
Since:
30.04.1999
 o getCurrentLayerObjectIndex
public int getCurrentLayerObjectIndex()
Gets the currentLayerObjectIndex.

Returns:
The currentLayerObjectIndex.
Since:
30.04.1999
 o getCurrentScalingX
public double getCurrentScalingX()
Gets the horizontal scaling factor after the rotation. If rotation == 90-deg or 270 deg scalingValueX and scalingValueY will be exchanged.

Returns:
Horizontal scaling factor after the rotation.
Since:
30.04.1999
 o getCurrentScalingY
public double getCurrentScalingY()
Gets the vertical scaling factor after rotation. If rotation == 90-deg or 270 deg scalingValueX and scalingValueY will be exchanged.

Returns:
Vertical scaling factor after rotation.
Since:
30.04.1999
 o getCurrentVOIDescription
public java.lang.String getCurrentVOIDescription()
Returns the description of the currently active VOI window. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The description of the currently active VOI window.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getCurrentWindowCenter
public int getCurrentWindowCenter()
Returns the center of the currently active VOI window. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The center of the currently active VOI window.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getCurrentWindowWidth
public int getCurrentWindowWidth()
Returns the width of the currently active VOI window. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The width of the currently active VOI window.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getImageHeight
public int getImageHeight()
Gets the height of the image.

Returns:
Heigth of the image.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getImageWidth
public int getImageWidth()
Gets the width of the image.

Returns:
Width of the image.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getInfo
public java.lang.String getInfo()
Returns a String representing this object.

Returns:
A String representing this object
Since:
30.04.1999
 o getLayerAtIndex
public Viewer.Presentation.PresentationStateGraphicLayer getLayerAtIndex(int index)
Gets the PresentationStateGraphicLayer with the specified index. Returns null if no object with the specified index exist.

Parameters:
index - Specifies the PresentationStateGraphicLayer.
Returns:
The PresentationStateGraphicLayer with the specified index.
Since:
30.04.1999
See Also:
PresentationStateGraphicLayer
 o getListPresentationStateGraphicLayer
public java.util.Vector getListPresentationStateGraphicLayer()
The Vector of PresentationStateGraphicLayers.

Returns:
The Vector of PresentationStateGraphicLayers.
Since:
30.04.1999
 o getPixelAspectRatio
public double getPixelAspectRatio()
Gets the pixel aspect ratio of the attached image. Pixel aspect ratio is defined here as the width of a pixel divided by the height of a pixel (x/y).

Since:
30.04.1999
See Also:
jDVPresentationState
 o getPresentationCreatorsName
public java.lang.String getPresentationCreatorsName()
Gets the creators name of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The creators name of the presentation state.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getPresentationDescription
public java.lang.String getPresentationDescription()
Gets the description of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The description of the presentation state.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getPresentationLabel
public java.lang.String getPresentationLabel()
Gets the label of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The label of the presentation state.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getRotation
public int getRotation()
Gets the rotation status of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The rotation of the presentation state.
Since:
30.04.1999
See Also:
jDVPresentationState, jDVPSRotationType
 o getScalingX
public double getScalingX()
Gets the horizontal scaling factor of the image.

Returns:
Horizontal scaling factor of the image.
Since:
30.04.1999
 o getScalingY
public double getScalingY()
Gets the vertical scaling factor of the image.

Returns:
Vertical scaling factor of the image.
Since:
30.04.1999
 o getTLHC
public java.awt.Dimension getTLHC()
Gets the top left hand corner of the displayed area of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
The top left hand corner of the displayed area of the presentation state.
Since:
30.04.1999
See Also:
jDVPresentationState
 o getZoomValue
public double getZoomValue()
Returns the zoom value.

Returns:
The zoom value.
Since:
30.04.1999
 o haveActiveVOILUT
public boolean haveActiveVOILUT()
Checks if a VOI LUT is active. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
True if a VOI LUT is active.
Since:
30.04.1999
See Also:
jDVPresentationState
 o haveActiveVOIWindow
public boolean haveActiveVOIWindow()
Checks if a VOI window is active. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Returns:
True if a VOI window is active.
Since:
30.04.1999
See Also:
jDVPresentationState
 o insertNewColorLayer
public void insertNewColorLayer(String label,
                                String description,
                                int r,
                                int g,
                                int b)
Insert a new PresentationStateGraphicLayer with a RGB -Color.

Parameters:
label - Label of the layer.
description - Decription of the layer.
r - Red color value.
g - Green color value.
b - Blue color value.
Since:
30.04.1999
See Also:
PresentationStateGraphicLayer
 o insertNewMonochromeLayer
public void insertNewMonochromeLayer(String label,
                                     String description,
                                     float monochome)
Insert a new PresentationStateGraphicLayer with a Gray -Color.

Parameters:
label - Label of the layer.
description - Decription of the layer.
monochome - Gray color value.
Since:
30.04.1999
See Also:
PresentationStateGraphicLayer
 o moveToLayer
public void moveToLayer(int newLayer,
                        int oldLayer,
                        int objectIndex)
Moves a PresentationStateLayerObject form one PresentationStateGraphicLayer to an other.

Parameters:
newLayer - The index of the new PresentationStateGraphicLayer.
oldLayer - The index of the current PresentationStateGraphicLayer.
objectIndex - The index of the moving PresentationStateLayerObject in the current PresentationStateGraphicLayer.
Since:
30.04.1999
See Also:
PresentationStateGraphicLayer, PresentationStateTextObject
 o newPaintObject
public void newPaintObject(PaintObject newPaintObject,
                           AffineTransform aff)
Inserts a PaintObject as a new PresentationStateGraphicObject in the currently active PresentationStateGraphicLayer or as a new shutter in the ShutterList.

Parameters:
newPaintObject - Contains the inserting PaintObject.
aff - Contains the current transfomations.
See Also:
ShutterList, PresentationStateGraphicObject
 o reset
public void reset()
Resets the currentLayerObjectIndex.

Since:
30.04.1999
 o resetPresentationState
public void resetPresentationState()
Resets the presentation state to the last saved status.

Since:
30.04.1999
 o setCurrentLayerIndex
public void setCurrentLayerIndex(int newIndex)
Sets the currentLayerIndex.

Parameters:
newIndex - New currentLayerIndex.
Since:
30.04.1999
 o setCurrentLayerObjectIndex
public void setCurrentLayerObjectIndex(int newIndex)
Sets the currentLayerObjectIndex.

Parameters:
newIndex - New currentLayerObjectIndex.
Since:
30.04.1999
 o setFlip
public void setFlip()
Flips the image of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Since:
30.04.1999
See Also:
jDVPresentationState, jDVPSRotationType
 o setNewPresentationState
public void setNewPresentationState(Dimension screenSize)
Deletes all objects of the PresentationStateGraphicsHandler and rebuilds them. Should be called if a new jDVPresentationState object is available in the jDVInterface.

Parameters:
screenSize - The size of the available size for drawing the image.
Since:
30.04.1999
 o setNewText
public void setNewText(String text,
                       boolean isBoundingBox,
                       boolean isAnchor,
                       boolean isboth,
                       boolean isAnchorDisplay,
                       boolean isBoxDisplay,
                       boolean isAnchorVisible)
Sets a new PresentationStateTextObject to the currently active PresentationStateGraphicLayer.

Parameters:
text - The text of the new PresentationStateTextObject.
isBoundingBox - If true the PresentationStateTextObject has a bounding box.
isAnchor - If ture the PresentationStateTextObject has an anchor point.
isboth - If true the PresentationStateTextObject has an anchor point and a bounding box.
isAnchorDisplay - If true the exitsting anchor point is display relative.
isBoxDisplay - If true the existing bounding box is display realtive.
isAnchorVisible - If true the existing anchor point have a visible anchor point.
Since:
30.04.1999
See Also:
PresentationStateGraphicLayer, PresentationStateTextObject
 o setRotation
public void setRotation(int rot)
Sets rotation status of the presentation state. The value is stored in the c++ interface and is available in the jDVPresententationState object ps.

Parameters:
rotation - the rotation to be set (from jDVPSRotationType).
Since:
30.04.1999
See Also:
jDVPresentationState, jDVPSRotationType
 o setScreenSize
public void setScreenSize(Dimension screenSize)
Sets the new available size for displaying the image. If no zoom value is set the zoom value will be calculate. The size of the available display is important for display realtive annotations (handled in PresentationStateGraphicObject and PresentationStateTextObject). Changing the size resluts in changing all display relative annotations.

Parameters:
screenSize - New available size for displaying the image.
Since:
30.04.1999
 o setZoomValue
public void setZoomValue(double zoomValue)
Sets the zoom value.

Parameters:
zoomValue - The new zoom value.
Since:
30.04.1999
 o updatePresentationState
public void updatePresentationState()
Updates the PresentationStateGraphicsHandler without changing the enablePresentationState status.

Since:
30.04.1999

All Packages  Class Hierarchy  This Package  Previous  Next  Index