Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

imamax.c File Reference

#include <math.h>
#include <stdio.h>
#include "idima.h"
#include "iderr.h"
#include "idprint.h"

Go to the source code of this file.

Defines

#define CCMIN(t1)
#define CC(t1)
#define CCMM(t1)
 renvoie le Min et Max d'un PPIMAGE, quelque soit son type

#define CCMOY(t1)
#define CCVAR(t1)
#define CCMV(t1)
 renvoie lea Moyenne et la Variance d'un PPIMAGE, quelque soit son type


Functions

double IdImaMinima (PPIMAGE ima)
double IdImaMaxima (PPIMAGE ima)
int IdImaMinMax (PPIMAGE ima, double *mini, double *maxi)
double IdImaMoyenne (PPIMAGE ima)
 Compute the mean value of a full image.

double IdImaVariance (PPIMAGE ima)
int IdImaMoyVar (PPIMAGE ima, double *moy, double *var)
double IdImaDyn (PPIMAGE ima)
 Calcule la Dynamique (max - min) d'une image, quelque soit son type.


Define Documentation

#define CC t1   ) 
 

Value:

maxi = (double) ((t1)ima)[0][0]; \ for (i=0;i<Y;i++) for (j=0;j<X;j++) \ { \ if (((t1)ima)[i][j]>maxi) \ maxi = (double) ((t1)ima)[i][j]; \ }

Definition at line 131 of file imamax.c.

Referenced by IdImaMaxima(), IdImaZoom(), IdSigMax(), IdVolMaxPlanX(), and IdVolMinPlanX().

#define CCMIN t1   ) 
 

Value:

mini = (double) ((t1)ima)[0][0]; \ for (i=0;i<Y;i++) for (j=0;j<X;j++) \ { \ if (((t1)ima)[i][j]<mini) \ mini = (double) ((t1)ima)[i][j]; \ }

Definition at line 70 of file imamax.c.

Referenced by IdImaMinima().

#define CCMM t1   ) 
 

Value:

*maxi = *mini = (double) ((t1)ima)[0][0]; \ for (i=0;i<Y;i++) for (j=0;j<X;j++) \ { \ if (((t1)ima)[i][j]>*maxi) \ { *maxi = (double) ((t1)ima)[i][j]; } \ else if (((t1)ima)[i][j]<*mini) \ { *mini = (double) ((t1)ima)[i][j]; } \ }
renvoie le Min et Max d'un PPIMAGE, quelque soit son type

Parameters:
pi Pointeur sur le PPIMAGE a traiter.
mini Pointeur sur le min a renvoyer (C'est un DOUBLE)
maxi Pointeur sur le max a renvoyer (C'est un DOUBLE)

Definition at line 200 of file imamax.c.

Referenced by IdImaMinMax().

#define CCMOY t1   ) 
 

Value:

for (i=0;i<Y;i++) for (j=0;j<X;j++) \ { \ moy += (double) ((t1)ima)[i][j]; \ }

Definition at line 240 of file imamax.c.

Referenced by IdImaMoyenne().

#define CCMV t1   ) 
 

Value:

for (i=0;i<Y;i++) for (j=0;j<X;j++) \ *moy += (double) ((t1)ima)[i][j]; \ *moy = *moy /((double)X*(double)Y); \ for (i=0;i<Y;i++) for (j=0;j<X;j++) \ *var += pow((*moy - ((t1)ima)[i][j]),2.0);
renvoie lea Moyenne et la Variance d'un PPIMAGE, quelque soit son type

Parameters:
pi Pointeur sur le PPIMAGE a traiter.
moy Pointeur sur la moyenne a renvoyer (C'est un DOUBLE)
var Pointeur sur la variance a renvoyer (C'est un DOUBLE)

Definition at line 378 of file imamax.c.

Referenced by IdImaMoyVar().

#define CCVAR t1   ) 
 

Value:

for (i=0;i<Y;i++) for (j=0;j<X;j++) \ { \ var += pow((moy -(double) ( ((t1)ima)[i][j])),2.0 ); \ }

Definition at line 303 of file imamax.c.

Referenced by IdImaVariance().


Function Documentation

double IdImaDyn PPIMAGE  ima  ) 
 

Calcule la Dynamique (max - min) d'une image, quelque soit son type.

Parameters:
ima PPIMAGE dont on calcule la dynamique
Returns:
dynamique calculee (c'est un DOUBLE)

Definition at line 449 of file imamax.c.

References IdImaMaxima(), and IdImaMinima().

double IdImaMaxima PPIMAGE  ima  ) 
 

Definition at line 140 of file imamax.c.

References CC, IDERR_WRONG_LIBTYPE, IdErrno, IdImaDimX(), IdImaDimY(), IdImaType(), IdPrintf(), IMA_CHAR, IMA_DOUBLE, IMA_FLOAT, IMA_LONG, IMA_SHORT, IMA_UCHAR, IMA_ULONG, IMA_USHORT, PPIMAGE_CHAR, PPIMAGE_DOUBLE, PPIMAGE_FLOAT, PPIMAGE_LONG, PPIMAGE_SHORT, PPIMAGE_UCHAR, PPIMAGE_ULONG, and PPIMAGE_USHORT.

Referenced by DisplayObject2D(), and IdImaDyn().

double IdImaMinima PPIMAGE  ima  ) 
 

Definition at line 78 of file imamax.c.

References CCMIN, IdExit(), IdImaDimX(), IdImaDimY(), IdImaType(), IdPrintf(), IMA_CHAR, IMA_DOUBLE, IMA_FLOAT, IMA_LONG, IMA_SHORT, IMA_UCHAR, IMA_ULONG, IMA_USHORT, PPIMAGE_CHAR, PPIMAGE_DOUBLE, PPIMAGE_FLOAT, PPIMAGE_LONG, PPIMAGE_SHORT, PPIMAGE_UCHAR, PPIMAGE_ULONG, and PPIMAGE_USHORT.

Referenced by DisplayObject2D(), and IdImaDyn().

int IdImaMinMax PPIMAGE  ima,
double *  mini,
double *  maxi
 

Definition at line 210 of file imamax.c.

References CCMM, IDERR_WRONG_LIBTYPE, IdErrno, IdImaDimX(), IdImaDimY(), IdImaType(), IdPrintf(), IMA_CHAR, IMA_DOUBLE, IMA_FLOAT, IMA_LONG, IMA_SHORT, IMA_UCHAR, IMA_ULONG, IMA_USHORT, PPIMAGE_CHAR, PPIMAGE_DOUBLE, PPIMAGE_FLOAT, PPIMAGE_LONG, PPIMAGE_SHORT, PPIMAGE_UCHAR, PPIMAGE_ULONG, and PPIMAGE_USHORT.

double IdImaMoyenne PPIMAGE  ima  ) 
 

Compute the mean value of a full image.

Parameters:
ima Image of requested mean value.
Returns:
Computed mean value.

Definition at line 251 of file imamax.c.

References CCMOY, IDERR_WRONG_LIBTYPE, IdErrno, IdImaDimX(), IdImaDimY(), IdImaType(), IdPrintf(), IMA_CHAR, IMA_DOUBLE, IMA_FLOAT, IMA_LONG, IMA_SHORT, IMA_UCHAR, IMA_ULONG, IMA_USHORT, PPIMAGE_CHAR, PPIMAGE_DOUBLE, PPIMAGE_FLOAT, PPIMAGE_LONG, PPIMAGE_SHORT, PPIMAGE_UCHAR, PPIMAGE_ULONG, and PPIMAGE_USHORT.

Referenced by IdImaVariance().

int IdImaMoyVar PPIMAGE  ima,
double *  moy,
double *  var
 

Definition at line 384 of file imamax.c.

References CCMV, IDERR_WRONG_LIBTYPE, IdErrno, IdImaDimX(), IdImaDimY(), IdImaType(), IdPrintf(), IMA_CHAR, IMA_DOUBLE, IMA_FLOAT, IMA_LONG, IMA_SHORT, IMA_UCHAR, IMA_ULONG, IMA_USHORT, PPIMAGE_CHAR, PPIMAGE_DOUBLE, PPIMAGE_FLOAT, PPIMAGE_LONG, PPIMAGE_SHORT, PPIMAGE_UCHAR, PPIMAGE_ULONG, and PPIMAGE_USHORT.

double IdImaVariance PPIMAGE  ima  ) 
 

Definition at line 309 of file imamax.c.

References CCVAR, IDERR_WRONG_LIBTYPE, IdErrno, IdImaDimX(), IdImaDimY(), IdImaMoyenne(), IdImaType(), IdPrintf(), IMA_CHAR, IMA_DOUBLE, IMA_FLOAT, IMA_LONG, IMA_SHORT, IMA_UCHAR, IMA_ULONG, IMA_USHORT, PPIMAGE_CHAR, PPIMAGE_DOUBLE, PPIMAGE_FLOAT, PPIMAGE_LONG, PPIMAGE_SHORT, PPIMAGE_UCHAR, PPIMAGE_ULONG, and PPIMAGE_USHORT.


Generated on Wed Oct 19 09:28:36 2005 for SIMRI3D by doxygen 1.3.7