atlas#

convert_label_to_color(label, key='id', level=None, alpha=True, as_int=False, int_type='uint8')[source]#

Convert label using the atlas annotation colors.

Arguments

labelarray

List of labels to convert.

keystr

The key corresponding to the label.

levelnt or None

Convert at this level of the hierarchy. If None use full hierarchy.

alphabool

If True, return rgba values.

as_intbool

If True, return rgb value as as int between 0 and 255.

int_typedtype

Type for the color array.

Returns

colorsarray

List of colors for each label.

create_color_annotation(annotation_file_path)[source]#

Creates a rgb image from the atlas color data.

Arguments

annotation_file_pathstr

File name of the atlas annotation.

Returns

filenamestr

The name of the file to which the color atlas was written.

write_color_annotation(filename, annotation_file=None)[source]#

Creates a rgb image from the atlas color data.

Arguments

filenamestr

The name of the color palette file.

annotation_filestr

File name of the atlas annotation.

Returns

filenamestr

The name of the file to which the color atlas was written.

write_color_palette(filename=None)[source]#

Creates a pal or lut file for Imaris or Imagej based on label colors of atlas.

Arguments

filenamestr

The name of the color palette file.

Returns

filenamestr

The name of the file to which the color palette was written.