public class ConvertStackToRGB extends Object
Modifier and Type | Method and Description |
---|---|
static RGBStack |
convert(DisplayStack stack,
boolean alwaysNew)
Converts all of a
DisplayStack to a RGBStack . |
static RGBStack |
convert(Stack stack,
StackDisplayer displayer,
boolean alwaysNew)
Converts all of a
DisplayStack to a RGBStack . |
static RGBStack |
convertCropped(DisplayStack stack,
BoundingBox box)
Converts a bounding-box region in
DisplayStack to a RGBStack . |
public static RGBStack convert(Stack stack, StackDisplayer displayer, boolean alwaysNew) throws CreateException
DisplayStack
to a RGBStack
.stack
- the stack to convert.displayer
- how to convert stack
to be displayed.alwaysNew
- when true, new channels are always created. when false, they are only
created if needed (e.g. if the voxel-data type is not already 8-bit).RGBStack
with exactly three channels, and intensity-values
converted to 8-bit.CreateException
- cannot successfuly convert Stack
to a DisplayStack
(as an intermediate step).public static RGBStack convert(DisplayStack stack, boolean alwaysNew)
DisplayStack
to a RGBStack
.stack
- the stack to convert.alwaysNew
- when true, new channels are always created. when false, they are only
created if needed (e.g. if the voxel-data type is not already 8-bit).RGBStack
with identical voxels and size as stack
.public static RGBStack convertCropped(DisplayStack stack, BoundingBox box)
DisplayStack
to a RGBStack
.stack
- the stack, from which a portion is to be converted.box
- the region in stack
which is converted.RGBStack
with identical voxels and size as stack
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.