Class ConvertStackToRGB
Object
org.anchoranalysis.image.io.stack.ConvertStackToRGB
public class ConvertStackToRGB extends Object
- Author:
- Owen Feehan
-
Method Summary
Modifier and Type Method Description static RGBStackconvert(DisplayStack stack, boolean alwaysNew)Converts all of aDisplayStackto aRGBStack.static RGBStackconvert(Stack stack, StackDisplayer displayer, boolean alwaysNew)Converts all of aDisplayStackto aRGBStack.static RGBStackconvertCropped(DisplayStack stack, org.anchoranalysis.spatial.box.BoundingBox box)Converts a bounding-box region inDisplayStackto aRGBStack.
-
Method Details
-
convert
public static RGBStack convert(Stack stack, StackDisplayer displayer, boolean alwaysNew) throws CreateExceptionConverts all of aDisplayStackto aRGBStack.- Parameters:
stack- the stack to convert.displayer- how to convertstackto 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
RGBStackwith exactly three channels, and intensity-values converted to 8-bit. - Throws:
CreateException- cannot successfuly convertStackto aDisplayStack(as an intermediate step).
-
convert
Converts all of aDisplayStackto 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
RGBStackwith identical voxels and size asstack.
-
convertCropped
public static RGBStack convertCropped(DisplayStack stack, org.anchoranalysis.spatial.box.BoundingBox box)Converts a bounding-box region inDisplayStackto aRGBStack.- Parameters:
stack- the stack, from which a portion is to be converted.box- the region instackwhich is converted.- Returns:
- a newly created
RGBStackwith identical voxels and size asstack.
-