#ifndef msm_image_tools_H #define msm_image_tools_H /* Procedures that write image files with given names. */ /* Last edited on 2008-01-29 18:06:21 by hcgl */ #define msm_image_tools_H_COPYRIGHT \ "Copyright © 2007 by the State University of Campinas (UNICAMP)" #include #include #include #include #include #include #include #include #include /* SEQUENCE-TO-SEQUENCE DISTANCE MAP */ void msm_image_seq_seq_score_write_named ( msm_seq_desc_t *xp, msm_seq_desc_t *yp, msm_rung_score_proc_t *score, msm_pairing_t *pr, char *name, char *tag ); /* Writes to disk a color (PPM) image file called "{name}{tag}.ppm" that shows the distances between all samples of sequence {xp} and the samples of sequence {yp}. !!! Change to take a {msm_cand_vec_t} instead of a single {msm_pairing_t} !!! If {pr} is not NULL, the rungs of {pr} are plotted over the pair score image. The image is generated by {msm_image_seq_seq_score_paint}, colorized with {msm_image_colorize}, and the rungs are painted with {msm_image_pairing_paint}. Positive scores are reddish, negative scores are bluish, zero scores are white. The image is scaled down as needed to keep its size below some reasonable maximum size. */ /* PLOTTING CANDIDATES */ void msm_image_cand_write_named ( msm_cand_t *cd, float v, char *name, char *tag ); /* Writes to disk a grayscale (PGM) image called "{name}{tag}.pgm" showing the candidate {cd}. The image scale factor {scale} is scaled down as needed to keep the image size below some reasonable maximum size. The pixel in column {ix} and row {iy} incremented with {v/scale} whenever the candidate's pairing pairs sample {ix} of sequence 0 with sample sample {iy} of sequence 1. The darkness of the pixel is proportional to the final sum of all received values. */ /* PLOTTING CANDIDATE LISTS */ void msm_image_cand_vec_write_named ( msm_cand_vec_t *cdv, msm_seq_desc_t *xp, msm_seq_desc_t *yp, char *name, char *tag ); /* Writes to disk a geyscale (PGM) image called "{name}{tag}.pgm" showing the candidates of {cdv}. The image is produced with {msm_image_cand_vec_paint}. */ /* PLOTTING DYNAMIC PROGRAMMING TABLEAUS */ void msm_image_dyn_tableau_write_named ( int nx, /* Length of first sequence. */ int ny, /* Length of second sequence. */ msm_dyn_tableau_t *tb, /* Tableau to plot. */ msm_rung_t gopt, /* End-rung of optimum path, or {msm_rung_none} */ char *name, /* Prefix for file name. */ char *tag /* Tag for file name. */ ); /* Writes a PGM image called "{name}{tag}.pgm", with {nx} columns and {ny} rows, showing the scores of all rungs spanned by the tableau {tb}. The image is produced with {msm_image_dyn_tableau_scores_paint} and {msm_image_dyn_tableau_pairing_paint}. The image's scale is selected so that it is not too big. */ #endif