ij.gui
Class Line.PointIterator

java.lang.Object
  extended by ij.gui.Line.PointIterator
All Implemented Interfaces:
Iterator<Point>
Enclosing class:
Line

public static class Line.PointIterator
extends Object
implements Iterator<Point>

Dedicated point iterator for thin lines. The iterator is based on (an improved version of) the algorithm used by the original method ImageProcessor.getLine(double, double, double, double). Improvements are (a) that the endpoint is drawn too and (b) every line point is visited only once, duplicates are skipped. Author: Wilhelm Burger (04/2017)


Constructor Summary
Line.PointIterator(double x1, double y1, double x2, double y2)
           
Line.PointIterator(Line line)
           
 
Method Summary
 boolean hasNext()
           
 Point next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line.PointIterator

public Line.PointIterator(Line line)

Line.PointIterator

public Line.PointIterator(double x1,
                          double y1,
                          double x2,
                          double y2)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Point>

next

public Point next()
Specified by:
next in interface Iterator<Point>

remove

public void remove()
Specified by:
remove in interface Iterator<Point>


Copyright © 1997–2017 NIH. All rights reserved.