Class Bvv


public class Bvv extends AbstractBigViewer
Support for Big Volume Viewer.
  • Constructor Details

    • Bvv

      public Bvv()
      Constructor for standalone BVV instance.
    • Bvv

      public Bvv(SNT snt)
      Constructor for assembling a BVV instance tethered to SNT.
      Parameters:
      snt - the snt instance providing paths and imagery to be rendered
  • Method Details

    • getInstance

      public static Bvv getInstance()
      Returns the most recently created Bvv instance, or null if none has been created yet. Convenience accessor for scripts.
      Returns:
      the last initialised Bvv, or null
    • show

      public <T extends net.imglib2.type.numeric.RealType<T>> bvv.vistools.BvvSource show(net.imglib2.RandomAccessibleInterval<T> img, double... calibration)
      Displays the BVV viewer with the specified image.
      Type Parameters:
      T - the numeric type of the image data
      Parameters:
      img - the image data to display
      calibration - optional calibration values for x, y, z dimensions. If null, defaults to {1, 1, 1}
      Returns:
      the BvvSource representing the displayed image
    • show

      public <T extends net.imglib2.type.numeric.RealType<T>> bvv.vistools.BvvSource show(net.imagej.ImgPlus<T> imgPlus)
    • show

      public <T extends net.imglib2.type.numeric.RealType<T>> List<BvvMultiSource> show(List<net.imglib2.RandomAccessibleInterval<T>> imgs, List<double[]> calibrations)
      Displays a list of RandomAccessibleInterval volumes, each as a BvvMultiSource. All volumes are added to the same BVV window.
      Type Parameters:
      T - the numeric type
      Parameters:
      imgs - the volumes to display
      calibrations - per-image calibration arrays (x, y, z pixel sizes); may be null to use defaults of {1,1,1}
      Returns:
      list of BvvMultiSource, one per volume
    • getMultiSources

      public List<BvvMultiSource> getMultiSources()
      Returns all BvvMultiSource groups currently managed by this viewer. This includes multichannel images and any grouped multi-image sources.
      Returns:
      unmodifiable list of BvvMultiSource groups
    • setChannelColors

      public void setChannelColors(String... colorNames)
      Script-friendly method for setting per-channel colors
      Parameters:
      colorNames - color representations (HTML/css values, or hex)
      See Also:
    • setChannelColors

      public void setChannelColors(BvvMultiSource group, Color... colors)
      Sets per-channel colors for a specific source group. Each color is applied to the corresponding channel in order; extra colors are ignored, and channels without a supplied color are left unchanged. Typical script usage:
         def bvv = Bvv.open([reference, moving])
         bvv.setChannelColors(bvv.getMultiSources().get(0), Color.RED, Color.GREEN, Color.BLUE)
       
      Parameters:
      group - the target source group, obtained from getMultiSources()
      colors - one color per channel, in channel order
    • setChannelColors

      public void setChannelColors(Color... colors)
      Sets per-channel colors across all source groups, assigning colors sequentially by global channel order across all groups. For example, with two 3-channel images and colors [R, G, B, C, M, Y], image 1 gets R/G/B and image 2 gets C/M/Y. With a single multichannel image or a dataset where each setup is its own group (e.g. IMS), colors are assigned one-to-one in load order.

      To apply the same color pattern to every group independently, call setChannelColors(BvvMultiSource, Color...) per group.

      Typical script usage:
         def bvv = Bvv.open(img)
         bvv.setChannelColors(Color.RED, Color.GREEN, Color.BLUE)
       
      Parameters:
      colors - colors assigned sequentially across all channels in all groups
    • setDisplayRange

      public void setDisplayRange(BvvMultiSource group, double min, double max)
      Sets the display range (min/max intensity) for all channels of a specific source group.
      Parameters:
      group - the target source group, obtained from getMultiSources()
      min - the minimum intensity value (maps to black)
      max - the maximum intensity value (maps to full color)
    • open

      public static Bvv open(ij.ImagePlus... imps)
      Convenience factory: creates a standalone BVV viewer and displays one or more ImagePlus volumes in one step. Multichannel images have their channels grouped and transformed together.

      Equivalent to:

         Bvv bvv = new Bvv();
         bvv.show(imp); // single image
         bvv.show(Arrays.asList(ref, moving)); // multiple images
       
      Typical Groovy/PySNT usage:
         def bvv = Bvv.open(imp)               // single image
         def bvv = Bvv.open(reference, moving) // multiple images
       
      Parameters:
      imps - one or more images to display; all are added to the same BVV window
      Returns:
      the fully initialised Bvv instance
      Throws:
      IllegalArgumentException - if an image type is unsupported (COLOR_256)
    • open

      @SafeVarargs public static <T extends net.imglib2.type.numeric.RealType<T>> Bvv open(net.imagej.ImgPlus<T>... imgs)
      Convenience factory: creates a standalone BVV viewer and displays one or more ImgPlus volumes in one step. Calibration (pixel sizes) is read automatically from each ImgPlus's metadata.

      Equivalent to:

         Bvv bvv = new Bvv();
         bvv.show(img);  // single image
       
      Typical Groovy/PySNT usage:
         def bvv = Bvv.open(imgPlus)
         def bvv = Bvv.open(imgPlus1, imgPlus2)
       
      Type Parameters:
      T - the numeric type of the image data
      Parameters:
      imgs - one or more volumes to display; all are added to the same BVV window
      Returns:
      the fully initialised Bvv instance
    • open

      public static Bvv open(List<?> imgs)
      Script friendly convenience factory: creates a standalone BVV viewer and displays a list of images in one step. Accepts any mix of ImagePlus, ImgPlus, or RandomAccessibleInterval objects.

      Typical Groovy/PySNT usage:

         def bvv = Bvv.open([reference, moving])
         def bvv = Bvv.open(myImageList)
       
      Parameters:
      imgs - the images to display; all are added to the same BVV window. Each element must be an ImagePlus, ImgPlus, or RandomAccessibleInterval
      Returns:
      the fully initialised Bvv instance
      Throws:
      IllegalArgumentException - if any element is null or of an unsupported type
    • open

      public static Bvv open(SNT snt)
      Convenience factory: creates a BVV instance tethered to the given SNT instance and immediately displays its currently loaded image data.

      Equivalent to:

         Bvv bvv = new Bvv(snt);
         bvv.showLoadedData();
       
      Typical Groovy/PySNT usage:
         def bvv = Bvv.open(snt)
         bvv.add(snt.getPathAndFillManager().getTrees())
       
      Parameters:
      snt - the SNT instance providing image data and paths
      Returns:
      the fully initialised Bvv instance tethered to snt
      Throws:
      IllegalArgumentException - if no valid image data is loaded in snt
    • open

      public static Bvv open(mpicbg.spim.data.generic.AbstractSpimData<?> spimData)
      Convenience factory: creates a standalone BVV viewer and displays a AbstractSpimData dataset using BVV's pyramid-aware GPU cache manager. Unlike the ImgPlus/ImagePlus paths, this does not attempt to upload the entire volume at once: data is streamed as tiles on demand, making it suitable for out-of-core datasets.

      The caller is responsible for constructing the AbstractSpimData object, typically via an XML/HDF5 loader:

         import bdv.spimdata.XmlIoSpimDataMinimal
         spimData = new XmlIoSpimDataMinimal().load("/path/to/dataset.xml")
         def bvv = Bvv.open(spimData)
       
      or via Bio-Formats/IMS loaders that produce a AbstractSpimData with a multiresolution pyramid.
      Parameters:
      spimData - the dataset to display
      Returns:
      the fully initialised Bvv instance
    • open

      public static Bvv open(String filePathOrUrl)
      Convenience factory: opens a file path into a BVV viewer. See open(String...) for supported formats and behavior.
      Parameters:
      filePathOrUrl - the file path or URL to open
      Returns:
      the fully initialised Bvv instance
      Throws:
      IllegalArgumentException - if the file cannot be opened or an .ims directory is not writable
    • open

      public static Bvv open(String... paths)
      Convenience factory: opens one or more file paths into the same BVV viewer window, choosing the most appropriate loading strategy per file:
      • .ims Imaris HDF5: creates a BDV XML sidecar file next to the .ims file (using the same base name, e.g. dataset.xml), then loads it via XmlIoSpimDataMinimal. BVV's pyramid-aware GPU cache manager is used, so the full volume is never loaded into RAM. If the directory is not writable, an IllegalArgumentException is thrown with instructions to create the XML manually using Plugins > BigDataViewer > Create XML for Imaris file.
      • .xml BDV XML/HDF5: loaded directly via XmlIoSpimDataMinimal and displayed using BVV's cache manager. This covers BDV HDF5 and BDV N5 datasets.
      • .n5 / .zarr directories: opened directly via n5-viewer_fiji (no XML sidecar) and displayed using BVV's cache manager. This covers plain N5 multiscale groups and OME-NGFF (OME-Zarr) containers.
      • anything else delegated to ImgUtils.open(String) and displayed via the standard ImgPlus path. Very large flat volumes will fail with a descriptive error rather than a GL crash.
      Typical Groovy/PySNT usage:
         def bvv = Bvv.open("/path/to/reference.xml", "/path/to/moving.ims")
       
      Parameters:
      paths - one or more file paths or URLs to open
      Returns:
      the fully initialised Bvv instance
      Throws:
      IllegalArgumentException - if any file cannot be opened or an .ims directory is not writable
    • show

      public List<BvvMultiSource> show(mpicbg.spim.data.generic.AbstractSpimData<?> spimData)
      Displays a AbstractSpimData dataset using BVV's pyramid-aware GPU cache manager. Each setup (channel/angle) is added as a source and wrapped in a BvvMultiSource. Unlike the ImgPlus/ImagePlus paths, the full volume is never loaded into RAM or GPU at once.
      Parameters:
      spimData - the dataset to display
      Returns:
      list of BvvMultiSource, one per BDV setup, in setup order
    • show

      public List<BvvMultiSource> show(SpimDataUtils.N5Sources n5Sources)
      Displays sources loaded from an N5 or OME-Zarr container (see SpimDataUtils.resolvePathToSource(String)), using BVV's pyramid-aware GPU cache manager. Unlike show(AbstractSpimData), there is no BDV-XML descriptor or AbstractSpimData involved: sources are built directly using n5-viewer_fiji.
      Parameters:
      n5Sources - the sources to display
      Returns:
      list containing a single BvvMultiSource grouping all setups
    • show

      public bvv.vistools.BvvSource show(ij.ImagePlus imp)
      Displays the BVV viewer with the specified image.
      Parameters:
      imp - the ImagePlus to display
      Returns:
      the BvvSource representing the displayed image
      Throws:
      IllegalArgumentException - if the image type is unsupported (COLOR_256)
    • add

      public void add(Object object)
      Script friendly method to add a supported object (Tree, DirectedWeightedGraph, Path) to the viewer overlay. Collections are also supported, which is an effective way of adding multiple items since the scene is only updated once all items have been added.
      Overrides:
      add in class AbstractBigViewer
      Parameters:
      object - the object to be added; null is silently ignored
      Throws:
      IllegalArgumentException - if object is not a supported type
    • add

      protected void add(Object object, boolean updateScene)
      Internal dispatcher with deferred sync support. Extends the parent's handling with support for Path objects and null-tolerant behavior.
      Overrides:
      add in class AbstractBigViewer
    • add

      public void add(File[] reconstructionFiles)
      Loads reconstruction files and adds them to the viewer with live progress feedback. Files are loaded one at a time on a background thread; the viewer scene is updated after each file so the user sees trees appearing incrementally. The progress bar in the SNT Annotations card tracks progress.
      Overrides:
      add in class AbstractBigViewer
      Parameters:
      reconstructionFiles - the reconstruction files (SWC, JSON, etc.) to load
    • updateStatus

      public void updateStatus(String message, int step, int nSteps)
      Updates the progress bar at the bottom of the BVV frame.
      • nSteps = 0: hides the bar
      • nSteps < 0: indeterminate mode (animated, no percentage)
      • nSteps > 0: determinate mode showing step/nSteps
      Safe to call from any thread.
      Parameters:
      message - short status message displayed inside the bar
      step - current step (0-based; ignored in indeterminate mode)
      nSteps - total steps (0 = hide, negative = indeterminate)
    • syncOverlays

      public void syncOverlays()
      Updates the viewer display to reflect changes in rendered trees and paths. This method should be called after modifying the collection of rendered objects to ensure the display is synchronized.
      Specified by:
      syncOverlays in class AbstractBigViewer
    • annotations

      public Bvv.AnnotationOverlay annotations()
      Description copied from class: AbstractBigViewer
      Returns the annotation overlay for this viewer. The overlay renders point markers in the viewer's world coordinate space. May return null if the viewer has not been opened yet.
      Specified by:
      annotations in class AbstractBigViewer
    • repaint

      public void repaint()
      Forces a repaint of the viewer, updating volume renderings but not overlays.
      Specified by:
      repaint in class AbstractBigViewer
    • resetView

      public void resetView()
      Resets the viewer to a fit-to-viewport transform, centering the loaded volume in the canvas. Equivalent to the Reset button in Camera Controls. No-op if no volume has been loaded.
      Specified by:
      resetView in class AbstractBigViewer
    • snapshot

      public ij.ImagePlus snapshot()
      Retrieves the current scene as an image.
      Returns:
      the bitmap image of the current scene
    • snapshot

      public ij.ImagePlus snapshot(String viewMode)
      Retrieves the specified scene view as an image. Must be called from a non-EDT thread (e.g. a script or SwingWorker), otherwise the render latch will time out.
      Parameters:
      viewMode - the view mode (case-insensitive): "xy", "xz", "yz", "default" (fit-to-viewport), or "current" (scene as-is).
      Returns:
      the bitmap image of the scene view, or null if the viewer is not initialized
    • saveSnapshot

      public boolean saveSnapshot(String filePath)
      Saves a snapshot of current scene as a PNG image to the specified path.
      Parameters:
      filePath - the absolute path of the destination file
      Returns:
      true, if file was successfully saved
    • getViewerFrame

      public bvv.core.VolumeViewerFrame getViewerFrame()
      Description copied from class: AbstractBigViewer
      Returns the top-level Swing window for this viewer, or null if not yet open.
      Specified by:
      getViewerFrame in class AbstractBigViewer
      Returns:
      a reference to the viewer's frame.
    • getViewerSplitPanel

      protected JSplitPane getViewerSplitPanel()
      Description copied from class: AbstractBigViewer
      Returns the JSplitPane that separates the viewer canvas from the card panel. Both BDV and BVV frames expose this via their own getSplitPanel() methods, but those classes share no common supertype above JFrame, so this method lets subclasses expose the split pane without the abstract method returning a viewer-specific frame type.
      Specified by:
      getViewerSplitPanel in class AbstractBigViewer
    • getOptions

      public bvv.vistools.BvvOptions getOptions()
      Returns:
      a reference to the viewer's options.
    • getViewer

      public bvv.core.BigVolumeViewer getViewer()
      Returns:
      a reference to the underlying BigVolumeViewer instance.
    • getViewerPanel

      public bvv.core.VolumeViewerPanel getViewerPanel()
      Returns:
      a reference to the viewer's panel.
    • getRenderingOptions

      public AbstractBigViewer.PathRenderingOptions getRenderingOptions()
      Gets the path rendering options for controlling thickness, transparency, etc.
      Overrides:
      getRenderingOptions in class AbstractBigViewer
      Returns:
      the rendering options
    • isOpen

      public boolean isOpen()
      Description copied from class: AbstractBigViewer
      Returns true if the viewer window is currently visible and usable.
      Specified by:
      isOpen in class AbstractBigViewer
    • getViewerWidth

      public int getViewerWidth()
      Description copied from class: AbstractBigViewer
      Returns the width of the viewer canvas in logical pixels, or 0 if the viewer is not yet initialized.
      Specified by:
      getViewerWidth in class AbstractBigViewer
    • getViewerHeight

      public int getViewerHeight()
      Description copied from class: AbstractBigViewer
      Returns the height of the viewer canvas in logical pixels, or 0 if the viewer is not yet initialized.
      Specified by:
      getViewerHeight in class AbstractBigViewer
    • getViewerTransform

      public net.imglib2.realtransform.AffineTransform3D getViewerTransform()
      Description copied from class: AbstractBigViewer
      Returns a snapshot of the current viewer-to-screen (world-to-screen) transform. The returned object is a copy; callers may modify it freely.
      Specified by:
      getViewerTransform in class AbstractBigViewer
    • getCurrentSource

      protected bdv.viewer.SourceAndConverter<?> getCurrentSource()
      Description copied from class: AbstractBigViewer
      Returns the currently active source, or null if none.
      Specified by:
      getCurrentSource in class AbstractBigViewer
    • getViewerAction

      protected Action getViewerAction(String name)
      Description copied from class: AbstractBigViewer
      Looks up a named action from the viewer's keybindings action map. Returns null if the action is not registered or the viewer is not ready.
      Specified by:
      getViewerAction in class AbstractBigViewer
      Parameters:
      name - the action key (e.g., "align XY plane")
    • addMouseListenerToDisplay

      public void addMouseListenerToDisplay(MouseListener ml)
      Description copied from class: AbstractBigViewer
      Adds a mouse listener to the viewer's canvas component so that click events on the display surface can be handled (e.g. for hit testing annotation markers).
      Specified by:
      addMouseListenerToDisplay in class AbstractBigViewer
      Parameters:
      ml - the listener to add
    • setViewerTransform

      public void setViewerTransform(net.imglib2.realtransform.AffineTransform3D target, long durationMs)
      Description copied from class: AbstractBigViewer
      Animates the viewer transform to target over durationMs milliseconds. Use durationMs = 0 for an immediate jump.
      Specified by:
      setViewerTransform in class AbstractBigViewer
      Parameters:
      target - the desired world-to-screen transform
      durationMs - animation duration in milliseconds (0 = immediate)
    • showViewerMessage

      public void showViewerMessage(String msg)
      Description copied from class: AbstractBigViewer
      Displays a short status message in the viewer's overlay area.
      Specified by:
      showViewerMessage in class AbstractBigViewer
      Parameters:
      msg - the message to show
    • getGlobalMouseCoordinates

      public void getGlobalMouseCoordinates(net.imglib2.RealPoint pos)
      Description copied from class: AbstractBigViewer
      Writes the current global (world-space) mouse position into pos. Callers must supply a pre-allocated RealPoint with at least 3 dimensions.
      Specified by:
      getGlobalMouseCoordinates in class AbstractBigViewer
      Parameters:
      pos - 3D point to receive the world-space cursor position
    • findClickRay

      public double[][] findClickRay()
      Returns the world-space endpoints of the perspective ray through the current mouse cursor position: result[0] = near-clip world point, result[1] = far-clip world point. Returns null if the mouse is outside the display or the viewer is not initialized.

      The ray correctly accounts for BVV's perspective projection (pf = dCam/(dCam+viewerZ)), giving a well-defined 3D ray for every screen pixel regardless of where the volume's focal plane sits. Use this instead of getGlobalMouseCoordinates(net.imglib2.RealPoint) when the Z coordinate of the picked point is important (e.g. landmark placement).

    • findClickRayMaxima

      public double[] findClickRayMaxima()
      Finds the world-space point of maximum intensity along the perspective ray through the current mouse cursor position.

      Casts a ray from the near clip plane to the far clip plane, samples the active source at 0.5-voxel intervals, and refines the peak location to sub-voxel accuracy via a 3-point parabola fit. Use this for landmark placement when the Z coordinate from the focal plane alone is unreliable.

      Returns:
      world-space [x, y, z] of the intensity maximum, or null if the ray misses the volume, the mouse is outside the display, or no source is loaded
    • getDefaultMarkerSize

      public float getDefaultMarkerSize()
      Description copied from class: AbstractBigViewer
      Returns the default sphere radius (in physical units) for newly placed markers. Implementations typically derive this from their rendering-options or a sensible default.
      Specified by:
      getDefaultMarkerSize in class AbstractBigViewer
    • getDefaultMarkerColor

      public Color getDefaultMarkerColor()
      Description copied from class: AbstractBigViewer
      Returns the default color for newly placed markers, or null to use the viewer's own fallback color.
      Specified by:
      getDefaultMarkerColor in class AbstractBigViewer
    • createMarkerManager

      protected BookmarkManager createMarkerManager()
      Description copied from class: AbstractBigViewer
      Creates and returns a new BookmarkManager for this viewer. Called exactly once (lazily) by AbstractBigViewer.getMarkerManager().
      Specified by:
      createMarkerManager in class AbstractBigViewer
    • setCalibration

      public void setCalibration(double[] spacing, String unit)
      Overrides the voxel calibration (spacing and unit) for all loaded sources. This is useful when the image metadata does not carry the correct spatial calibration (e.g., ND2 files opened via SCIFIO/Bio-Formats where the unit string is lost). The change takes effect immediately: the scale bar, distance measurements, and slab-thickness controls will all use the new values.
      Overrides:
      setCalibration in class AbstractBigViewer
      Parameters:
      spacing - voxel size in {x, y, z} order
      unit - physical unit string (e.g. "µm")
    • setDisplayRadii

      public void setDisplayRadii(boolean display)
      Sets whether paths are rendered as tapered frusta with per-node radii (true) or as anti-aliased lines (false). Line rendering is significantly faster for datasets with many paths. Automatically invalidates the overlay cache and repaints.
      Specified by:
      setDisplayRadii in class AbstractBigViewer
      Parameters:
      display - true for frustum/radius rendering (default), false for fast line rendering
    • getDisplayRadii

      public boolean getDisplayRadii()
      Returns whether paths are currently rendered with per-node radii as tapered frusta (true) or as simple lines (false).
      Returns:
      true if frustum/radius rendering is active
    • setCanvasOffset

      public void setCanvasOffset(double offsetX, double offsetY, double offsetZ)
      Offsets all paths being rendered. This allows for 'dislodging' paths from their underlying signal without altering their coordinates.
      Specified by:
      setCanvasOffset in class AbstractBigViewer
      Parameters:
      offsetX - X offset (calibrated distance)
      offsetY - Y offset (calibrated distance)
      offsetZ - Z offset (calibrated distance)
    • isPathRenderingEnabled

      protected boolean isPathRenderingEnabled()
      Description copied from class: AbstractBigViewer
      Returns true if path/tree overlay rendering is currently enabled.
      Specified by:
      isPathRenderingEnabled in class AbstractBigViewer
    • setPathRenderingEnabled

      protected void setPathRenderingEnabled(boolean enabled)
      Description copied from class: AbstractBigViewer
      Enables or disables path/tree overlay rendering.
      Specified by:
      setPathRenderingEnabled in class AbstractBigViewer
    • showLoadedData

      public bvv.vistools.BvvSource showLoadedData()
      Displays the main tracing data from the associated SNT instance. This method is only available for BVV instances that are tethered to an SNT instance.
      Returns:
      the BvvSource representing the displayed tracing data
      Throws:
      IllegalArgumentException - if this is a standalone viewer or no valid image data is available
    • showSecondaryData

      public bvv.vistools.BvvSource showSecondaryData()
      Displays the secondary tracing data from the associated SNT instance. This method is only available for BVV instances that are tethered to an SNT instance.
      Returns:
      the BvvSource representing the displayed secondary data
      Throws:
      IllegalArgumentException - if this is a standalone viewer or no valid image data is available
    • syncPathManagerList

      public boolean syncPathManagerList()
      Synchronizes the Path Manager contents with BVV display.
      Overrides:
      syncPathManagerList in class AbstractBigViewer
      Returns:
      true if synchronization was successful
      Throws:
      IllegalArgumentException - if this is a standalone viewer not tethered to a SNT instance
    • updateSelection

      public void updateSelection()
      Lightweight alternative to syncPathManagerList() for pure selection changes. Patches color/thickness in place for already-rendered trees instead of rebuilding the Path Manager's tree grouping and recomputing screen-space geometry for the whole scene. Does nothing if paths haven't been rendered yet (e.g., before the first sync); The next syncPathManagerList() call renders and colors them correctly regardless.
      Throws:
      IllegalArgumentException - if this viewer is not tethered to a SNT instance
    • getPhysicalUnit

      public String getPhysicalUnit()
      Resolves the physical unit string for the currently loaded volume. Checks (in order): calUnit field, SNT spacing units, first source's VoxelDimensions (same source used by the scale bar renderer).
      Overrides:
      getPhysicalUnit in class AbstractBigViewer
    • captureKeyframe

      public Bvv.Keyframe captureKeyframe()
      Captures the current viewer state as a Bvv.Keyframe. The transform, camera/slab parameters, and visible actor set are all snapshotted.
      Returns:
      the current state as a Keyframe
    • accel

      public static double accel(double t, int type)
      Easing functions for keyframe transitions, adapted from BDV movie recorder.
      Parameters:
      t - progress value in [0, 1]
      type - easing type: 0 = symmetric, 1 = slow start, 2 = slow end, 3 = soft symmetric, 4 = soft slow start, 5 = soft slow end
      Returns:
      eased progress value in [0, 1]
    • playback

      public void playback(List<Bvv.Keyframe> keyframes)
      Plays back an animation between keyframes in the viewer without saving frames. Useful for previewing a movie before committing to a render. The frame count for each transition is read from Bvv.Keyframe.frames on the destination keyframe.
      Parameters:
      keyframes - ordered list of keyframes (at least 2)
      See Also:
    • playback

      public void playback(List<Bvv.Keyframe> keyframes, int from, int to)
      Plays back a subset of keyframes (from index from to index to, inclusive). Useful for previewing a specific transition without replaying the entire sequence.
      Parameters:
      keyframes - ordered list of all keyframes
      from - start index (inclusive, 0-based)
      to - end index (inclusive, 0-based)
      See Also:
    • renderFrames

      public void renderFrames(List<Bvv.Keyframe> keyframes, String outputDir)
      Renders an animation between a list of keyframes, saving each frame as a PNG screenshot. The transform is interpolated smoothly between keyframes using SimilarityTransformAnimator; visibility and slab bounds snap at keyframe boundaries (no interpolation).

      The number of frames for each transition is read from Bvv.Keyframe.frames on each destination keyframe (the first keyframe's value is ignored).

      This method must be called from a non-EDT thread. It blocks until all frames have been rendered and saved.

      Parameters:
      keyframes - ordered list of keyframes (at least 2)
      outputDir - directory where PNGs will be saved (created if needed); if null, frames are played back live without saving
      Throws:
      IllegalArgumentException - if arguments are inconsistent
      IllegalStateException - if no BVV viewer is active