Package gov.nih.mipav.view
Class ViewJComponentRegistration
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- gov.nih.mipav.view.ViewJComponentBase
-
- gov.nih.mipav.view.ViewJComponentEditImage
-
- gov.nih.mipav.view.ViewJComponentRegistration
-
- All Implemented Interfaces:
PaintGrowListener,ScreenCoordinateListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.MouseWheelListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener
public class ViewJComponentRegistration extends ViewJComponentEditImage implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener
DOCUMENT ME!- Author:
- William Gandler
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.CursoraddPointCursorDOCUMENT ME!private intadjMarknumber of VOIs for adjustable slicestatic intADJMARKDOCUMENT ME!private java.awt.PointanchorPtDOCUMENT ME!private intblueDOCUMENT ME!private shortcenteridid of rotation centerprivate VOIcenterVOIcenter rotation VOIprotected java.awt.CursordefaultCursorDOCUMENT ME!private booleandoAdjMarkDOCUMENT ME!private booleandoCenterDOCUMENT ME!private booleandoDragno adjusted slice movements with mouseDragprivate booleandoRefMarkDOCUMENT ME!private intgreenDOCUMENT ME!private floathueDOCUMENT ME!private shortidDOCUMENT ME!protected java.awt.CursormagRegionCursorCustom cursor: magnify region.private int[]markerTypeDOCUMENT ME!(package private) intmemCountDOCUMENT ME!protected java.awt.CursormoveCursorDOCUMENT ME!private VOInewVOIDOCUMENT ME!private intnewXadjustable slice VOI.private intnewYadjustable slice VOI.private booleanoldFrameUsed to set old or new mode of registration.floatOPACITYOpacity value used by the paint brush. value = 1.0 - opaque value = 0.25 - default (mostly see through)protected java.awt.CursorpointCursorDOCUMENT ME!private float[]ptCoordDOCUMENT ME!protected java.awt.CursorrectCursorDOCUMENT ME!private intredDOCUMENT ME!private intrefMarknumber of VOIs for reference slicestatic intREFMARKDOCUMENT ME!protected java.awt.CursorremovePointCursorDOCUMENT ME!static intROTATIONCENTERThe 3 types of markers - rotation center, reference slice, and adjusted slice.private introtCenterMarknumber of VOIs for rotation centerprivate static longserialVersionUIDUse serialVersionUID for interoperability.protected ViewJFrameRegistrationTooltoolFrameFrame where component image is displayed (only for new RegistrationTool).protected java.awt.CursorwaitCursorDOCUMENT ME!protected java.awt.CursorwandCursorDOCUMENT ME!private floatxFinishvalues obtained when mouseReleasedprivate int[]xOrgDOCUMENT ME!private int[]xPresDOCUMENT ME!private floatxRotationDOCUMENT ME!private floatxStartvalues obtained when mousePressedprivate floatyFinishvalues obtained when mouseReleasedprivate int[]yOrgDOCUMENT ME!private int[]yPresDOCUMENT ME!private floatyRotationDOCUMENT ME!private floatyStartvalues obtained when mousePressed-
Fields inherited from class gov.nih.mipav.view.ViewJComponentEditImage
ACTIVE_IMAGE_COLOR, allActive, alphaBlend, alphaPrime, checkerDialog, cleanImageBufferA, cleanImageBufferB, crosshairCursor, cursorMode, displayFuzzy, drawVOIs, frame, frameControls, fuzzyThreshold, GEOMETRIC_ZOOM, gridColor, gridLabelingOn, gridLabelOrientation, gridOverlayOn, gridSpacingX, gridSpacingY, growDialog, imageA, imageActive, imageB, imageBufferA, imageBufferActive, imageBufferB, imageExtents, imageStatList, intensityDropper, less, lessB, lessG, lessR, LINEAR_ZOOM, logMagDisplay, LUTa, LUTb, m_kPatientSlice, m_kWinLevel, MAGR_HEIGHT, MAGR_MAG, MAGR_WIDTH, magSettings, maxDistance, maxExtents, modifyFlag, more, moreB, moreG, moreR, mousePressIsShiftDown, MultiFrameEyetrackerMode, nColumnCheckers, nRowCheckers, onTop, orientation, overlayOn, paintBitmap, paintBitmapBU, paintBitmapSwitch, paintBrush, paintBrushDim, paintBrushDimPrevious, paintBrushPrevious, paintBrushSize, paintBuffer, paintImage, paintImagePrevious, pixBuffer, pixBufferB, PluginEyetrackerMode, previousPaintBrush, rgbString, RGBTA, RGBTB, saveValue, saveValueB, saveValueG, saveValueR, saveX, saveY, saveZ, seedPaintBitmap, seedVal, seedValB, seedValG, seedValR, SingleFrameEyetrackerMode, sizeLimit, slice, stringOverride, time, timeSlice, toppedColor, useBComp, useGComp, useRComp, useVOI, variableThresholds, visRect, voiManager, winLevel, winLevelSet, xMod, xPG, yMod, yPG, zPG
-
Fields inherited from class gov.nih.mipav.view.ViewJComponentBase
ANNOTATION, BOTH, CENTER_VOI, CUBE_BOUNDS, DEFAULT, DELETE_POINT, DROPPER_PAINT, ELLIPSE, ERASER_PAINT, IMAGE_A, IMAGE_B, imageDim, img, imgB, interpMode, INTERPOLATE_A, INTERPOLATE_B, INTERPOLATE_BOTH, lastMouseX, lastMouseY, LEVELSET, LINE, LIVEWIRE, MAG_REGION, memImageA, memImageB, MOVE, MOVE_INTERSECTION_POINT, MOVE_POINT, MOVE_VOIPOINT, NEAREST_BOTH, NEW_POINT, NEW_VOI, OUT_OF_BOUNDS, PAINT_CAN, PAINT_VASC, PAINT_VOI, POINT_VOI, POLYLINE, POLYLINE_SLICE_VOI, PROBE, PROTRACTOR, QUICK_LUT, RECTANGLE, RECTANGLE3D, resolutionX, resolutionY, RETRACE, ROTATE, SELECT, showSliceNumber, sliceString, SMOOTH, SPLIT_VOI, textColor, TRANSLATE, VOI_3D, WAND, WIN_REGION, ZOOMING_IN, ZOOMING_OUT, zoomX, zoomY
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description ViewJComponentRegistration(ViewJFrameRegistration _frame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, int[] pixelBuffer, float zoom, int[] extents, boolean logMagDisplay, int _orientation, float alphaBl)Constructor: ImageA and ImageB are expected to be of the same dimensionality !!ViewJComponentRegistration(ViewJFrameRegistrationTool _toolFrame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, int[] pixelBuffer, float zoom, int[] extents, boolean logMagDisplay, int _orientation, float alphaBl)Constructor: ImageA and ImageB are expected to be of the same dimensionality !!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteAdjRotVOIs()Deletes all ROTATIONCENTER and ADJMARK VOIs.voiddeleteAdjustableVOIs()Deletes all ADJMARK VOIs.voiddeletePoint(boolean isReference)If a point is selected of the given type (reference or adjusted) delete the point and reset the.voiddeleteReferenceVOIs()Deletes all REFMARK VOIs.voiddeleteRefRotVOIs()Deletes all REFMARK and ROTATIONCENTER VOIs.voiddeleteVOIs()Deletes all VOIs.voiddispose(boolean gcFlag)Sets all variables to null, disposes, and garbage collects.protected voidfinalize()Cleans up memory.intgetAdjMark()Returns the adjust mark flag.intgetBlue()accessor that returns int blue.intgetGreen()Accessor that returns int green.int[]getMarkerType()Returns the marker type.intgetnVOI()Returns the number of VOIs.floatgetOpacity()Returns the opacity used in alpha blending between the input image and the reference image.intgetRed()Returns int red.intgetRefMark()Returns the reference mark flag.int[]getxOrg()Returns the X origin.int[]getxPres()DOCUMENT ME!int[]getyOrg()Returns the Y origin.int[]getyPres()DOCUMENT ME!voidmakeAdjustableVOI(WildMagic.LibFoundation.Mathematics.Vector3f adjPoint)Constructs reference point VOI from the refPoint passed in.voidmakeReferenceVOI(WildMagic.LibFoundation.Mathematics.Vector3f refPoint)Constructs reference point VOI from the refPoint passed in.voidmouseClicked(java.awt.event.MouseEvent mouseEvent)When the mouse is clicked in the image, several different things may happen.voidmouseDragged(java.awt.event.MouseEvent mouseEvent)Drags an VOI real time by calling a series of translations and draws.voidmouseMoved(java.awt.event.MouseEvent mouseEvent)If the mode is level set, draws level sets as user moves mouse.voidmousePressed(java.awt.event.MouseEvent mouseEvent)Sets the mode of the program depending on the cursor mode.voidmouseReleased(java.awt.event.MouseEvent mouseEvent)This function sets up and draws the VOI according to the mode.voidmoveVOIPosition(int deltaX, int deltaY)Moves VOIs to new position by deltaX and deltaY.voidmoveVOITo(int id, int x, int y)Moves VOI with ID == id to a new position (x,y).voidpaintComponent(java.awt.Graphics g)Paints the image and calls drawSelf for all VOIs.voidpaintWindowComponent(java.awt.Graphics g, java.awt.event.MouseEvent mouseEvent)Paints the image and calls drawSelf for all VOIs.voidsetAdjMark(boolean doAdj)Sets the adjusted mark flag.voidsetCenter(boolean doCen)Sets the center point used in transformations.voidsetCursorMode(int mode)Switches modes based on the variable mode.voidsetLogMagDisplay(boolean flag)Sets the log magnitude display flag.voidsetLUTa(ModelLUT LUT)Sets the model LUT for the imageA.voidsetLUTb(ModelLUT LUT)Sets the model LUTb for the imageB.voidsetMouseDrag(boolean doDrag)doDrag true enables the adjusted slice to respond to mouse press and drag events doDrag false restricts the adjusted slice to responding to mouse press and release events.voidsetNewAlphaBlend(int value)Sets the alpha blending of parameter for two image displaying.voidsetRefMark(boolean doRef)Sets the reference mark flag.-
Methods inherited from class gov.nih.mipav.view.ViewJComponentEditImage
calcPaintedVolume, cine, commitMask, commitMask, commitMask, commitMask, commitPaintToMask, commitPaintToUbyteMask, createImg, createImg, ctMode, disposeLocal, downSlice, draw3DVOIs, drawGradicules, drawStringBW, eraseAllPaint, fileToScreen, fileToScreenVOI, getActiveImage, getActiveImageBuffer, getActiveImageSliceBuffer, getActiveLUT, getActiveRGB, getAlphaBlend, getBandSpacing, getBrushSize, getCleanImageBufferB, getCursorMode, getFrame, getGridColor, getGridLabeling, getGridLabelOrientation, getGridOverlay, getGridSpacingX, getGridSpacingY, getHBrushSize, getImageA, getImageB, getImageBufferA, getImageBufferB, getIntensityDropper, getLUTa, getLUTb, getMaxExtents, getModifyFlag, getNumPoints, getOrientation, getOverlayOn, getPaintBitmap, getPaintBuffer, getPaintMask, getPixBuffer, getPixBufferB, getRASScannerPositionLabels, getRGBPaintComponents, getRGBTA, getRGBTB, getScannerPositionLabels, getShowMagIntensityEnabled, getSlice, getTimeSlice, getVOIHandler, getVOIManager, getxMod, getxSep, getxStart, getyMod, getySep, getyStart, getZoomMagnitudeX, getZoomMagnitudeY, isCheckerboardAnimate, isCheckerboarded, isHighlight, isMakingCheckerboard, isZeroToOneLUTAdj, loadPaintBrush, loopBandSpacing, loopBandSpacingReverse, mouseEntered, mouseExited, mousePressedPaint, mouseWheelMoved, openUDLUTandTransferFunct, paintComponentForPrinter, paintMagComponent, patientToScreen, patientToScreenVOI, performPaint, performPaint, processDefaultMouseDrag, quickSwitchBrush, readLUTandTFunctFrom, recordPanning, recordZoom, regionGrow, regionGrow, regionGrow, regionGrow, regionGrow, regionGrowColor, rememberPaintBrushSize, resetLUT, resetLUTs, resetPaintBrushSize, restartCheckerboardAnimateThread, saveLUTandTransferFunction, saveUDLUT, screenToFile, screenToFile, screenToFile, screenToFileVOI, screenToFileVOI, screenToFileVOI, setActiveImage, setAlphaBlend, setBandSpacing, setBuffers, setCenter, setCheckerboard, setCheckerboardAnimate, setCrosshairCursor, setDisplayFuzzy, setDrawVOIs, setEnabled, setEyetrackerRecordingMode, setEyetrackerRecordMode, setFrameControls, setFullScreenModeLocation, setFuzzyThreshold, setGridColor, setGridLabelingOn, setGridLabelOrientation, setGridOverlay, setGridSpacingX, setGridSpacingY, setGrowDialog, setHasThreshold1, setHasThreshold2, setHighlightColor, setImageA, setImageB, setImageBufferB, setImageColocalize, setImageExtents, setImageSlice, setIntensityDropper, setLess, setLessB, setLessG, setLessR, setMakingCheckerboard, setMaxDistance, setModifyFlag, setMore, setMoreB, setMoreG, setMoreR, setOverlay, setPaintBitmapSwitch, setPaintBrushSize, setPaintMask, setPixelInformationAtLocation, setRegionGrowVars, setRGBPaintComponents, setRGBTA, setRGBTB, setShowMagIntensity, setShowSliceNum, setSizeLimit, setSlice, setStringOverride, setThresholdColors, setThresholds, setTimeSlice, setUseVOI, setVariableThresholds, setVOIManager, setWindLevel, setxSep, setySep, setZeroToOneLUTAdj, show, show, show, showBlank, showGridOverlay, showOverlay, showRegionInfo, showRegionInfo, showRegionInfo, showStatisticsCalculator, undoLastPaint, updatePaint, updatePaintBrushCursor, upSlice, useHighlight
-
Methods inherited from class gov.nih.mipav.view.ViewJComponentBase
disposeLocal, getImage, getInterpMode, getLastMouseX, getLastMouseY, getPreferredSize, getResolutionX, getResolutionY, getScaledX, getScaledY, getSelectedPaintColor, getShowMagIntensityEnabled, getSize, getZoomX, getZoomY, importImage, importImageB, LocalToScreen, makePaintBitmapBorder, makePaintImage, paintCursorBoxComponent, paintWindowComponent, paintWindowComponent, ScreenToLocal, setInterpolationMode, setResolutions, setShowSliceNumber, setSliceString, setTextColor, setZoom, setZoomExact, update
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gov.nih.mipav.view.renderer.WildMagic.VOI.ScreenCoordinateListener
getHeight, getResolutionX, getResolutionY, getWidth, getZoomX, getZoomY
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
ROTATIONCENTER
public static final int ROTATIONCENTER
The 3 types of markers - rotation center, reference slice, and adjusted slice.- See Also:
- Constant Field Values
-
REFMARK
public static final int REFMARK
DOCUMENT ME!- See Also:
- Constant Field Values
-
ADJMARK
public static final int ADJMARK
DOCUMENT ME!- See Also:
- Constant Field Values
-
OPACITY
public float OPACITY
Opacity value used by the paint brush. value = 1.0 - opaque value = 0.25 - default (mostly see through)
-
addPointCursor
protected java.awt.Cursor addPointCursor
DOCUMENT ME!
-
defaultCursor
protected java.awt.Cursor defaultCursor
DOCUMENT ME!
-
magRegionCursor
protected java.awt.Cursor magRegionCursor
Custom cursor: magnify region.
-
moveCursor
protected java.awt.Cursor moveCursor
DOCUMENT ME!
-
pointCursor
protected java.awt.Cursor pointCursor
DOCUMENT ME!
-
rectCursor
protected java.awt.Cursor rectCursor
DOCUMENT ME!
-
removePointCursor
protected java.awt.Cursor removePointCursor
DOCUMENT ME!
-
waitCursor
protected java.awt.Cursor waitCursor
DOCUMENT ME!
-
wandCursor
protected java.awt.Cursor wandCursor
DOCUMENT ME!
-
toolFrame
protected ViewJFrameRegistrationTool toolFrame
Frame where component image is displayed (only for new RegistrationTool).
-
memCount
int memCount
DOCUMENT ME!
-
adjMark
private int adjMark
number of VOIs for adjustable slice
-
anchorPt
private java.awt.Point anchorPt
DOCUMENT ME!
-
centerid
private short centerid
id of rotation center
-
centerVOI
private VOI centerVOI
center rotation VOI
-
doAdjMark
private boolean doAdjMark
DOCUMENT ME!
-
doCenter
private boolean doCenter
DOCUMENT ME!
-
doDrag
private boolean doDrag
no adjusted slice movements with mouseDrag
-
doRefMark
private boolean doRefMark
DOCUMENT ME!
-
hue
private float hue
DOCUMENT ME!
-
id
private short id
DOCUMENT ME!
-
markerType
private int[] markerType
DOCUMENT ME!
-
newVOI
private VOI newVOI
DOCUMENT ME!
-
newX
private int newX
adjustable slice VOI.
-
newY
private int newY
adjustable slice VOI.
-
oldFrame
private boolean oldFrame
Used to set old or new mode of registration.
-
ptCoord
private float[] ptCoord
DOCUMENT ME!
-
red
private int red
DOCUMENT ME!
-
green
private int green
DOCUMENT ME!
-
blue
private int blue
DOCUMENT ME!
-
refMark
private int refMark
number of VOIs for reference slice
-
rotCenterMark
private int rotCenterMark
number of VOIs for rotation center
-
xFinish
private float xFinish
values obtained when mouseReleased
-
yFinish
private float yFinish
values obtained when mouseReleased
-
xOrg
private int[] xOrg
DOCUMENT ME!
-
xPres
private int[] xPres
DOCUMENT ME!
-
xRotation
private float xRotation
DOCUMENT ME!
-
xStart
private float xStart
values obtained when mousePressed
-
yStart
private float yStart
values obtained when mousePressed
-
yOrg
private int[] yOrg
DOCUMENT ME!
-
yPres
private int[] yPres
DOCUMENT ME!
-
yRotation
private float yRotation
DOCUMENT ME!
-
-
Constructor Detail
-
ViewJComponentRegistration
public ViewJComponentRegistration(ViewJFrameRegistration _frame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, int[] pixelBuffer, float zoom, int[] extents, boolean logMagDisplay, int _orientation, float alphaBl)
Constructor: ImageA and ImageB are expected to be of the same dimensionality !!- Parameters:
_frame- frame where image(s) will be displayed_imageA- Model of the image that will be displayed_LUTa- LUT used to display imageAimgBufferA- storage buffer used to display image A_imageB- Model of the image that will be displayed_LUTb- LUT used to display imageBimgBufferB- storage buffer used to display image BpixelBuffer- storage buffer used to build a displayable imagezoom- initial magnification of imageextents- initial display dimensions of the imagelogMagDisplay- display log magnitude of image_orientation- orientation of the imagealphaBl- DOCUMENT ME!
-
ViewJComponentRegistration
public ViewJComponentRegistration(ViewJFrameRegistrationTool _toolFrame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, int[] pixelBuffer, float zoom, int[] extents, boolean logMagDisplay, int _orientation, float alphaBl)
Constructor: ImageA and ImageB are expected to be of the same dimensionality !!- Parameters:
_toolFrame- frame where image(s) will be displayed_imageA- Model of the image that will be displayed_LUTa- LUT used to display imageAimgBufferA- storage buffer used to display image A_imageB- Model of the image that will be displayed_LUTb- LUT used to display imageBimgBufferB- storage buffer used to display image BpixelBuffer- storage buffer used to build a displayable imagezoom- initial magnification of imageextents- initial display dimensions of the imagelogMagDisplay- display log magnitude of image_orientation- orientation of the imagealphaBl- DOCUMENT ME!
-
-
Method Detail
-
deleteAdjRotVOIs
public void deleteAdjRotVOIs()
Deletes all ROTATIONCENTER and ADJMARK VOIs.
-
deleteAdjustableVOIs
public void deleteAdjustableVOIs()
Deletes all ADJMARK VOIs.
-
deletePoint
public void deletePoint(boolean isReference)
If a point is selected of the given type (reference or adjusted) delete the point and reset the.- Parameters:
isReference- delete point if of this type
-
deleteReferenceVOIs
public void deleteReferenceVOIs()
Deletes all REFMARK VOIs.
-
deleteRefRotVOIs
public void deleteRefRotVOIs()
Deletes all REFMARK and ROTATIONCENTER VOIs.
-
deleteVOIs
public void deleteVOIs()
Deletes all VOIs.
-
dispose
public void dispose(boolean gcFlag)
Sets all variables to null, disposes, and garbage collects.- Overrides:
disposein classViewJComponentEditImage- Parameters:
gcFlag- if true garbage collector should be called.
-
getAdjMark
public int getAdjMark()
Returns the adjust mark flag.- Returns:
- int adjust mark flag
-
getBlue
public int getBlue()
accessor that returns int blue.- Returns:
- int blue component
-
getGreen
public int getGreen()
Accessor that returns int green.- Returns:
- int green component
-
getMarkerType
public int[] getMarkerType()
Returns the marker type.- Returns:
- int[] marker
-
getnVOI
public int getnVOI()
Returns the number of VOIs.- Overrides:
getnVOIin classViewJComponentEditImage- Returns:
- int number of VOIs
-
getOpacity
public float getOpacity()
Returns the opacity used in alpha blending between the input image and the reference image.- Overrides:
getOpacityin classViewJComponentEditImage- Returns:
- float opacity
-
getRed
public int getRed()
Returns int red.- Returns:
- int red component
-
getRefMark
public int getRefMark()
Returns the reference mark flag.- Returns:
- int reference mark flag
-
getxOrg
public int[] getxOrg()
Returns the X origin.- Returns:
- int[] the X origin
-
getxPres
public int[] getxPres()
DOCUMENT ME!- Returns:
- int[] list of x coordinates
-
getyOrg
public int[] getyOrg()
Returns the Y origin.- Returns:
- int[] the Y origin
-
getyPres
public int[] getyPres()
DOCUMENT ME!- Returns:
- int[] list of y coordinates
-
makeAdjustableVOI
public void makeAdjustableVOI(WildMagic.LibFoundation.Mathematics.Vector3f adjPoint)
Constructs reference point VOI from the refPoint passed in.- Parameters:
adjPoint- a point VOI is generated from the 3D point
-
makeReferenceVOI
public void makeReferenceVOI(WildMagic.LibFoundation.Mathematics.Vector3f refPoint)
Constructs reference point VOI from the refPoint passed in.- Parameters:
refPoint- a point VOI is generated from the 3D point
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
When the mouse is clicked in the image, several different things may happen. If a Region of Interest (VOI) is selected and the click count is 2, a VOI dialog should pop up. If the click count is 1 and the mouse is in an VOI, it should select the VOI. In all other cases, a click within the image but not in an VOI should deselect all VOIs.- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener- Overrides:
mouseClickedin classViewJComponentEditImage- Parameters:
mouseEvent- event that triggers function; contains click count
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent mouseEvent)
Drags an VOI real time by calling a series of translations and draws. Once the mouse is released, the positions are reset permenantly. Also rubberbands points if the cursor indicates it by calling rubberbandVOI.- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classViewJComponentEditImage- Parameters:
mouseEvent- event that triggered function
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent mouseEvent)
Sets the mode of the program depending on the cursor mode. If the mode is move, activates the contour or line and enables the delete button.- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Overrides:
mousePressedin classViewJComponentEditImage- Parameters:
mouseEvent- event that triggered function
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent mouseEvent)
If the mode is level set, draws level sets as user moves mouse. Otherwise, changes the cursor depending on where the mouse is in relation to the VOI.- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseMovedin classViewJComponentEditImage- Parameters:
mouseEvent- event that triggered the function
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
This function sets up and draws the VOI according to the mode.- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Overrides:
mouseReleasedin classViewJComponentEditImage- Parameters:
mouseEvent- event that triggered function
-
moveVOIPosition
public void moveVOIPosition(int deltaX, int deltaY)Moves VOIs to new position by deltaX and deltaY.- Parameters:
deltaX- distance VOI moves in the X directiondeltaY- distance VOI moves in the Y direction
-
moveVOITo
public void moveVOITo(int id, int x, int y)Moves VOI with ID == id to a new position (x,y).- Parameters:
id- DOCUMENT ME!x- x coordinate of new positiony- y coordinate of new position
-
paintComponent
public void paintComponent(java.awt.Graphics g)
Paints the image and calls drawSelf for all VOIs.- Overrides:
paintComponentin classViewJComponentEditImage- Parameters:
g- graphics
-
paintWindowComponent
public void paintWindowComponent(java.awt.Graphics g, java.awt.event.MouseEvent mouseEvent)Paints the image and calls drawSelf for all VOIs.- Parameters:
g- graphicsmouseEvent- DOCUMENT ME!
-
setAdjMark
public void setAdjMark(boolean doAdj)
Sets the adjusted mark flag.- Parameters:
doAdj- DOCUMENT ME!
-
setCenter
public void setCenter(boolean doCen)
Sets the center point used in transformations.- Parameters:
doCen- if true construct a center point VOI
-
setLogMagDisplay
public void setLogMagDisplay(boolean flag)
Sets the log magnitude display flag.- Overrides:
setLogMagDisplayin classViewJComponentEditImage- Parameters:
flag- if true display log of the Magnitude of the complex image
-
setLUTa
public void setLUTa(ModelLUT LUT)
Sets the model LUT for the imageA.- Overrides:
setLUTain classViewJComponentEditImage- Parameters:
LUT- the model LUT
-
setLUTb
public void setLUTb(ModelLUT LUT)
Sets the model LUTb for the imageB.- Overrides:
setLUTbin classViewJComponentEditImage- Parameters:
LUT- the model LUT
-
setCursorMode
public void setCursorMode(int mode)
Switches modes based on the variable mode. Sets rubberband activity and the cursor.- Overrides:
setCursorModein classViewJComponentEditImage- Parameters:
mode- the integer mode
-
setMouseDrag
public void setMouseDrag(boolean doDrag)
doDrag true enables the adjusted slice to respond to mouse press and drag events doDrag false restricts the adjusted slice to responding to mouse press and release events.- Parameters:
doDrag- DOCUMENT ME!
-
setNewAlphaBlend
public void setNewAlphaBlend(int value)
Sets the alpha blending of parameter for two image displaying.- Parameters:
value- amount [0,100] that is the percentage of Image A to be displayed
-
setRefMark
public void setRefMark(boolean doRef)
Sets the reference mark flag.- Parameters:
doRef- DOCUMENT ME!
-
finalize
protected void finalize()
Cleans up memory.- Overrides:
finalizein classViewJComponentEditImage
-
-