• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java VisibilityAndGrouping类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中bdv.viewer.VisibilityAndGrouping的典型用法代码示例。如果您正苦于以下问题:Java VisibilityAndGrouping类的具体用法?Java VisibilityAndGrouping怎么用?Java VisibilityAndGrouping使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

VisibilityAndGrouping类属于bdv.viewer包,在下文中一共展示了VisibilityAndGrouping类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: transferChannelSettings

点赞 3

import bdv.viewer.VisibilityAndGrouping; //导入依赖的package包/类
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( (int)lut.min, (int)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 );
}
 

开发者ID:saalfeldlab,
项目名称:bigwarp,
代码行数:25,
代码来源:BigWarpImagePlusPlugIn.java

示例2: transferChannelSettings

点赞 3

import bdv.viewer.VisibilityAndGrouping; //导入依赖的package包/类
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 );
}
 

开发者ID:bigdataviewer,
项目名称:bigdataviewer_fiji,
代码行数:25,
代码来源:OpenImagePlusPlugIn.java

示例3: setVisibleSources

点赞 2

import bdv.viewer.VisibilityAndGrouping; //导入依赖的package包/类
public static void setVisibleSources(final VisibilityAndGrouping vag, final boolean[] active)
{
	for ( int i = 0; i < active.length; ++i )
		vag.setSourceActive( i, active[i] );
}
 

开发者ID:PreibischLab,
项目名称:BigStitcher,
代码行数:6,
代码来源:StitchingExplorerPanel.java

示例4: toggleWarpVisMode

点赞 2

import bdv.viewer.VisibilityAndGrouping; //导入依赖的package包/类
public void toggleWarpVisMode( BigWarpViewerFrame viewerFrame )
	{
//		int offImgIndex = 0;
//		int onImgIndex = 1;
		if ( viewerFrame == null )
		{
			if ( viewerFrameP.isActive() )
			{
				viewerFrame = viewerFrameP;
			}
			else if ( viewerFrameQ.isActive() )
			{
				viewerFrame = viewerFrameQ;
			}
			else
				return;
		}

//		if ( viewerFrame == viewerFrameP )
//		{
//			offImgIndex = 1;
//			onImgIndex = 0;
//		}

		if ( landmarkModel.getTransform() == null )
		{
			viewerFrame.getViewerPanel().showMessage( "No warp - estimate warp first." );
			return;
		}

		final VisibilityAndGrouping vg = viewerFrame.getViewerPanel().getVisibilityAndGrouping();

		// TODO consider remembering whether fused was on before displaying
		// warpmag
		// so that its still on or off after we turn it off
		if ( vg.isSourceActive( warpMagSourceIndex ) ) // warp mag is visible,
														// turn it off
		{
			vg.setSourceActive( warpMagSourceIndex, false );

//			vg.setSourceActive( offImgIndex, true );

			vg.setFusedEnabled( false );
			viewerFrame.getViewerPanel().showMessage( "Removing Warp Magnitude" );
		}
		else // warp mag is invisible, turn it on
		{
			vg.setSourceActive( warpMagSourceIndex, true );
//			vg.setSourceActive( offImgIndex, false );

			// estimate the max warp
			final WarpMagnitudeSource< ? > wmSrc = ( ( WarpMagnitudeSource< ? > ) sources.get( warpMagSourceIndex ).getSpimSource() );
			final double maxval = wmSrc.getMax( landmarkModel );

			// set the slider
			( ( RealARGBColorConverter< FloatType > ) ( sources.get( warpMagSourceIndex ).getConverter() ) ).setMax( maxval );

			vg.setFusedEnabled( true );
			viewerFrame.getViewerPanel().showMessage( "Displaying Warp Magnitude" );
		}

		viewerFrame.getViewerPanel().requestRepaint();
	}
 

开发者ID:saalfeldlab,
项目名称:bigwarp,
代码行数:64,
代码来源:BigWarp.java

示例5: setVisibleSources

点赞 2

import bdv.viewer.VisibilityAndGrouping; //导入依赖的package包/类
public static void setVisibleSources( final VisibilityAndGrouping vag, final boolean[] active )
{
	for ( int i = 0; i < active.length; ++i )
		vag.setSourceActive( i, active[ i ] );
}
 

开发者ID:fiji,
项目名称:SPIM_Registration,
代码行数:6,
代码来源:ViewSetupExplorerPanel.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)