0001 function avw_view_hdr(avw,parent)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 if ~exist('avw','var'),
0024 msg = sprintf('AVW_VIEW_HDR: No input avw - see help gui_avw\n');
0025 error(msg);
0026 end
0027
0028
0029
0030
0031 GUIwidth = 80;
0032 GUIheight = 20;
0033 GUI = figure('Name','AVWHDR','Tag','AVWHDR','units','characters',...
0034 'NumberTitle','off','HandleVisibility','callback',...
0035 'MenuBar','none','Position',[1 1 GUIwidth GUIheight]);
0036 movegui(GUI,'center');
0037
0038 AVWHDR.gui = GUI;
0039
0040 Font.FontName = 'Helvetica';
0041 Font.FontUnits = 'Pixels';
0042 Font.FontSize = 12;
0043 Font.FontWeight = 'normal';
0044 Font.FontAngle = 'normal';
0045
0046
0047
0048 Font.FontWeight = 'bold';
0049
0050 G.Tselectfield = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0051 'Position',[.01 .9 .49 .09],'String','Select Header Fields','HorizontalAlignment','left');
0052 G.Pselectfield = uicontrol('Parent',GUI,'Style','popup','Units','Normalized',Font, ...
0053 'Position',[.51 .9 .48 .09],...
0054 'String',{'Header Key','Image Dimensions','Data History (optional)'},...
0055 'TooltipString','Select Header Fields to Display',...
0056 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0057 'field = get(AVWHDR.handles.Pselectfield,''Value'');',...
0058 'switch field, ',...
0059 'case 1, ',...
0060 ' set(AVWHDR.handles.Tsizeof_hdr, ''Visible'',''on'');',...
0061 ' set(AVWHDR.handles.Esizeof_hdr, ''Visible'',''on'');',...
0062 ' set(AVWHDR.handles.Tdata_type, ''Visible'',''on'');',...
0063 ' set(AVWHDR.handles.Edata_type, ''Visible'',''on'');',...
0064 ' set(AVWHDR.handles.Tdb_name, ''Visible'',''on'');',...
0065 ' set(AVWHDR.handles.Edb_name, ''Visible'',''on'');',...
0066 ' set(AVWHDR.handles.Textents, ''Visible'',''on'');',...
0067 ' set(AVWHDR.handles.Eextents, ''Visible'',''on'');',...
0068 ' set(AVWHDR.handles.Tsession_error, ''Visible'',''on'');',...
0069 ' set(AVWHDR.handles.Esession_error, ''Visible'',''on'');',...
0070 ' set(AVWHDR.handles.Tregular, ''Visible'',''on'');',...
0071 ' set(AVWHDR.handles.Eregular, ''Visible'',''on'');',...
0072 ' set(AVWHDR.handles.Thkey_un0, ''Visible'',''on'');',...
0073 ' set(AVWHDR.handles.Ehkey_un0, ''Visible'',''on'');',...
0074 ' set(AVWHDR.handles.Tdim1, ''Visible'',''off'');',...
0075 ' set(AVWHDR.handles.Edim1, ''Visible'',''off'');',...
0076 ' set(AVWHDR.handles.Tdim2, ''Visible'',''off'');',...
0077 ' set(AVWHDR.handles.Edim2, ''Visible'',''off'');',...
0078 ' set(AVWHDR.handles.Tdim3, ''Visible'',''off'');',...
0079 ' set(AVWHDR.handles.Edim3, ''Visible'',''off'');',...
0080 ' set(AVWHDR.handles.Tdim4, ''Visible'',''off'');',...
0081 ' set(AVWHDR.handles.Edim4, ''Visible'',''off'');',...
0082 ' set(AVWHDR.handles.Tdim5, ''Visible'',''off'');',...
0083 ' set(AVWHDR.handles.Edim5, ''Visible'',''off'');',...
0084 ' set(AVWHDR.handles.Tdim6, ''Visible'',''off'');',...
0085 ' set(AVWHDR.handles.Edim6, ''Visible'',''off'');',...
0086 ' set(AVWHDR.handles.Tdim7, ''Visible'',''off'');',...
0087 ' set(AVWHDR.handles.Edim7, ''Visible'',''off'');',...
0088 ' set(AVWHDR.handles.Tdim8, ''Visible'',''off'');',...
0089 ' set(AVWHDR.handles.Edim8, ''Visible'',''off'');',...
0090 ' set(AVWHDR.handles.Tpixdim1, ''Visible'',''off'');',...
0091 ' set(AVWHDR.handles.Epixdim1, ''Visible'',''off'');',...
0092 ' set(AVWHDR.handles.Tpixdim2, ''Visible'',''off'');',...
0093 ' set(AVWHDR.handles.Epixdim2, ''Visible'',''off'');',...
0094 ' set(AVWHDR.handles.Tpixdim3, ''Visible'',''off'');',...
0095 ' set(AVWHDR.handles.Epixdim3, ''Visible'',''off'');',...
0096 ' set(AVWHDR.handles.Tpixdim4, ''Visible'',''off'');',...
0097 ' set(AVWHDR.handles.Epixdim4, ''Visible'',''off'');',...
0098 ' set(AVWHDR.handles.Tpixdim5, ''Visible'',''off'');',...
0099 ' set(AVWHDR.handles.Epixdim5, ''Visible'',''off'');',...
0100 ' set(AVWHDR.handles.Tpixdim6, ''Visible'',''off'');',...
0101 ' set(AVWHDR.handles.Epixdim6, ''Visible'',''off'');',...
0102 ' set(AVWHDR.handles.Tpixdim7, ''Visible'',''off'');',...
0103 ' set(AVWHDR.handles.Epixdim7, ''Visible'',''off'');',...
0104 ' set(AVWHDR.handles.Tpixdim8, ''Visible'',''off'');',...
0105 ' set(AVWHDR.handles.Epixdim8, ''Visible'',''off'');',...
0106 ' set(AVWHDR.handles.Tvox_units, ''Visible'',''off'');',...
0107 ' set(AVWHDR.handles.Evox_units, ''Visible'',''off'');',...
0108 ' set(AVWHDR.handles.Tcal_units, ''Visible'',''off'');',...
0109 ' set(AVWHDR.handles.Ecal_units, ''Visible'',''off'');',...
0110 ' set(AVWHDR.handles.Tdatatype, ''Visible'',''off'');',...
0111 ' set(AVWHDR.handles.Edatatype, ''Visible'',''off'');',...
0112 ' set(AVWHDR.handles.Tbitpix, ''Visible'',''off'');',...
0113 ' set(AVWHDR.handles.Ebitpix, ''Visible'',''off'');',...
0114 ' set(AVWHDR.handles.Tvox_offset, ''Visible'',''off'');',...
0115 ' set(AVWHDR.handles.Evox_offset, ''Visible'',''off'');',...
0116 ' set(AVWHDR.handles.Troi_scale, ''Visible'',''off'');',...
0117 ' set(AVWHDR.handles.Eroi_scale, ''Visible'',''off'');',...
0118 ' set(AVWHDR.handles.Tglmax, ''Visible'',''off'');',...
0119 ' set(AVWHDR.handles.Eglmax, ''Visible'',''off'');',...
0120 ' set(AVWHDR.handles.Tglmin, ''Visible'',''off'');',...
0121 ' set(AVWHDR.handles.Eglmin, ''Visible'',''off'');',...
0122 ' set(AVWHDR.handles.Tverified, ''Visible'',''off'');',...
0123 ' set(AVWHDR.handles.Everified, ''Visible'',''off'');',...
0124 ' set(AVWHDR.handles.Tcompressed, ''Visible'',''off'');',...
0125 ' set(AVWHDR.handles.Ecompressed, ''Visible'',''off'');',...
0126 ' set(AVWHDR.handles.Tcal_min, ''Visible'',''off'');',...
0127 ' set(AVWHDR.handles.Ecal_min, ''Visible'',''off'');',...
0128 ' set(AVWHDR.handles.Tcal_max, ''Visible'',''off'');',...
0129 ' set(AVWHDR.handles.Ecal_max, ''Visible'',''off'');',...
0130 ' set(AVWHDR.handles.Tfunused1, ''Visible'',''off'');',...
0131 ' set(AVWHDR.handles.Efunused1, ''Visible'',''off'');',...
0132 ' set(AVWHDR.handles.Tfunused2, ''Visible'',''off'');',...
0133 ' set(AVWHDR.handles.Efunused2, ''Visible'',''off'');',...
0134 ' set(AVWHDR.handles.Tdim_un0, ''Visible'',''off'');',...
0135 ' set(AVWHDR.handles.Edim_un0, ''Visible'',''off'');',...
0136 ' set(AVWHDR.handles.Tunused1, ''Visible'',''off'');',...
0137 ' set(AVWHDR.handles.Eunused1, ''Visible'',''off'');',...
0138 ' set(AVWHDR.handles.Tdescrip, ''Visible'',''off'');',...
0139 ' set(AVWHDR.handles.Edescrip, ''Visible'',''off'');',...
0140 ' set(AVWHDR.handles.Taux_file, ''Visible'',''off'');',...
0141 ' set(AVWHDR.handles.Eaux_file, ''Visible'',''off'');',...
0142 ' set(AVWHDR.handles.Toriginator, ''Visible'',''off'');',...
0143 ' set(AVWHDR.handles.Eoriginator, ''Visible'',''off'');',...
0144 ' set(AVWHDR.handles.Tgenerated, ''Visible'',''off'');',...
0145 ' set(AVWHDR.handles.Egenerated, ''Visible'',''off'');',...
0146 ' set(AVWHDR.handles.Tscannum, ''Visible'',''off'');',...
0147 ' set(AVWHDR.handles.Escannum, ''Visible'',''off'');',...
0148 ' set(AVWHDR.handles.Tpatient_id, ''Visible'',''off'');',...
0149 ' set(AVWHDR.handles.Epatient_id, ''Visible'',''off'');',...
0150 ' set(AVWHDR.handles.Texp_date, ''Visible'',''off'');',...
0151 ' set(AVWHDR.handles.Eexp_date, ''Visible'',''off'');',...
0152 ' set(AVWHDR.handles.Texp_time, ''Visible'',''off'');',...
0153 ' set(AVWHDR.handles.Eexp_time, ''Visible'',''off'');',...
0154 ' set(AVWHDR.handles.Tsmin, ''Visible'',''off'');',...
0155 ' set(AVWHDR.handles.Esmin, ''Visible'',''off'');',...
0156 ' set(AVWHDR.handles.Tsmax, ''Visible'',''off'');',...
0157 ' set(AVWHDR.handles.Esmax, ''Visible'',''off'');',...
0158 ' set(AVWHDR.handles.Tomin, ''Visible'',''off'');',...
0159 ' set(AVWHDR.handles.Eomin, ''Visible'',''off'');',...
0160 ' set(AVWHDR.handles.Tomax, ''Visible'',''off'');',...
0161 ' set(AVWHDR.handles.Eomax, ''Visible'',''off'');',...
0162 ' set(AVWHDR.handles.Tviews, ''Visible'',''off'');',...
0163 ' set(AVWHDR.handles.Eviews, ''Visible'',''off'');',...
0164 ' set(AVWHDR.handles.Tvols_added, ''Visible'',''off'');',...
0165 ' set(AVWHDR.handles.Evols_added, ''Visible'',''off'');',...
0166 ' set(AVWHDR.handles.Tstart_field, ''Visible'',''off'');',...
0167 ' set(AVWHDR.handles.Estart_field, ''Visible'',''off'');',...
0168 ' set(AVWHDR.handles.Tfield_skip, ''Visible'',''off'');',...
0169 ' set(AVWHDR.handles.Efield_skip, ''Visible'',''off'');',...
0170 ' set(AVWHDR.handles.Torient, ''Visible'',''off'');',...
0171 ' set(AVWHDR.handles.Eorient, ''Visible'',''off'');',...
0172 ' set(AVWHDR.handles.Thist_un0, ''Visible'',''off'');',...
0173 ' set(AVWHDR.handles.Ehist_un0, ''Visible'',''off'');',...
0174 'case 2, ',...
0175 ' set(AVWHDR.handles.Tsizeof_hdr, ''Visible'',''off'');',...
0176 ' set(AVWHDR.handles.Esizeof_hdr, ''Visible'',''off'');',...
0177 ' set(AVWHDR.handles.Tdata_type, ''Visible'',''off'');',...
0178 ' set(AVWHDR.handles.Edata_type, ''Visible'',''off'');',...
0179 ' set(AVWHDR.handles.Tdb_name, ''Visible'',''off'');',...
0180 ' set(AVWHDR.handles.Edb_name, ''Visible'',''off'');',...
0181 ' set(AVWHDR.handles.Textents, ''Visible'',''off'');',...
0182 ' set(AVWHDR.handles.Eextents, ''Visible'',''off'');',...
0183 ' set(AVWHDR.handles.Tsession_error, ''Visible'',''off'');',...
0184 ' set(AVWHDR.handles.Esession_error, ''Visible'',''off'');',...
0185 ' set(AVWHDR.handles.Tregular, ''Visible'',''off'');',...
0186 ' set(AVWHDR.handles.Eregular, ''Visible'',''off'');',...
0187 ' set(AVWHDR.handles.Thkey_un0, ''Visible'',''off'');',...
0188 ' set(AVWHDR.handles.Ehkey_un0, ''Visible'',''off'');',...
0189 ' set(AVWHDR.handles.Tdim1, ''Visible'',''on '');',...
0190 ' set(AVWHDR.handles.Edim1, ''Visible'',''on '');',...
0191 ' set(AVWHDR.handles.Tdim2, ''Visible'',''on '');',...
0192 ' set(AVWHDR.handles.Edim2, ''Visible'',''on '');',...
0193 ' set(AVWHDR.handles.Tdim3, ''Visible'',''on '');',...
0194 ' set(AVWHDR.handles.Edim3, ''Visible'',''on '');',...
0195 ' set(AVWHDR.handles.Tdim4, ''Visible'',''on '');',...
0196 ' set(AVWHDR.handles.Edim4, ''Visible'',''on '');',...
0197 ' set(AVWHDR.handles.Tdim5, ''Visible'',''on '');',...
0198 ' set(AVWHDR.handles.Edim5, ''Visible'',''on '');',...
0199 ' set(AVWHDR.handles.Tdim6, ''Visible'',''on '');',...
0200 ' set(AVWHDR.handles.Edim6, ''Visible'',''on '');',...
0201 ' set(AVWHDR.handles.Tdim7, ''Visible'',''on '');',...
0202 ' set(AVWHDR.handles.Edim7, ''Visible'',''on '');',...
0203 ' set(AVWHDR.handles.Tdim8, ''Visible'',''on '');',...
0204 ' set(AVWHDR.handles.Edim8, ''Visible'',''on '');',...
0205 ' set(AVWHDR.handles.Tpixdim1, ''Visible'',''on '');',...
0206 ' set(AVWHDR.handles.Epixdim1, ''Visible'',''on '');',...
0207 ' set(AVWHDR.handles.Tpixdim2, ''Visible'',''on '');',...
0208 ' set(AVWHDR.handles.Epixdim2, ''Visible'',''on '');',...
0209 ' set(AVWHDR.handles.Tpixdim3, ''Visible'',''on '');',...
0210 ' set(AVWHDR.handles.Epixdim3, ''Visible'',''on '');',...
0211 ' set(AVWHDR.handles.Tpixdim4, ''Visible'',''on '');',...
0212 ' set(AVWHDR.handles.Epixdim4, ''Visible'',''on '');',...
0213 ' set(AVWHDR.handles.Tpixdim5, ''Visible'',''on '');',...
0214 ' set(AVWHDR.handles.Epixdim5, ''Visible'',''on '');',...
0215 ' set(AVWHDR.handles.Tpixdim6, ''Visible'',''on '');',...
0216 ' set(AVWHDR.handles.Epixdim6, ''Visible'',''on '');',...
0217 ' set(AVWHDR.handles.Tpixdim7, ''Visible'',''on '');',...
0218 ' set(AVWHDR.handles.Epixdim7, ''Visible'',''on '');',...
0219 ' set(AVWHDR.handles.Tpixdim8, ''Visible'',''on '');',...
0220 ' set(AVWHDR.handles.Epixdim8, ''Visible'',''on '');',...
0221 ' set(AVWHDR.handles.Tvox_units, ''Visible'',''on '');',...
0222 ' set(AVWHDR.handles.Evox_units, ''Visible'',''on '');',...
0223 ' set(AVWHDR.handles.Tcal_units, ''Visible'',''on '');',...
0224 ' set(AVWHDR.handles.Ecal_units, ''Visible'',''on '');',...
0225 ' set(AVWHDR.handles.Tdatatype, ''Visible'',''on '');',...
0226 ' set(AVWHDR.handles.Edatatype, ''Visible'',''on '');',...
0227 ' set(AVWHDR.handles.Tbitpix, ''Visible'',''on '');',...
0228 ' set(AVWHDR.handles.Ebitpix, ''Visible'',''on '');',...
0229 ' set(AVWHDR.handles.Tvox_offset, ''Visible'',''on '');',...
0230 ' set(AVWHDR.handles.Evox_offset, ''Visible'',''on '');',...
0231 ' set(AVWHDR.handles.Troi_scale, ''Visible'',''on '');',...
0232 ' set(AVWHDR.handles.Eroi_scale, ''Visible'',''on '');',...
0233 ' set(AVWHDR.handles.Tglmax, ''Visible'',''on '');',...
0234 ' set(AVWHDR.handles.Eglmax, ''Visible'',''on '');',...
0235 ' set(AVWHDR.handles.Tglmin, ''Visible'',''on '');',...
0236 ' set(AVWHDR.handles.Eglmin, ''Visible'',''on '');',...
0237 ' set(AVWHDR.handles.Tverified, ''Visible'',''on '');',...
0238 ' set(AVWHDR.handles.Everified, ''Visible'',''on '');',...
0239 ' set(AVWHDR.handles.Tcompressed, ''Visible'',''on '');',...
0240 ' set(AVWHDR.handles.Ecompressed, ''Visible'',''on '');',...
0241 ' set(AVWHDR.handles.Tcal_min, ''Visible'',''on '');',...
0242 ' set(AVWHDR.handles.Ecal_min, ''Visible'',''on '');',...
0243 ' set(AVWHDR.handles.Tcal_max, ''Visible'',''on '');',...
0244 ' set(AVWHDR.handles.Ecal_max, ''Visible'',''on '');',...
0245 ' set(AVWHDR.handles.Tfunused1, ''Visible'',''on '');',...
0246 ' set(AVWHDR.handles.Efunused1, ''Visible'',''on '');',...
0247 ' set(AVWHDR.handles.Tfunused2, ''Visible'',''on '');',...
0248 ' set(AVWHDR.handles.Efunused2, ''Visible'',''on '');',...
0249 ' set(AVWHDR.handles.Tdim_un0, ''Visible'',''on '');',...
0250 ' set(AVWHDR.handles.Edim_un0, ''Visible'',''on '');',...
0251 ' set(AVWHDR.handles.Tunused1, ''Visible'',''on '');',...
0252 ' set(AVWHDR.handles.Eunused1, ''Visible'',''on '');',...
0253 ' set(AVWHDR.handles.Tdescrip, ''Visible'',''off'');',...
0254 ' set(AVWHDR.handles.Edescrip, ''Visible'',''off'');',...
0255 ' set(AVWHDR.handles.Taux_file, ''Visible'',''off'');',...
0256 ' set(AVWHDR.handles.Eaux_file, ''Visible'',''off'');',...
0257 ' set(AVWHDR.handles.Toriginator, ''Visible'',''off'');',...
0258 ' set(AVWHDR.handles.Eoriginator, ''Visible'',''off'');',...
0259 ' set(AVWHDR.handles.Tgenerated, ''Visible'',''off'');',...
0260 ' set(AVWHDR.handles.Egenerated, ''Visible'',''off'');',...
0261 ' set(AVWHDR.handles.Tscannum, ''Visible'',''off'');',...
0262 ' set(AVWHDR.handles.Escannum, ''Visible'',''off'');',...
0263 ' set(AVWHDR.handles.Tpatient_id, ''Visible'',''off'');',...
0264 ' set(AVWHDR.handles.Epatient_id, ''Visible'',''off'');',...
0265 ' set(AVWHDR.handles.Texp_date, ''Visible'',''off'');',...
0266 ' set(AVWHDR.handles.Eexp_date, ''Visible'',''off'');',...
0267 ' set(AVWHDR.handles.Texp_time, ''Visible'',''off'');',...
0268 ' set(AVWHDR.handles.Eexp_time, ''Visible'',''off'');',...
0269 ' set(AVWHDR.handles.Tsmin, ''Visible'',''off'');',...
0270 ' set(AVWHDR.handles.Esmin, ''Visible'',''off'');',...
0271 ' set(AVWHDR.handles.Tsmax, ''Visible'',''off'');',...
0272 ' set(AVWHDR.handles.Esmax, ''Visible'',''off'');',...
0273 ' set(AVWHDR.handles.Tomin, ''Visible'',''off'');',...
0274 ' set(AVWHDR.handles.Eomin, ''Visible'',''off'');',...
0275 ' set(AVWHDR.handles.Tomax, ''Visible'',''off'');',...
0276 ' set(AVWHDR.handles.Eomax, ''Visible'',''off'');',...
0277 ' set(AVWHDR.handles.Tviews, ''Visible'',''off'');',...
0278 ' set(AVWHDR.handles.Eviews, ''Visible'',''off'');',...
0279 ' set(AVWHDR.handles.Tvols_added, ''Visible'',''off'');',...
0280 ' set(AVWHDR.handles.Evols_added, ''Visible'',''off'');',...
0281 ' set(AVWHDR.handles.Tstart_field, ''Visible'',''off'');',...
0282 ' set(AVWHDR.handles.Estart_field, ''Visible'',''off'');',...
0283 ' set(AVWHDR.handles.Tfield_skip, ''Visible'',''off'');',...
0284 ' set(AVWHDR.handles.Efield_skip, ''Visible'',''off'');',...
0285 ' set(AVWHDR.handles.Torient, ''Visible'',''off'');',...
0286 ' set(AVWHDR.handles.Eorient, ''Visible'',''off'');',...
0287 ' set(AVWHDR.handles.Thist_un0, ''Visible'',''off'');',...
0288 ' set(AVWHDR.handles.Ehist_un0, ''Visible'',''off'');',...
0289 'case 3, ',...
0290 ' set(AVWHDR.handles.Tsizeof_hdr, ''Visible'',''off'');',...
0291 ' set(AVWHDR.handles.Esizeof_hdr, ''Visible'',''off'');',...
0292 ' set(AVWHDR.handles.Tdata_type, ''Visible'',''off'');',...
0293 ' set(AVWHDR.handles.Edata_type, ''Visible'',''off'');',...
0294 ' set(AVWHDR.handles.Tdb_name, ''Visible'',''off'');',...
0295 ' set(AVWHDR.handles.Edb_name, ''Visible'',''off'');',...
0296 ' set(AVWHDR.handles.Textents, ''Visible'',''off'');',...
0297 ' set(AVWHDR.handles.Eextents, ''Visible'',''off'');',...
0298 ' set(AVWHDR.handles.Tsession_error, ''Visible'',''off'');',...
0299 ' set(AVWHDR.handles.Esession_error, ''Visible'',''off'');',...
0300 ' set(AVWHDR.handles.Tregular, ''Visible'',''off'');',...
0301 ' set(AVWHDR.handles.Eregular, ''Visible'',''off'');',...
0302 ' set(AVWHDR.handles.Thkey_un0, ''Visible'',''off'');',...
0303 ' set(AVWHDR.handles.Ehkey_un0, ''Visible'',''off'');',...
0304 ' set(AVWHDR.handles.Tdim1, ''Visible'',''off'');',...
0305 ' set(AVWHDR.handles.Edim1, ''Visible'',''off'');',...
0306 ' set(AVWHDR.handles.Tdim2, ''Visible'',''off'');',...
0307 ' set(AVWHDR.handles.Edim2, ''Visible'',''off'');',...
0308 ' set(AVWHDR.handles.Tdim3, ''Visible'',''off'');',...
0309 ' set(AVWHDR.handles.Edim3, ''Visible'',''off'');',...
0310 ' set(AVWHDR.handles.Tdim4, ''Visible'',''off'');',...
0311 ' set(AVWHDR.handles.Edim4, ''Visible'',''off'');',...
0312 ' set(AVWHDR.handles.Tdim5, ''Visible'',''off'');',...
0313 ' set(AVWHDR.handles.Edim5, ''Visible'',''off'');',...
0314 ' set(AVWHDR.handles.Tdim6, ''Visible'',''off'');',...
0315 ' set(AVWHDR.handles.Edim6, ''Visible'',''off'');',...
0316 ' set(AVWHDR.handles.Tdim7, ''Visible'',''off'');',...
0317 ' set(AVWHDR.handles.Edim7, ''Visible'',''off'');',...
0318 ' set(AVWHDR.handles.Tdim8, ''Visible'',''off'');',...
0319 ' set(AVWHDR.handles.Edim8, ''Visible'',''off'');',...
0320 ' set(AVWHDR.handles.Tpixdim1, ''Visible'',''off'');',...
0321 ' set(AVWHDR.handles.Epixdim1, ''Visible'',''off'');',...
0322 ' set(AVWHDR.handles.Tpixdim2, ''Visible'',''off'');',...
0323 ' set(AVWHDR.handles.Epixdim2, ''Visible'',''off'');',...
0324 ' set(AVWHDR.handles.Tpixdim3, ''Visible'',''off'');',...
0325 ' set(AVWHDR.handles.Epixdim3, ''Visible'',''off'');',...
0326 ' set(AVWHDR.handles.Tpixdim4, ''Visible'',''off'');',...
0327 ' set(AVWHDR.handles.Epixdim4, ''Visible'',''off'');',...
0328 ' set(AVWHDR.handles.Tpixdim5, ''Visible'',''off'');',...
0329 ' set(AVWHDR.handles.Epixdim5, ''Visible'',''off'');',...
0330 ' set(AVWHDR.handles.Tpixdim6, ''Visible'',''off'');',...
0331 ' set(AVWHDR.handles.Epixdim6, ''Visible'',''off'');',...
0332 ' set(AVWHDR.handles.Tpixdim7, ''Visible'',''off'');',...
0333 ' set(AVWHDR.handles.Epixdim7, ''Visible'',''off'');',...
0334 ' set(AVWHDR.handles.Tpixdim8, ''Visible'',''off'');',...
0335 ' set(AVWHDR.handles.Epixdim8, ''Visible'',''off'');',...
0336 ' set(AVWHDR.handles.Tvox_units, ''Visible'',''off'');',...
0337 ' set(AVWHDR.handles.Evox_units, ''Visible'',''off'');',...
0338 ' set(AVWHDR.handles.Tcal_units, ''Visible'',''off'');',...
0339 ' set(AVWHDR.handles.Ecal_units, ''Visible'',''off'');',...
0340 ' set(AVWHDR.handles.Tdatatype, ''Visible'',''off'');',...
0341 ' set(AVWHDR.handles.Edatatype, ''Visible'',''off'');',...
0342 ' set(AVWHDR.handles.Tbitpix, ''Visible'',''off'');',...
0343 ' set(AVWHDR.handles.Ebitpix, ''Visible'',''off'');',...
0344 ' set(AVWHDR.handles.Tvox_offset, ''Visible'',''off'');',...
0345 ' set(AVWHDR.handles.Evox_offset, ''Visible'',''off'');',...
0346 ' set(AVWHDR.handles.Troi_scale, ''Visible'',''off'');',...
0347 ' set(AVWHDR.handles.Eroi_scale, ''Visible'',''off'');',...
0348 ' set(AVWHDR.handles.Tglmax, ''Visible'',''off'');',...
0349 ' set(AVWHDR.handles.Eglmax, ''Visible'',''off'');',...
0350 ' set(AVWHDR.handles.Tglmin, ''Visible'',''off'');',...
0351 ' set(AVWHDR.handles.Eglmin, ''Visible'',''off'');',...
0352 ' set(AVWHDR.handles.Tverified, ''Visible'',''off'');',...
0353 ' set(AVWHDR.handles.Everified, ''Visible'',''off'');',...
0354 ' set(AVWHDR.handles.Tcompressed, ''Visible'',''off'');',...
0355 ' set(AVWHDR.handles.Ecompressed, ''Visible'',''off'');',...
0356 ' set(AVWHDR.handles.Tcal_min, ''Visible'',''off'');',...
0357 ' set(AVWHDR.handles.Ecal_min, ''Visible'',''off'');',...
0358 ' set(AVWHDR.handles.Tcal_max, ''Visible'',''off'');',...
0359 ' set(AVWHDR.handles.Ecal_max, ''Visible'',''off'');',...
0360 ' set(AVWHDR.handles.Tfunused1, ''Visible'',''off'');',...
0361 ' set(AVWHDR.handles.Efunused1, ''Visible'',''off'');',...
0362 ' set(AVWHDR.handles.Tfunused2, ''Visible'',''off'');',...
0363 ' set(AVWHDR.handles.Efunused2, ''Visible'',''off'');',...
0364 ' set(AVWHDR.handles.Tdim_un0, ''Visible'',''off'');',...
0365 ' set(AVWHDR.handles.Edim_un0, ''Visible'',''off'');',...
0366 ' set(AVWHDR.handles.Tunused1, ''Visible'',''off'');',...
0367 ' set(AVWHDR.handles.Eunused1, ''Visible'',''off'');',...
0368 ' set(AVWHDR.handles.Tdescrip, ''Visible'',''on '');',...
0369 ' set(AVWHDR.handles.Edescrip, ''Visible'',''on '');',...
0370 ' set(AVWHDR.handles.Taux_file, ''Visible'',''on '');',...
0371 ' set(AVWHDR.handles.Eaux_file, ''Visible'',''on '');',...
0372 ' set(AVWHDR.handles.Toriginator, ''Visible'',''on '');',...
0373 ' set(AVWHDR.handles.Eoriginator, ''Visible'',''on '');',...
0374 ' set(AVWHDR.handles.Tgenerated, ''Visible'',''on '');',...
0375 ' set(AVWHDR.handles.Egenerated, ''Visible'',''on '');',...
0376 ' set(AVWHDR.handles.Tscannum, ''Visible'',''on '');',...
0377 ' set(AVWHDR.handles.Escannum, ''Visible'',''on '');',...
0378 ' set(AVWHDR.handles.Tpatient_id, ''Visible'',''on '');',...
0379 ' set(AVWHDR.handles.Epatient_id, ''Visible'',''on '');',...
0380 ' set(AVWHDR.handles.Texp_date, ''Visible'',''on '');',...
0381 ' set(AVWHDR.handles.Eexp_date, ''Visible'',''on '');',...
0382 ' set(AVWHDR.handles.Texp_time, ''Visible'',''on '');',...
0383 ' set(AVWHDR.handles.Eexp_time, ''Visible'',''on '');',...
0384 ' set(AVWHDR.handles.Tsmin, ''Visible'',''on '');',...
0385 ' set(AVWHDR.handles.Esmin, ''Visible'',''on '');',...
0386 ' set(AVWHDR.handles.Tsmax, ''Visible'',''on '');',...
0387 ' set(AVWHDR.handles.Esmax, ''Visible'',''on '');',...
0388 ' set(AVWHDR.handles.Tomin, ''Visible'',''on '');',...
0389 ' set(AVWHDR.handles.Eomin, ''Visible'',''on '');',...
0390 ' set(AVWHDR.handles.Tomax, ''Visible'',''on '');',...
0391 ' set(AVWHDR.handles.Eomax, ''Visible'',''on '');',...
0392 ' set(AVWHDR.handles.Tviews, ''Visible'',''on '');',...
0393 ' set(AVWHDR.handles.Eviews, ''Visible'',''on '');',...
0394 ' set(AVWHDR.handles.Tvols_added, ''Visible'',''on '');',...
0395 ' set(AVWHDR.handles.Evols_added, ''Visible'',''on '');',...
0396 ' set(AVWHDR.handles.Tstart_field, ''Visible'',''on '');',...
0397 ' set(AVWHDR.handles.Estart_field, ''Visible'',''on '');',...
0398 ' set(AVWHDR.handles.Tfield_skip, ''Visible'',''on '');',...
0399 ' set(AVWHDR.handles.Efield_skip, ''Visible'',''on '');',...
0400 ' set(AVWHDR.handles.Torient, ''Visible'',''on '');',...
0401 ' set(AVWHDR.handles.Eorient, ''Visible'',''on '');',...
0402 ' set(AVWHDR.handles.Thist_un0, ''Visible'',''on '');',...
0403 ' set(AVWHDR.handles.Ehist_un0, ''Visible'',''on '');',...
0404 'end; ',...
0405 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR field;'));
0406
0407
0408
0409
0410 Font.FontWeight = 'normal';
0411
0412 G.Tsizeof_hdr = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0413 'Position',[.01 .8 .49 .09],'String','Size of Header','HorizontalAlignment','left');
0414 G.Esizeof_hdr = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0415 'Position',[.51 .8 .48 .09], 'String',num2str(double(avw.hdr.hk.sizeof_hdr)),...
0416 'TooltipString','Must indicate the byte size of the header file: int32, must = 348',...
0417 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0418 'size = 348; AVWHDR.avw.hdr.hk.sizeof_hdr = int32(size);',...
0419 'set(AVWHDR.handles.Esizeof_hdr,''String'', num2str(size));',...
0420 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR size;'));
0421
0422 G.Tdata_type = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0423 'Position',[.01 .7 .49 .09],'String','Data Type','HorizontalAlignment','left');
0424 G.Edata_type = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0425 'Position',[.51 .7 .48 .09], 'String',avw.hdr.hk.data_type,...
0426 'TooltipString','Not important: string',...
0427 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0428 'AVWHDR.avw.hdr.hk.data_type = get(AVWHDR.handles.Edata_type,''String'');',...
0429 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0430
0431 G.Tdb_name = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0432 'Position',[.01 .6 .49 .09],'String','DB Name','HorizontalAlignment','left');
0433 G.Edb_name = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0434 'Position',[.51 .6 .48 .09], 'String',avw.hdr.hk.db_name,...
0435 'TooltipString','Not important: string',...
0436 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0437 'AVWHDR.avw.hdr.hk.db_name = get(AVWHDR.handles.Edb_name,''String'');',...
0438 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0439
0440 G.Textents = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0441 'Position',[.01 .5 .49 .09],'String','Extents','HorizontalAlignment','left');
0442 G.Eextents = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0443 'Position',[.51 .5 .48 .09], 'String',num2str(double(avw.hdr.hk.extents)),...
0444 'TooltipString','Should be 16384, the image file is created as contiguous with a minimum extent size: int32',...
0445 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0446 'extents = str2num(get(AVWHDR.handles.Eextents,''String''));',...
0447 'AVWHDR.avw.hdr.hk.extents = int32(extents);',...
0448 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR extents;'));
0449
0450 G.Tsession_error = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0451 'Position',[.01 .4 .49 .09],'String','Session Error','HorizontalAlignment','left');
0452 G.Esession_error = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0453 'Position',[.51 .4 .48 .09], 'String',num2str(double(avw.hdr.hk.session_error)),...
0454 'TooltipString','Not important: int16',...
0455 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0456 'session_error = str2num(get(AVWHDR.handles.Esession_error,''String''));',...
0457 'AVWHDR.avw.hdr.hk.session_error = int16(session_error);',...
0458 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR session_error;'));
0459
0460 G.Tregular = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0461 'Position',[.01 .3 .49 .09],'String','Regular','HorizontalAlignment','left');
0462 G.Eregular = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0463 'Position',[.51 .3 .48 .09], 'String',avw.hdr.hk.regular,...
0464 'TooltipString','Must be ''r'' to indicate that all images and volumes are the same size: string',...
0465 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0466 'AVWHDR.avw.hdr.hk.regular = ''r'';',...
0467 'set(AVWHDR.handles.Eregular,''String'', ''r'');',...
0468 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0469
0470 G.Thkey_un0 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0471 'Position',[.01 .2 .49 .09],'String','Key Unused #0','HorizontalAlignment','left');
0472 G.Ehkey_un0 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0473 'Position',[.51 .2 .48 .09], 'String',avw.hdr.hk.hkey_un0,...
0474 'TooltipString','Unused key: uint8',...
0475 'Visible','on',...
0476 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0477 'hkey_un0 = get(AVWHDR.handles.Ehkey_un0,''String'');',...
0478 'AVWHDR.avw.hdr.hk.hkey_un0 = uint8(str2num(hkey_un0));',...
0479 'set(gcbf,''Userdata'',AVWHDR); clear hkey_un0 AVWHDR;'));
0480
0481
0482
0483
0484
0485
0486
0487
0488
0489
0490 G.Tdim1 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0491 'Position',[.01 .8 .13 .09],'String','Dims: ',...
0492 'Visible','off','HorizontalAlignment','right');
0493 G.Edim1 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0494 'Position',[.15 .8 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(1))),...
0495 'TooltipString','Number of image dimensions used: int16',...
0496 'Visible','off',...
0497 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0498 'dim = str2num(get(AVWHDR.handles.Edim1,''String''));',...
0499 'AVWHDR.avw.hdr.dime.dim(1) = int16(dim);',...
0500 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0501
0502 G.Tdim2 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0503 'Position',[.01 .7 .13 .09],'String','Dim 2: ',...
0504 'Visible','off','HorizontalAlignment','right');
0505 G.Edim2 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0506 'Position',[.15 .7 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(2))),...
0507 'TooltipString','Image dimension 2 (x): int16',...
0508 'Visible','off',...
0509 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0510 'dim = str2num(get(AVWHDR.handles.Edim2,''String''));',...
0511 'AVWHDR.avw.hdr.dime.dim(2) = int16(dim);',...
0512 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0513
0514 G.Tdim3 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0515 'Position',[.01 .6 .13 .09],'String','Dim 3: ',...
0516 'Visible','off','HorizontalAlignment','right');
0517 G.Edim3 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0518 'Position',[.15 .6 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(3))),...
0519 'TooltipString','Image dimension 3 (y): int16',...
0520 'Visible','off',...
0521 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0522 'dim = str2num(get(AVWHDR.handles.Edim3,''String''));',...
0523 'AVWHDR.avw.hdr.dime.dim(3) = int16(dim);',...
0524 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0525
0526 G.Tdim4 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0527 'Position',[.01 .5 .13 .09],'String','Dim 4: ',...
0528 'Visible','off','HorizontalAlignment','right');
0529 G.Edim4 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0530 'Position',[.15 .5 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(4))),...
0531 'TooltipString','Image dimension 4 (z): int16',...
0532 'Visible','off',...
0533 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0534 'dim = str2num(get(AVWHDR.handles.Edim4,''String''));',...
0535 'AVWHDR.avw.hdr.dime.dim(4) = int16(dim);',...
0536 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0537
0538 G.Tdim5 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0539 'Position',[.01 .4 .13 .09],'String','Dim 5: ',...
0540 'Visible','off','HorizontalAlignment','right');
0541 G.Edim5 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0542 'Position',[.15 .4 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(5))),...
0543 'TooltipString','Image dimension 5, # of 3D volumes (time): int16',...
0544 'Visible','off',...
0545 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0546 'dim = str2num(get(AVWHDR.handles.Edim5,''String''));',...
0547 'AVWHDR.avw.hdr.dime.dim(5) = int16(dim);',...
0548 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0549
0550 G.Tdim6 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0551 'Position',[.01 .3 .13 .09],'String','Dim 6: ',...
0552 'Visible','off','HorizontalAlignment','right');
0553 G.Edim6 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0554 'Position',[.15 .3 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(6))),...
0555 'TooltipString','Image dimension 6: int16',...
0556 'Visible','off',...
0557 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0558 'dim = str2num(get(AVWHDR.handles.Edim6,''String''));',...
0559 'AVWHDR.avw.hdr.dime.dim(6) = int16(dim);',...
0560 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0561
0562 G.Tdim7 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0563 'Position',[.01 .2 .13 .09],'String','Dim 7: ',...
0564 'Visible','off','HorizontalAlignment','right');
0565 G.Edim7 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0566 'Position',[.15 .2 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(7))),...
0567 'TooltipString','Image dimension 7: int16',...
0568 'Visible','off',...
0569 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0570 'dim = str2num(get(AVWHDR.handles.Edim7,''String''));',...
0571 'AVWHDR.avw.hdr.dime.dim(7) = int16(dim);',...
0572 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0573
0574 G.Tdim8 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0575 'Position',[.01 .1 .13 .09],'String','Dim 8: ',...
0576 'Visible','off','HorizontalAlignment','right');
0577 G.Edim8 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0578 'Position',[.15 .1 .09 .09], 'String',num2str(double(avw.hdr.dime.dim(8))),...
0579 'TooltipString','Image dimension 8: int16',...
0580 'Visible','off',...
0581 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0582 'dim = str2num(get(AVWHDR.handles.Edim8,''String''));',...
0583 'AVWHDR.avw.hdr.dime.dim(8) = int16(dim);',...
0584 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0585
0586
0587
0588
0589
0590 G.Tpixdim1 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0591 'Position',[.26 .8 .13 .09],'String','Pix 1: ',...
0592 'Visible','off','HorizontalAlignment','right');
0593 G.Epixdim1 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0594 'Position',[.40 .8 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(1))),...
0595 'TooltipString','Pixel dimension 1: float',...
0596 'Visible','off',...
0597 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0598 'dim = str2num(get(AVWHDR.handles.Epixdim1,''String''));',...
0599 'AVWHDR.avw.hdr.dime.pixdim(1) = single(dim);',...
0600 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0601
0602 G.Tpixdim2 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0603 'Position',[.26 .7 .13 .09],'String','Pix 2: ',...
0604 'Visible','off','HorizontalAlignment','right');
0605 G.Epixdim2 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0606 'Position',[.40 .7 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(2))),...
0607 'TooltipString','Pixel dimension 2 (X, mm): float',...
0608 'Visible','off',...
0609 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0610 'dim = str2num(get(AVWHDR.handles.Epixdim2,''String''));',...
0611 'AVWHDR.avw.hdr.dime.pixdim(2) = single(dim);',...
0612 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0613
0614 G.Tpixdim3 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0615 'Position',[.26 .6 .13 .09],'String','Pix 3: ',...
0616 'Visible','off','HorizontalAlignment','right');
0617 G.Epixdim3 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0618 'Position',[.40 .6 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(3))),...
0619 'TooltipString','Pixel dimension 3 (Y, mm): float',...
0620 'Visible','off',...
0621 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0622 'dim = str2num(get(AVWHDR.handles.Epixdim3,''String''));',...
0623 'AVWHDR.avw.hdr.dime.pixdim(3) = single(dim);',...
0624 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0625
0626 G.Tpixdim4 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0627 'Position',[.26 .5 .13 .09],'String','Pix 4: ',...
0628 'Visible','off','HorizontalAlignment','right');
0629 G.Epixdim4 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0630 'Position',[.40 .5 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(4))),...
0631 'TooltipString','Pixel dimension 4 (Z, mm): float',...
0632 'Visible','off',...
0633 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0634 'dim = str2num(get(AVWHDR.handles.Epixdim4,''String''));',...
0635 'AVWHDR.avw.hdr.dime.pixdim(4) = single(dim);',...
0636 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0637
0638 G.Tpixdim5 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0639 'Position',[.26 .4 .13 .09],'String','Pix 5: ',...
0640 'Visible','off','HorizontalAlignment','right');
0641 G.Epixdim5 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0642 'Position',[.40 .4 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(5))),...
0643 'TooltipString','Pixel dimension 5 (Time, msec): float',...
0644 'Visible','off',...
0645 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0646 'dim = str2num(get(AVWHDR.handles.Epixdim5,''String''));',...
0647 'AVWHDR.avw.hdr.dime.pixdim(5) = single(dim);',...
0648 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0649
0650 G.Tpixdim6 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0651 'Position',[.26 .3 .13 .09],'String','Pix 6: ',...
0652 'Visible','off','HorizontalAlignment','right');
0653 G.Epixdim6 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0654 'Position',[.40 .3 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(6))),...
0655 'TooltipString','Pixel dimension 6: float',...
0656 'Visible','off',...
0657 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0658 'dim = str2num(get(AVWHDR.handles.Epixdim6,''String''));',...
0659 'AVWHDR.avw.hdr.dime.pixdim(6) = single(dim);',...
0660 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0661
0662 G.Tpixdim7 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0663 'Position',[.26 .2 .13 .09],'String','Pix 7: ',...
0664 'Visible','off','HorizontalAlignment','right');
0665 G.Epixdim7 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0666 'Position',[.40 .2 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(7))),...
0667 'TooltipString','Pixel dimension 7: float',...
0668 'Visible','off',...
0669 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0670 'dim = str2num(get(AVWHDR.handles.Epixdim7,''String''));',...
0671 'AVWHDR.avw.hdr.dime.pixdim(7) = single(dim);',...
0672 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0673
0674 G.Tpixdim8 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0675 'Position',[.26 .1 .13 .09],'String','Pix 8: ',...
0676 'Visible','off','HorizontalAlignment','right');
0677 G.Epixdim8 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0678 'Position',[.40 .1 .09 .09], 'String',num2str(double(avw.hdr.dime.pixdim(8))),...
0679 'TooltipString','Pixel dimension 8: float',...
0680 'Visible','off',...
0681 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0682 'dim = str2num(get(AVWHDR.handles.Epixdim8,''String''));',...
0683 'AVWHDR.avw.hdr.dime.pixdim(8) = single(dim);',...
0684 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim;'));
0685
0686
0687
0688
0689
0690
0691
0692
0693 G.Tbitpix = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0694 'Position',[.51 .8 .13 .09],'String','BitPix: ',...
0695 'Visible','off','HorizontalAlignment','right');
0696 G.Ebitpix = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0697 'Position',[.66 .8 .09 .09], 'String',num2str(double(avw.hdr.dime.bitpix)),...
0698 'TooltipString','Bits Per Pixel: int16',...
0699 'Visible','off',...
0700 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0701 'bitpix = str2num(get(AVWHDR.handles.Ebitpix,''String''));',...
0702 'AVWHDR.avw.hdr.dime.bitpix = int16(bitpix);',...
0703 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR bitpix;'));
0704
0705 G.Tdatatype = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0706 'Position',[.51 .7 .13 .09],'String','Type: ',...
0707 'Visible','off','HorizontalAlignment','right');
0708 G.Edatatype = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0709 'Position',[.66 .7 .09 .09], 'String',num2str(double(avw.hdr.dime.datatype)),...
0710 'TooltipString','Data Type: int16',...
0711 'Visible','off',...
0712 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0713 'type = str2num(get(AVWHDR.handles.Edatatype,''String''));',...
0714 'AVWHDR.avw.hdr.dime.datatype = int16(type);',...
0715 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR type;'));
0716
0717 G.Tvox_units = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0718 'Position',[.51 .6 .13 .09],'String','Vox: ',...
0719 'Visible','off','HorizontalAlignment','right');
0720 G.Evox_units = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0721 'Position',[.66 .6 .09 .09], 'String',avw.hdr.dime.vox_units,...
0722 'TooltipString','Voxel units: string',...
0723 'Visible','off',...
0724 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0725 'AVWHDR.avw.hdr.dime.vox_units = get(AVWHDR.handles.Evox_units,''String'');',...
0726 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0727
0728 G.Tvox_offset = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0729 'Position',[.51 .5 .13 .09],'String','Offset: ',...
0730 'Visible','off','HorizontalAlignment','right');
0731 G.Evox_offset = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0732 'Position',[.66 .5 .09 .09], 'String',num2str(double(avw.hdr.dime.vox_offset)),...
0733 'TooltipString','Voxel Offset: float',...
0734 'Visible','off',...
0735 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0736 'vox_offset = str2num(get(AVWHDR.handles.Evox_offset,''String''));',...
0737 'AVWHDR.avw.hdr.dime.vox_offset = single(vox_offset);',...
0738 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR vox_offset;'));
0739
0740 G.Tglmin = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0741 'Position',[.51 .4 .13 .09],'String','GL Min: ',...
0742 'Visible','off','HorizontalAlignment','right');
0743 G.Eglmin = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0744 'Position',[.66 .4 .09 .09], 'String',num2str(double(avw.hdr.dime.glmin)),...
0745 'TooltipString','Global Minimum: int32',...
0746 'Visible','off',...
0747 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0748 'glmin = str2num(get(AVWHDR.handles.Eglmin,''String''));',...
0749 'AVWHDR.avw.hdr.dime.glmin = int32(glmin);',...
0750 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR glmin;'));
0751
0752 G.Tglmax = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0753 'Position',[.51 .3 .13 .09],'String','GL Max: ',...
0754 'Visible','off','HorizontalAlignment','right');
0755 G.Eglmax = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0756 'Position',[.66 .3 .09 .09], 'String',num2str(double(avw.hdr.dime.glmax)),...
0757 'TooltipString','Global Maximum: int32',...
0758 'Visible','off',...
0759 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0760 'glmax = str2num(get(AVWHDR.handles.Eglmax,''String''));',...
0761 'AVWHDR.avw.hdr.dime.glmax = int32(glmax);',...
0762 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR glmax;'));
0763
0764 G.Troi_scale = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0765 'Position',[.51 .2 .13 .09],'String','ROI: ',...
0766 'Visible','off','HorizontalAlignment','right');
0767 G.Eroi_scale = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0768 'Position',[.66 .2 .09 .09], 'String',num2str(double(avw.hdr.dime.roi_scale)),...
0769 'TooltipString','Region of Interest Scale: float',...
0770 'Visible','off',...
0771 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0772 'roi_scale = str2num(get(AVWHDR.handles.Eroi_scale,''String''));',...
0773 'AVWHDR.avw.hdr.dime.roi_scale = single(roi_scale);',...
0774 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR roi_scale;'));
0775
0776 G.Tcal_units = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0777 'Position',[.51 .1 .13 .09],'String','Cal: ',...
0778 'Visible','off','HorizontalAlignment','right');
0779 G.Ecal_units = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0780 'Position',[.66 .1 .09 .09], 'String',avw.hdr.dime.cal_units,...
0781 'TooltipString','Calibration Units: string',...
0782 'Visible','off',...
0783 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0784 'AVWHDR.avw.hdr.dime.cal_units = get(AVWHDR.handles.Ecal_units,''String'');',...
0785 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0786
0787
0788 G.Tverified = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0789 'Position',[.76 .8 .13 .09],'String','Verif: ',...
0790 'Visible','off','HorizontalAlignment','right');
0791 G.Everified = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0792 'Position',[.90 .8 .09 .09], 'String',num2str(double(avw.hdr.dime.verified)),...
0793 'TooltipString','Verified: int32',...
0794 'Visible','off',...
0795 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0796 'verified = str2num(get(AVWHDR.handles.Everified,''String''));',...
0797 'AVWHDR.avw.hdr.dime.verified = int32(verified);',...
0798 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR verified;'));
0799
0800 G.Tcompressed = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0801 'Position',[.76 .7 .13 .09],'String','Comp: ',...
0802 'Visible','off','HorizontalAlignment','right');
0803 G.Ecompressed = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0804 'Position',[.90 .7 .09 .09], 'String',num2str(double(avw.hdr.dime.compressed)),...
0805 'TooltipString','Compression: int32',...
0806 'Visible','off',...
0807 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0808 'compressed = str2num(get(AVWHDR.handles.Ecompressed,''String''));',...
0809 'AVWHDR.avw.hdr.dime.compressed = int32(compressed);',...
0810 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR compressed;'));
0811
0812 G.Tcal_min = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0813 'Position',[.76 .6 .13 .09],'String','Cal_Min: ',...
0814 'Visible','off','HorizontalAlignment','right');
0815 G.Ecal_min = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0816 'Position',[.90 .6 .09 .09], 'String',num2str(double(avw.hdr.dime.cal_min)),...
0817 'TooltipString','Calibration Min: float',...
0818 'Visible','off',...
0819 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0820 'cal_min = str2num(get(AVWHDR.handles.Ecal_min,''String''));',...
0821 'AVWHDR.avw.hdr.dime.cal_min = single(cal_min);',...
0822 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR cal_min;'));
0823
0824 G.Tcal_max = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0825 'Position',[.76 .5 .13 .09],'String','Cal_Max: ',...
0826 'Visible','off','HorizontalAlignment','right');
0827 G.Ecal_max = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0828 'Position',[.90 .5 .09 .09], 'String',num2str(double(avw.hdr.dime.cal_max)),...
0829 'TooltipString','Calibration Max: float',...
0830 'Visible','off',...
0831 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0832 'cal_max = str2num(get(AVWHDR.handles.Ecal_max,''String''));',...
0833 'AVWHDR.avw.hdr.dime.cal_max = single(cal_max);',...
0834 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR cal_max;'));
0835
0836 G.Tfunused1 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0837 'Position',[.76 .4 .13 .09],'String','FUn1: ',...
0838 'Visible','off','HorizontalAlignment','right');
0839 G.Efunused1 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0840 'Position',[.90 .4 .09 .09], 'String',num2str(double(avw.hdr.dime.funused1)),...
0841 'TooltipString','funused1, unused float field: float',...
0842 'Visible','off',...
0843 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0844 'funused1 = str2num(get(AVWHDR.handles.Efunused1,''String''));',...
0845 'AVWHDR.avw.hdr.dime.funused1 = single(funused1);',...
0846 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR funused1;'));
0847
0848 G.Tfunused2 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0849 'Position',[.76 .3 .13 .09],'String','FUn2: ',...
0850 'Visible','off','HorizontalAlignment','right');
0851 G.Efunused2 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0852 'Position',[.90 .3 .09 .09], 'String',num2str(double(avw.hdr.dime.funused2)),...
0853 'TooltipString','funused2, unused float field: float',...
0854 'Visible','off',...
0855 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0856 'funused2 = str2num(get(AVWHDR.handles.Efunused2,''String''));',...
0857 'AVWHDR.avw.hdr.dime.funused2 = single(funused2);',...
0858 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR funused2;'));
0859
0860 G.Tdim_un0 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0861 'Position',[.76 .2 .13 .09],'String','DimUn: ',...
0862 'Visible','off','HorizontalAlignment','right');
0863 G.Edim_un0 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0864 'Position',[.90 .2 .09 .09], 'String',num2str(double(avw.hdr.dime.dim_un0)),...
0865 'TooltipString','Dim_Un0, unused field: int16',...
0866 'Visible','off',...
0867 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0868 'dim_un0 = str2num(get(AVWHDR.handles.Edim_un0,''String''));',...
0869 'AVWHDR.avw.hdr.dime.dim_un0 = int16(dim_un0);',...
0870 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR dim_un0;'));
0871
0872 G.Tunused1 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0873 'Position',[.76 .1 .13 .09],'String','Unused: ',...
0874 'Visible','off','HorizontalAlignment','right');
0875 G.Eunused1 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0876 'Position',[.90 .1 .09 .09], 'String',num2str(double(avw.hdr.dime.unused1)),...
0877 'TooltipString','Unused int field: int16',...
0878 'Visible','off',...
0879 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0880 'unused1 = str2num(get(AVWHDR.handles.Eunused1,''String''));',...
0881 'AVWHDR.avw.hdr.dime.unused1 = int16(unused1);',...
0882 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR unused1;'));
0883
0884
0885
0886
0887
0888
0889
0890
0891 G.Tdescrip = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0892 'Position',[.01 .8 .18 .09],'String','Description: ',...
0893 'Visible','off','HorizontalAlignment','right');
0894 G.Edescrip = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0895 'Position',[.20 .8 .79 .09], 'String',avw.hdr.hist.descrip,...
0896 'TooltipString','Description: string',...
0897 'Visible','off',...
0898 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0899 'AVWHDR.avw.hdr.hist.descrip = get(AVWHDR.handles.Edescrip,''String'');',...
0900 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0901
0902 G.Taux_file = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0903 'Position',[.01 .7 .18 .09],'String','Aux File: ',...
0904 'Visible','off','HorizontalAlignment','right');
0905 G.Eaux_file = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0906 'Position',[.20 .7 .79 .09], 'String',avw.hdr.hist.aux_file,...
0907 'TooltipString','Auxilliary File: string',...
0908 'Visible','off',...
0909 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0910 'AVWHDR.avw.hdr.hist.aux_file = get(AVWHDR.handles.Eaux_file,''String'');',...
0911 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0912
0913 G.Toriginator = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0914 'Position',[.01 .6 .18 .09],'String','Originator: ',...
0915 'Visible','off','HorizontalAlignment','right');
0916 G.Eoriginator = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0917 'Position',[.20 .6 .29 .09], 'String',avw.hdr.hist.originator,...
0918 'TooltipString','Originator: string',...
0919 'Visible','off',...
0920 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0921 'AVWHDR.avw.hdr.hist.originator = get(AVWHDR.handles.Eoriginator,''String'');',...
0922 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0923
0924 G.Tgenerated = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0925 'Position',[.51 .6 .18 .09],'String','Generated: ',...
0926 'Visible','off','HorizontalAlignment','right');
0927 G.Egenerated = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0928 'Position',[.70 .6 .29 .09], 'String',avw.hdr.hist.generated,...
0929 'TooltipString','Generated: string',...
0930 'Visible','off',...
0931 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0932 'AVWHDR.avw.hdr.hist.generated = get(AVWHDR.handles.Egenerated,''String'');',...
0933 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0934
0935 G.Tscannum = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0936 'Position',[.01 .5 .18 .09],'String','Scan Num: ',...
0937 'Visible','off','HorizontalAlignment','right');
0938 G.Escannum = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0939 'Position',[.20 .5 .29 .09], 'String',avw.hdr.hist.scannum,...
0940 'TooltipString','Scan Number: string',...
0941 'Visible','off',...
0942 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0943 'AVWHDR.avw.hdr.hist.scannum = get(AVWHDR.handles.Escannum,''String'');',...
0944 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0945
0946 G.Tpatient_id = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0947 'Position',[.51 .5 .18 .09],'String','Patient ID: ',...
0948 'Visible','off','HorizontalAlignment','right');
0949 G.Epatient_id = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0950 'Position',[.70 .5 .29 .09], 'String',avw.hdr.hist.patient_id,...
0951 'TooltipString','Patient ID: string',...
0952 'Visible','off',...
0953 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0954 'AVWHDR.avw.hdr.hist.patient_id = get(AVWHDR.handles.Epatient_id,''String'');',...
0955 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0956
0957 G.Texp_date = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0958 'Position',[.01 .4 .18 .09],'String','Exp Date: ',...
0959 'Visible','off','HorizontalAlignment','right');
0960 G.Eexp_date = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0961 'Position',[.20 .4 .29 .09], 'String',avw.hdr.hist.exp_date,...
0962 'TooltipString','Exp Date: string',...
0963 'Visible','off',...
0964 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0965 'AVWHDR.avw.hdr.hist.exp_date = get(AVWHDR.handles.Eexp_date,''String'');',...
0966 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0967
0968 G.Texp_time = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0969 'Position',[.51 .4 .18 .09],'String','Exp Time: ',...
0970 'Visible','off','HorizontalAlignment','right');
0971 G.Eexp_time = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0972 'Position',[.70 .4 .29 .09], 'String',avw.hdr.hist.exp_time,...
0973 'TooltipString','Exp Time: string',...
0974 'Visible','off',...
0975 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0976 'AVWHDR.avw.hdr.hist.exp_time = get(AVWHDR.handles.Eexp_time,''String'');',...
0977 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
0978
0979 G.Tsmin = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0980 'Position',[.01 .3 .13 .09],'String','Smin: ',...
0981 'Visible','off','HorizontalAlignment','right');
0982 G.Esmin = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0983 'Position',[.16 .3 .09 .09], 'String',num2str(double(avw.hdr.hist.smin)),...
0984 'TooltipString','Smin: int32',...
0985 'Visible','off',...
0986 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0987 'smin = str2num(get(AVWHDR.handles.Esmin,''String''));',...
0988 'AVWHDR.avw.hdr.hist.smin = int32(smin);',...
0989 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR smin;'));
0990
0991 G.Tsmax = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
0992 'Position',[.26 .3 .13 .09],'String','Smax: ',...
0993 'Visible','off','HorizontalAlignment','right');
0994 G.Esmax = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
0995 'Position',[.40 .3 .09 .09], 'String',num2str(double(avw.hdr.hist.smax)),...
0996 'TooltipString','Smax: int32',...
0997 'Visible','off',...
0998 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
0999 'smax = str2num(get(AVWHDR.handles.Esmax,''String''));',...
1000 'AVWHDR.avw.hdr.hist.smax = int32(smax);',...
1001 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR smax;'));
1002
1003 G.Tomin = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1004 'Position',[.01 .2 .13 .09],'String','Omin: ',...
1005 'Visible','off','HorizontalAlignment','right');
1006 G.Eomin = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1007 'Position',[.16 .2 .09 .09], 'String',num2str(double(avw.hdr.hist.omin)),...
1008 'TooltipString','Omin: int32',...
1009 'Visible','off',...
1010 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1011 'omin = str2num(get(AVWHDR.handles.Eomin,''String''));',...
1012 'AVWHDR.avw.hdr.hist.omin = int32(omin);',...
1013 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR omin;'));
1014
1015 G.Tomax = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1016 'Position',[.26 .2 .13 .09],'String','Omax: ',...
1017 'Visible','off','HorizontalAlignment','right');
1018 G.Eomax = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1019 'Position',[.40 .2 .09 .09], 'String',num2str(double(avw.hdr.hist.omax)),...
1020 'TooltipString','Omax: int32',...
1021 'Visible','off',...
1022 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1023 'omax = str2num(get(AVWHDR.handles.Eomax,''String''));',...
1024 'AVWHDR.avw.hdr.hist.omax = int32(omax);',...
1025 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR omax;'));
1026
1027 G.Tviews = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1028 'Position',[.51 .3 .13 .09],'String','Views: ',...
1029 'Visible','off','HorizontalAlignment','right');
1030 G.Eviews = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1031 'Position',[.66 .3 .09 .09], 'String',num2str(double(avw.hdr.hist.views)),...
1032 'TooltipString','Views: int32',...
1033 'Visible','off',...
1034 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1035 'views = str2num(get(AVWHDR.handles.Eviews,''String''));',...
1036 'AVWHDR.avw.hdr.hist.views = int32(views);',...
1037 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR views;'));
1038
1039 G.Tvols_added = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1040 'Position',[.76 .3 .13 .09],'String','VolAdd: ',...
1041 'Visible','off','HorizontalAlignment','right');
1042 G.Evols_added = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1043 'Position',[.90 .3 .09 .09], 'String',num2str(double(avw.hdr.hist.vols_added)),...
1044 'TooltipString','Volumes Added: int32',...
1045 'Visible','off',...
1046 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1047 'vols_added = str2num(get(AVWHDR.handles.Evols_added,''String''));',...
1048 'AVWHDR.avw.hdr.hist.vols_added = int32(vols_added);',...
1049 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR vols_added;'));
1050
1051 G.Tstart_field = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1052 'Position',[.51 .2 .13 .09],'String','Start F: ',...
1053 'Visible','off','HorizontalAlignment','right');
1054 G.Estart_field = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1055 'Position',[.66 .2 .09 .09], 'String',num2str(double(avw.hdr.hist.start_field)),...
1056 'TooltipString','Start Field: int32',...
1057 'Visible','off',...
1058 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1059 'start_field = str2num(get(AVWHDR.handles.Estart_field,''String''));',...
1060 'AVWHDR.avw.hdr.hist.start_field = int32(start_field);',...
1061 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR start_field;'));
1062
1063 G.Tfield_skip = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1064 'Position',[.76 .2 .13 .09],'String','Skip F: ',...
1065 'Visible','off','HorizontalAlignment','right');
1066 G.Efield_skip = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1067 'Position',[.90 .2 .09 .09], 'String',num2str(double(avw.hdr.hist.field_skip)),...
1068 'TooltipString','Skip Field: int32',...
1069 'Visible','off',...
1070 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1071 'field_skip = str2num(get(AVWHDR.handles.Efield_skip,''String''));',...
1072 'AVWHDR.avw.hdr.hist.field_skip = int32(field_skip);',...
1073 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR field_skip;'));
1074
1075 G.Torient = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1076 'Position',[.01 .1 .13 .09],'String','Orient: ',...
1077 'Visible','off','HorizontalAlignment','right');
1078 G.Eorient = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1079 'Position',[.16 .1 .09 .09], 'String',avw.hdr.hist.orient,...
1080 'TooltipString','Orientation, valid values are 0..5: uint8',...
1081 'Visible','off',...
1082 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1083 'orient = get(AVWHDR.handles.Eorient,''String'');',...
1084 'AVWHDR.avw.hdr.hist.orient = uint8(str2num(orient));',...
1085 'set(gcbf,''Userdata'',AVWHDR); clear orient AVWHDR;'));
1086
1087 G.Thist_un0 = uicontrol('Parent',GUI,'Style','text','Units','Normalized',Font, ...
1088 'Position',[.01 .01 .13 .09],'String','Hist Un: ',...
1089 'Visible','off','HorizontalAlignment','right');
1090 G.Ehist_un0 = uicontrol('Parent',GUI,'Style','edit','Units','Normalized',Font, ...
1091 'Position',[.16 .01 .09 .09], 'String',avw.hdr.hist.hist_un0,...
1092 'TooltipString','History unused field: string',...
1093 'Visible','off',...
1094 'Callback',strcat('AVWHDR = get(gcbf,''Userdata'');',...
1095 'AVWHDR.avw.hdr.hist.hist_un0 = get(AVWHDR.handles.Ehist_un0,''String'');',...
1096 'set(gcbf,''Userdata'',AVWHDR); clear AVWHDR;'));
1097
1098
1099
1100
1101
1102
1103
1104
1105 Font.FontWeight = 'bold';
1106
1107
1108 G.Bdone = uicontrol('Parent',GUI,'Style','pushbutton','Units','Normalized', Font, ...
1109 'Position',[.51 .01 .24 .08],...
1110 'String','OK','BusyAction','queue',...
1111 'TooltipString','Save the hdr parameters.',...
1112 'BackgroundColor',[0.0 0.5 0.0],...
1113 'ForegroundColor', [1 1 1], 'HorizontalAlignment', 'center',...
1114 'Callback',strcat('AVWHDR = get(gcbf,''Userdata''); ',...
1115 'if exist(''p'',''var''), p.mriData.hdr = AVWHDR.avw.hdr; end; ',...
1116 'if isfield(AVWHDR,''parent''), ',...
1117 ' if ~isempty(AVWHDR.parent.gui), ',...
1118 ' parent = get(AVWHDR.parent.gui,''userdata''); ',...
1119 ' if isfield(parent,''avw''), ',...
1120 ' parent.avw.hdr = AVWHDR.avw.hdr; ',...
1121 ' if isfield(parent,''scale''), ',...
1122 ' pixdim = double(parent.avw.hdr.dime.pixdim(2:4)); ',...
1123 ' parent.scale = pixdim ./ 1000; ',...
1124 ' parent.daspect = pixdim ./ max(pixdim); ',...
1125 ' axes(parent.handles.Haax); daspect(parent.daspect([2 1 3])); ',...
1126 ' axes(parent.handles.Hcax); daspect(parent.daspect([3 1 2])); ',...
1127 ' axes(parent.handles.Hsax); daspect(parent.daspect([3 2 1])); ',...
1128 ' clear pixdim; ',...
1129 ' end; ',...
1130 ' set(AVWHDR.parent.gui,''userdata'',parent); ',...
1131 ' end; clear parent; ',...
1132 ' end, ',...
1133 'else, avw = AVWHDR.avw; end; ',...
1134 'close gcbf; clear AVWHDR;'));
1135
1136
1137 G.Bquit = uicontrol('Parent',GUI,'Style','pushbutton','Units','Normalized', Font, ...
1138 'Position',[.76 .01 .23 .08],...
1139 'String','CANCEL','BusyAction','queue',...
1140 'BackgroundColor',[0.75 0.0 0.0],...
1141 'ForegroundColor', [1 1 1], 'HorizontalAlignment', 'center',...
1142 'Callback','close gcbf;');
1143
1144
1145
1146 if exist('parent','var'), AVWHDR.parent.gui = parent; end
1147 AVWHDR.avw = avw;
1148 AVWHDR.handles = G;
1149 set(AVWHDR.gui,'Userdata',AVWHDR);
1150
1151 return