A toolkit for working with phylogenetic data.
PrinterBitmap Class Reference

#include <genesis/sequence/printers/bitmap.hpp>

Detailed Description

Print the sites of a SequenceSet as pixels in a bitmap.

By default, no colors are set, thus, the image will be completely black. You have to set the color_map() first, for example using the colors defined in nucleic_acid_colors() or amino_acid_colors().

Definition at line 74 of file bitmap.hpp.

Public Member Functions

 PrinterBitmap ()=default
 PrinterBitmap (PrinterBitmap const &)=default
 PrinterBitmap (PrinterBitmap &&)=default
 ~PrinterBitmap ()=default
PrinterBitmapcolor_map (std::map< char, utils::Color > const &value)
 Set the list of Colors to use for the Sequence charaters. More...
std::map< char, utils::Color > const & color_map () const
 Get the currently set list of Colors for each Sequence character. More...
PrinterBitmapoperator= (PrinterBitmap const &)=default
PrinterBitmapoperator= (PrinterBitmap &&)=default
PrinterBitmappixel_height_per_char (size_t value)
size_t pixel_height_per_char () const
PrinterBitmappixel_width_per_char (size_t value)
size_t pixel_width_per_char () const
void to_file (SequenceSet const &set, std::string const &filename) const
void to_stream (SequenceSet const &set, std::ostream &outstream) const

Constructor & Destructor Documentation

◆ PrinterBitmap() [1/3]

PrinterBitmap ( )

◆ ~PrinterBitmap()

~PrinterBitmap ( )

◆ PrinterBitmap() [2/3]

PrinterBitmap ( PrinterBitmap const &  )

◆ PrinterBitmap() [3/3]

PrinterBitmap ( PrinterBitmap &&  )

Member Function Documentation

◆ color_map() [1/2]

PrinterBitmap & color_map ( std::map< char, utils::Color > const &  value)

Set the list of Colors to use for the Sequence charaters.

The provided map sets the colors for each Sequence character. The presettings nucleic_acid_colors() and amino_acid_colors() for default sequence types can be used as input for this parameter. If the colors map does not contain a key for one of the chars in the sequence, the char is printed in black.

Definition at line 112 of file bitmap.cpp.

◆ color_map() [2/2]

std::map< char, utils::Color > const & color_map ( ) const

Get the currently set list of Colors for each Sequence character.

See the setter for details.

Definition at line 118 of file bitmap.cpp.

◆ operator=() [1/2]

PrinterBitmap& operator= ( PrinterBitmap const &  )

◆ operator=() [2/2]

PrinterBitmap& operator= ( PrinterBitmap &&  )

◆ pixel_height_per_char() [1/2]

PrinterBitmap & pixel_height_per_char ( size_t  value)

Definition at line 123 of file bitmap.cpp.

◆ pixel_height_per_char() [2/2]

size_t pixel_height_per_char ( ) const

Definition at line 132 of file bitmap.cpp.

◆ pixel_width_per_char() [1/2]

PrinterBitmap & pixel_width_per_char ( size_t  value)

Definition at line 137 of file bitmap.cpp.

◆ pixel_width_per_char() [2/2]

size_t pixel_width_per_char ( ) const

Definition at line 146 of file bitmap.cpp.

◆ to_file()

void to_file ( SequenceSet const &  set,
std::string const &  filename 
) const

Definition at line 59 of file bitmap.cpp.

◆ to_stream()

void to_stream ( SequenceSet const &  set,
std::ostream &  outstream 
) const

Definition at line 52 of file bitmap.cpp.

The documentation for this class was generated from the following files: