Package sc.fiji.snt.util
Interface SNTPoint
- All Known Implementing Classes:
Path.PathNode,PointInCanvas,PointInImage,SeedPoint,ShollPoint,SWCPoint
public interface SNTPoint
Classes extend this interface implement a point in a 3D space, always using
real world coordinates.
- Author:
- Tiago Ferreira
-
Method Summary
Modifier and TypeMethodDescriptionstatic PointInImageaverage(Collection<? extends SNTPoint> points) Computes the average position of a collection of SNTPoints.doublegetCoordinateOnAxis(int axis) chardoublegetX()doublegetY()doublegetZ()static PointInImagestatic PointInImageScript friendly method for instantiating a new point.voidsetAnnotation(BrainAnnotation annotation) Assigns a neuropil annotation (e.g., atlas compartment) to this point.voidsetHemisphere(char lr)
-
Method Details
-
getX
double getX()- Returns:
- the X-coordinate of the point
-
getY
double getY()- Returns:
- the Y-coordinate of the point
-
getZ
double getZ()- Returns:
- the Z-coordinate of the point
-
getCoordinateOnAxis
double getCoordinateOnAxis(int axis) - Returns:
- the coordinate on the specified axis
-
setAnnotation
Assigns a neuropil annotation (e.g., atlas compartment) to this point.- Parameters:
annotation- the annotation to be assigned to this point
-
getAnnotation
BrainAnnotation getAnnotation()- Returns:
- the neuropil annotation assigned to this point
-
setHemisphere
void setHemisphere(char lr) -
getHemisphere
char getHemisphere() -
average
Computes the average position of a collection of SNTPoints.- Parameters:
points- the collection of points to average- Returns:
- the average point, or null if the collection is null or empty
-
of
Script friendly method for instantiating a new point.- Parameters:
x- the X coordinatey- the Y coordinatez- the Z coordinate
-
of
-