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  

mri_histobyte.c File Reference

#include "mrilib.h"

Go to the source code of this file.


Functions

void mri_histobyte (MRI_IMAGE *im, int *hist)

Function Documentation

void mri_histobyte MRI_IMAGE   im,
int *    hist
 

int hist[256] *

Definition at line 13 of file mri_histobyte.c.

References ENTRY, MRI_IMAGE::kind, MRI_BYTE_PTR, and MRI_IMAGE::nvox.

Referenced by main(), RCREND_reload_dataset(), and REND_reload_dataset().

00014 {
00015    register int ih , npix , ii ;
00016    byte * bar ;
00017 
00018 ENTRY("mri_histobyte") ;
00019 
00020    if( im == NULL || im->kind != MRI_byte || hist == NULL ) EXRETURN ;
00021 
00022    npix = im->nvox ;
00023    bar  = MRI_BYTE_PTR(im) ;
00024 
00025    for( ih=0 ; ih < 256 ; ih++ ) hist[ih] = 0 ;
00026 
00027    for( ii=0 ; ii < npix ; ii++ )
00028       hist[ bar[ii] ] ++ ;
00029 
00030    EXRETURN ;
00031 }
 

Powered by Plone

This site conforms to the following standards: