Tabnine Logo
Channel.getId
Code IndexAdd Tabnine to your IDE (free)

How to use
getId
method
in
mpicbg.spim.data.sequence.Channel

Best Java code snippets using mpicbg.spim.data.sequence.Channel.getId (Showing top 20 results out of 315)

origin: net.preibisch/multiview-reconstruction

public static ArrayList< ViewDescription > getAllViewIdsForChannelSorted( final SpimData data, final Collection< ? extends ViewId > viewIds, final Channel channel )
{
  final ArrayList< ViewDescription > views = new ArrayList< ViewDescription >();
  for ( final ViewId id : viewIds )
  {
    final ViewDescription vd = data.getSequenceDescription().getViewDescription( id );
    
    if ( vd.isPresent() && vd.getViewSetup().getChannel().getId() == channel.getId() )
      views.add( vd );
  }
  Collections.sort( views );
  return views;
}
origin: net.preibisch/multiview-reconstruction

  @Override
  public int compare( final ViewId o1, final ViewId o2 )
  {
    final int id1 = sd.getViewDescriptions().get( o1 ).getViewSetup().getAttribute( Channel.class ).getId();
    final int id2 = sd.getViewDescriptions().get( o2 ).getViewSetup().getAttribute( Channel.class ).getId();
    return id1 - id2;
  }
} );
origin: net.preibisch/multiview-reconstruction

public static ArrayList< ViewDescription > getAllViewIdsForChannelTimePointSorted( final SpimData data, final Collection< ? extends ViewId > viewIds, final Channel channel, final TimePoint timePoint )
{
  final ArrayList< ViewDescription > views = new ArrayList< ViewDescription >();
  for ( final ViewId id : viewIds )
  {
    final ViewDescription vd = data.getSequenceDescription().getViewDescription( id );
    
    if ( vd.isPresent() && vd.getViewSetup().getChannel().getId() == channel.getId() && id.getTimePointId() == timePoint.getId() )
      views.add( vd );
  }
  Collections.sort( views );
  return views;
}
origin: net.preibisch/multiview-reconstruction

final Channel c2 = vd2.getViewSetup().getChannel();
if ( c1.getId() == cA.getId() && c2.getId() == cB.getId() || c1.getId() == cB.getId() && c2.getId() == cA.getId() )
origin: net.preibisch/multiview-reconstruction

public static ArrayList< Angle > getAllAnglesForChannelTimepointSorted( final SpimData data, final Collection< ? extends ViewId > viewIds, final Channel c, final TimePoint t )
{
  final HashSet< Angle > angleSet = new HashSet< Angle >();
  for ( final ViewId v : viewIds )
  {
    final ViewDescription vd = data.getSequenceDescription().getViewDescription( v );
    
    if ( vd.isPresent() && v.getTimePointId() == t.getId() && vd.getViewSetup().getChannel().getId() == c.getId() )
      angleSet.add( vd.getViewSetup().getAngle() );
  }
  final ArrayList< Angle > angles = new ArrayList< Angle >();
  angles.addAll( angleSet );
  Collections.sort( angles );
  return angles;
}
origin: net.preibisch/multiview-reconstruction

public static ArrayList< Illumination > getAllIlluminationsForChannelTimepointSorted( final SpimData data, final Collection< ? extends ViewId > viewIds, final Channel c, final TimePoint t )
{
  final HashSet< Illumination > illumSet = new HashSet< Illumination >();
  for ( final ViewId v : viewIds )
  {
    final ViewDescription vd = data.getSequenceDescription().getViewDescription( v );
    
    if ( vd.isPresent() && v.getTimePointId() == t.getId() && vd.getViewSetup().getChannel().getId() == c.getId() )
      illumSet.add( vd.getViewSetup().getIllumination() );
  }
  final ArrayList< Illumination > illums = new ArrayList< Illumination >();
  illums.addAll( illumSet );
  Collections.sort( illums );
  return illums;
}
origin: net.preibisch/multiview-reconstruction

  @Override
  public int compare( final ViewId o1, final ViewId o2 )
  {
    return sd.getViewDescription( o1 ).getViewSetup().getChannel().getId() - sd.getViewDescription( o2 ).getViewSetup().getChannel().getId();
  }
} );
origin: net.preibisch/multiview-reconstruction

  t.setLocation( locations.get( new ViewSetupPrecursor( c.getId(), i.getId(), a.getId(), t.getId() ) ) );
final Calibration cal = calibrations.get( new ViewSetupPrecursor( c.getId(), i.getId(), a.getId(), t.getId() ) );
final VoxelDimensions voxelSize = new FinalVoxelDimensions( cal.calUnit, cal.calX, cal.calY, cal.calZ );
origin: sc.fiji/bigdataviewer_fiji

public static FusionResult create(
    final SpimRegistrationSequence spimseq,
    final String filepath,
    final String filepattern,
    final int numSlices,
    final double sliceValueMin,
    final double sliceValueMax,
    final Map< Integer, AffineTransform3D > perTimePointFusionTransforms )
{
  // add one fused ViewSetup per channel in the SpimRegistrationSequence
  final List< Integer > channels = new ArrayList<>();
  for ( final BasicViewSetup setup : spimseq.getSequenceDescription().getViewSetupsOrdered() )
  {
    final int channel = setup.getAttribute( Channel.class ).getId();
    if ( ! channels.contains( channel ) )
      channels.add( channel );
  }
  final TimePoints timepoints = spimseq.getSequenceDescription().getTimePoints();
  return new FusionResult( filepath, filepattern, channels, timepoints, numSlices, sliceValueMin, sliceValueMax, perTimePointFusionTransforms );
}
origin: net.preibisch/multiview-reconstruction

public static String getTitle( final int splittingType, final Group< ViewDescription > group )
{
  String title;
  final ViewDescription vd0 = group.iterator().next();
  if ( splittingType == 0 ) // "Each timepoint & channel"
    title = "fused_tp_" + vd0.getTimePointId() + "_ch_" + vd0.getViewSetup().getChannel().getId();
  else if ( splittingType == 1 ) // "Each timepoint, channel & illumination"
    title = "fused_tp_" + vd0.getTimePointId() + "_ch_" + vd0.getViewSetup().getChannel().getId() + "_illum_" + vd0.getViewSetup().getIllumination().getId();
  else if ( splittingType == 2 ) // "All views together"
    title = "fused";
  else // "All views"
    title = "fused_tp_" + vd0.getTimePointId() + "_vs_" + vd0.getViewSetupId();
  return title;
}
origin: net.preibisch/multiview-reconstruction

public static ViewSetup getViewSetup( final List< ? extends ViewSetup > list, final Channel c, final Angle a, final Illumination i, final Tile x )
{
  for ( final ViewSetup viewSetup : list )
  {
    if ( viewSetup.getAngle().getId() == a.getId() && 
       viewSetup.getChannel().getId() == c.getId() && 
       viewSetup.getIllumination().getId() == i.getId() &&
       viewSetup.getTile().getId() == x.getId() )
    {
      return viewSetup;
    }
  }
  return null;
}
origin: net.preibisch/multiview-reconstruction

public static final ArrayList< ViewDescription > assembleInputData(
    final SpimData2 spimData,
    final TimePoint timepoint,
    final Channel channel,
    final List< ViewId > viewIdsToProcess )
{
  final ArrayList< ViewDescription > inputData = new ArrayList< ViewDescription >();
  for ( final ViewId viewId : viewIdsToProcess )
  {
    final ViewDescription vd = spimData.getSequenceDescription().getViewDescription(
        viewId.getTimePointId(), viewId.getViewSetupId() );
    if ( !vd.isPresent() || vd.getTimePointId() != timepoint.getId() || vd.getViewSetup().getChannel().getId() != channel.getId() )
      continue;
    // get the most recent model
    spimData.getViewRegistrations().getViewRegistration( viewId ).updateModel();
    inputData.add( vd );
  }
  return inputData;
}
origin: sc.fiji/bigdataviewer_fiji

/**
 * find ViewSetup index corresponding to given (angle, illumination,
 * channel) triple.
 *
 * @return setup index or -1 if no corresponding setup was found.
 */
protected static int getViewSetupId( final ArrayList< ViewSetup > setups, final int angle, final int illumination, final int channel )
{
  for ( final ViewSetup s : setups )
    if ( s.getAngle().getId() == angle && s.getIllumination().getId() == illumination && s.getChannel().getId() == channel )
      return s.getId();
  return -1;
}
origin: net.preibisch/multiview-reconstruction

@Override
public RandomAccessibleInterval< FloatType > getFloatImage( final ViewId view, final boolean normalize )
{
  final BasicViewDescription< ? > vd = sd.getViewDescriptions().get( view );
  final Dimensions d = vd.getViewSetup().getSize();
  final VoxelDimensions dv = vd.getViewSetup().getVoxelSize();
  final ArrayImg< FloatType, ? > img = ArrayImgs.floats( d.dimension( 0 ), d.dimension( 1 ), d.dimension(  2 ) );
  final String ampOrPhaseDir;
  if ( vd.getViewSetup().getAttribute( Channel.class ).getId() == ampChannelId )
    ampOrPhaseDir = amplitudeDir;
  else if ( vd.getViewSetup().getAttribute( Channel.class ).getId() ==  phaseChannelId )
    ampOrPhaseDir = phaseDir;
  else
    throw new RuntimeException( "viewSetupId=" + view.getViewSetupId() + " is not Amplitude nor phase." );
  populateImage( img, directory, stackDir, ampOrPhaseDir, zPlanes, timepoints.get( view.getTimePointId() ), extension );
  if ( normalize )
    normalize( img );
  updateMetaDataCache( view, (int)d.dimension( 0 ), (int)d.dimension( 1 ), (int)d.dimension( 2 ), dv.dimension( 0 ), dv.dimension( 1 ), dv.dimension( 2 ) );
  return img;
}
origin: net.preibisch/multiview-reconstruction

@Override
public RandomAccessibleInterval< UnsignedShortType > getImage( final ViewId view )
{
  final BasicViewDescription< ? > vd = sd.getViewDescriptions().get( view );
  final Dimensions d = vd.getViewSetup().getSize();
  final VoxelDimensions dv = vd.getViewSetup().getVoxelSize();
  final ArrayImg< UnsignedShortType, ? > img = ArrayImgs.unsignedShorts( d.dimension( 0 ), d.dimension( 1 ), d.dimension( 2 ) );
  final String ampOrPhaseDir;
  if ( vd.getViewSetup().getAttribute( Channel.class ).getId() == ampChannelId )
    ampOrPhaseDir = amplitudeDir;
  else if ( vd.getViewSetup().getAttribute( Channel.class ).getId() ==  phaseChannelId )
    ampOrPhaseDir = phaseDir;
  else
    throw new RuntimeException( "viewSetupId=" + view.getViewSetupId() + " is not Amplitude nor phase." );
  populateImage( img, directory, stackDir, ampOrPhaseDir, zPlanes, timepoints.get( view.getTimePointId() ), extension );
  updateMetaDataCache( view, (int)d.dimension( 0 ), (int)d.dimension( 1 ), (int)d.dimension( 2 ), dv.dimension( 0 ), dv.dimension( 1 ), dv.dimension( 2 ) );
  return img;
}
origin: sc.fiji/bigdataviewer_fiji

@Override
public ImgPlus< UnsignedShortType > getImage( final int timepointId, final ImgLoaderHint... hints )
{
  ensureExpIsOpen();
  final int channel = setup.getChannel().getId();
  final int illumination = setup.getIllumination().getId();
  final int angle = setup.getAngle().getId();
  final ImagePlus imp = getImagePlus( timepointId );
  final Img< UnsignedShortType > img = ImageJFunctions.wrapShort( imp );
  final String name = getBasename( timepointId, angle, channel, illumination );
  final AxisType[] axes = new AxisType[] { Axes.X, Axes.Y, Axes.Z };
  final float zStretching = ( float ) ( exp.pd / exp.pw );
  final double[] calibration = new double[] { 1, 1, zStretching };
  return new ImgPlus<>( img, name, axes, calibration );
}
origin: sc.fiji/bigdataviewer_fiji

channel.getId() == viewDataBeads.getChannel() )
origin: net.preibisch/multiview-reconstruction

final int oc = old.getViewSetup().getChannel().getId();
  if ( vs.getChannel().getId() == oc )
    vsNew = vs;
final int oc = old.getViewSetup().getChannel().getId();
final int oi = old.getViewSetup().getIllumination().getId();
  if ( vs.getChannel().getId() == oc && vs.getIllumination().getId() == oi )
    vsNew = vs;
origin: sc.fiji/bigdataviewer_fiji

  private ImagePlus getImagePlus( final int timepointId )
  {
    final int channel = setup.getChannel().getId();
    final int illumination = setup.getIllumination().getId();
    final int angle = setup.getAngle().getId();
    final int s = exp.sampleStart;
    final int r = exp.regionStart;
    final int f = exp.frameStart;
    final int zMin = exp.planeStart;
    final int zMax = exp.planeEnd;
    final int xMin = 0;
    final int xMax = exp.w - 1;
    final int yMin = 0;
    final int yMax = exp.h - 1;
    ImagePlus imp;
    if ( hasAlternatingIllumination )
    {
      final int zStep = 2;
      if ( illumination == 0 )
        imp = exp.openNotProjected( s, timepointId, timepointId, r, angle, channel, zMin, zMax - 1, zStep, f, f, yMin, yMax, xMin, xMax, SPIMExperiment.X, SPIMExperiment.Y, SPIMExperiment.Z, false );
      else
        imp = exp.openNotProjected( s, timepointId, timepointId, r, angle, channel, zMin + 1, zMax, zStep, f, f, yMin, yMax, xMin, xMax, SPIMExperiment.X, SPIMExperiment.Y, SPIMExperiment.Z, false );
    }
    else
    {
      imp = exp.openNotProjected( s, timepointId, timepointId, r, angle, channel, zMin, zMax, f, f, yMin, yMax, xMin, xMax, SPIMExperiment.X, SPIMExperiment.Y, SPIMExperiment.Z, false );
    }
    return imp;
  }
}
origin: net.preibisch/multiview-reconstruction

final int c = vd.getViewSetup().getAttribute( Channel.class ).getId();
final int i = vd.getViewSetup().getAttribute( Illumination.class ).getId();
mpicbg.spim.data.sequenceChannelgetId

Popular methods of Channel

  • <init>
  • getName
  • equals
  • setName

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now