java.lang.Object
imagingbook.common.geometry.basic.Pnt2d.PntInt
imagingbook.common.mser.components.PixelMap.Pixel
- All Implemented Interfaces:
Pnt2d
,Primitive2d
,ShapeProducer
,Comparable<PixelMap.Pixel>
- Enclosing class:
- PixelMap
A pixel value which knows its coordinates. This is a non-static class, i.e.,
PixelMap.Pixel
instances can only
exist in the context of a PixelMap
instance.-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.geometry.basic.Pnt2d
Pnt2d.PntDouble, Pnt2d.PntInt
-
Field Summary
FieldsFields inherited from class imagingbook.common.geometry.basic.Pnt2d.PntInt
x, y, ZERO
Fields inherited from interface imagingbook.common.geometry.basic.Pnt2d
DefaultDotRadius, TOLERANCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PixelMap.Pixel other) Gets the next neighbor of this pixel that is inside the containing image.void
reset()
Sets this pixel to unvisited and resets its next-neighbor search direction.toString()
Methods inherited from class imagingbook.common.geometry.basic.Pnt2d.PntInt
distanceSq, distL1, duplicate, equals, from, from, from, from, from, getX, getXint, getY, getYint, hashCode, minus, minus, minus, plus, plus, plus, plus, toAwtPoint, toIntArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface imagingbook.common.geometry.basic.Pnt2d
cross, distance, distanceSq, distL1, distL2, dot, equals, getDistance, getShape, minus, mult, perp, plus, toAwtPoint2D, toDoubleArray, toRealVector, toVector2D
Methods inherited from interface imagingbook.common.geometry.shape.ShapeProducer
getShape, getShapes, getShapes
-
Field Details
-
val
-
-
Constructor Details
-
Pixel
-
-
Method Details
-
reset
Sets this pixel to unvisited and resets its next-neighbor search direction. -
getNextNeighbor
Gets the next neighbor of this pixel that is inside the containing image.- Returns:
- the next neighboring
PixelMap.Pixel
ornull
if no more neighbors
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PixelMap.Pixel>
-
toString
- Overrides:
toString
in classPnt2d.PntInt
-