public class MipmapTransforms extends Object
Constructor and Description |
---|
MipmapTransforms() |
Modifier and Type | Method and Description |
---|---|
static int |
getBestMipMapLevel(AffineTransform3D screenTransform,
Source<?> source,
int timepoint)
Get the mipmap level that best matches the given screen scale for the
given source.
|
static AffineTransform3D |
getMipmapTransformDefault(double[] resolution)
Compute the transformation (scale and shift) that maps from coordinates
in a down-scaled image to coordinates in the original image.
|
static double[] |
getPixelSourceSize(AffineTransform3D screenTransform,
Source<?> source,
int timepoint,
int mipmapIndex)
Compute the size of the backprojected screen pixel in the
Source space. |
static double |
getVoxelScreenSize(AffineTransform3D screenTransform,
Source<?> source,
int timepoint,
int mipmapIndex)
Compute the projected voxel size at the given screen transform and mipmap
level of a
Source . |
public static AffineTransform3D getMipmapTransformDefault(double[] resolution)
resolution
- the down-scaling factors in each dimension. {4,4,2} means
every pixel in the down-scaled image corresponds to a 4x4x2
pixel block in the original image.public static double getVoxelScreenSize(AffineTransform3D screenTransform, Source<?> source, int timepoint, int mipmapIndex)
Source
. Take a source voxel (0,0,0)-(1,1,1) at the
given mipmap level and transform it to the screen image at the given
screen scale. Take the maximum of the screen extends of the transformed
projected voxel edges.screenTransform
- transforms screen coordinates to global coordinates.source
- the sourcetimepoint
- for which timepoint to query the sourcemipmapIndex
- mipmap levelpublic static double[] getPixelSourceSize(AffineTransform3D screenTransform, Source<?> source, int timepoint, int mipmapIndex)
Source
space.
Take a screen pixel (0,0)-(1,1) and transform it into the
source coordinate system at the given mipmap level and screen scale,
then compute the length of the resulting vectors.screenTransform
- transforms screen coordinates to global coordinates.source
- the sourcetimepoint
- for which timepoint to query the sourcemipmapIndex
- mipmap levelpublic static int getBestMipMapLevel(AffineTransform3D screenTransform, Source<?> source, int timepoint)
screenTransform
- transforms screen coordinates to global coordinates.source
- the sourcetimepoint
- for which timepoint to query the sourceCopyright © 2015–2021 Fiji. All rights reserved.