~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/tools/sequence/seq_draw.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #include <stdio.h>
  2 #include <sys/param.h>
  3 #include <string.h>   
  4 #include <tina/sys.h>
  5 #include <tina/sysfuncs.h>
  6 #include <tina/math.h>  
  7 #include <tina/mathfuncs.h>
  8 #include <tina/vision.h>
  9 #include <tina/visionfuncs.h>
 10 #include <tina/file.h>
 11 #include <tina/filefuncs.h>
 12 #include <tina/file_gen.h>
 13 #include <tina/tv.h>
 14 #include <tina/tvfuncs.h>
 15 #include <tina/toolsfuncs.h>
 16 #include <tina/tw_Xfuncs.h>
 17 #include <tina/tw_X11funcs.h>
 18 #include <tina/seqvoi.h>
 19 #include "seqvoifuncs.h"
 20 #include <tina/draw.h>
 21 #include <tina/drawfuncs.h>
 22 /*#include <tina/my.h>*/
 23 
 24 
 25 
 26 static Vec3 map(Vec2 p, double *z)
 27 {
 28   return (vec3(vec2_x(p), vec2_y(p), *z));
 29 }
 30 
 31 void str2_draw3(Tv * tv, Tstring * string, double z)
 32 {
 33   draw3_str2(tv, string, map, &z);
 34   printf("drawn string\n");
 35 }
 36 
 37 
 38 int seq_z_get(void)
 39 {
 40   Br_imstack *ims =(Br_imstack *) Br_imstack_get();
 41 
 42   if (ims == NULL)
 43     return -1;
 44      else
 45        return ims->z;
 46 }
 47 
 48 /*
 49   Set z-coordinate of 3D-cursor, see seq_z_get.
 50   working slice.
 51 */
 52 void seq_z_set(int newz)
 53 {
 54 
 55   Br_imstack *ims = (Br_imstack *)Br_imstack_get();
 56   if (ims != NULL)
 57     {
 58       newz = MAX(newz, ims->lz);
 59       newz = MIN(newz, ims->uz - 1);
 60       ims->z = newz;
 61     }
 62 }
 63 
 64 
 65 /*
 66   Get active VOI number.
 67 */
 68 int seq_nvoi_get()
 69 {
 70   Br_imstack *ims = (Br_imstack *)Br_imstack_get();
 71   if (ims == NULL)
 72     return(-1);
 73   return(ims->nvoi);
 74 }
 75 
 76 /*
 77   Set active VOI number (< NVOI in splines.h).
 78 */
 79 /*void seq_nvoi_set(int nvoi)
 80 {
 81   if (ims == NULL)
 82     return;
 83   ims->nvoi = nvoi;
 84 }
 85 */
 86 
 87 Tstring *seq_string_get(void)
 88 {
 89   Br_imstack *ims = (Br_imstack *)Br_imstack_get();
 90   if (ims == NULL)
 91     return NULL;
 92   else
 93     return svoi_string_get(VOI(ims));
 94 }
 95 
 96 /*
 97   Get lowest slice number in image stack (inclusive bound).
 98 */
 99 int seq_lz_get(void)
100 {
101   Br_imstack *ims = (Br_imstack *)Br_imstack_get();
102   if (ims == NULL)
103     return -1;
104   else
105     return ims->lz;
106 }
107 
108 /*
109   Get highest slice number+1 in image stack (exclusive bound).
110 */
111 int seq_uz_get(void)
112 {
113   Br_imstack *ims = (Br_imstack *)Br_imstack_get();
114   if (ims == NULL)
115     return -1;
116   else
117     return ims->uz;
118 }
119 
120 void seq_voi_empty(void)
121 {
122   Br_imstack *ims = (Br_imstack *)Br_imstack_get();
123   if (ims != NULL)
124     svoi_empty(VOI(ims));
125 }
126 
127 
128 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.