Package util
Class BDVTools
java.lang.Object
util.BDVTools
Utility methods for BigDataViewer operations.
Consolidates BDV helper methods from ViewSetupExplorerPanel and FilteredAndGroupedExplorerPanel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcolorByFactors(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.).static voidcolorSourcesBatch(bdv.BigDataViewer bdv, long colorOffset) Colors sources sequentially using the proper ConverterSetups API.static intgetBDVSourceIndex(mpicbg.spim.data.generic.sequence.BasicViewSetup vs, mpicbg.spim.data.generic.AbstractSpimData<?> data) Gets the BDV display index for a ViewSetup.static intgetBDVTimePointIndex(mpicbg.spim.data.sequence.TimePoint t, mpicbg.spim.data.generic.AbstractSpimData<?> data) Gets the BDV display index for a TimePoint.static voidResets manual transformations for all views to identity.static voidsameColorSources(List<bdv.tools.brightness.ConverterSetup> cs, int r, int g, int b, int a) Deprecated.Use the batch methods insteadstatic voidSets BDV to FUSED display mode and deactivates all sources.static voidsetVisibleSources(bdv.viewer.ViewerState state, Collection<? extends bdv.viewer.SourceAndConverter<?>> active) Sets source visibility using batch API.static voidsetVisibleSourcesBatch(bdv.BigDataViewer bdv, Set<Integer> activeSetupIds) Sets source visibility by setup ID using BDV's batch API.static voidDeprecated.UsewhiteSourcesBatch(BigDataViewer)insteadstatic voidSets all sources to white color using the proper ConverterSetups API.
-
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 instancedata- 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 ViewerStateactive- collection of sources to make active (all others will be deactivated)
-
setVisibleSourcesBatch
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 instanceactiveSetupIds- set of setup IDs that should be visible
-
whiteSourcesBatch
Sets all sources to white color using the proper ConverterSetups API.- Parameters:
bdv- the BigDataViewer instance
-
colorSourcesBatch
Colors sources sequentially using the proper ConverterSetups API.- Parameters:
bdv- the BigDataViewer instancecolorOffset- 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 instancedata- the SpimDatagroupingFactors- the Entity classes to group bycolorOffset- offset into the color stream
-
whiteSources
Deprecated.UsewhiteSourcesBatch(BigDataViewer)insteadSets 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 insteadSets all sources to the same color using legacy API. -
resetBDVManualTransformations
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 TimePointdata- the SpimData- Returns:
- the display index in BDV
-
getBDVSourceIndex
public static int getBDVSourceIndex(mpicbg.spim.data.generic.sequence.BasicViewSetup vs, mpicbg.spim.data.generic.AbstractSpimData<?> data) Gets the BDV display index for a ViewSetup.- Parameters:
vs- the ViewSetupdata- the SpimData- Returns:
- the display index in BDV
-