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

volmax.c File Reference

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

Go to the source code of this file.

Defines

#define CC(t1)
#define DD(t1)
#define EE(t1)
#define FF(t1)
#define HH(t1)
#define II(t1)
#define JJ(t1)
#define GG(t1)

Functions

double IdVolMaxPlanX (PPPVOLUME vol, int X)
double IdVolMaxPlanY (PPPVOLUME vol, int Y)
double IdVolMaxPlanZ (PPPVOLUME vol, int Z)
double IdVolMaxima (PPPVOLUME vol)
double IdVolMoyenne (PPPVOLUME vol)
double IdVolVariance (PPPVOLUME vol)
int IdVolMoyVar (PPPVOLUME vol, double *moy, double *var)
int IdVolMinMax (PPPVOLUME vol, double *mini, double *maxi)
 Compute minimum and maximum of a volume (non COMPLEX).


Define Documentation

#define CC t1   ) 
 

Value:

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

Definition at line 82 of file volmax.c.

#define DD t1   ) 
 

Value:

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

Definition at line 163 of file volmax.c.

Referenced by IdVolMaxPlanY(), and IdVolMinPlanY().

#define EE t1   ) 
 

Value:

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

Definition at line 244 of file volmax.c.

Referenced by IdVolMaxPlanZ(), and IdVolMinPlanZ().

#define FF t1   ) 
 

Value:

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

Definition at line 324 of file volmax.c.

Referenced by IdVolMaxima(), and IdVolMinima().

#define GG t1   ) 
 

Value:

*mini = *maxi = (double) ((t1)vol)[0][0][0]; \ for (t=0;t<Z;t++) for (i=0;i<Y;i++) for (j=0;j<X;j++) \ { \ if (((t1)vol)[t][i][j]>*maxi) \ *maxi = (double) ((t1)vol)[t][i][j]; \ if (((t1)vol)[t][i][j]<*mini) \ *mini = (double) ((t1)vol)[t][i][j]; \ }

Referenced by IdVolMinMax().

#define HH t1   ) 
 

Value:

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

Definition at line 402 of file volmax.c.

Referenced by IdVolMoyenne().

#define II t1   ) 
 

Value:

for (t=0;t<Z;t++) for (i=0;i<Y;i++) for (j=0;j<X;j++) \ var += pow((moy - ((t1)vol)[t][i][j]),2.0);

Definition at line 483 of file volmax.c.

Referenced by IdVolVariance().

#define JJ t1   ) 
 

Value:

for (t=0;t<Z;t++) for (i=0;i<Y;i++) for (j=0;j<X;j++) \ *moy += (double) ((t1)vol)[t][i][j]; \ *moy = *moy /((double)X*(double)Y*(double)Z); \ for (t=0;t<Z;t++) for (i=0;i<Y;i++) for (j=0;j<X;j++) \ *var += pow((*moy - ((t1)vol)[t][i][j]),2.0);

Definition at line 575 of file volmax.c.

Referenced by IdVolMoyVar().


Function Documentation

double IdVolMaxima PPPVOLUME  vol  ) 
 

Definition at line 332 of file volmax.c.

References FF, IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimY, IdVolDimZ, IdVolType, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

Referenced by DisplayVol(), and TestSequence2D().

double IdVolMaxPlanX PPPVOLUME  vol,
int  X
 

Definition at line 89 of file volmax.c.

References CC, IdErrPrintf(), IdVolDimY, IdVolDimZ, IdVolType, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

double IdVolMaxPlanY PPPVOLUME  vol,
int  Y
 

Definition at line 170 of file volmax.c.

References DD, IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimZ, IdVolType, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

double IdVolMaxPlanZ PPPVOLUME  vol,
int  Z
 

Definition at line 251 of file volmax.c.

References EE, IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimY, IdVolType, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

int IdVolMinMax PPPVOLUME  vol,
double *  mini,
double *  maxi
 

Compute minimum and maximum of a volume (non COMPLEX).

Parameters:
vol Pointer to concerned volume.
mini Computed minimum.
maxi Computed maximum.
Returns:
1 on succes, 0 on failure

Definition at line 636 of file volmax.c.

References GG, IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimY, IdVolDimZ, IdVolType, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

Referenced by WriteVolRecUchar().

double IdVolMoyenne PPPVOLUME  vol  ) 
 

Definition at line 408 of file volmax.c.

References HH, IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimY, IdVolDimZ, IdVolType, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

Referenced by IdVolVariance().

int IdVolMoyVar PPPVOLUME  vol,
double *  moy,
double *  var
 

Definition at line 582 of file volmax.c.

References IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimY, IdVolDimZ, IdVolType, JJ, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.

double IdVolVariance PPPVOLUME  vol  ) 
 

Definition at line 488 of file volmax.c.

References IDERR_WRONG_LIBTYPE, IdErrno, IdErrPrintf(), IdVolDimX, IdVolDimY, IdVolDimZ, IdVolMoyenne(), IdVolType, II, PPPVOLUME_CHAR, PPPVOLUME_DOUBLE, PPPVOLUME_FLOAT, PPPVOLUME_LONG, PPPVOLUME_SHORT, PPPVOLUME_UCHAR, PPPVOLUME_USHORT, VOL_CHAR, VOL_DOUBLE, VOL_FLOAT, VOL_LONG, VOL_SHORT, VOL_UCHAR, and VOL_USHORT.


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