Package sc.fiji.snt
Class MultiPathTracerCanvas
java.lang.Object
java.awt.Component
java.awt.Canvas
ij.gui.ImageCanvas
sc.fiji.snt.hyperpanes.MultiDThreePanesCanvas
sc.fiji.snt.TracerCanvas
sc.fiji.snt.MultiPathTracerCanvas
- All Implemented Interfaces:
MouseListener,MouseMotionListener,ImageObserver,MenuContainer,Serializable,Cloneable,EventListener,Accessible
TracerCanvas variant that renders a caller-supplied collection of Paths: each in its own color,
with one entry optionally "highlighted".
Intended for read-only wizard windows (e.g. the cost-function wizard). Supplied paths should already have their
canvasOffset configured if the canvas image is a cropped sub-volume of the source (so node coordinates
line up with the displayed cropped image).
- Author:
- Tiago Ferreira
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne painted path: the path itself, its base color, and whether to highlight itNested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvasNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class sc.fiji.snt.TracerCanvas
eitherSide, just_near_slices, pathAndFillManager, searchArtistsFields inherited from class sc.fiji.snt.hyperpanes.MultiDThreePanesCanvas
cursorLocked, owner, plane, waitingForRoiDrawingFields inherited from class ij.gui.ImageCanvas
crosshairCursor, defaultCursor, dstHeight, dstWidth, flags, handCursor, ij, imageHeight, imageUpdated, imageWidth, imp, lastZoomSX, lastZoomSY, magnification, MAX_MOUSEMOVE_ZOOM, moveCursor, srcRect, usePointer, xMouse, xMouseStart, xSrcStart, yMouse, yMouseStart, ySrcStart, zoomTargetOX, zoomTargetOYFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionMultiPathTracerCanvas(ij.ImagePlus imp, SNT snt, PathAndFillManager pafm) Builds the canvas. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends a single entry without repaintingvoidClears all entriesprotected voidReplaces the parent's PAFM-iterating draw loop with our entry list.voidsetDimmedAlpha(int inBand, int outOfBand) Sets the in-band / out-of-band transparency for non-highlighted entries (percent).voidsetEitherSide(int either_side) Sets the z-slice band (either side of the current slice) over which paths still render (with reduced alpha).voidReplaces the current set of painted entries with the supplied list.voidsetHighlightedAlpha(int inBand, int outOfBand) Sets the in-band / out-of-band transparency for highlighted entries (percent).Methods inherited from class sc.fiji.snt.TracerCanvas
addSearchArtist, getDefaultTransparency, getEitherSide, getOutOfBoundsTransparency, getPlane, isJustNearSlices, nodeDiameter, paint, removeSearchArtist, resetBackBuffer, setDefaultTransparency, setNodeDiameter, setOutOfBoundsTransparencyMethods inherited from class sc.fiji.snt.hyperpanes.MultiDThreePanesCanvas
disableEvents, drawCrosshairs, getAnnotationsColor, getCanvasLabel, getCursorPos, getGraphics2D, getViewPort, isEventsDisabled, mouseDragged, myOffScreenX, myOffScreenXD, myOffScreenY, myOffScreenYD, myScreenX, myScreenXD, myScreenXDprecise, myScreenY, myScreenYD, myScreenYDprecise, restoreDefaultCursor, scrollTo, setAnnotationsColor, setCanvasLabel, setCanvasLabelBackground, setCrosshairs, setCursorText, setDrawCrosshairs, setLockCursor, setZoom, triggerZoomEvent, updateCursor, updatePosition, zoomIn, zoomOutMethods inherited from class ij.gui.ImageCanvas
canEnlarge, cursorOverImage, disablePopupMenu, fitToWindow, getCursorLoc, getCustomRoi, getDisplayList, getHigherZoomLevel, getImage, getLowerZoomLevel, getMagnification, getModifiers, getOverlay, getPaintPending, getPreferredSize, getScaleToFit, getShowAllColor, getShowAllList, getShowAllROIs, getSliceNumber, getSrcRect, handlePopupMenu, handleRoiMouseDown, hideZoomIndicator, mouseClicked, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offScreenX, offScreenX2, offScreenXD, offScreenY, offScreenY2, offScreenYD, repaintOverlay, resetDoubleBuffer, roiManagerSelect, screenX, screenXD, screenY, screenYD, scroll, setCursor, setCursor, setCustomRoi, setDisplayList, setDisplayList, setDisplayList, setDrawingColor, setDrawingSize, setImageUpdated, setLongClickDelay, setMagnification, setOverlay, setPaintPending, setScaleToFit, setShowAllColor, setShowAllList, setShowAllROIs, setShowCursorStatus, setSize, setSourceRect, setupScroll, unzoom, update, zoom100PercentMethods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategyMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Constructor Details
-
MultiPathTracerCanvas
Builds the canvas. Thepafmargument is required by theTracerCanvascontract but is never iterated by this subclass — pass the SNT instance's PathAndFillManager.
-
-
Method Details
-
setEntries
Replaces the current set of painted entries with the supplied list. -
clearEntries
public void clearEntries()Clears all entries -
addEntry
Appends a single entry without repainting -
setEitherSide
public void setEitherSide(int either_side) Sets the z-slice band (either side of the current slice) over which paths still render (with reduced alpha). Pass 0 for strict per-slice rendering. -
setHighlightedAlpha
public void setHighlightedAlpha(int inBand, int outOfBand) Sets the in-band / out-of-band transparency for highlighted entries (percent). -
setDimmedAlpha
public void setDimmedAlpha(int inBand, int outOfBand) Sets the in-band / out-of-band transparency for non-highlighted entries (percent). -
drawOverlay
Replaces the parent's PAFM-iterating draw loop with our entry list. SeedOverlay, SearchArtist, and crosshairs are intentionally skipped — this canvas is a passive preview, not an interactive tracing surface.- Overrides:
drawOverlayin classTracerCanvas
-