Package gov.nih.mipav.view
Class ViewJFrameImage
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameBase
-
- gov.nih.mipav.view.ViewJFrameImage
-
- All Implemented Interfaces:
VOIManagerInterfaceListener,ViewImageUpdateInterface,ViewOpenFrameInterface,java.awt.event.ActionListener,java.awt.event.ComponentListener,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.WindowListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.event.ChangeListener,javax.swing.RootPaneContainer,javax.swing.WindowConstants
- Direct Known Subclasses:
ViewJFrameFastMarching2,ViewJFrameFastMarching3
public class ViewJFrameImage extends ViewJFrameBase implements java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, ViewOpenFrameInterface, VOIManagerInterfaceListener
Makes a frame and put a single image component into it.- Version:
- 1.0 Sept 28, 1998
- Author:
- Matthew J. McAuliffe, Ph.D.
- See Also:
ViewJComponentEditImage, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classViewJFrameImage.DicomQueryListener(package private) classViewJFrameImage.OkColorListenerPick up the selected color and call method to change the VOI color.-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private ViewJColorChoosercolorChooserReference to the color chooser.protected ViewJComponentEditImagecomponentImageObject where DICOM image, ... is converted and displayed as a Java imageprotected ViewControlsImagecontrolsReference to the toolbars located in the controls object.private booleandoOrientsDOCUMENT ME!private booleandoOriginsWhen loading an image into B slot, should origins and orients be matched?private JDialogDataProvenancedpDialogData provenance dialogprivate JDialogGridOptionsgridOptionsOnly want one gridoptions dialog per jframeimage.protected floatheightResFactorStorage for correction parameters where datasets have non isotropic values.protected float[]imageBufferABuffer used to store image intensities the presently viewed slice of image A.protected float[]imageBufferBBuffer used to store image intensities the presently viewed slice of image B.protected JDialogImageInfoinfoDialogAreference to the JDialogImageInfo for updating slice/resolutions.protected JDialogImageInfoinfoDialogBDOCUMENT ME!private booleanisShiftDownboolean indicating if shift button is down.protected booleanlogMagDisplayFlag indicating whether or not that the image should be displayed in Log scale.protected javax.swing.JMenuBarmenuBarReference to the frame's menu bar.protected ViewMenuBarmenuBarMakerConstructs the image menu bar.protected ViewMenuBuildermenuBuilderThis object contains a number of useful functions for building a menu and querying the state of menu items.protected JDialogMultiPaintmultipaintDialogreference to the JDialogMultiPaint for shortcutsprotected intnImageNumber of slices in a 3D dataset.protected intnTImageNumber of time sequences in a 4D dataset.private booleanpaintBrushLockedused in conjuction with the above variable, stating that the paint brush has been changed but will change back to previous.protected int[]pixBufferInteger buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data.protected int[]pixBufferBInteger buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data.private JDialogAAMClassificationprostateAAMClassificationprivate JDialogAAMplusSVMprostateMLprivate intquickPaintBrushIndexDOCUMENT ME!protected float[]resolsStorage of the image voxel resolutions.protected javax.swing.JScrollPanescrollPaneThe scrollPane where the image is displayed.private static longserialVersionUIDUse serialVersionUID for interoperability.protected int[]unitsStorage of the resolution units of measure.protected javax.swing.ButtonGroupVOIGroupprotected VOIManagerInterfacevoiManagerprotected javax.swing.JMenuvoiMenuprotected floatwidthResFactorStorage for correction parameters where datasets have non isotropic values.protected JDialogWinLevel[]windowLevelReference to the two window and level dialogs where [0] is for imageA, [1] for imageB.protected static intxScreenWidth of the display screen.protected static intyScreenHeight of the display screen.protected floatzoomDefaults magnification of image to 1.private JDialogZoomzoomDialogReference to the magnification tool.-
Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, imageA, imageB, isClosing, linkedScrolling, linkFrame, linkTriFrame, LUTa, LUTb, progressBar, scannerLPS_APLabel, scannerLPS_APTextField, scannerLPS_GoToButton, scannerLPS_GoToPanel, scannerLPS_ISLabel, scannerLPS_ISTextField, scannerLPS_RLLabel, scannerLPS_RLTextField, scannerLPSLabel, scannerLPSLabelVals, scannerLPSPanel, scannerRAS_APLabel, scannerRAS_APTextField, scannerRAS_GoToButton, scannerRAS_GoToPanel, scannerRAS_ISLabel, scannerRAS_ISTextField, scannerRAS_RLLabel, scannerRAS_RLTextField, scannerRASLabel, scannerRASLabelVals, scannerRASPanel, scannerTabbedPane, tabbedPane, talGoToButton, talGoToPanel, talXLabel, talXTextField, talYLabel, talYTextField, talZLabel, talZTextField, userInterface, zoomMode
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ViewJFrameImage(ModelImage _imageA)Makes a frame and puts an image into it.ViewJFrameImage(ModelImage _imageA, ModelImage _imageB)Makes a frame and puts an image component into it, does not display the frame through ViewJFrameImage's init() method.ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa)Makes a frame and puts an image into it.ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa, java.awt.Dimension loc)Makes a frame and puts an image component into it.ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa, java.awt.Dimension loc, boolean logMagDisplay)Makes a frame and puts an image component into it.ViewJFrameImage(ModelSimpleImage simpleImage, java.lang.String name)Constructs a ModelSimpleImage VJF
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private voidaamClassification()private voidaamGroupRename()private voidaamGroups()private voidaamMLClassification()voidabout()Makes an aboutDialog box and displays information of the image plane presently being displayed.voidactionPerformed(java.awt.event.ActionEvent event)calls various methods depending on the action.voidaddSphereVOIs(VOI annotations)private voidadjustScrollbars(int x, int y)DOCUMENT ME!voidchangeMenuEnables()Routine to enable some menu items and disable othter menu items when the dimensionality or type of the image is changed.private booleancheckForActiveVOIs()voidclose()Closes window and disposes of frame and component.voidclose(boolean closeAll)Closes window and disposes of frame and component.voidcollapseAlltoSinglePaint(boolean showProgressBar)This method is provided for the user to convert a masked area back to a painted area.voidcomponentResized(java.awt.event.ComponentEvent event)Resizes frame and all components.protected voidcomputeIdealWindowSize()private void computeIdealWindowSize() This method will enlarge or shrink the window size in response to the componentImage being zoomed.private voidconvertVOITBI()voidcreate3DVOI(boolean bIntersection)protected int[]createBuffers()Create the buffers for imageA and imageB.voiddecSlice()Decreases the slice to be displayed by one and updates title frame.voiddecSliceEyeTracker()private voiddeepCNNConvert()private voiddeepCNNMap()private voiddeepCNNTest()private voiddeepCNNTrain()private voiddeepKneesAtlas()private voiddeepKneesMap()voiddoLinkedScrolling(int offset)voidenableImageB(boolean enable)Quick and simple way for ViewJFrameBase to tell the ViewJFrameImage it created to set the menu (right now only for 2Dimensional) for image B.private voidextractCEFeature()voidfinalize()Cleans memory.private voidgenerateAtlasImage()Read the 3D atlas images directory, convert each 3D image to 2D slices based atlas.private voidgenerateEndingSlices()ModelImagegetActiveImage()Returns the reference to the currently active image.protected JDialogImageInfogetActiveImageInfoDialog()Returns a reference to the image info dialog for the active image.ModelLUTgetActiveLUT()ModelRGBgetActiveRGB()floatgetAlphaBlend()Returns the alphaBlend value for blending between imageA and imageB.WildMagic.LibFoundation.Mathematics.Vector3fgetCenterPt()ViewJComponentEditImagegetComponentImage()Returns the reference to the component image.ViewControlsImagegetControls()Get control widgets (toolbars, sliders) for the image frame.javax.swing.JFramegetFrame()intgetFrameHeight()Return the height that the frame should have.int[]getFrameLandMarkPoints()Get the frame four corner landmark points.java.awt.DimensiongetFrameSize()Return the preferred size for the frame.java.awt.DimensiongetFrameSize(java.awt.Dimension size)Return the preferred size for the frame.intgetFrameWidth()Return the width that the frame should have.ModelImagegetImageA()Returns the reference to imageA.ModelImagegetImageB()Returns the reference to imageB.protected JDialogImageInfogetImageInfoDialogB()Returns the image info dialog for image B.javax.swing.JMenuBargetJMenuBar()java.util.Vector<ModelImage>getRegisteredFramedImages(ModelImage activeImage)Returns the Vector of Registered Framed Images that are of the same number of dimensions as the active image and same extents for dimesions 3, 4, and 5.java.util.Vector<ModelImage>getRegisteredFramedImages4D3D(ModelImage activeImage)If active image is 4D, this returns all 3d images that have same x,y,and z dimensionality as the 4d imageintgetRegisteredFramedImagesSize()Returns the size of the RegisteredFramedImages Vector.ModelRGBgetRGBTA()Gets the RGB LUT table for ARGB image A.ModelRGBgetRGBTB()Gets the RGB LUT table for ARGB image B.javax.swing.JScrollPanegetScrollPane()DOCUMENT ME!protected intgetScrollPaneHeight()Get the height of the scroll pane holding the component image.protected java.awt.DimensiongetScrollPaneSize()Get the size of the scroll pane holding the component image.java.awt.DimensiongetScrollPaneSize(java.awt.Dimension size)Return the preferred size for the component image scroll pane.protected intgetScrollPaneWidth()Get the width of the scroll pane holding the component image.intgetViewableSlice()Get the top-most slice.intgetViewableTimeSlice()Gets the current Time slice which is being viewed.ViewMenuBargetViewMenuBar()VOIManagerInterfacegetVOIManager()booleanhandleMaskToPaint(boolean showProgressBar)This method is provided for the user to convert a masked area back to a painted area.private voidhedCNNMap()voidincSlice()Increases the slice to be displayed by one and updates title frame.voidincSliceEyeTracker()private voidinit(ModelLUT LUTa, java.awt.Dimension loc, boolean logMagDisplay)Initializes the frame and variables.protected voidinitComponentImage(int[] extents)Creates and initializes the component image for the given image.voidinitExtentsVariables(ModelImage img)Initializes the variables based on the image extents.protected voidinitLUT()Creates and initializes the LUT for the first image (imageA) if it hasn't been already.voidinitResolutions()Initializes the resolutions and units from the image.protected voidinitVOI()Initialize the 3D VOI interface.voidinitZoom()Initializes the zoom variables for the first image (imageA).private booleanisMultipleImages()Helper method to establish if there are other images so that a dialog can be created.private booleanisMultipleSameSizeImages(boolean isForCalculator)Helper method to establish if there are images of the same dimensionality so that a dialog can be created.voidkeyPressed(java.awt.event.KeyEvent e)********************************************************************* **************************** Key Events *** **************************voidkeyReleased(java.awt.event.KeyEvent e)DOCUMENT ME!voidkeyTyped(java.awt.event.KeyEvent e)DOCUMENT ME!private voidloadProstateMask()protected java.lang.StringmakeTitle()Constructs the title of the frame with the image name and the slice location.voidmaskToPaint()voidmouseClicked(java.awt.event.MouseEvent event)DOCUMENT ME!voidmouseDragged(java.awt.event.MouseEvent e)DOCUMENT ME!voidmouseEntered(java.awt.event.MouseEvent event)DOCUMENT ME!voidmouseExited(java.awt.event.MouseEvent event)DOCUMENT ME!voidmouseMoved(java.awt.event.MouseEvent e)DOCUMENT ME!voidmousePressed(java.awt.event.MouseEvent event)DOCUMENT ME!voidmouseReleased(java.awt.event.MouseEvent event)DOCUMENT ME!ViewJFrameImageopenFrame(ModelImage image)ViewOpenFrameInterface function to create a new frame from a result image (jdialog produced)voidpaintToShortMask()voidpaintToUbyteMask()voidPointerActive(boolean bActive)voidprintImage()Method to send an image to the printer.private voidpropagatePaintToAllSlices()DOCUMENT ME!private voidpropagatePaintToNextSlice()DOCUMENT ME!private voidpropagatePaintToPreviousSlice()DOCUMENT ME!WildMagic.LibFoundation.Mathematics.Vector3fPropDown(int iActive)WildMagic.LibFoundation.Mathematics.Vector3fPropUp(int iActive)private voidprostateSemiAutoBSpline()private voidprostateSemiAutoBSplineFuzzyC()private voidreconstructSurfaceFromVOIs()Reconstruct the prostate surface from the coarse VOIs cloudy points.voidremoveComponentListener()voidremoveControls()Removes the menu and controls of the main frame so that a new frame can load the main frame with the proper controls.voidremoveKeyListener()voidremoveMouseListener()voidremoveMouseMotionListener()voidremoveWindowListener()voidsaveImageInfo()Saves the image info; need to do before saving image.private voidsaveMergedVOIs()This method merges the 3 axial, sagittal, coronal VOIs and save them into one cloudy points file.private voidsaveProstateBoundaryFeature()private voidsaveProstateFeatures()private voidsaveProstateFeatures2D()voidsetActiveImage(int active)Sets the active image for drawing VOIs.voidsetActiveImage(ModelImage kImage)voidsetAlphaBlend(int value)Sets the alpha blending of parameter for two image displaying.booleansetAndLoad(ModelImage image2load)DOCUMENT ME!booleansetAndLoad(ModelImage image2load, boolean doOrigins, boolean doOrients, double defaultValue, double defaultRed, double defaultGreen, double defaultBlue)DOCUMENT ME!voidsetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)voidsetControls()Sets the menu and controls (i.e. toolbars) of the main frame!voidsetCursor(java.awt.Cursor kCursor)voidsetEnabled(boolean flag)Controls whether or not the images/VOIs of the frame can be modified.voidsetImageB(ModelImage _imageB)Sets the reference to imageB.voidsetLUTa(ModelLUT LUT)Sets the LUT for image A.voidsetLUTb(ModelLUT LUT)Sets the LUT for image B.voidsetModified()voidsetOutputWindowBox(boolean isShown)Updates the checkbox to show whether or not the output window is currently displayed.voidsetPaintBitmapSwitch(boolean paintBitmapSwitch)When switching the active image, copy the paintBitmap of the previous active image into the paintBitmap of the new active image.voidsetPaintMask(java.util.BitSet mask)voidsetRGBTA(ModelRGB RGBT)Sets the RGB LUT table for ARGB image A.voidsetRGBTB(ModelRGB RGBT)Sets the RGB LUT table for ARGB image B.voidsetShiftDown(boolean isShiftDown)DOCUMENT MEvoidsetSlice(int slice)Sets the slice to be displayed and updates title frame.voidsetSlice(int slice, boolean updateLinkedImages)DOCUMENT ME!voidsetTimeSlice(int slice)Sets the slice to be displayed and updates title frame.voidsetTimeSlice(int slice, boolean checkScroll)Sets the slice to be displayed and updates title frame.voidsetTitle()Sets the title of the frame with the image name and the slice location.booleansetZoomB()Sets the magnification of Image B.voidsetZoomDialogNull()Sets the magnification dialog to null.voidshowEditImageInfo()DOCUMENT ME!voidstateChanged(javax.swing.event.ChangeEvent event)DOCUMENT ME!private voidsurfaceReconstructionTBI()protected booleantestParameter(java.lang.String str, double minValue, double maxValue)Tests that the entered parameter is in range.private voidtestProstateBoundaryFeatureTrain()voidtestProstateFeatures()private voidtestProstateFeatures2D()private voidtestProstateFeaturesClassification()private voidtestProstateFeaturesTrain()voidtriPlanarClosing()DOCUMENT ME!voidupdateData()voidupdateFrame(float sX, float sY)Updates the this frame's size the components sizes.voidupdateFrame(float sX, float sY, int x, int y)public void updateFrame(float xZoom, float yZoom, int x, int y) This method is called when the user is zooming in or out.protected voidupdateHistoLUTFrame(int imageAorB)Deprecated.protected voidupdateHistoLUTFrame(int imageAorB, ViewJComponentEditImage compImg)Deprecated.protected voidupdateHistoRGBFrame(int imageAorB)Deprecated.protected voidupdateHistoRGBFrame(int imageAorB, ViewJComponentEditImage compImg)Deprecated.booleanupdateImageExtents()This methods calls the componentImage's REPAINT method to redraw the screen.booleanupdateImages()This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.booleanupdateImages(boolean forceShow)This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(boolean forceShow, int interpMode)This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)This methods calls the componentImage's update method to redraw the screen.voidupdateMenubar()This method updates the menubar; ie: after an image has been opened.voidupdateWinLevel(int min, int max)Update the window level sliders from the CT preset dialog.voidwindowClosing(java.awt.event.WindowEvent event)Closes window and disposes of frame and component.-
Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, buildLabelPanel, canCloseImageBAfterLoad, closeImageB, componentHidden, componentMoved, componentShown, getDefaultLUTa, getDefaultLUTb, getDisplayMode, getImageNameA, getImageNameB, getLastState, getLUTa, getLUTb, getTriImg, getUserInterface, handleMaskPopupMenu, handlePaintToMaskPopupMenu, handleZoomPopupMenu, initExtents, initImageBuffer, initLUT, initNumSlices, initPixelBuffer, initResFactor, initResolutions, initRGB, initSlicePositions, initUnits, initZoom, loadAllVOIs, loadAllVOIsFrom, loadImage, loadLUT, loadLUTandTransferFunctionFrom, loadLUTandTransferFunctionFrom, makeString, newFrameBeenCreated, openVOI, openVOI, pickImageFile, save, save, save, saveAllVOIs, saveAllVOIsTo, saveLabels, saveLUT, saveLUTandTransferFunction, saveLUTandTransferFunction, saveLUTAs, saveLUTAs, saveVOI, saveVOIAs, saveVOIAs, saveVOIIntensities, saveVOIIntensitiesTo, setAbsPositionLabels, setEnableCloseImageBAfterLoad, setImageA, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPosition, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
xScreen
protected static final int xScreen
Width of the display screen.
-
yScreen
protected static final int yScreen
Height of the display screen.
-
componentImage
protected ViewJComponentEditImage componentImage
Object where DICOM image, ... is converted and displayed as a Java image
-
controls
protected ViewControlsImage controls
Reference to the toolbars located in the controls object.
-
heightResFactor
protected float heightResFactor
Storage for correction parameters where datasets have non isotropic values.
-
imageBufferA
protected float[] imageBufferA
Buffer used to store image intensities the presently viewed slice of image A.
-
imageBufferB
protected float[] imageBufferB
Buffer used to store image intensities the presently viewed slice of image B.
-
infoDialogA
protected JDialogImageInfo infoDialogA
reference to the JDialogImageInfo for updating slice/resolutions.
-
infoDialogB
protected JDialogImageInfo infoDialogB
DOCUMENT ME!
-
logMagDisplay
protected boolean logMagDisplay
Flag indicating whether or not that the image should be displayed in Log scale. Used primarily for displaying the FFT of an image.
-
menuBar
protected javax.swing.JMenuBar menuBar
Reference to the frame's menu bar.
-
menuBarMaker
protected ViewMenuBar menuBarMaker
Constructs the image menu bar.
-
menuBuilder
protected ViewMenuBuilder menuBuilder
This object contains a number of useful functions for building a menu and querying the state of menu items.
-
nImage
protected int nImage
Number of slices in a 3D dataset.
-
nTImage
protected int nTImage
Number of time sequences in a 4D dataset.
-
pixBuffer
protected int[] pixBuffer
Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data. The ARGB values are generated by using the imageA intensities as a index into a LUT.
-
pixBufferB
protected int[] pixBufferB
Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data. The ARGB values are generated by using the imageB intensities as a index into a LUT.
-
resols
protected float[] resols
Storage of the image voxel resolutions. One resolution value per dimension.
-
scrollPane
protected javax.swing.JScrollPane scrollPane
The scrollPane where the image is displayed.
-
units
protected int[] units
Storage of the resolution units of measure. For example, mm, cm, inches ...
-
widthResFactor
protected float widthResFactor
Storage for correction parameters where datasets have non isotropic values.
-
windowLevel
protected JDialogWinLevel[] windowLevel
Reference to the two window and level dialogs where [0] is for imageA, [1] for imageB.
-
zoom
protected float zoom
Defaults magnification of image to 1.
-
colorChooser
private ViewJColorChooser colorChooser
Reference to the color chooser.
-
doOrients
private final boolean doOrients
DOCUMENT ME!- See Also:
- Constant Field Values
-
doOrigins
private final boolean doOrigins
When loading an image into B slot, should origins and orients be matched?- See Also:
- Constant Field Values
-
gridOptions
private JDialogGridOptions gridOptions
Only want one gridoptions dialog per jframeimage.
-
isShiftDown
private boolean isShiftDown
boolean indicating if shift button is down.
-
paintBrushLocked
private boolean paintBrushLocked
used in conjuction with the above variable, stating that the paint brush has been changed but will change back to previous.
-
quickPaintBrushIndex
private int quickPaintBrushIndex
DOCUMENT ME!
-
zoomDialog
private JDialogZoom zoomDialog
Reference to the magnification tool.
-
dpDialog
private JDialogDataProvenance dpDialog
Data provenance dialog
-
multipaintDialog
protected JDialogMultiPaint multipaintDialog
reference to the JDialogMultiPaint for shortcuts
-
VOIGroup
protected javax.swing.ButtonGroup VOIGroup
-
voiMenu
protected javax.swing.JMenu voiMenu
-
voiManager
protected VOIManagerInterface voiManager
-
prostateAAMClassification
private JDialogAAMClassification prostateAAMClassification
-
prostateML
private JDialogAAMplusSVM prostateML
-
-
Constructor Detail
-
ViewJFrameImage
public ViewJFrameImage(ModelImage _imageA)
Makes a frame and puts an image into it. Image will be centered on screen.- Parameters:
_imageA- ModelImage - first image to display
-
ViewJFrameImage
public ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa)
Makes a frame and puts an image into it. Image will be centered on screen.- Parameters:
_imageA- ModelImage - first image to displayLUTa- LUT of the imageA (if null grayscale LUT is constructed)
-
ViewJFrameImage
public ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa, java.awt.Dimension loc)
Makes a frame and puts an image component into it.- Parameters:
_imageA- First image to displayLUTa- LUT of the imageA (if null grayscale LUT is constructed)loc- location where image should be initially placed
-
ViewJFrameImage
public ViewJFrameImage(ModelImage _imageA, ModelImage _imageB)
Makes a frame and puts an image component into it, does not display the frame through ViewJFrameImage's init() method.- Parameters:
_imageA- First image to display_imageB- Second image to display
-
ViewJFrameImage
public ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa, java.awt.Dimension loc, boolean logMagDisplay)
Makes a frame and puts an image component into it.- Parameters:
_imageA- First image to displayLUTa- LUT of the imageA (if null grayscale LUT is constructed)loc- location where image should be initially placedlogMagDisplay- Display log magnitude of image
-
ViewJFrameImage
public ViewJFrameImage(ModelSimpleImage simpleImage, java.lang.String name)
Constructs a ModelSimpleImage VJF- Parameters:
simpleImage-name-
-
-
Method Detail
-
about
public void about()
Makes an aboutDialog box and displays information of the image plane presently being displayed.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
calls various methods depending on the action.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Specified by:
actionPerformedin classViewJFrameBase- Parameters:
event- event that triggered function
-
close
public void close()
Closes window and disposes of frame and component.- Overrides:
closein classViewJFrameBase
-
close
public void close(boolean closeAll)
Closes window and disposes of frame and component.- Overrides:
closein classViewJFrameBase
-
removeComponentListener
public void removeComponentListener()
-
removeMouseMotionListener
public void removeMouseMotionListener()
-
removeWindowListener
public void removeWindowListener()
-
removeMouseListener
public void removeMouseListener()
-
removeKeyListener
public void removeKeyListener()
-
collapseAlltoSinglePaint
public void collapseAlltoSinglePaint(boolean showProgressBar)
This method is provided for the user to convert a masked area back to a painted area. It only affects those areas that were masked with the intensity value that is currently active.- Parameters:
showProgressBar- DOCUMENT ME!
-
componentResized
public void componentResized(java.awt.event.ComponentEvent event)
Resizes frame and all components.- Specified by:
componentResizedin interfacejava.awt.event.ComponentListener- Overrides:
componentResizedin classViewJFrameBase- Parameters:
event- event that triggered function
-
decSlice
public void decSlice()
Decreases the slice to be displayed by one and updates title frame.
-
decSliceEyeTracker
public void decSliceEyeTracker()
-
doLinkedScrolling
public void doLinkedScrolling(int offset)
-
enableImageB
public void enableImageB(boolean enable)
Quick and simple way for ViewJFrameBase to tell the ViewJFrameImage it created to set the menu (right now only for 2Dimensional) for image B.- Parameters:
enable- whether to enable the imageB related menu items
-
changeMenuEnables
public void changeMenuEnables()
Routine to enable some menu items and disable othter menu items when the dimensionality or type of the image is changed.
-
finalize
public void finalize() throws java.lang.ThrowableCleans memory.- Overrides:
finalizein classViewJFrameBase- Throws:
java.lang.Throwable- theExceptionraised by this method
-
getActiveImage
public ModelImage getActiveImage()
Returns the reference to the currently active image.- Specified by:
getActiveImagein interfaceVOIManagerInterfaceListener- Returns:
- the active image
-
getAlphaBlend
public float getAlphaBlend()
Returns the alphaBlend value for blending between imageA and imageB.- Overrides:
getAlphaBlendin classViewJFrameBase- Returns:
- the alphaBlend value for blending between imageA and imageB
-
getComponentImage
public ViewJComponentEditImage getComponentImage()
Returns the reference to the component image.- Returns:
- component image
-
getControls
public ViewControlsImage getControls()
Get control widgets (toolbars, sliders) for the image frame.- Specified by:
getControlsin classViewJFrameBase- Returns:
- the controls for this image frame
-
getFrameHeight
public int getFrameHeight()
Return the height that the frame should have.- Returns:
- the frame's height
-
getFrameSize
public java.awt.Dimension getFrameSize()
Return the preferred size for the frame.- Returns:
- the size the frame should be
-
getFrameSize
public java.awt.Dimension getFrameSize(java.awt.Dimension size)
Return the preferred size for the frame.- Parameters:
size- if non-null, its dimensions are changed to the size the frame should be- Returns:
- the size the frame should be
-
getFrameWidth
public int getFrameWidth()
Return the width that the frame should have.- Returns:
- the frame's width
-
getImageA
public ModelImage getImageA()
Returns the reference to imageA.- Specified by:
getImageAin classViewJFrameBase- Returns:
- image
-
getImageB
public ModelImage getImageB()
Returns the reference to imageB.- Specified by:
getImageBin classViewJFrameBase- Returns:
- imageB
-
getViewMenuBar
public ViewMenuBar getViewMenuBar()
- Returns:
- menuBarMaker
-
getJMenuBar
public javax.swing.JMenuBar getJMenuBar()
- Overrides:
getJMenuBarin classjavax.swing.JFrame- Returns:
- menuBar
-
getRegisteredFramedImages
public java.util.Vector<ModelImage> getRegisteredFramedImages(ModelImage activeImage)
Returns the Vector of Registered Framed Images that are of the same number of dimensions as the active image and same extents for dimesions 3, 4, and 5.- Returns:
- Vector
-
getRegisteredFramedImages4D3D
public java.util.Vector<ModelImage> getRegisteredFramedImages4D3D(ModelImage activeImage)
If active image is 4D, this returns all 3d images that have same x,y,and z dimensionality as the 4d image- Returns:
- Vector
-
getRegisteredFramedImagesSize
public int getRegisteredFramedImagesSize()
Returns the size of the RegisteredFramedImages Vector.- Returns:
- size of the Vector
-
getRGBTA
public ModelRGB getRGBTA()
Gets the RGB LUT table for ARGB image A.- Overrides:
getRGBTAin classViewJFrameBase- Returns:
- RGBT the new RGB LUT to be applied to the image
-
getRGBTB
public ModelRGB getRGBTB()
Gets the RGB LUT table for ARGB image B.- Overrides:
getRGBTBin classViewJFrameBase- Returns:
- RGBT the new RGB LUT to be applied to the image
-
getScrollPane
public javax.swing.JScrollPane getScrollPane()
DOCUMENT ME!- Returns:
- JScrollPane
-
getScrollPaneSize
public java.awt.Dimension getScrollPaneSize(java.awt.Dimension size)
Return the preferred size for the component image scroll pane.- Parameters:
size- if non-null, its dimensions are changed to the size the scroll pane should be- Returns:
- the size the scroll pane should be
-
getViewableSlice
public int getViewableSlice()
Get the top-most slice.- Returns:
- returns the slice which is currently displayed
-
getViewableTimeSlice
public int getViewableTimeSlice()
Gets the current Time slice which is being viewed.- Returns:
- int the current time slice
-
handleMaskToPaint
public boolean handleMaskToPaint(boolean showProgressBar)
This method is provided for the user to convert a masked area back to a painted area. It only affects those areas that were masked with the intensity value that is currently active.- Parameters:
showProgressBar- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
incSlice
public void incSlice()
Increases the slice to be displayed by one and updates title frame.
-
incSliceEyeTracker
public void incSliceEyeTracker()
-
initExtentsVariables
public void initExtentsVariables(ModelImage img)
Initializes the variables based on the image extents. (i.e. number of slices, number of time slices, the initial z-slice, etc.- Parameters:
img- the image to set the extent variables for
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
********************************************************************* **************************** Key Events *** **************************.*********************************************************************- Specified by:
keyPressedin interfacejava.awt.event.KeyListener- Parameters:
e- DOCUMENT ME!
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
DOCUMENT ME!- Specified by:
keyReleasedin interfacejava.awt.event.KeyListener- Parameters:
e- DOCUMENT ME!
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
DOCUMENT ME!- Specified by:
keyTypedin interfacejava.awt.event.KeyListener- Parameters:
e- DOCUMENT ME!
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener- Parameters:
event- DOCUMENT ME!
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
DOCUMENT ME!- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Parameters:
e- DOCUMENT ME!
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener- Parameters:
event- DOCUMENT ME!
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener- Parameters:
event- DOCUMENT ME!
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
DOCUMENT ME!- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener- Parameters:
e- DOCUMENT ME!
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Parameters:
event- DOCUMENT ME!
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Parameters:
event- DOCUMENT ME!
-
openFrame
public ViewJFrameImage openFrame(ModelImage image)
ViewOpenFrameInterface function to create a new frame from a result image (jdialog produced)- Specified by:
openFramein interfaceViewOpenFrameInterface
-
printImage
public void printImage()
Method to send an image to the printer.
-
removeControls
public void removeControls()
Removes the menu and controls of the main frame so that a new frame can load the main frame with the proper controls. Since the controls point to this particular image, when we remove the controls, turn off the highlight box.- Specified by:
removeControlsin classViewJFrameBase- See Also:
ViewJComponentEditImage.useHighlight(boolean),Component.repaint()
-
saveImageInfo
public void saveImageInfo()
Saves the image info; need to do before saving image.
-
setActiveImage
public void setActiveImage(int active)
Sets the active image for drawing VOIs. VOIs are only drawn in the active image. In addition, algorithms are executed on the active window.- Specified by:
setActiveImagein interfaceVOIManagerInterfaceListener- Specified by:
setActiveImagein classViewJFrameBase- Parameters:
active- IMAGE_A or IMAGE_B
-
setAlphaBlend
public void setAlphaBlend(int value)
Sets the alpha blending of parameter for two image displaying.- Specified by:
setAlphaBlendin classViewJFrameBase- Parameters:
value- amount [0,100] that is the percentage of Image A to be displayed
-
setAndLoad
public boolean setAndLoad(ModelImage image2load)
DOCUMENT ME!- Parameters:
image2load- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
setAndLoad
public boolean setAndLoad(ModelImage image2load, boolean doOrigins, boolean doOrients, double defaultValue, double defaultRed, double defaultGreen, double defaultBlue)
DOCUMENT ME!- Parameters:
image2load- DOCUMENT ME!doOrigins- DOCUMENT ME!doOrients- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
setControls
public void setControls()
Sets the menu and controls (i.e. toolbars) of the main frame! This puts the menus and controls needed to controls the operations of this frame. Different image frames have different menu and controls. Notify this componentImage that it needs to display highlight box, notifying user that this componentImage is the image being controlled- Specified by:
setControlsin classViewJFrameBase- See Also:
ViewJComponentEditImage.useHighlight(boolean),Component.repaint()
-
setEnabled
public void setEnabled(boolean flag)
Controls whether or not the images/VOIs of the frame can be modified.- Specified by:
setEnabledin classViewJFrameBase- Parameters:
flag- if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
-
setImageB
public void setImageB(ModelImage _imageB)
Sets the reference to imageB.- Specified by:
setImageBin classViewJFrameBase- Parameters:
_imageB- image to set the frame to
-
setLUTa
public void setLUTa(ModelLUT LUT)
Sets the LUT for image A.- Overrides:
setLUTain classViewJFrameBase- Parameters:
LUT- the LUT
-
setLUTb
public void setLUTb(ModelLUT LUT)
Sets the LUT for image B.- Overrides:
setLUTbin classViewJFrameBase- Parameters:
LUT- the LUT
-
setOutputWindowBox
public void setOutputWindowBox(boolean isShown)
Updates the checkbox to show whether or not the output window is currently displayed.- Parameters:
isShown- boolean is the output window shown
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean paintBitmapSwitch)
When switching the active image, copy the paintBitmap of the previous active image into the paintBitmap of the new active image.- Specified by:
setPaintBitmapSwitchin classViewJFrameBase- Parameters:
paintBitmapSwitch- if true do not getMask on a setActiveImage command
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image A.- Specified by:
setRGBTAin classViewJFrameBase- Parameters:
RGBT- the new RGB LUT to be applied to the image
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image B.- Specified by:
setRGBTBin classViewJFrameBase- Parameters:
RGBT- the new RGB LUT to be applied to the image
-
setShiftDown
public void setShiftDown(boolean isShiftDown)
DOCUMENT ME.*- Parameters:
isShiftDown- DOCUMENT ME!
-
setSlice
public void setSlice(int slice)
Sets the slice to be displayed and updates title frame.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- indicates image slice to be displayed
-
setSlice
public void setSlice(int slice, boolean updateLinkedImages)DOCUMENT ME!- Parameters:
slice- DOCUMENT ME!updateLinkedImages- DOCUMENT ME!
-
setTimeSlice
public void setTimeSlice(int slice)
Sets the slice to be displayed and updates title frame.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- indicates image time-slice (4th dimension) to be displayed
-
setTimeSlice
public void setTimeSlice(int slice, boolean checkScroll)Sets the slice to be displayed and updates title frame.- Parameters:
slice- indicates image time-slice (4th dimension) to be displayedwhether- linked images should change their linked image sets
-
setTitle
public void setTitle()
Sets the title of the frame with the image name and the slice location.- Specified by:
setTitlein classViewJFrameBase
-
setZoomB
public boolean setZoomB()
Sets the magnification of Image B. Allocates the image buffers so that it can be displayed properly.- Returns:
- true if setting the zoom on imageB was successful
-
setZoomDialogNull
public void setZoomDialogNull()
Sets the magnification dialog to null.
-
showEditImageInfo
public void showEditImageInfo()
DOCUMENT ME!
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent event)
DOCUMENT ME!- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener- Overrides:
stateChangedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
triPlanarClosing
public void triPlanarClosing()
DOCUMENT ME!
-
updateFrame
public void updateFrame(float sX, float sY)Updates the this frame's size the components sizes. If the magnified image fits into the frame that will fit into the screen then frame and image are sized appropriately. If the frame, to fit the image, exceeds the screen size the frame remains the same size and the image magnified and placed in the scroll pane.- Parameters:
sX- zoom in the x dimensionsY- zoom in the y dimension
-
updateFrame
public void updateFrame(float sX, float sY, int x, int y)public void updateFrame(float xZoom, float yZoom, int x, int y) This method is called when the user is zooming in or out.- Parameters:
sX- float zoom in the x dimensionsY- float zoom in the y dimensionx- int X-pixel the user wants to zoom aroundy- int Y-pixel the user wants to zoom around
-
updateImageExtents
public boolean updateImageExtents()
This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.- Specified by:
updateImageExtentsin interfaceViewImageUpdateInterface- Specified by:
updateImageExtentsin classViewJFrameBase- Returns:
- whether the image extents update was successful
- See Also:
ViewImageUpdateInterface
-
updateImages
public boolean updateImages()
This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
forceShow- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean forceShow, int interpMode)This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Parameters:
forceShow- forces show to re import image and calc. java imageinterpMode-- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- LUT used to update imageALUTb- LUT used to update imageBforceShow- forces show to re import image and calc. java imageinterpMode- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming successful update
-
updateMenubar
public void updateMenubar()
This method updates the menubar; ie: after an image has been opened.
-
updateWinLevel
public void updateWinLevel(int min, int max)Update the window level sliders from the CT preset dialog.- Parameters:
min- min value.max- max value.
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.- Specified by:
windowClosingin interfacejava.awt.event.WindowListener- Overrides:
windowClosingin classViewJFrameBase- Parameters:
event- Event that triggered function
-
createBuffers
protected int[] createBuffers() throws java.lang.OutOfMemoryErrorCreate the buffers for imageA and imageB.- Returns:
- the extents of the buffers
- Throws:
java.lang.OutOfMemoryError- if enough memory cannot be allocated for this method
-
getActiveImageInfoDialog
protected JDialogImageInfo getActiveImageInfoDialog()
Returns a reference to the image info dialog for the active image. Image A and image B have references to their individual dialogs.- Returns:
- a reference to the image info dialog for the active image
-
getImageInfoDialogB
protected JDialogImageInfo getImageInfoDialogB()
Returns the image info dialog for image B.- Returns:
- the image info dialog for image B
-
getScrollPaneHeight
protected int getScrollPaneHeight()
Get the height of the scroll pane holding the component image.- Returns:
- the height of the component image scroll pane
-
getScrollPaneSize
protected java.awt.Dimension getScrollPaneSize()
Get the size of the scroll pane holding the component image.- Returns:
- the size of the component image scroll pane
-
getScrollPaneWidth
protected int getScrollPaneWidth()
Get the width of the scroll pane holding the component image.- Returns:
- the width of the component image scroll pane
-
initLUT
protected void initLUT() throws java.lang.OutOfMemoryErrorCreates and initializes the LUT for the first image (imageA) if it hasn't been already.- Throws:
java.lang.OutOfMemoryError- if enough memory cannot be allocated for this method
-
initResolutions
public void initResolutions()
Initializes the resolutions and units from the image.
-
initZoom
public void initZoom()
Initializes the zoom variables for the first image (imageA).
-
makeTitle
protected java.lang.String makeTitle()
Constructs the title of the frame with the image name and the slice location.- Returns:
- the image frame title
-
testParameter
protected boolean testParameter(java.lang.String str, double minValue, double maxValue)Tests that the entered parameter is in range.- Parameters:
str- the value entered by the userminValue- the minimum value this variable may be set tomaxValue- the maximum value this variable may be set to- Returns:
- boolean result of test
-
updateHistoLUTFrame
@Deprecated protected void updateHistoLUTFrame(int imageAorB)
Deprecated.Displays histoLUT frame for a gray scale image.- Parameters:
imageAorB- whether to show the IMAGE_A, IMAGE_B or IMAGE_A_B lut frame
-
updateHistoLUTFrame
@Deprecated protected void updateHistoLUTFrame(int imageAorB, ViewJComponentEditImage compImg)Deprecated.Displays histoLUT frame for a gray scale image.- Parameters:
imageAorB- whether to show the IMAGE_A, IMAGE_B or IMAGE_A_B lut framecompImg- the component image with the image histogram frames to update
-
updateHistoRGBFrame
@Deprecated protected void updateHistoRGBFrame(int imageAorB)
Deprecated.Displays histoRGB frame for an RGB image.- Parameters:
imageAorB- indicates whether to show IMAGE_A, IMAGE_B or IMAGE_A_B (both).
-
updateHistoRGBFrame
@Deprecated protected void updateHistoRGBFrame(int imageAorB, ViewJComponentEditImage compImg)Deprecated.Displays histoRGB frame for an RGB image.- Parameters:
imageAorB- indicates whether to show IMAGE_A, IMAGE_B or IMAGE_A_B (both).compImg- the component image with the image histogram frames to update
-
adjustScrollbars
private void adjustScrollbars(int x, int y)DOCUMENT ME!- Parameters:
x- inty- int
-
computeIdealWindowSize
protected void computeIdealWindowSize()
private void computeIdealWindowSize() This method will enlarge or shrink the window size in response to the componentImage being zoomed. It will only resize the window to IMAGE_SCREEN_RATIO of the screen size, in this case 3/5. If the image is zoomed past that size, scrollbars are added. If the user has dragged the window to a size larger than 3/5 of screen size, I assume he wants it that way and the window will not be resized in that case upon zoom-in.
-
init
private void init(ModelLUT LUTa, java.awt.Dimension loc, boolean logMagDisplay) throws java.lang.OutOfMemoryError
Initializes the frame and variables.- Parameters:
LUTa- LUT of the imageA (if null grayscale LUT is constructed)loc- location where image should be initially placedlogMagDisplay- a boolean indicating if the log magnitude of image should be displayed.- Throws:
java.lang.OutOfMemoryError- if enough memory cannot be allocated for the GUI
-
initComponentImage
protected void initComponentImage(int[] extents) throws java.lang.OutOfMemoryErrorCreates and initializes the component image for the given image.- Parameters:
extents- the image dimensionality.- Throws:
java.lang.OutOfMemoryError- if enough memory cannot be allocated for this method
-
isMultipleImages
private boolean isMultipleImages()
Helper method to establish if there are other images so that a dialog can be created. Used by registration methods, load frame, etc.- Returns:
trueif there are images to operate on.
-
isMultipleSameSizeImages
private boolean isMultipleSameSizeImages(boolean isForCalculator)
Helper method to establish if there are images of the same dimensionality so that a dialog can be created. Used by image calculator, concat, etc.- Parameters:
isForCalculator- whether this call is being done before using the image calculator- Returns:
trueif there are images to operate on.
-
propagatePaintToAllSlices
private void propagatePaintToAllSlices()
DOCUMENT ME!
-
propagatePaintToNextSlice
private void propagatePaintToNextSlice()
DOCUMENT ME!
-
propagatePaintToPreviousSlice
private void propagatePaintToPreviousSlice()
DOCUMENT ME!
-
checkForActiveVOIs
private boolean checkForActiveVOIs()
-
convertVOITBI
private void convertVOITBI()
-
surfaceReconstructionTBI
private void surfaceReconstructionTBI()
-
saveMergedVOIs
private void saveMergedVOIs()
This method merges the 3 axial, sagittal, coronal VOIs and save them into one cloudy points file. This function is used by the prostate surface reconstruction analysis.
-
reconstructSurfaceFromVOIs
private void reconstructSurfaceFromVOIs()
Reconstruct the prostate surface from the coarse VOIs cloudy points.
-
saveProstateFeatures
private void saveProstateFeatures()
-
saveProstateFeatures2D
private void saveProstateFeatures2D()
-
saveProstateBoundaryFeature
private void saveProstateBoundaryFeature()
-
testProstateFeatures2D
private void testProstateFeatures2D()
-
testProstateFeatures
public void testProstateFeatures()
-
testProstateFeaturesClassification
private void testProstateFeaturesClassification()
-
testProstateFeaturesTrain
private void testProstateFeaturesTrain()
-
testProstateBoundaryFeatureTrain
private void testProstateBoundaryFeatureTrain()
-
generateAtlasImage
private void generateAtlasImage()
Read the 3D atlas images directory, convert each 3D image to 2D slices based atlas. And save the final 2D slice and corresponding VOIs to specified atlas directory.
-
generateEndingSlices
private void generateEndingSlices()
-
aamGroups
private void aamGroups()
-
aamGroupRename
private void aamGroupRename()
-
aamClassification
private void aamClassification()
-
deepCNNTrain
private void deepCNNTrain()
-
deepCNNTest
private void deepCNNTest()
-
deepCNNConvert
private void deepCNNConvert()
-
deepKneesAtlas
private void deepKneesAtlas()
-
deepKneesMap
private void deepKneesMap()
-
deepCNNMap
private void deepCNNMap()
-
hedCNNMap
private void hedCNNMap()
-
aamMLClassification
private void aamMLClassification()
-
extractCEFeature
private void extractCEFeature()
-
loadProstateMask
private void loadProstateMask()
-
prostateSemiAutoBSplineFuzzyC
private void prostateSemiAutoBSplineFuzzyC()
-
prostateSemiAutoBSpline
private void prostateSemiAutoBSpline()
-
initVOI
protected void initVOI()
Initialize the 3D VOI interface.
-
getCenterPt
public WildMagic.LibFoundation.Mathematics.Vector3f getCenterPt()
- Specified by:
getCenterPtin interfaceVOIManagerInterfaceListener
-
getFrame
public javax.swing.JFrame getFrame()
- Specified by:
getFramein interfaceVOIManagerInterfaceListener
-
getVOIManager
public VOIManagerInterface getVOIManager()
- Specified by:
getVOIManagerin interfaceVOIManagerInterfaceListener
-
PointerActive
public void PointerActive(boolean bActive)
- Specified by:
PointerActivein interfaceVOIManagerInterfaceListener
-
PropDown
public WildMagic.LibFoundation.Mathematics.Vector3f PropDown(int iActive)
- Specified by:
PropDownin interfaceVOIManagerInterfaceListener
-
PropUp
public WildMagic.LibFoundation.Mathematics.Vector3f PropUp(int iActive)
- Specified by:
PropUpin interfaceVOIManagerInterfaceListener
-
create3DVOI
public void create3DVOI(boolean bIntersection)
- Specified by:
create3DVOIin interfaceVOIManagerInterfaceListener
-
setActiveImage
public void setActiveImage(ModelImage kImage)
- Specified by:
setActiveImagein interfaceVOIManagerInterfaceListener
-
setCenter
public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
- Specified by:
setCenterin interfaceVOIManagerInterfaceListener
-
setCursor
public void setCursor(java.awt.Cursor kCursor)
- Specified by:
setCursorin interfaceVOIManagerInterfaceListener- Overrides:
setCursorin classjava.awt.Window
-
setModified
public void setModified()
- Specified by:
setModifiedin interfaceVOIManagerInterfaceListener
-
updateData
public void updateData()
- Specified by:
updateDatain interfaceVOIManagerInterfaceListener
-
getActiveLUT
public ModelLUT getActiveLUT()
- Specified by:
getActiveLUTin interfaceVOIManagerInterfaceListener
-
getActiveRGB
public ModelRGB getActiveRGB()
- Specified by:
getActiveRGBin interfaceVOIManagerInterfaceListener
-
setPaintMask
public void setPaintMask(java.util.BitSet mask)
- Specified by:
setPaintMaskin interfaceVOIManagerInterfaceListener
-
paintToShortMask
public void paintToShortMask()
- Specified by:
paintToShortMaskin interfaceVOIManagerInterfaceListener
-
paintToUbyteMask
public void paintToUbyteMask()
- Specified by:
paintToUbyteMaskin interfaceVOIManagerInterfaceListener
-
maskToPaint
public void maskToPaint()
- Specified by:
maskToPaintin interfaceVOIManagerInterfaceListener
-
getFrameLandMarkPoints
public int[] getFrameLandMarkPoints()
Get the frame four corner landmark points.- Returns:
- landmark points result[0] = startX; result[1] = startY; result[2] = endX; result[3] = endY;
-
addSphereVOIs
public void addSphereVOIs(VOI annotations)
- Specified by:
addSphereVOIsin interfaceVOIManagerInterfaceListener
-
-