Class Viewer.Main.ScreenImageHandler
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Viewer.Main.ScreenImageHandler

Object
   |
   +----Viewer.Main.ScreenImageHandler

public class ScreenImageHandler
extends Object
This calls manages the the image viewing and processing part of DICOMScope. This class contains all important objects of the GUI and the data level.

Author:
Klaus Kleber
Since:
30.04.1999

Variable Index

 o imageCanvas
Contains the current ImageCanvas.
 o imageCanvasMouseEventListener
MouseListener and MouseMotionListener which handles the MouseEvents.
 o mainImageViewerPanel
Contains the main GUI object.
 o paintStructure
Contains the current PaintStructure
 o presentationStateGraphicsHandler
Contains the current PresentationStateGraphicsHandler.
 o transformationConverter
Object which transforms the visible part of the image to device space

Constructor Index

 o Viewer.Main.ScreenImageHandler(MainImageViewerPanel, PresentationStateGraphicsHandler)
Builds the screenImageHandler.

Method Index

 o buildImageBuffer(boolean, boolean, boolean, boolean)
Builds the visible part of the image in the bufferedScreenImage.
 o deleteActivePresentationStateGraphicObject()
Deletes the active PresentationStateGraphicObject in the presentationStateGraphicsHandler.
 o drawScreenImage(Graphics2D)
This function draws the visible part of the image in the specified Graphics2D object.
 o getBufferedScreenImage()
Returns the content of the Image Canvas.
 o getImageCanvas()
Returns the current ImageCanvas.
 o resetState()
Resets the all objects of the ScreenImageHandler.
 o setClick(Point2D. Float)
This function search for the first PresentationStateLayerObject which contains the specified point.
 o setCloseNew()
Closes a new Annoatation and transforms the Annotation to a PresentationStateGraphicObject.
 o setCurrentLayerObject(int)
Sets the specified PresentationStateLayerObject to the active PresentationStateLayerObject.
 o setEditAction()
Sets a MouseEventListenerEditAnnotation the the imageCanvas.
 o setImageCanvas(ImageCanvas)
Sets the ImageCanvas.
 o setNewCenter(double)
Sets a new center value for the image and draws the image.
 o setNewImage()
Initialize the image data struture for new image.
 o setNewImagePartHeight(int)
Sets the image on a new position of the display.
 o setNewImagePartWidth(int)
Sets the image on a new position of the display.
 o setNewPaintObjectAction(PaintObject)
Initialize all obejcts for drawing a new Annotation.
 o setNewPoint(Point2D. Float)
Sets a new Point to the current Annotation in the paintStructure.
 o setNewPresentationState()
If a new jDVPresentationState object is available, this methode updates all object.
 o setNewText(String, boolean, boolean, boolean, boolean, boolean, boolean)
Sets an new presentationStateTextObject form the specified parameters.
 o setNewTextPart(boolean, boolean)
Sets either an new anchor or a new bounding box to an existing PresentationStateTextObject and deletes the old if exist.
 o setNewTextValue(String)
Sets an new text value to an existing PresentationStateTextObject.
 o setNewWidth(double)
Sets a new widht value for the image and draws the image.
 o setNewWindow(double, double)
Set a new window.
 o setStopNew()
Stops creating a new Annoatation and transforms the Annotation to a PresentationStateGraphicObject.
 o startMoveAnnotation()
Initializes the active PresentationStateGraphicObject in the presentationStateGraphicsHandler for moving.
 o stopMoveAnnotation()
Stop moving the active PresentationStateGraphicObject in the presentationStateGraphicsHandler.
 o stopMoveText()
Stop moving the active PresentationStateTextObject in the presentationStateGraphicsHandler.

Variables

 o imageCanvas
public Viewer.GUI.ImageCanvas imageCanvas
Contains the current ImageCanvas. This is the image drawing part of the GUI.

Since: 30.04.1999
 o imageCanvasMouseEventListener
public Viewer.Controller.ImageCanvasMouseEventListener imageCanvasMouseEventListener
MouseListener and MouseMotionListener which handles the MouseEvents.

Since: 30.04.1999
 o mainImageViewerPanel
public Viewer.GUI.MainImageViewerPanel mainImageViewerPanel
Contains the main GUI object.

Since: 30.04.1999
 o paintStructure
public Viewer.Presentation.PaintStructure paintStructure
Contains the current PaintStructure

Since: 30.04.1999
 o presentationStateGraphicsHandler
public Viewer.Presentation.PresentationStateGraphicsHandler presentationStateGraphicsHandler
Contains the current PresentationStateGraphicsHandler.

Since: 30.04.1999
 o transformationConverter
public Viewer.Presentation.TransformationConverter transformationConverter
Object which transforms the visible part of the image to device space

Since: 30.04.1999

Constructors

 o ScreenImageHandler
public ScreenImageHandler(MainImageViewerPanel mainImageViewerPanel,
                          PresentationStateGraphicsHandler presentationStateGraphicsHandler)
Builds the screenImageHandler.

Parameters:
mainImageViewerPanel - Contains the main GUI object
presentationStateGraphicsHandler - Contains the current ScreenImageHandler.
Since:
30.04.1999

Methods

 o buildImageBuffer
public void buildImageBuffer(boolean first,
                             boolean loadNewPixels,
                             boolean newScrollbarValue,
                             boolean resetState)
Builds the visible part of the image in the bufferedScreenImage.

Parameters:
first - if true builds the bufferedScreenImage at first time.
loadNewPixels - if ture - load the pixels form the c++ part
newScrollbarValue - if true sets the scrollbar properties of the PanleScollImage.
resetState - if true resets all objects to their initial state.
Since:
30.04.1999
 o deleteActivePresentationStateGraphicObject
public void deleteActivePresentationStateGraphicObject()
Deletes the active PresentationStateGraphicObject in the presentationStateGraphicsHandler.

Since:
30.04.1999
See Also:
PopupMenuController, PresentationStateGraphicsHandler
 o drawScreenImage
public void drawScreenImage(Graphics2D g2)
This function draws the visible part of the image in the specified Graphics2D object.

Parameters:
g2 - Specifies the Graphics2D object.
Since:
30.04.1999
 o getBufferedScreenImage
public java.awt.image.BufferedImage getBufferedScreenImage()
Returns the content of the Image Canvas.

Returns:
Returns the content of the Image Canvas.
Since:
30.04.1999
 o getImageCanvas
public Viewer.GUI.ImageCanvas getImageCanvas()
Returns the current ImageCanvas.

Returns:
The current ImageCanvas.
Since:
30.04.1999
 o resetState
public void resetState()
Resets the all objects of the ScreenImageHandler.

Since:
30.04.1999
 o setClick
public void setClick(Point2D.Float clickedPoint)
This function search for the first PresentationStateLayerObject which contains the specified point.

Parameters:
clickedPoint - The specified point.
Since:
30.04.1999
 o setCloseNew
public void setCloseNew()
Closes a new Annoatation and transforms the Annotation to a PresentationStateGraphicObject.

Since:
30.04.1999
See Also:
PopupMenuController
 o setCurrentLayerObject
public void setCurrentLayerObject(int index)
Sets the specified PresentationStateLayerObject to the active PresentationStateLayerObject.

Parameters:
index - The index of the PresentationStateLayerObject
Since:
30.04.1999
 o setEditAction
public void setEditAction()
Sets a MouseEventListenerEditAnnotation the the imageCanvas.

Since:
30.04.1999
 o setImageCanvas
public void setImageCanvas(ImageCanvas imageCanvas)
Sets the ImageCanvas.

Parameters:
imageCanvas - New ImageCanas.
Since:
30.04.1999
 o setNewCenter
public void setNewCenter(double center)
Sets a new center value for the image and draws the image.

Parameters:
center - the new center value.
Since:
30.04.1999
 o setNewImage
public boolean setNewImage()
Initialize the image data struture for new image. Called if a new image width other dimensions than the old image should be displayed.

Since:
30.04.1999
 o setNewImagePartHeight
public void setNewImagePartHeight(int newHeight)
Sets the image on a new position of the display.

Parameters:
newHeight - Specifies the new virtualTLHC.y of the image.
Since:
30.04.1999
See Also:
TransformationConverter
 o setNewImagePartWidth
public void setNewImagePartWidth(int newWidth)
Sets the image on a new position of the display.

Parameters:
newWidth - Specifies the new virtualTLHC.x of the image.
Since:
30.04.1999
See Also:
TransformationConverter
 o setNewPaintObjectAction
public void setNewPaintObjectAction(PaintObject thePaintObject)
Initialize all obejcts for drawing a new Annotation. The paintStructure will be reset and the ImageCanvasNewListener will be set.

Parameters:
theAnnotation - The new Annotation.
Since:
30.04.1999
 o setNewPoint
public void setNewPoint(Point2D.Float newPoint)
Sets a new Point to the current Annotation in the paintStructure.

Parameters:
newPoint - Contains the new Point.
Since:
30.04.1999
 o setNewPresentationState
public void setNewPresentationState()
If a new jDVPresentationState object is available, this methode updates all object.

Since:
30.04.1999
 o setNewText
public void setNewText(String text,
                       boolean isBoundingBox,
                       boolean isAnchor,
                       boolean isboth,
                       boolean isAnchorDisplay,
                       boolean isBoxDisplay,
                       boolean isAnchorVisible)
Sets an new presentationStateTextObject form the specified parameters.

Parameters:
text - Contains the text of the new presentationStateTextObject.
isBoundingBox - Contains true if the new presentationStateTextObject have only a bounding box and no anchor point.
isAnchor - Contains true if the new presentationStateTextObject have only an anchor point and no bounding box .
isboth - Contains true if the new presentationStateTextObject have an achor point and a bounding box .
isAnchorDisplay - Contains true if the anchor point is display relative.
isBoxDisplay - Contains true if the bounding box is display relative.
isAnchorVisible - Contains ture if the anchor point is visible.
Since:
30.04.1999
 o setNewTextPart
public void setNewTextPart(boolean anchor,
                           boolean isDisplayRelative)
Sets either an new anchor or a new bounding box to an existing PresentationStateTextObject and deletes the old if exist.

Parameters:
anchor - If true insert anchor point, if false insert bounding box.
isDisplayRelative - If true the anchor point is display relative.
Since:
30.04.1999
 o setNewTextValue
public void setNewTextValue(String text)
Sets an new text value to an existing PresentationStateTextObject.

Parameters:
text - The new text value.
Since:
30.04.1999
 o setNewWidth
public void setNewWidth(double width)
Sets a new widht value for the image and draws the image.

Parameters:
width - the new width value.
Since:
30.04.1999
 o setNewWindow
public void setNewWindow(double center,
                         double width)
Set a new window.

Parameters:
width - The new window with.
center - The new window center.
Since:
30.04.1999
 o setStopNew
public void setStopNew()
Stops creating a new Annoatation and transforms the Annotation to a PresentationStateGraphicObject.

Since:
30.04.1999
See Also:
PopupMenuController
 o startMoveAnnotation
public void startMoveAnnotation()
Initializes the active PresentationStateGraphicObject in the presentationStateGraphicsHandler for moving. Sets the ImageCanvasMoveListener.

Since:
30.04.1999
See Also:
PopupMenuController
 o stopMoveAnnotation
public void stopMoveAnnotation()
Stop moving the active PresentationStateGraphicObject in the presentationStateGraphicsHandler.

Since:
30.04.1999
See Also:
PopupMenuController
 o stopMoveText
public void stopMoveText()
Stop moving the active PresentationStateTextObject in the presentationStateGraphicsHandler.

Since:
30.04.1999
See Also:
PopupMenuController

All Packages  Class Hierarchy  This Package  Previous  Next  Index