public final class Resolution extends Object implements Serializable
i.e. what a single voxel represents in physical units (meters) in x, y, z dimensions.
This class is immutable.
Constructor and Description |
---|
Resolution() |
Resolution(double x,
double y,
double z) |
Resolution(Tuple3d tuple)
Constructs a resolution from a tuple.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(Point3d point1,
Point3d point2) |
double |
distance(Point3i point1,
Point3i point2) |
double |
distanceSquared(Point3d point1,
Point3d point2)
The square of the distance between two points taking account image-resolution.
|
double |
distanceSquared(Point3i point1,
Point3i point2)
The square of the distance between two points taking account image-resolution.
|
double |
distanceSquaredZRelative(Point3d point1,
Point3d point2) |
double |
distanceSquaredZRelative(Point3i point1,
Point3i point2) |
double |
distanceZRelative(Point3d point1,
Point3d point2) |
Resolution |
duplicateFlattenZ(int prevZSize) |
boolean |
equals(Object o) |
boolean |
hasEqualXAndY() |
int |
hashCode() |
double |
max(boolean do3D) |
double |
min(boolean do3D) |
Resolution |
scaleXY(ScaleFactor scaleFactor) |
String |
toString() |
double |
unitArea() |
UnitConverter |
unitConvert()
Converts voxelized measurements to/from physical units.
|
double |
unitVolume() |
double |
valueByDimension(AxisType axisType) |
double |
valueByDimension(int dimIndex) |
double |
x() |
double |
y() |
double |
z() |
double |
zRelative()
Assumes x and y has constant resolution, and gives the relative resolution of z to x or y.
|
public Resolution()
public Resolution(double x, double y, double z) throws CreateException
CreateException
public Resolution(Tuple3d tuple) throws CreateException
Note all dimensions must have positive (i.e. non-zero) resolution.
X and Y are not allowed have NaN but this is acceptable for the Z-value.
tuple
- the resolution for X, Y and ZCreateException
public Resolution duplicateFlattenZ(int prevZSize)
public double x()
public double y()
public double z()
public double unitVolume()
public double unitArea()
public Resolution scaleXY(ScaleFactor scaleFactor)
public double max(boolean do3D)
public double min(boolean do3D)
public boolean hasEqualXAndY()
public double distanceSquared(Point3i point1, Point3i point2)
point1
- first pointpoint2
- second pointpublic double distanceSquared(Point3d point1, Point3d point2)
point1
- first pointpoint2
- second pointpublic UnitConverter unitConvert()
public double zRelative()
public final double valueByDimension(int dimIndex)
public final double valueByDimension(AxisType axisType)
Copyright © 2010–2021 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.