Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main 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
bitbitrow
int cols
int format
int forceplain
graymaxvalP
graygrayrow
gray maxval
FILE * file
pixelpixelrow
int * formatP
xelxelrow
xel ** xels
int maxcolors
int * colorsP
pixelcolorP
int value
int position
int colors
xelval newmaxval
int newformat

Define Documentation

#define BSD
 

Definition at line 25 of file libpnmrw.c.

#define HASH_SIZE   20023
 

#define pbm_allocarray cols,
rows       ((bit**) pm_allocarray( cols, rows, sizeof(bit) ))
 

Definition at line 40 of file libpnmrw.c.

#define pbm_allocrow cols       ((bit*) pm_allocrow( cols, sizeof(bit) ))
 

Definition at line 41 of file libpnmrw.c.

#define pbm_freearray bits,
rows       pm_freearray( (char**) bits, rows )
 

Definition at line 42 of file libpnmrw.c.

#define pbm_freerow bitrow       pm_freerow( (char*) bitrow )
 

Definition at line 43 of file libpnmrw.c.

#define pgm_allocarray cols,
rows       ((gray**) pm_allocarray( cols, rows, sizeof(gray) ))
 

Definition at line 44 of file libpnmrw.c.

#define pgm_allocrow cols       ((gray*) pm_allocrow( cols, sizeof(gray) ))
 

Definition at line 45 of file libpnmrw.c.

#define pgm_freearray grays,
rows       pm_freearray( (char**) grays, rows )
 

Definition at line 46 of file libpnmrw.c.

#define pgm_freerow grayrow       pm_freerow( (char*) grayrow )
 

Definition at line 47 of file libpnmrw.c.

#define pm_error      exit(1)
 

Definition at line 13 of file libpnmrw.c.

#define ppm_allocarray cols,
rows       ((pixel**) pm_allocarray( cols, rows, sizeof(pixel) ))
 

Definition at line 48 of file libpnmrw.c.

#define ppm_allocrow cols       ((pixel*) pm_allocrow( cols, sizeof(pixel) ))
 

Definition at line 49 of file libpnmrw.c.

#define ppm_freearray pixels,
rows       pm_freearray( (char**) pixels, rows )
 

Definition at line 50 of file libpnmrw.c.

#define ppm_freerow pixelrow       pm_freerow( (char*) pixelrow )
 

Definition at line 51 of file libpnmrw.c.

#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)
 

Definition at line 35 of file libpnmrw.c.


Function Documentation

char* pm_allocrow cols   ,
size   
 

int pnm_readpnminit file   ,
colsP   ,
rowsP   ,
maxvalP   ,
formatP   
 


Variable Documentation

bit * bitrow
 

Definition at line 476 of file libpnmrw.c.

pixel * colorP
 

Definition at line 1346 of file libpnmrw.c.

int colors
 

Definition at line 1303 of file libpnmrw.c.

int * colorsP
 

Definition at line 1179 of file libpnmrw.c.

int cols
 

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().

int * colsP
 

Definition at line 972 of file libpnmrw.c.

FILE* file
 

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().

int forceplain
 

Definition at line 1098 of file libpnmrw.c.

int format
 

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().

int * formatP
 

Definition at line 974 of file libpnmrw.c.

gray * grayrow
 

Definition at line 646 of file libpnmrw.c.

int maxcolors
 

Definition at line 1270 of file libpnmrw.c.

xelval maxval
 

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().

xelval * maxvalP
 

Definition at line 975 of file libpnmrw.c.

int newformat
 

Definition at line 1660 of file libpnmrw.c.

xelval newmaxval
 

Definition at line 1659 of file libpnmrw.c.

pixel * pixelrow
 

Definition at line 847 of file libpnmrw.c.

int position
 

Definition at line 1141 of file libpnmrw.c.

Referenced by MCW_popup_meter(), read_application_extension(), read_unknown_extension(), and UnQuantZig().

char* progname [static]
 

Definition at line 56 of file libpnmrw.c.

int rows
 

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().

int * rowsP
 

Definition at line 973 of file libpnmrw.c.

unsigned size
 

Definition at line 1102 of file vp_file.c.

int value
 

Definition at line 1245 of file vp_context.c.

xel * xelrow
 

Definition at line 1037 of file libpnmrw.c.

xel** xels
 

Definition at line 1095 of file libpnmrw.c.

 

Powered by Plone

This site conforms to the following standards: