bdv.viewer.VisibilityAndGrouping Java Examples

The following examples show how to use bdv.viewer.VisibilityAndGrouping. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BDVRenderer.java    From 3Dscript with BSD 2-Clause "Simplified" License 6 votes vote down vote up
protected void transferChannelSettings(final CompositeImage ci, final SetupAssignments setupAssignments,
		final VisibilityAndGrouping visibility) {
	final int nChannels = ci.getNChannels();
	final int mode = ci.getCompositeMode();
	final boolean transferColor = mode == IJ.COMPOSITE || mode == IJ.COLOR;
	for (int c = 0; c < nChannels; ++c) {
		final LUT lut = ci.getChannelLut(c + 1);
		final ConverterSetup setup = setupAssignments.getConverterSetups().get(c);
		if (transferColor)
			setup.setColor(new ARGBType(lut.getRGB(255)));
		setup.setDisplayRange(lut.min, lut.max);
	}
	if (mode == IJ.COMPOSITE) {
		final boolean[] activeChannels = ci.getActiveChannels();
		visibility.setDisplayMode(DisplayMode.FUSED);
		for (int i = 0; i < activeChannels.length; ++i)
			visibility.setSourceActive(i, activeChannels[i]);
	} else
		visibility.setDisplayMode(DisplayMode.SINGLE);
	visibility.setCurrentSource(ci.getChannel() - 1);
}
 
Example #2
Source File: StitchingExplorerPanel.java    From BigStitcher with GNU General Public License v2.0 4 votes vote down vote up
public static void setVisibleSources(final VisibilityAndGrouping vag, final boolean[] active)
{
	for ( int i = 0; i < active.length; ++i )
		vag.setSourceActive( i, active[i] );
}
 
Example #3
Source File: ViewSetupExplorerPanel.java    From SPIM_Registration with GNU General Public License v2.0 4 votes vote down vote up
public static void setVisibleSources( final VisibilityAndGrouping vag, final boolean[] active )
{
	for ( int i = 0; i < active.length; ++i )
		vag.setSourceActive( i, active[ i ] );
}