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

Linux Cross Reference
Tina4/src/snake/cvr_tina.c

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

  1 /** @(#)Aivru/Covira data conversions.
  2  */
  3 #include <stdio.h>
  4 #include <math.h>
  5 #include <tina/sys.h>
  6 #include <tina/sysfuncs.h>
  7 #include <tina/math.h>
  8 #include <tina/mathfuncs.h>
  9 #include <tina/vision.h>
 10 #include <tina/visionfuncs.h>
 11 #include <tina/cvr.h>
 12 #include <tina/snakefuncs.h>
 13 
 14 /* Convert edge_string to IcContour (temporarily Tstring). (UPDATE when
 15  * IcContour structure is known). */
 16 IcContour *edge_string_to_iccontour(Tstring * edge_string)
 17 {
 18     IcContour *iccontour = NULL;
 19 
 20     if (edge_string)
 21     {
 22         iccontour = (IcContour *) edge_string;
 23     }
 24     return iccontour;
 25 }
 26 
 27 /* Convert IcContour (temporarily Tstring) to edge_string. (UPDATE when
 28  * IcContour structure is known). */
 29 Tstring *iccontour_to_edge_string(IcContour * iccontour)
 30 {
 31     Tstring *edge_string = NULL;
 32 
 33     if (iccontour)
 34     {
 35         edge_string = (Tstring *) iccontour;
 36     }
 37     return edge_string;
 38 }
 39 
 40 /* Convert IcImage (temporarily JP image list) to imstack. (UPDATE when
 41  * IcImage structure is known). */
 42 Imstack *icimage_to_imstack(IcImage * icimage)
 43 {
 44     List *cslist = (List *) icimage;
 45     Imstack *imstack = NULL;
 46 
 47     if (cslist)
 48     {
 49         int     slice;
 50         int     nslices = dd_list_length(cslist);
 51 
 52         imstack = imstack_struct_create(0, nslices);
 53         for (slice = 0; slice < nslices; slice++)
 54         {
 55             Cvr_slice *cvr_slice = (Cvr_slice *) ddlist_nth(cslist, slice)->to;
 56 
 57             imstack->imrect[slice] = cvr_slice->im;
 58         }
 59     }
 60     return imstack;
 61 }
 62 
 63 /* Convert Imstack to IcImage (temporarily JP image list). (UPDATE when
 64  * IcImage structure is known). */
 65 IcImage *imstack_to_icimage(Imstack * imstack)
 66 {
 67     List *cslist = NULL;
 68     extern Cvr_slice *cvr_slice_alloc();
 69 
 70     if (imstack)
 71     {
 72         int     slice;
 73 
 74         for (slice = 0; slice < imstack->end; slice++)
 75         {
 76             Cvr_slice *cs = (Cvr_slice *) cvr_slice_alloc();
 77 
 78             cs->im = imstack->imrect[slice];
 79             cs->num = slice;
 80             cs->z = -cs->num * kw__zspace_get();
 81             cslist = dd_list_addtoend(cslist, dd_link_alloc((void *) cs, (int)NULL));
 82         }
 83     }
 84     return (IcImage *) cslist;
 85 }
 86 
 87 /* Convert Cvr_slice to Imrect */
 88 Imrect *cvr_slice_to_imrect(Cvr_slice * cvr_slice)
 89 {
 90     Imrect *imrect = NULL;
 91 
 92     if (cvr_slice)
 93     {
 94         imrect = cvr_slice->im;
 95     }
 96     return imrect;
 97 }
 98 

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