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

Linux Cross Reference
Tina5/tina-tools/toolkits/mri_analysis/tinaTool.c

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

  1 /**********
  2  * 
  3  * This file is part of the TINA Open Source Image Analysis Environment
  4  * henceforth known as TINA
  5  *
  6  * TINA is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU Lesser General Public License as 
  8  * published by the Free Software Foundation.
  9  *
 10  * TINA is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  * GNU Lesser General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU Lesser General Public License
 16  * along with TINA; if not, write to the Free Software Foundation, Inc., 
 17  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  *
 19  **********
 20  * 
 21  * Program :    TINA
 22  * File    :  $Source: /home/tina/cvs/tina-tools/toolkits/mri_analysis/tinaTool.c,v $
 23  * Date    :  $Date: 2003/12/30 15:35:52 $
 24  * Version :  $Revision: 1.4 $
 25  * CVS Id  :  $Id: tinaTool.c,v 1.4 2003/12/30 15:35:52 gio Exp $
 26  *
 27  * Author  :  Legacy TINA
 28  *
 29  * Notes   :
 30  * 
 31  *********
 32 */
 33 
 34 #if HAVE_CONFIG_H
 35   #include <config.h>
 36 #endif
 37 
 38 #include <stdio.h>
 39 
 40 #include <tinatool/wdgts/wdgtsPro.h>
 41 #include <tinatool/tlbase/tlbaseDef.h>
 42 #include <tinatool/tlbase/tlbasePro.h>
 43 
 44 void tool_proc(void)
 45 {
 46   static int x = 100, y = 200;
 47   static int xr = 0, yr = 0;
 48 
 49   tv_tool(x+xr, y+yr);
 50   xr += 50;
 51   yr += 10;
 52   if (x+xr>700)
 53     {
 54       xr = yr = 0;
 55       y += 50;
 56     }
 57   if (y>400) y = 200;
 58 }
 59 
 60 static void macro_tool_proc()
 61 {
 62     macro_tool(200,200);
 63 }
 64 
 65 static void view_tool_proc()
 66 {
 67     view_tool(200,200);
 68 }
 69 
 70 static void mono_tool_proc(void)
 71 {
 72   mono_tool(50, 50);
 73 }
 74 
 75 static void raw_input_tool_proc(void)
 76 {
 77   raw_input_tool(50, 50);
 78 }
 79 
 80 
 81 static void seq_tool_proc()
 82 {
 83   seq_tool(250, 250);
 84 }
 85 
 86 static void imcalc_tool_proc()
 87 {
 88     imcalc_tool(200,200);
 89 }
 90 
 91 static void coreg_tool_proc()
 92 {
 93     coreg_tool(250, 250);
 94 }
 95 
 96 static void nmr_segment_tool_proc()
 97 {
 98     nmr_segment_tool(250, 250);
 99 }
100 
101 static void seqroi_tool_proc()
102 {
103   seqroi_tool(250, 250);
104 }
105 
106 static void nmr_analysis_tool_proc()
107 {
108     nmranalysis_tool(250, 250);
109 }
110 
111 int main(int argc, char **argv)
112 {
113   tw_init(&argc, argv);
114   
115   tw_tool("tinatool", 100, 100);
116   
117   tw_label("Display: ");
118   tw_button("New Tvtool", tool_proc, NULL);
119   tw_label("          ");
120   tw_newrow();
121   tw_button("save", save_macro_proc,NULL);
122   tw_button("Macro", macro_tool_proc,NULL);
123   tw_button("View", view_tool_proc,NULL);
124 
125   tw_newrow();
126   tw_label("File I/O: ");
127   tw_button("Mono", mono_tool_proc, NULL);
128   tw_button("Sequence", seq_tool_proc, NULL);
129   tw_button("Rawinput", raw_input_tool_proc, NULL);
130 
131   tw_newrow();
132   tw_button("Imcalc", imcalc_tool_proc, NULL);
133   tw_button("Coreg", coreg_tool_proc, NULL);
134   tw_button("Segment", nmr_segment_tool_proc, NULL);
135   tw_button("MR Analysis", nmr_analysis_tool_proc, NULL);
136   tw_button("seqroi", seqroi_tool_proc, NULL);
137   tw_newrow();
138   tw_textsw(10, 65);
139   
140   tw_end_tool();
141   tw_main_loop();
142 }
143 

~ [ 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.