public class ScaleableBackground extends Object
In situations, where only particular regions of a large stack (or large after upscaling) are desired, this provides a more efficient lazy interpolation strategy (just for the needed regions) rather than eagerly interpolating the entire background.
It is always flattened via a maximum intensity projection.
Modifier and Type | Method and Description |
---|---|
Stack |
extractRegionFromStack(BoundingBox box)
Extracts a portion of a stack (flattened and maybe scaled) corresponding to a bounding-box
|
int |
getNumberChannels()
Number of channels in the background.
|
boolean |
isRGB()
Does the display-stack contain an RGB image?
|
static ScaleableBackground |
noScaling(DisplayStack stack)
Creates a background from a stack without any scaling.
|
static ScaleableBackground |
scaleBy(DisplayStack stack,
ScaleFactor scaleFactor,
VoxelsResizer resizer)
Creates a background from a stack with scaling.
|
Extent |
sizeAfterAnyScaling()
The size of the background after any scaling has occurred.
|
public static ScaleableBackground noScaling(DisplayStack stack)
stack
- the stackpublic static ScaleableBackground scaleBy(DisplayStack stack, ScaleFactor scaleFactor, VoxelsResizer resizer)
stack
- the stack.scaleFactor
- what to scale the stack by.resizer
- an interpolator for resizing voxels.ScaleableBackground
.public int getNumberChannels()
public Stack extractRegionFromStack(BoundingBox box) throws OperationFailedException
box
- bounding-box representing the region.OperationFailedException
- if the operation cannot complete successfully.public Extent sizeAfterAnyScaling()
public boolean isRGB()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.