congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ThinPlateR2LogRSplineKernelTransform.apply
Code IndexAdd Tabnine to your IDE (free)

How to use
apply
method
in
jitk.spline.ThinPlateR2LogRSplineKernelTransform

Best Java code snippets using jitk.spline.ThinPlateR2LogRSplineKernelTransform.apply (Showing top 11 results out of 315)

origin: net.imglib2/imglib2-realtransform

@Override
public void apply( final double[] source, final double[] target )
{
  tps.apply( source, target );
}
origin: jitk/jitk-tps

/**
 * Transform pt in place.
 *
 * @param pt the point
 */
public void applyInPlace( final double[] pt )
{
  final double[] tmp = new double[ ndims ];
  apply( pt, tmp );
  for ( int i = 0; i < ndims; ++i )
  {
    pt[ i ] = tmp[ i ];
  }
}
origin: jitk/jitk-tps

public void apply( final double[] pt, final double[] result )
{
  apply( pt, result, false );
}
origin: jitk/jitk-tps

/**
 * Transforms the input point according to the thin plate spline stored by
 * this object.
 *
 * @param pt the point to be transformed
 * @return the transformed point
 */
public double[] apply( final double[] pt )
{
  final double[] result = new double[ ndims ];
  apply( pt, result );
  return result;
}
origin: jitk/jitk-tps

/**
 * Computes the displacement between the i^th source point and the input
 * point.
 *
 * Stores the result in the input array 'res'. Does not validate inputs.
 * 
 * @param i first index
 * @param pt the point
 * @param res the result
 */
protected void tgtPtDisplacement( final int i, final double[] pt,
    final double[] res )
{
  apply( pt, res );
  for ( int d = 0; d < ndims; d++ )
  {
    res[ d ]-= pt[ d ];
  }
}
origin: jitk/jitk-tps

public void printXfmBacks2d( final int maxx, final int maxy, final int delx, final int dely )
{
  final double[] pt = new double[ 2 ];
  final double[] result = new double[ 2 ];
  for ( int x = 0; x < maxx; x += delx )
    for ( int y = 0; y < maxy; y += dely )
    {
      pt[ 0 ] = x;
      pt[ 1 ] = y;
      this.apply( pt, result );
      System.out.println( "( " + x + ", " + y + " )  ->  ( " + result[ 0 ] + ", " + result[ 0 ] + " )" );
    }
}
origin: jitk/jitk-tps

public static double maxError( double[][] sourcePoints, double[][] targetPoints, ThinPlateR2LogRSplineKernelTransform xfm, boolean debug )
{
  double maxError = 0.0;
  
  int D = sourcePoints.length;
  int N = sourcePoints[ 0 ].length;
  
  double[] spt = new double[ sourcePoints.length ];
  double[] tpt = new double[ sourcePoints.length ];
  for( int i = 0; i < N; i++ )
  {
    for( int n = 0; n < D; n++ )
    {
      spt[ n ] = sourcePoints[ n ][ i ];
      tpt[ n ] = targetPoints[ n ][ i ];
    }
      
    double[] result = xfm.apply( spt );
    double distance = distance( tpt, result );
    
    if( debug )
      System.out.println( "distance at: " + i + " is " + distance );
    
    if( distance > maxError )
      maxError = distance;
  }
  
  return maxError;
}

origin: net.imglib2/imglib2-realtransform

@Override
public void apply( final RealLocalizable source, final RealPositionable target )
{
  rpa.setPosition( source );
  tps.apply( a, b );
  for ( int d = 0; d < a.length; ++d )
    target.setPosition( b[ d ], d );
}
origin: jitk/jitk-tps

  initialGuessAffine = target;
final double[] resL = apply( initialGuess );
final double[] resA = apply( initialGuessAffine );
origin: jitk/jitk-tps

double[] phix_ap = xfm.apply( x_ap );
origin: jitk/jitk-tps

final double[] guessXfm = new double[ ndims ];
apply( guess, guessXfm );
mtx = jacobian( guess );
  apply( guess, guessXfm );
jitk.splineThinPlateR2LogRSplineKernelTransformapply

Javadoc

Transforms the input point according to the thin plate spline stored by this object.

Popular methods of ThinPlateR2LogRSplineKernelTransform

  • <init>
    Constructor with transformation parameters. aMatrix and bVector are allowed to be null
  • getNumDims
  • jacobian
    Computes the jacobian of this tranformation around the point p. The result is stored in a new double
  • applyInPlace
    Transform pt in place.
  • buildDisplacements
  • closestTargetLandmarkAndDistance
    Returns the index of the target landmark closest to the input point as well as the distance to that
  • computeDeformationContribution
  • computeG
  • computeK
    Builds the K matrix from landmark points and G matrix.
  • computeL
  • computeP
  • computeReflexiveG
  • computeP,
  • computeReflexiveG,
  • computeW,
  • getAffine,
  • getKnotWeights,
  • getNumLandmarks,
  • getSourceLandmarks,
  • getTranslation,
  • initialGuessAtInverse

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 21 Best IntelliJ Plugins
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