PLUTO
set_image.c File Reference
#include "pluto.h"
Include dependency graph for set_image.c:

Go to the source code of this file.

Macros

#define MAX_IMAGE_NUMBER   32
 

Functions

void CreateImage (char *var_name)
 
ImageGetImage (char *var_name)
 

Variables

static Image image [MAX_IMAGE_NUMBER]
 

Macro Definition Documentation

#define MAX_IMAGE_NUMBER   32

Definition at line 2 of file set_image.c.

Function Documentation

void CreateImage ( char *  var_name)

Definition at line 8 of file set_image.c.

19 {
20  static int icount = 0;
21 
22  sprintf (image[icount].basename,"%s",var_name);
23 
24  image[icount].slice_plane = X12_PLANE;
25  image[icount].slice_coord = 0.0;
26 
27  image[icount].max = image[icount].min = 0.0;
28  image[icount].logscale = 0;
29  image[icount].colormap = "br";
30 
31  icount++;
32 }
#define X12_PLANE
Definition: pluto.h:158
double max
Definition: structs.h:308
char * colormap
Definition: structs.h:304
double slice_coord
Definition: structs.h:310
double min
Definition: structs.h:309
int logscale
Definition: structs.h:303
int slice_plane
Definition: structs.h:302
static Image image[MAX_IMAGE_NUMBER]
Definition: set_image.c:4

Here is the caller graph for this function:

Image* GetImage ( char *  var_name)

Definition at line 35 of file set_image.c.

45 {
46  int indx = -1;
47 
48  while (strcmp(image[++indx].basename, var_name)) {
49  if (image[indx].colormap == NULL) { /* if colormap is NULL, image does not exist! */
50  print1 ("! Error: var '%s' is not associated with a valid image\n");
51  QUIT_PLUTO(1);
52  }
53  }
54 
55  return (image + indx);
56 }
void print1(const char *fmt,...)
Definition: amrPluto.cpp:511
#define QUIT_PLUTO(e_code)
Definition: macros.h:125
static Image image[MAX_IMAGE_NUMBER]
Definition: set_image.c:4

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Image image[MAX_IMAGE_NUMBER]
static

Definition at line 4 of file set_image.c.