|  | 
                  
                  
                    
                    
                    
                    
    
            Doxygen Source Code DocumentationMain Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search
 
 libpnmrw.c File Reference#include <stdio.h>#include "libpnmrw.h"#include <string.h>
Go to the source code of this file. 
|  |  | 
 Defines |  | #define | pm_error(x)   exit(1) |  | #define | BSD |  | #define | rindex(s, c)   strrchr(s,c) |  | #define | pbm_allocarray(cols, rows)   ((bit**) pm_allocarray( cols, rows, sizeof(bit) )) |  | #define | pbm_allocrow(cols)   ((bit*) pm_allocrow( cols, sizeof(bit) )) |  | #define | pbm_freearray(bits, rows)   pm_freearray( (char**) bits, rows ) |  | #define | pbm_freerow(bitrow)   pm_freerow( (char*) bitrow ) |  | #define | pgm_allocarray(cols, rows)   ((gray**) pm_allocarray( cols, rows, sizeof(gray) )) |  | #define | pgm_allocrow(cols)   ((gray*) pm_allocrow( cols, sizeof(gray) )) |  | #define | pgm_freearray(grays, rows)   pm_freearray( (char**) grays, rows ) |  | #define | pgm_freerow(grayrow)   pm_freerow( (char*) grayrow ) |  | #define | ppm_allocarray(cols, rows)   ((pixel**) pm_allocarray( cols, rows, sizeof(pixel) )) |  | #define | ppm_allocrow(cols)   ((pixel*) pm_allocrow( cols, sizeof(pixel) )) |  | #define | ppm_freearray(pixels, rows)   pm_freearray( (char**) pixels, rows ) |  | #define | ppm_freerow(pixelrow)   pm_freerow( (char*) pixelrow ) |  | #define | HASH_SIZE   20023 |  | #define | ppm_hashpixel(p)   ( ( ( (long) PPM_GETR(p) * 33023 + (long) PPM_GETG(p) * 30013 + (long) PPM_GETB(p) * 27011 ) & 0x7fffffff ) % HASH_SIZE ) |  | 
 Functions |  | char * | pm_allocrow (cols, size) int cols |  | int | pnm_readpnminit (file, colsP, rowsP, maxvalP, formatP) FILE *file |  | 
 Variables |  | char * | progname |  | int | size |  |  | rows |  | int * | colsP |  | int * | rowsP |  | bit * | bitrow |  | int | cols |  | int | format |  | int | forceplain |  | gray * | maxvalP |  | gray * | grayrow |  | gray | maxval |  | FILE * | file |  | pixel * | pixelrow |  | int * | formatP |  | xel * | xelrow |  | xel ** | xels |  | int | maxcolors |  | int * | colorsP |  | pixel * | colorP |  | int | value |  | int | position |  | int | colors |  | xelval | newmaxval |  | int | newformat |  
 Define Documentation
 
 
 
 
  
    | 
        
          | #define pbm_allocrow | ( | cols |  | ) | ((bit*) pm_allocrow( cols, sizeof(bit) )) |  |  
 
 
 
 
 
  
    | 
        
          | #define pgm_freearray | ( | grays, |  
          |  |  | rows |  | ) | pm_freearray( (char**) grays, rows ) |  |  
 
 
  
    | 
        
          | #define pm_error | ( | x |  | ) | exit(1) |  |  
 
 
 
 
 
  
    | 
        
          | #define ppm_hashpixel | ( | p |  | ) | ( ( ( (long) PPM_GETR(p) * 33023 + (long) PPM_GETG(p) * 30013 + (long) PPM_GETB(p) * 27011 ) & 0x7fffffff ) % HASH_SIZE ) |  |  
 
  
    | 
        
          | #define rindex | ( | s, |  
          |  |  | c |  | ) | strrchr(s,c) |  |  
 Function Documentation
 
 
 Variable Documentation
 
 
 
 
 
  
    |  | 
 
Definition at line 1660 of file libpnmrw.c.
 
Referenced by allocate2D(), array_to_matrix(), get_inputs(), matrix_add(), matrix_check_columns(), matrix_copy(), matrix_create(), matrix_enter(), matrix_equate(), matrix_extract(), matrix_extract_rows(), matrix_file_read(), matrix_file_write(), matrix_multiply(), matrix_norm(), matrix_print(), matrix_scale(), matrix_subtract(), matrix_transpose(), ppmd_circle(), ppmd_filledrectangle(), ppmd_line(), ppmd_polyspline(), ppmd_spline3(), ppmd_text(), SUMA_allocate2D(), SUMA_assignColors(), vector_multiply(), and vector_multiply_subtract().     |  
 
 
  
    |  | 
 
Definition at line 586 of file libpnmrw.c.
 
Referenced by DCM_WriteFile(), debug_free_id(), debug_malloc_id(), debug_realloc_id(), fail_die_malloc(), fail_die_malloc_die(), fail_die_realloc(), file_exists(), find_fl_file_index(), internal_draw_frame(), main(), MD5_B64_file(), MD5_static_file(), open_file(), open_URL_hpf(), open_URL_http(), pgm_draw_frame(), read_scan_integer(), read_text_integer(), read_URL_ftp(), sample1(), sample2(), SUMA_read1D(), and text_getc().     |  
 
 
  
    |  | 
 
Definition at line 1660 of file libpnmrw.c.
 
Referenced by __glutFatalError(), __glutFatalUsage(), __glutWarning(), different(), grabPixels(), output_binary(), qh_appendprint(), qh_printafacet(), qh_printbegin(), qh_printcenter(), qh_printend(), qh_printfacet3vertex(), qh_printfacetNvertex_nonsimplicial(), qh_printfacetNvertex_simplicial(), qh_printfacets(), qh_printneighborhood(), qh_printvdiagram(), qh_printvoronoi(), SUMA_grabPixels(), and SUMA_writeSpecFile().     |  
 
 
 
 
  
    |  | 
 
Definition at line 1659 of file libpnmrw.c.
 
Referenced by initialize_simplex(), mri_read_ppm(), mri_read_ppm3(), mri_read_stuff(), mri_try_pgm(), new_MCW_arrowval(), new_MCW_optmenu(), qh_maxabsval(), qh_minabsval(), read_ppm_map(), refit_MCW_optmenu(), restart(), simplex_initialize(), and TTget_ppm().     |  
 
 
 
 
 
 
 
  
    |  | 
 
Definition at line 1642 of file libpnmrw.c.
 
Referenced by allocate2D(), array_to_matrix(), do_barray_io(), do_sarray_io(), free2D(), get_inputs(), matrix_add(), matrix_check_columns(), matrix_copy(), matrix_create(), matrix_enter(), matrix_equate(), matrix_extract(), matrix_extract_rows(), matrix_file_read(), matrix_file_write(), matrix_multiply(), matrix_norm(), matrix_print(), matrix_scale(), matrix_subtract(), matrix_transpose(), ppmd_circle(), ppmd_filledrectangle(), ppmd_line(), ppmd_polyspline(), ppmd_spline3(), ppmd_text(), qh_backnormal(), qh_determinant(), qh_detsimplex(), qh_facetarea_simplex(), qh_gausselim(), qh_printmatrix(), qh_randommatrix(), qh_rotateinput(), qh_sethyperplane_det(), qh_sethyperplane_gauss(), SUMA_allocate2D(), SUMA_free2D(), vector_multiply(), and vector_multiply_subtract().     |  
 
 
 
 
 |