Functions
imgmax.h File Reference
#include "img.h"
Include dependency graph for imgmax.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int imgMax (IMG *img, float *maxvalue)
int imgAbsMax (IMG *img, float *maxvalue)
int imgMinMax (IMG *img, float *minvalue, float *maxvalue)
int imgFrameMinMax (IMG *img, int frame, float *minvalue, float *maxvalue)
int imgReadMinMax (const char *fname, float *fmin, float *fmax)
int imgSmoothMax (IMG *img, float *maxvalue)

Function Documentation

int imgAbsMax ( IMG img,
float *  maxvalue 
)

Searches the max absolute pixel value in the IMG data. Sets maxvalue to the absolute max value with sign.

Parameters:
imgimage structure
maxvaluepointer to output
Returns:
0 if ok, 1 invalid image status, 2 invalid output pointer, 3 invalid image dimensions

Definition at line 86 of file imgmax.c.

References IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, and IMG::status.

Referenced by test_img_io().

int imgFrameMinMax ( IMG img,
int  frame,
float *  minvalue,
float *  maxvalue 
)

Searches the min and max pixel value in one frame (1..dimt) of the IMG data.

Parameters:
imgimage structure
frameframe number [1..number of frames]
minvaluepointer to output of minimum
maxvaluepointer to output of maximum
Returns:
0 if ok, 1 invalid image status, 2 invalid output pointer, 3 invalid image dimensions

Definition at line 147 of file imgmax.c.

References IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, and IMG::status.

Referenced by img2svol(), and test_img_io().

int imgMax ( IMG img,
float *  maxvalue 
)

Searches the max pixel value in the IMG data.

Parameters:
imgimage structure
maxvaluepointer to output
Returns:
0 if ok, 1 invalid image status, 2 invalid output pointer, 3 invalid image dimensions

Definition at line 57 of file imgmax.c.

References IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, and IMG::status.

Referenced by test_img_io().

int imgMinMax ( IMG img,
float *  minvalue,
float *  maxvalue 
)

Searches the min and max pixel value in the IMG data.

Parameters:
imgimage structure
minvaluepointer to output of minimum
maxvaluepointer to output of maximum
Returns:
0 if ok, 1 invalid image status, 2 invalid output pointer, 3 invalid image dimensions

Definition at line 115 of file imgmax.c.

References IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, and IMG::status.

Referenced by imgReadMinMax(), imgSetAnalyzeHeader(), imgWriteAnalyze(), and test_img_io().

int imgReadMinMax ( const char *  fname,
float *  fmin,
float *  fmax 
)

Read the calibrated maximum and minimum pixel values in the specified file in ECAT 7, ECAT 6.3, or Analyze 7.5 format. File is read frame-by-frame with normal IMG functions.

Parameters:
fnameECAT 7 or ECAT 6.3 filename, or Analyze 7.5 database
fminpointer to minimum pixel value that will be set by this function
fmaxpointer to maximum pixel value that will be set by this function
Returns:
errstatus, which is STATUS_OK (0) when call was successful, and >0 in case of an error.

Definition at line 180 of file imgmax.c.

References IMG_TEST, imgEmpty(), imgInit(), imgMinMax(), imgReadFrame(), STATUS_FAULT, STATUS_NOMATRIX, and STATUS_OK.

Here is the call graph for this function:

int imgSmoothMax ( IMG img,
float *  maxvalue 
)

Searches the spatially (3x3) smoothed max pixel value in the IMG data.

Parameters:
imgimage structure
maxvaluepointer to output
Returns:
0 if ok, 1 invalid image status, 2 invalid output pointer, 3 invalid image dimensions

Definition at line 212 of file imgmax.c.

References IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, and IMG::status.