本文整理汇总了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 );
}
示例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 ) );
}
}
示例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 );
}
示例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;
}
示例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;
}
示例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 );
}
示例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 );
}
示例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);
}
示例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;
}
示例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 ) ) );
}
示例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 ) ) );
}
示例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() );
}
示例13: BigWarpConverterSetupWrapper
import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public BigWarpConverterSetupWrapper( BigWarp bw, ConverterSetup cs )
{
this.bw = bw;
this.cs = cs;
}
示例14: getSourceConverterSetup
import bdv.tools.brightness.ConverterSetup; //导入依赖的package包/类
public ConverterSetup getSourceConverterSetup(){
return cs;
}
示例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 );
}
}