当前位置: 首页>>代码示例>>Java>>正文


Java ConverterSetup类代码示例

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


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

示例1: transferChannelSettings

import bdv.tools.brightness.ConverterSetup; //导入依赖的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: initSetupsARGBTypeNonVolatile

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
private static void initSetupsARGBTypeNonVolatile(
		final AbstractSpimData< ? > spimData,
		final ARGBType type,
		final List< ConverterSetup > converterSetups,
		final List< SourceAndConverter< ? > > sources )
{
	final AbstractSequenceDescription< ?, ?, ? > seq = spimData.getSequenceDescription();
	for ( final BasicViewSetup setup : seq.getViewSetupsOrdered() )
	{
		final ScaledARGBConverter.ARGB converter = new ScaledARGBConverter.ARGB( 0, 255 );

		final int setupId = setup.getId();
		final String setupName = createSetupName( setup );
		final SpimSource< ARGBType > s = new SpimSource< ARGBType >( spimData, setupId, setupName );

		// Decorate each source with an extra transformation, that can be
		// edited manually in this viewer.
		final TransformedSource< ARGBType > ts = new TransformedSource< ARGBType >( s );
		final SourceAndConverter< ARGBType > soc = new SourceAndConverter< ARGBType >( ts, converter );

		sources.add( soc );
		converterSetups.add( new RealARGBColorConverterSetup( setupId, converter ) );
	}
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:25,代码来源:BigWarpInit.java

示例3: createBigWarpData

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
/**
 * Create {@link BigWarpData} from two {@link AbstractSpimData}.
 *
 * @param spimDataP array of moving SpimData
 * @param spimDataQ array of fixed SpimData
 * @return BigWarpData
 */
public static BigWarpData createBigWarpData( final AbstractSpimData< ? > spimDataP, final AbstractSpimData< ? > spimDataQ )
{
	final AbstractSequenceDescription< ?, ?, ? > seqP = spimDataP.getSequenceDescription();
	final AbstractSequenceDescription< ?, ?, ? > seqQ = spimDataQ.getSequenceDescription();

	final ArrayList< ConverterSetup > converterSetups = new ArrayList< ConverterSetup >();

	final ArrayList< SourceAndConverter< ? > > sources = new ArrayList< SourceAndConverter< ? > >();
	BigWarpInit.initSetups( spimDataP, converterSetups, sources );

	int numMovingSources = seqP.getViewSetups().size();
	int numTargetSources = seqQ.getViewSetups().size();

	int[] movingSourceIndices = ImagePlusLoader.range( 0, numMovingSources );
	int[] targetSourceIndices = ImagePlusLoader.range( numMovingSources, numTargetSources );

	/* Load the second source */
	BigWarpInit.initSetups( spimDataQ, converterSetups, sources );

	return new BigWarpData( sources, seqP, seqQ, converterSetups, movingSourceIndices, targetSourceIndices );
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:29,代码来源:BigWarpInit.java

示例4: addWarpMagnitudeSource

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
/**
 * 
 * @param sources the source list 
 * @param converterSetups the converterSetups 
 * @param name a name of the new source
 * @param data the BigWarpData
 * @return the index into sources where this source was added
 */
private static int addWarpMagnitudeSource( final ArrayList< SourceAndConverter< ? > > sources, final ArrayList< ConverterSetup > converterSetups, final String name, final BigWarpData data )
{
	// TODO think about whether its worth it to pass a type parameter.
	// or should we just stick with Doubles?

	final WarpMagnitudeSource< FloatType > magSource = new WarpMagnitudeSource< FloatType >( name, data, new FloatType() );

	final RealARGBColorConverter< VolatileFloatType > vconverter = new RealARGBColorConverter.Imp0< VolatileFloatType >( 0, 512 );
	vconverter.setColor( new ARGBType( 0xffffffff ) );
	final RealARGBColorConverter< FloatType > converter = new RealARGBColorConverter.Imp1< FloatType >( 0, 512 );
	converter.setColor( new ARGBType( 0xffffffff ) );

	converterSetups.add( new RealARGBColorConverterSetup( WARPMAG_SOURCE_ID, converter, vconverter ) );

	final SourceAndConverter< FloatType > soc = new SourceAndConverter< FloatType >( magSource, converter, null );
	sources.add( soc );

	return sources.size() - 1;
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:28,代码来源:BigWarp.java

示例5: addGridSource

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
/**
 * 
 * @param sources the source list 
 * @param converterSetups the converterSetups 
 * @param name a name of the new source
 * @param data the BigWarpData
 * @return the index into sources where this source was added
 */
private static int addGridSource( final ArrayList< SourceAndConverter< ? > > sources, final ArrayList< ConverterSetup > converterSetups, final String name, final BigWarpData data )
{
	// TODO think about whether its worth it to pass a type parameter.
	// or should we just stick with Floats?

	final GridSource< FloatType > magSource = new GridSource< FloatType >( name, data, new FloatType(), null );

	final RealARGBColorConverter< VolatileFloatType > vconverter = new RealARGBColorConverter.Imp0< VolatileFloatType >( 0, 512 );
	vconverter.setColor( new ARGBType( 0xffffffff ) );
	final RealARGBColorConverter< FloatType > converter = new RealARGBColorConverter.Imp1< FloatType >( 0, 512 );
	converter.setColor( new ARGBType( 0xffffffff ) );

	converterSetups.add( new RealARGBColorConverterSetup( GRID_SOURCE_ID, converter, vconverter ) );

	final SourceAndConverter< FloatType > soc = new SourceAndConverter< FloatType >( magSource, converter, null );
	sources.add( soc );

	return sources.size() - 1;
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:28,代码来源:BigWarp.java

示例6: transferChannelSettings

import bdv.tools.brightness.ConverterSetup; //导入依赖的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

示例7: initSetupsARGBType

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public static void initSetupsARGBType(
		final AbstractSpimData< ? > spimData,
		final ARGBType type,
		final List< ConverterSetup > converterSetups,
		final List< SourceAndConverter< ? > > sources )
{
	initSetupsARGBType( spimData, type, converterSetups, sources, true );
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:9,代码来源:BigWarpInit.java

示例8: initSetups

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public static void initSetups(
		final AbstractSpimData< ? > spimData,
		final List< ConverterSetup > converterSetups,
		final List< SourceAndConverter< ? > > sources )
{
	BigDataViewer.initSetups(spimData, converterSetups, sources);
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:8,代码来源:BigWarpInit.java

示例9: BigWarpData

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public BigWarpData(
		final ArrayList< SourceAndConverter< ? > > sources,
		final AbstractSequenceDescription< ?, ?, ? > seqP,
		final AbstractSequenceDescription< ?, ?, ? > seqQ,
		final ArrayList< ConverterSetup > converterSetups,
		int[] movingSourceIndices, int[] targetSourceIndices )
{
	this.sources = sources;
	this.seqP = seqP;
	this.seqQ = seqQ;
	this.converterSetups = converterSetups;
	this.movingSourceIndices = movingSourceIndices;
	this.targetSourceIndices = targetSourceIndices;
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:15,代码来源:BigWarp.java

示例10: colorSources

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public static void colorSources(final List< ConverterSetup > cs, final long j)
{
	for ( int i = 0; i < cs.size(); ++i )
		cs.get( i ).setColor( new ARGBType( ColorStream.get( i + j ) ) );
}
 
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:6,代码来源:StitchingExplorerPanel.java

示例11: whiteSources

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public static void whiteSources(final List< ConverterSetup > cs)
{
	for ( int i = 0; i < cs.size(); ++i )
		cs.get( i ).setColor( new ARGBType( ARGBType.rgba( 255, 255, 255, 0 ) ) );
}
 
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:6,代码来源:StitchingExplorerPanel.java

示例12: transferSettingsRGB

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
protected void transferSettingsRGB( final ImagePlus imp, final SetupAssignments setupAssignments )
{
	final ConverterSetup setup = setupAssignments.getConverterSetups().get( 0 );
	setup.setDisplayRange( (int)imp.getDisplayRangeMin(), (int)imp.getDisplayRangeMax() );
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:6,代码来源:BigWarpImagePlusPlugIn.java

示例13: BigWarpConverterSetupWrapper

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public BigWarpConverterSetupWrapper( BigWarp bw, ConverterSetup cs )
{
	this.bw = bw;
	this.cs = cs;
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:6,代码来源:BigWarpConverterSetupWrapper.java

示例14: getSourceConverterSetup

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public ConverterSetup getSourceConverterSetup(){
	return cs;
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:4,代码来源:BigWarpConverterSetupWrapper.java

示例15: initSetupsARGBTypeRandom

import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public static void initSetupsARGBTypeRandom(
		final AbstractSpimData< ? > spimData,
		final ARGBType type,
		final List< ConverterSetup > converterSetups,
		final List< SourceAndConverter< ? > > sources)
{
	if ( spimData.getSequenceDescription().getImgLoader() instanceof WrapBasicImgLoader )
	{
		initSetupsARGBTypeNonVolatile( spimData, type, converterSetups, sources );
		return;
	}

	final AbstractSequenceDescription< ?, ?, ? > seq = spimData.getSequenceDescription();
	for ( final BasicViewSetup setup : seq.getViewSetupsOrdered() )
	{

		final int setupId = setup.getId();

		final String setupName = createSetupName( setup );
		final VolatileSpimSource< ARGBType, VolatileARGBType > vs = new VolatileSpimSource< ARGBType, VolatileARGBType >( spimData, setupId, setupName );
		final SpimSource< ARGBType > s = vs.nonVolatile();

		// Decorate each source with an extra transformation, that can be
		// edited manually in this viewer.
		final TransformedSource< VolatileARGBType > tvs = new TransformedSource< VolatileARGBType >( vs );
		final TransformedSource< ARGBType > ts = new TransformedSource< ARGBType >( s, tvs );

		final SourceAndConverter< ARGBType > soc;
		final SourceAndConverter< VolatileARGBType > vsoc;
		final ConverterSetup converterSetup;

		final ARGBtoRandomARGBColorConverter.ToGray converter = new ARGBtoRandomARGBColorConverter.ToGray( 0, 255 );
		final ARGBtoRandomARGBColorConverter.VolatileToGray vconverter = new ARGBtoRandomARGBColorConverter.VolatileToGray( 0, 255 );

		converterSetup = new RealARGBColorConverterSetup( setupId, converter, vconverter );
		vsoc = new SourceAndConverter< VolatileARGBType >( tvs, vconverter );
		soc = new SourceAndConverter< ARGBType >( ts, converter, vsoc );

		converterSetups.add( converterSetup );


		sources.add( soc );
	}
}
 
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:45,代码来源:BigWarpInit.java


注:本文中的bdv.tools.brightness.ConverterSetup类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。