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

Linux Cross Reference
Tina5/tina-tools/toolkits/example2/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    :  
 23  * Date    :  
 24  * Version :  
 25  * CVS Id  :  
 26  *
 27  * Author  :  paul.bromiley@manchester.ac.uk
 28  *
 29  * Notes   :  This example toolkit includes all existing Tina tools.  It also provide
 30  *            a simple Makefile capable of using any of the widget sets.
 31  * 
 32  *********
 33 */
 34 
 35 #if HAVE_CONFIG_H
 36   #include <config.h>
 37 #endif
 38 
 39 #include <stdio.h>
 40 
 41 #include <tinatool/wdgts/wdgtsPro.h>
 42 #include <tinatool/tlbase/tlbaseDef.h>
 43 #include <tinatool/tlbase/tlbasePro.h>
 44 #include <tinatool/tlvision/tlvisPro.h>
 45 #include <tinatool/tlmedical/tlmedDef.h>
 46 #include <tinatool/tlmedical/tlmedPro.h>
 47 
 48 
 49 void tv_tool_proc(void)
 50 {
 51   static int x = 100, y = 200;
 52   static int xr = 0, yr = 0;
 53 
 54   tv_tool(x+xr, y+yr);
 55   xr += 50;
 56   yr += 10;
 57   if (x+xr>700)
 58     {
 59       xr = yr = 0;
 60       y += 50;
 61     }
 62   if (y>400) y = 200;
 63 }
 64 
 65 static void raw_input_tool_proc()
 66 {
 67     raw_input_tool(50,50);
 68 }
 69 
 70 static void mono_tool_proc(void)
 71 {
 72     mono_tool(55, 55);
 73 }
 74 
 75 static void stereo_tool_proc(void)
 76 {
 77     stereo_tool(60, 60);
 78 }
 79 
 80 static void seq_tool_proc(void)
 81 {
 82     seq_tool(65, 65);
 83 }
 84 
 85 static void macro_tool_proc(void)
 86 {
 87     macro_tool(70, 70);
 88 }
 89 
 90 static void view_tool_proc(void)
 91 {
 92     view_tool(75, 75);
 93 }
 94 
 95 static void imcalc_tool_proc(void)
 96 {
 97     imcalc_tool(80, 80);
 98 }
 99 
100 static void colour_tool_proc(void)
101 {
102     colour_tool(83, 83);
103 }
104 
105 static void calib_tool_proc(void)
106 {
107     calib_tool(85, 85);
108 }
109 
110 static void edge_tool_proc(void)
111 {
112     edge_tool(90, 90);
113 }
114 
115 static void corner_tool_proc(void)
116 {
117     corner_tool(95, 95);
118 }
119 
120 static void stereo_test_tool_proc(void)
121 {
122     stereo_test_tool(100, 100);
123 }
124 
125 static void st_corr_tool_proc(void)
126 {
127     st_corr_tool(105, 105);
128 }
129 
130 static void terrain_tool_proc(void)
131 {
132     terrain_tool(108, 108);
133 }
134 
135 static void matcher_tool_proc(void)
136 {
137     matcher_tool(115, 115);
138 }
139 
140 static void nmr_segment_tool_proc(void)
141 {
142     nmr_segment_tool(120, 120);
143 }
144 
145 static void nmranalysis_tool_proc(void)
146 {
147     nmranalysis_tool(125, 125);
148 }
149 
150 static void coreg_tool_proc(void)
151 {
152     coreg_tool(130, 130);
153 }
154 
155 static void sroi_tool_proc(void)
156 {
157     sroi_tool(135, 135);
158 }
159 
160 static void seqroi_tool_proc(void)
161 {
162     seqroi_tool(140, 140);
163 }
164 
165 static void octants_tool_proc(void)
166 {
167     octants_tool(145, 145);
168 }
169 
170 int main(int argc, char **argv)
171 {
172   tw_init(&argc, argv);
173   
174   tw_tool("tinatool", 100, 100);
175   
176   tw_label("Display: ");
177   tw_newrow();
178   tw_button("New Tvtool", tv_tool_proc, NULL);
179   tw_button("View", view_tool_proc, NULL);
180   tw_newrow();
181   tw_label("File I/O: ");
182   tw_newrow();
183   tw_button("Stack", raw_input_tool_proc, NULL);
184   tw_button("Mono",  mono_tool_proc, NULL);
185   tw_button("Stereo", stereo_tool_proc, NULL);
186   tw_button("Sequence", seq_tool_proc, NULL);
187   tw_newrow();
188   tw_label("Infrastructure: ");
189   tw_newrow();
190   tw_button("Macro", macro_tool_proc, NULL);
191   tw_button("Imcalc", imcalc_tool_proc, NULL);
192   tw_button("Colour", colour_tool_proc, NULL);
193   tw_newrow();
194   tw_label("Machine Vision: ");
195   tw_newrow();
196   tw_button("Calib", calib_tool_proc, NULL);
197   tw_button("Edge geom", edge_tool_proc, NULL);
198   tw_button("Corner", corner_tool_proc, NULL);
199   tw_button("PMF Stereo", stereo_test_tool_proc, NULL);
200   tw_newrow();
201   tw_button("Correlation Stereo", st_corr_tool_proc, NULL);
202   tw_button("Terrain", terrain_tool_proc, NULL);
203   tw_button("Matcher", matcher_tool_proc, NULL);
204   tw_newrow();
205   tw_label("Medical Image Analysis: ");
206   tw_newrow();
207   tw_button("NMR segment", nmr_segment_tool_proc, NULL);
208   tw_button("NMR analysis", nmranalysis_tool_proc, NULL);
209   tw_button("Coreg", coreg_tool_proc, NULL);
210   tw_newrow();
211   tw_button("SmartROI", sroi_tool_proc, NULL);
212   tw_button("SeqROI", seqroi_tool_proc, NULL);
213   tw_button("DODECANTS", octants_tool_proc, NULL);
214 
215   tw_newrow();
216   tw_textsw(10, 65);
217   
218   tw_end_tool();
219   tw_main_loop();
220 }
221 
222 
223 

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