Package util

Class BDVTools

java.lang.Object
util.BDVTools

public class BDVTools extends Object
Utility methods for BigDataViewer operations. Consolidates BDV helper methods from ViewSetupExplorerPanel and FilteredAndGroupedExplorerPanel.
  • Constructor Details

    • BDVTools

      public BDVTools()
  • Method Details

    • setFusedModeSimple

      public static void setFusedModeSimple(bdv.BigDataViewer bdv, mpicbg.spim.data.generic.AbstractSpimData<?> data)
      Sets BDV to FUSED display mode and deactivates all sources.
      Parameters:
      bdv - the BigDataViewer instance
      data - the SpimData (unused but kept for API compatibility)
    • setVisibleSources

      public static void setVisibleSources(bdv.viewer.ViewerState state, Collection<? extends bdv.viewer.SourceAndConverter<?>> active)
      Sets source visibility using batch API.
      Parameters:
      state - the ViewerState
      active - collection of sources to make active (all others will be deactivated)
    • setVisibleSourcesBatch

      public static void setVisibleSourcesBatch(bdv.BigDataViewer bdv, Set<Integer> activeSetupIds)
      Sets source visibility by setup ID using BDV's batch API. Uses O(1) batch calls instead of O(n) per-source calls.
      Parameters:
      bdv - the BigDataViewer instance
      activeSetupIds - set of setup IDs that should be visible
    • whiteSourcesBatch

      public static void whiteSourcesBatch(bdv.BigDataViewer bdv)
      Sets all sources to white color using the proper ConverterSetups API.
      Parameters:
      bdv - the BigDataViewer instance
    • colorSourcesBatch

      public static void colorSourcesBatch(bdv.BigDataViewer bdv, long colorOffset)
      Colors sources sequentially using the proper ConverterSetups API.
      Parameters:
      bdv - the BigDataViewer instance
      colorOffset - offset into the color stream
    • colorByFactors

      public static void colorByFactors(bdv.BigDataViewer bdv, mpicbg.spim.data.generic.AbstractSpimData<?> data, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors, long colorOffset)
      Colors sources based on grouping factors (Tile, Illumination, etc.). Each unique combination of grouping factors gets a distinct color.
      Parameters:
      bdv - the BigDataViewer instance
      data - the SpimData
      groupingFactors - the Entity classes to group by
      colorOffset - offset into the color stream
    • whiteSources

      @Deprecated public static void whiteSources(List<bdv.tools.brightness.ConverterSetup> cs)
      Deprecated.
      Sets all sources to white using legacy API.
    • sameColorSources

      @Deprecated public static void sameColorSources(List<bdv.tools.brightness.ConverterSetup> cs, int r, int g, int b, int a)
      Deprecated.
      Use the batch methods instead
      Sets all sources to the same color using legacy API.
    • resetBDVManualTransformations

      public static void resetBDVManualTransformations(bdv.BigDataViewer bdv)
      Resets manual transformations for all views to identity.
      Parameters:
      bdv - the BigDataViewer instance
    • getBDVTimePointIndex

      public static int getBDVTimePointIndex(mpicbg.spim.data.sequence.TimePoint t, mpicbg.spim.data.generic.AbstractSpimData<?> data)
      Gets the BDV display index for a TimePoint.
      Parameters:
      t - the TimePoint
      data - the SpimData
      Returns:
      the display index in BDV
    • getBDVSourceIndex

      Gets the BDV display index for a ViewSetup.
      Parameters:
      vs - the ViewSetup
      data - the SpimData
      Returns:
      the display index in BDV