Tabnine Logo
Gauss3
Code IndexAdd Tabnine to your IDE (free)

How to use
Gauss3
in
net.imglib2.algorithm.gauss3

Best Java code snippets using net.imglib2.algorithm.gauss3.Gauss3 (Showing top 20 results out of 315)

origin: net.imglib2/imglib2-algorithm

gauss( sigma, source, target, service );
service.shutdown();
origin: imagej/imagej-ops

@Override
public void compute(final RandomAccessible<T> input,
  final RandomAccessibleInterval<T> output)
{
  try {
    SeparableSymmetricConvolution.convolve(Gauss3.halfkernels(sigmas), input,
      output, threads.getExecutorService());
  }
  catch (final IncompatibleTypeException e) {
    throw new RuntimeException(e);
  }
}
origin: net.imglib2/imglib2-algorithm

public static double[][] halfkernels( final double[] sigma )
{
  final int n = sigma.length;
  final double[][] halfkernels = new double[ n ][];
  final int[] size = halfkernelsizes( sigma );
  for ( int i = 0; i < n; ++i )
    halfkernels[ i ] = halfkernel( sigma[ i ], size[ i ], true );
  return halfkernels;
}
origin: net.imglib2/imglib2-algorithms

public static double[][] halfkernels( final double[] sigma )
{
  final int n = sigma.length;
  final double[][] halfkernels = new double[ n ][];
  for( int i = 0; i < n; ++i )
  {
    final int size = Math.max( 2, (int) (3 * sigma[ i ] + 0.5) + 1 );
    halfkernels[ i ] = halfkernel( sigma[ i ], size, true );
  }
  return halfkernels;
}
origin: net.imglib2/imglib2-algorithm

gauss( sigma, source, target, service );
service.shutdown();
origin: net.imglib2/imglib2-algorithms

final double[][] halfkernels = halfkernels( sigma );
final int numthreads = Runtime.getRuntime().availableProcessors();
SeparableSymmetricConvolution.convolve( halfkernels, source, target, numthreads );
origin: net.imglib2/imglib2-algorithms

for ( int d = 0; d < n; ++d )
  s[ d ] = sigma;
gauss( s, source, target );
origin: imagej/imagej-ops

@Override
public void compute(final RandomAccessibleInterval<T> input,
  final RandomAccessibleInterval<T> output)
{
  if (outOfBounds == null) {
    outOfBounds = new OutOfBoundsMirrorFactory<>(Boundary.SINGLE);
  }
  final RandomAccessible<FloatType> eIn = //
    (RandomAccessible) Views.extend(input, outOfBounds);
  try {
    SeparableSymmetricConvolution.convolve(Gauss3.halfkernels(sigmas), eIn,
      output, threads.getExecutorService());
  }
  catch (final IncompatibleTypeException e) {
    throw new RuntimeException(e);
  }
}
origin: net.imglib2/imglib2-algorithm

for ( int d = 0; d < n; ++d )
  s[ d ] = sigma;
gauss( s, source, target );
origin: net.imglib2/imglib2-algorithm

final double[][] halfkernels = halfkernels( sigma );
final Convolution< NumericType< ? > > convolution = SeparableKernelConvolution.convolution( Kernel1D.symmetric( halfkernels ) );
convolution.setExecutor( service );
origin: sc.fiji/Image_Expression_Parser

@Override
public final < R extends RealType< R > > Img< FloatType > evaluate( final Img< R > img, final R alpha ) throws ParseException
{
  RandomAccessibleInterval< FloatType > fimg = ImgLibUtils.copyToFloatTypeImage( img );
  try
  {
    Gauss3.gauss( alpha.getRealDouble(), Views.extendZero( fimg ), fimg );
  }
  catch ( IncompatibleTypeException e )
  {
    throw new RuntimeException( e );
  }
  return ( Img< FloatType > ) fimg;
}
origin: net.preibisch/multiview-reconstruction

public static double[] computeCenter( final Img< FloatType > i, final double threshold ) throws IncompatibleTypeException
{
  final Img<FloatType> copy = i.copy();
  Gauss3.gauss( 2, Views.extendMirrorSingle( copy ), copy );
  
  return centerofmass( copy, threshold );
}
origin: net.imglib2/imglib2-algorithm

try
  Gauss3.gauss( sigmaSmaller, input, tmpInterval, service );
  Gauss3.gauss( sigmaLarger, input, dog, service );
origin: net.preibisch/multiview-reconstruction

Gauss3.gauss( Util.getArrayFromValue( sigma, psi.numDimensions() ), Views.extendMirrorSingle( psi ), psi, service );
origin: net.imglib2/imglib2-algorithms-legacy

protected Img< FloatType > computeGaussianConvolution( final double[] sigma )
{
  final FloatType type = new FloatType();
  Img< FloatType > target = null;
  try
  {
    target = this.factory.imgFactory( type ).create( image, type );
    Gauss3.gauss( sigma, Views.extend( image, outOfBoundsFactory ), target );
  }
  catch ( final IncompatibleTypeException e )
  {
    e.printStackTrace();
  }
  return target;
}
origin: net.imglib2/imglib2-algorithm

  Gauss3.gauss( sigma[ 0 ], source, gaussian );
else
  Gauss3.gauss( sigma, source, gaussian );
return calculateMatrix( Views.extend( gaussian, outOfBounds ), gradient, hessianMatrix, outOfBounds );
  Gauss3.gauss( IntStream.range( 0, source.numDimensions() ).mapToDouble( i -> sigma[ 0 ] ).toArray(), source, gaussian, es );
else
  Gauss3.gauss( sigma, source, gaussian, es );
return calculateMatrix( Views.extend( gaussian, outOfBounds ), gradient, hessianMatrix, outOfBounds, nTasks, es );
origin: fiji/Trainable_Segmentation

  public ArrayList< ImagePlus > call()
  {
    // Get channel(s) to process
    ImagePlus[] channels = extractChannels(originalImage);
    ArrayList<ImagePlus>[] results = new ArrayList[ channels.length ];
    for(int ch=0; ch < channels.length; ch++)
    {
      results[ ch ] = new ArrayList<ImagePlus>();
      final ImagePlus im = channels [ ch ].duplicate();
      final Img<FloatType> image2 = ImagePlusAdapter.wrap( im );
      // first extend the image with mirror
      RandomAccessible< FloatType > mirrorImg = Views.extendMirrorSingle( image2 );
      // adjust sigma based on voxel size
      final double[] isoSigma = new double[ mirrorImg.numDimensions() ];
      for ( int d = 0; d < isoSigma.length; ++d )
        isoSigma[ d ] = sigma * scaleFactor[ d ];
      try {
        Gauss3.gauss( isoSigma, mirrorImg, image2 );
      } catch (IncompatibleTypeException e) {
        IJ.log( "Error when calculating Gaussian feature." );
        e.printStackTrace();
        return null;
      }
      final ImagePlus ip = ImageJFunctions.wrapFloat(
          image2, availableFeatures[ GAUSSIAN ] +"_" + sigma );
      results[ch].add( ip );
    }
    return mergeResultChannels(results);
  }
};
origin: sc.fiji/Trainable_Segmentation

  public ArrayList< ImagePlus > call()
  {
    // Get channel(s) to process
    ImagePlus[] channels = extractChannels(originalImage);
    ArrayList<ImagePlus>[] results = new ArrayList[ channels.length ];
    for(int ch=0; ch < channels.length; ch++)
    {
      results[ ch ] = new ArrayList<ImagePlus>();
      final ImagePlus im = channels [ ch ].duplicate();
      final Img<FloatType> image2 = ImagePlusAdapter.wrap( im );
      // first extend the image with mirror
      RandomAccessible< FloatType > mirrorImg = Views.extendMirrorSingle( image2 );
      // adjust sigma based on voxel size
      final double[] isoSigma = new double[ mirrorImg.numDimensions() ];
      for ( int d = 0; d < isoSigma.length; ++d )
        isoSigma[ d ] = sigma * scaleFactor[ d ];
      try {
        Gauss3.gauss( isoSigma, mirrorImg, image2 );
      } catch (IncompatibleTypeException e) {
        IJ.log( "Error when calculating Gaussian feature." );
        e.printStackTrace();
        return null;
      }
      final ImagePlus ip = ImageJFunctions.wrapFloat(
          image2, availableFeatures[ GAUSSIAN ] +"_" + sigma );
      results[ch].add( ip );
    }
    return mergeResultChannels(results);
  }
};
origin: net.preibisch/multiview-reconstruction

Gauss3.gauss( new double[]{ 2, 2, 2 }, Views.extendZero( s ), s );
origin: fiji/TrackMate

Gauss3.gauss( rad / Math.sqrt( 2 ), source, img );
final ImgPlus< UnsignedShortType > imgplus = new ImgPlus< >( img );
net.imglib2.algorithm.gauss3Gauss3

Javadoc

Gaussian convolution.

Most used methods

  • gauss
    Apply Gaussian convolution to source and write the result to output. In-place operation (source==tar
  • halfkernels
  • halfkernel
  • halfkernelsizes

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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