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  

set.c File Reference

#include <stdlib.h>
#include "f2c.h"

Go to the source code of this file.


Defines

#define zzzplt_1   zzzplt_
#define zzpltr_1   zzpltr_

Functions

int set_ (real *xobj1, real *xobj2, real *yobj1, real *yobj2, real *xsub1, real *xsub2, real *ysub1, real *ysub2, integer *ltype)

Variables

struct {
   real   xpgmin
   real   ypgmin
   real   xpgmax
   real   ypgmax
   real   xclbot
   real   yclbot
   real   xcltop
   real   ycltop
   real   xbot
   real   ybot
   real   xtop
   real   ytop
   real   xmin
   real   ymin
   real   xmax
   real   ymax
   integer   ixcoor
   integer   iycoor
   real   alphxx
   real   betaxx
   real   alphyy
   real   betayy
   real   tmajx
   real   tminx
   real   tmajy
   real   tminy
   integer   majrx
   integer   minrx
   integer   majry
   integer   minry
   integer   isizx
   integer   isizy
   real   xphold
   real   yphold
zzzplt_
struct {
   real   xphmax
   real   yphmax
   integer   ixpmax
   integer   iypmax
   real   xpscal
   real   ypscal
   integer   iflip
   integer   nplotr
   char   cfile [64]
zzpltr_
integer c__1 = 1

Define Documentation

#define zzpltr_1   zzpltr_
 

Definition at line 30 of file set.c.

#define zzzplt_1   zzzplt_
 

Definition at line 20 of file set.c.

Referenced by set_().


Function Documentation

int set_ real   xobj1,
real   xobj2,
real   yobj1,
real   yobj2,
real   xsub1,
real   xsub2,
real   ysub1,
real   ysub2,
integer   ltype
 

Definition at line 41 of file set.c.

References c__1, do_fio(), e_wsfe(), r_lg10(), s_wsfe(), and zzzplt_1.

Referenced by plotpak_set(), and srface_().

00043 {
00044     /* Initialized data */
00045 
00046     static shortint ixc[4] = { 1,1,-1,-1 };
00047     static shortint iyc[4] = { 1,-1,1,-1 };
00048 
00049     /* Format strings */
00050     static char fmt_9001[] = "(//\002 ********** Illegal parameters in SET *"
00051             "*********\002/4(1x,1pg12.5)/4(1x,1pg12.5),i6)";
00052 
00053     /* Builtin functions */
00054     double r_lg10(real *);
00055     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00056 
00057     /* Local variables */
00058     static real sxmin, sxmax, symin, symax;
00059 
00060     /* Fortran I/O blocks */
00061     static cilist io___7 = { 0, 6, 0, fmt_9001, 0 };
00062 
00063 
00064 
00065 /*  Set the relationship between the physical space and the user space. */
00066 /* .......................................................................
00067  */
00068 
00069 
00070 /*  Internal Data for PLOTPAK */
00071 
00072 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00073  */
00074 /*  Check entry values for reasonableness. */
00075 
00076     if (*xobj1 < zzzplt_1.xpgmin || *xobj1 >= *xobj2 || *xobj2 > 
00077             zzzplt_1.xpgmax || *xsub1 == *xsub2 || *yobj1 < zzzplt_1.ypgmin ||
00078              *yobj1 >= *yobj2 || *yobj2 > zzzplt_1.ypgmax || *ysub1 == *ysub2 
00079             || *ltype <= 0 || *ltype > 4) {
00080         goto L9000;
00081     }
00082 /* .......................................................................
00083  */
00084     zzzplt_1.xbot = *xobj1;
00085     zzzplt_1.ybot = *yobj1;
00086     zzzplt_1.xtop = *xobj2;
00087     zzzplt_1.ytop = *yobj2;
00088 
00089     zzzplt_1.xmin = *xsub1;
00090     zzzplt_1.xmax = *xsub2;
00091     zzzplt_1.ymin = *ysub1;
00092     zzzplt_1.ymax = *ysub2;
00093 
00094     zzzplt_1.ixcoor = ixc[*ltype - 1];
00095     zzzplt_1.iycoor = iyc[*ltype - 1];
00096 
00097     if (zzzplt_1.ixcoor >= 0) {
00098         sxmin = *xsub1;
00099         sxmax = *xsub2;
00100     } else {
00101         if (*xsub1 <= 0.f || *xsub2 <= 0.f) {
00102             goto L9000;
00103         }
00104         sxmin = r_lg10(xsub1);
00105         sxmax = r_lg10(xsub2);
00106     }
00107 
00108     if (zzzplt_1.iycoor >= 0) {
00109         symin = *ysub1;
00110         symax = *ysub2;
00111     } else {
00112         if (*ysub1 <= 0.f || *ysub2 <= 0.f) {
00113             goto L9000;
00114         }
00115         symin = r_lg10(ysub1);
00116         symax = r_lg10(ysub2);
00117     }
00118 
00119 /*  Calculate the alpha and beta scaling factors to map user space */
00120 /*  into physical space. */
00121 
00122     zzzplt_1.alphxx = (zzzplt_1.xtop - zzzplt_1.xbot) / (sxmax - sxmin);
00123     zzzplt_1.betaxx = zzzplt_1.xbot - zzzplt_1.alphxx * sxmin;
00124 
00125     zzzplt_1.alphyy = (zzzplt_1.ytop - zzzplt_1.ybot) / (symax - symin);
00126     zzzplt_1.betayy = zzzplt_1.ybot - zzzplt_1.alphyy * symin;
00127 
00128     return 0;
00129 /* .......................................................................
00130  */
00131 L9000:
00132 /* CC      OPEN( 98 , FILE='PLOTPAK.ERR' , STATUS='NEW' ) */
00133 /* CC      WRITE(98,9001) XOBJ1,XOBJ2 , YOBJ1,YOBJ2 , */
00134 /* CC     X               XSUB1,XSUB2 , YSUB1,YSUB2 , LTYPE */
00135 /* L9001: */
00136 /* cc      CLOSE( 98 ) */
00137 
00138     s_wsfe(&io___7);
00139     do_fio(&c__1, (char *)&(*xobj1), (ftnlen)sizeof(real));
00140     do_fio(&c__1, (char *)&(*xobj2), (ftnlen)sizeof(real));
00141     do_fio(&c__1, (char *)&(*yobj1), (ftnlen)sizeof(real));
00142     do_fio(&c__1, (char *)&(*yobj2), (ftnlen)sizeof(real));
00143     do_fio(&c__1, (char *)&(*xsub1), (ftnlen)sizeof(real));
00144     do_fio(&c__1, (char *)&(*xsub2), (ftnlen)sizeof(real));
00145     do_fio(&c__1, (char *)&(*ysub1), (ftnlen)sizeof(real));
00146     do_fio(&c__1, (char *)&(*ysub2), (ftnlen)sizeof(real));
00147     do_fio(&c__1, (char *)&(*ltype), (ftnlen)sizeof(integer));
00148     e_wsfe();
00149     exit(0) ;
00150     return 0;
00151 } /* set_ */

Variable Documentation

real alphxx
 

Definition at line 15 of file set.c.

real alphyy
 

Definition at line 15 of file set.c.

real betaxx
 

Definition at line 15 of file set.c.

real betayy
 

Definition at line 15 of file set.c.

integer c__1 = 1 [static]
 

Definition at line 34 of file set.c.

Referenced by set_().

char cfile[64]
 

Definition at line 27 of file set.c.

integer iflip
 

Definition at line 26 of file set.c.

integer isizx
 

Definition at line 16 of file set.c.

integer isizy
 

Definition at line 16 of file set.c.

integer ixcoor
 

Definition at line 14 of file set.c.

integer ixpmax
 

Definition at line 24 of file set.c.

integer iycoor
 

Definition at line 14 of file set.c.

integer iypmax
 

Definition at line 24 of file set.c.

integer majrx
 

Definition at line 16 of file set.c.

integer majry
 

Definition at line 16 of file set.c.

integer minrx
 

Definition at line 16 of file set.c.

integer minry
 

Definition at line 16 of file set.c.

integer nplotr
 

Definition at line 26 of file set.c.

real tmajx
 

Definition at line 15 of file set.c.

real tmajy
 

Definition at line 15 of file set.c.

real tminx
 

Definition at line 15 of file set.c.

real tminy
 

Definition at line 15 of file set.c.

real xbot
 

Definition at line 12 of file set.c.

real xclbot
 

Definition at line 12 of file set.c.

real xcltop
 

Definition at line 12 of file set.c.

real xmax
 

Definition at line 12 of file set.c.

real xmin
 

Definition at line 12 of file set.c.

real xpgmax
 

Definition at line 12 of file set.c.

real xpgmin
 

Definition at line 12 of file set.c.

real xphmax
 

Definition at line 23 of file set.c.

real xphold
 

Definition at line 17 of file set.c.

real xpscal
 

Definition at line 25 of file set.c.

real xtop
 

Definition at line 12 of file set.c.

real ybot
 

Definition at line 12 of file set.c.

real yclbot
 

Definition at line 12 of file set.c.

real ycltop
 

Definition at line 12 of file set.c.

real ymax
 

Definition at line 12 of file set.c.

real ymin
 

Definition at line 12 of file set.c.

real ypgmax
 

Definition at line 12 of file set.c.

real ypgmin
 

Definition at line 12 of file set.c.

real yphmax
 

Definition at line 23 of file set.c.

real yphold
 

Definition at line 17 of file set.c.

real ypscal
 

Definition at line 25 of file set.c.

real ytop
 

Definition at line 12 of file set.c.

struct { ... } zzpltr_
 

struct { ... } zzzplt_
 

 

Powered by Plone

This site conforms to the following standards: