Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
vol2surf.h
Go to the documentation of this file.00001 #ifndef _VOL2SURF_H_
00002 #define _VOL2SURF_H_
00003
00004 #define V2S_MAX_SURFS 2
00005
00006 #define V2S_INDEX_VOXEL 0
00007 #define V2S_INDEX_NODE 1
00008
00009 #define V2S_STEPS_TOOOOO_BIG 10000
00010
00011 #define V2S_NORM_DEFAULT 0
00012 #define V2S_NORM_KEEP 1
00013 #define V2S_NORM_REVERSE 2
00014
00015 #define V2S_EPSILON 0.0001
00016
00017 #define V2S_SKIP_NONE 0
00018 #define V2S_SKIP_NODES 1
00019 #define V2S_SKIP_VOLIND 2
00020 #define V2S_SKIP_I 4
00021 #define V2S_SKIP_J 8
00022 #define V2S_SKIP_K 16
00023 #define V2S_SKIP_NVALS 32
00024 #define V2S_SKIP_VALS 64
00025 #define V2S_SKIP_ALL 127
00026
00027 #define CHECK_NULL_STR(str) ( str ? str : "<NULL>" )
00028 #define CHECK_EMPTY_STR(str) ( str[0] ? str : "<empty>" )
00029
00030
00031 typedef enum
00032 {
00033 E_SMAP_INVALID = 0,
00034 E_SMAP_MASK, E_SMAP_MIDPT,
00035 E_SMAP_MASK2,
00036 E_SMAP_AVE, E_SMAP_COUNT,
00037 E_SMAP_MIN, E_SMAP_MAX,
00038 E_SMAP_MAX_ABS, E_SMAP_SEG_VALS,
00039
00040 E_SMAP_MEDIAN, E_SMAP_MODE,
00041 E_SMAP_FINAL
00042 } v2s_map_nums;
00043
00044 typedef struct
00045 {
00046 int show;
00047 int index;
00048 float value;
00049 } v2s_oob_t;
00050
00051 typedef struct
00052 {
00053 int nalloc;
00054 int nused;
00055 int max_vals;
00056 int memory;
00057 int * nodes;
00058 int * volind;
00059 int * i;
00060 int * j;
00061 int * k;
00062 int * nvals;
00063 float ** vals;
00064 } v2s_results;
00065
00066 typedef struct
00067 {
00068 int map;
00069 int gp_index;
00070 int debug;
00071 int dnode;
00072 int no_head;
00073 int skip_cols;
00074 int first_node;
00075 int last_node;
00076 int use_norms;
00077 float norm_len;
00078 int norm_dir;
00079 int f_index;
00080 int f_steps;
00081 float f_p1_fr;
00082 float f_pn_fr;
00083 float f_p1_mm;
00084 float f_pn_mm;
00085 char * outfile_1D;
00086 char * outfile_niml;
00087 v2s_oob_t oob;
00088 v2s_oob_t oom;
00089 } v2s_opts_t;
00090
00091 typedef struct
00092 {
00093 int ready, use0, use1;
00094 int s0A, s0B;
00095 int s1A, s1B;
00096 v2s_opts_t sopt;
00097 } v2s_plugin_opts;
00098
00099
00100 typedef struct
00101 {
00102 THD_3dim_dataset * gpar;
00103 byte * cmask;
00104 int nvox;
00105 int over_steps;
00106 int nsurf;
00107 SUMA_surface surf[V2S_MAX_SURFS];
00108 } v2s_param_t;
00109
00110
00111
00112 v2s_results * afni_vol2surf ( THD_3dim_dataset * gpar, int gp_index,
00113 SUMA_surface * sA, SUMA_surface * sB,
00114 byte * mask, int use_defaults );
00115 v2s_results * vol2surf ( v2s_opts_t * sopt, v2s_param_t * p );
00116
00117 int disp_mri_imarr ( char * info, MRI_IMARR * dp );
00118 int disp_v2s_opts_t ( char * info, v2s_opts_t * sopt );
00119 int disp_v2s_param_t ( char * info, v2s_param_t * p );
00120 int disp_v2s_plugin_opts( char * mesg, v2s_plugin_opts * d );
00121 int disp_v2s_results ( char * mesg, v2s_results * d );
00122 int free_v2s_results ( v2s_results * sd );
00123 int v2s_is_good_map ( int map, int from_afni );
00124 int v2s_map_type ( char * map_str );
00125 int v2s_vals_over_steps ( int map );
00126 int v2s_write_outfile_1D( v2s_opts_t * sopt, v2s_results * sd, char * label );
00127 int v2s_write_outfile_niml( v2s_opts_t * sopt, v2s_results * sd, int free_vals);
00128
00129
00130
00131 int thd_mask_from_brick(THD_3dim_dataset * dset, int volume, float thresh,
00132 byte ** mask, int absolute);
00133
00134
00135 #ifndef _VOL2SURF_C_
00136 extern v2s_plugin_opts gv2s_plug_opts;
00137 extern char * gv2s_map_names[];
00138 extern char gv2s_history[];
00139 #endif
00140
00141
00142 #endif