Class ConvertStackToRGB
Object
ConvertStackToRGB
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic RGBStack
convert
(DisplayStack stack, boolean alwaysNew) Converts all of aDisplayStack
to aRGBStack
.static RGBStack
convert
(Stack stack, StackDisplayer displayer, boolean alwaysNew) Converts all of aDisplayStack
to aRGBStack
.static RGBStack
convertCropped
(DisplayStack stack, BoundingBox box) Converts a bounding-box region inDisplayStack
to aRGBStack
.
-
Method Details
-
convert
public static RGBStack convert(Stack stack, StackDisplayer displayer, boolean alwaysNew) throws CreateException Converts all of aDisplayStack
to aRGBStack
.- Parameters:
stack
- the stack to convert.displayer
- how to convertstack
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).- Returns:
- a newly created
RGBStack
with exactly three channels, and intensity-values converted to 8-bit. - Throws:
CreateException
- cannot successfuly convertStack
to aDisplayStack
(as an intermediate step).
-
convert
Converts all of aDisplayStack
to aRGBStack
.- Parameters:
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).- Returns:
- a newly created
RGBStack
with identical voxels and size asstack
.
-
convertCropped
Converts a bounding-box region inDisplayStack
to aRGBStack
.- Parameters:
stack
- the stack, from which a portion is to be converted.box
- the region instack
which is converted.- Returns:
- a newly created
RGBStack
with identical voxels and size asstack
.
-