PolygonRegionOfInterest.getEdgeEnd
Code IndexAdd Codota to your IDE (free)

Best code snippets using net.imglib2.roi.PolygonRegionOfInterest.getEdgeEnd(Showing top 4 results out of 315)

origin: net.imglib2/imglib2-roi

/**
 * Determine whether the given edge is horizontal. If so,
 * interpolateEdgeXAtY won't work because the X is then indeterminate.
 * 
 * @param index
 *            index of edge to examine
 * @return true if horizontal (Y coordinates of start and end are identical)
 */
public boolean isHorizontal( final int index )
{
  return getEdgeStart( index ).getDoublePosition( 1 ) == getEdgeEnd( index ).getDoublePosition( 1 );
}
origin: net.imglib2/imglib2-roi

/**
 * Given an edge and a Y coordinate, find its X coordinate at that Y
 * coordinate.
 * 
 * NOTE: this assumes that isHorizontal(start) is false, else the X
 * coordinate is indeterminate.
 * 
 * @param start
 *            index of the edge
 * @return the X coordinate
 */
public double interpolateEdgeXAtY( final int start, final double y )
{
  final RealLocalizable p_start = getEdgeStart( start );
  final RealLocalizable p_end = getEdgeEnd( start );
  final double x_start = p_start.getDoublePosition( 0 );
  final double y_start = p_start.getDoublePosition( 1 );
  final double x_end = p_end.getDoublePosition( 0 );
  final double y_end = p_end.getDoublePosition( 1 );
  return x_start + ( y - y_start ) * ( x_end - x_start ) / ( y_end - y_start );
}
origin: net.imglib2/imglib2-roi

final double y_end = getEdgeEnd( i ).getDoublePosition( 1 );
final double x_start = getEdgeStart( i ).getDoublePosition( 0 );
final double x_end = getEdgeEnd( i ).getDoublePosition( 0 );
if ( y_start == y_end )
origin: net.imglib2/imglib2-roi

final RealLocalizable p1 = getEdgeEnd( i );
double x0 = p0.getDoublePosition( 0 );
double y0 = p0.getDoublePosition( 1 );
net.imglib2.roiPolygonRegionOfInterestgetEdgeEnd

Javadoc

Get the coordinates of the second vertex of the indexed edge

Popular methods of PolygonRegionOfInterest

  • getVertexCount
  • addVertex
    Insert a point into the polygon at the given index
  • getVertex
    Get a vertex by index
  • removeVertex
    Remove a vertex from the polygon
  • <init>
  • ceil
    Given an interpolated value, assign a ceiling accounting for roundoff error.
  • findStripeIndex
    Find the index of the stripe whose yMin is lower or the same as the given y
  • floor
    Given an interpolated value, assign a floor accounting for roundoff error.
  • ge
    Greater-than-or-equal comparison, accounting for roundoff
  • getEdgeStart
    Get the coordinates of the first vertex of the indexed edge
  • gt
    Greater-than comparison, accounting for roundoff
  • interpolateEdgeXAtY
    Given an edge and a Y coordinate, find its X coordinate at that Y coordinate. NOTE: this assumes tha
  • gt,
  • interpolateEdgeXAtY,
  • invalidateCachedState,
  • lt,
  • move,
  • realMax,
  • realMin,
  • setVertexPosition,
  • splitStripe

Popular classes and methods

  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • Font (java.awt)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • HashSet (java.util)
    This class implements the Set interface, backed by a java.util.HashMap.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)