A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 ( )
default
~PrinterBitmap ( )
default
PrinterBitmap ( PrinterBitmap const &  )
default
PrinterBitmap ( PrinterBitmap &&  )
default

Member Function Documentation

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.

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.

PrinterBitmap& operator= ( PrinterBitmap const &  )
default
PrinterBitmap& operator= ( PrinterBitmap &&  )
default
PrinterBitmap & pixel_height_per_char ( size_t  value)

Definition at line 123 of file bitmap.cpp.

size_t pixel_height_per_char ( ) const

Definition at line 132 of file bitmap.cpp.

PrinterBitmap & pixel_width_per_char ( size_t  value)

Definition at line 137 of file bitmap.cpp.

size_t pixel_width_per_char ( ) const

Definition at line 146 of file bitmap.cpp.

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

Definition at line 59 of file bitmap.cpp.

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: