0001 function varargout = matRad_importDicomGUI(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 gui_Singleton = 1;
0042 gui_State = struct('gui_Name', mfilename, ...
0043 'gui_Singleton', gui_Singleton, ...
0044 'gui_OpeningFcn', @matRad_importDicomGUI_OpeningFcn, ...
0045 'gui_OutputFcn', @matRad_importDicomGUI_OutputFcn, ...
0046 'gui_LayoutFcn', [] , ...
0047 'gui_Callback', []);
0048 if nargin && ischar(varargin{1})
0049 gui_State.gui_Callback = str2func(varargin{1});
0050 end
0051
0052
0053 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0054
0055
0056
0057
0058
0059
0060
0061 function matRad_importDicomGUI_OpeningFcn(hObject, eventdata, handles, varargin)
0062
0063
0064
0065
0066
0067
0068
0069 handles.output = hObject;
0070
0071 axes(handles.axesMatRadLogo)
0072 [im, ~, alpha] = imread('matrad_logo.png');
0073 q = image(im);
0074 axis equal off
0075 set(q, 'AlphaData', alpha);
0076
0077 axes(handles.axesDKFZLogo)
0078 [im, ~, alpha] = imread('DKFZ_Logo.png');
0079 p = image(im);
0080 axis equal off
0081 set(p, 'AlphaData', alpha);
0082
0083 guidata(hObject, handles);
0084
0085
0086
0087
0088
0089
0090 function varargout = matRad_importDicomGUI_OutputFcn(hObject, eventdata, handles)
0091
0092
0093
0094
0095
0096
0097 varargout{1} = handles.output;
0098
0099
0100
0101 function patDir = browse_button_Callback(hObject, eventdata, handles)
0102
0103
0104
0105
0106 patDir = uigetdir('', 'Choose the input directory...');
0107 if patDir ~= 0
0108 patDir = [patDir filesep];
0109
0110 set(handles.dir_path_field,'String',patDir);
0111
0112 guidata(hObject, handles);
0113 scan(hObject, eventdata, handles)
0114 end
0115
0116 function scan(hObject, eventdata, handles)
0117 [fileList, patient_listbox] = matRad_scanDicomImportFolder(get(handles.dir_path_field,'String'));
0118 if iscell(patient_listbox)
0119 handles.fileList = fileList;
0120
0121 set(handles.patient_listbox,'String',patient_listbox,'Value',1);
0122 guidata(hObject, handles);
0123 end
0124
0125
0126 function patient_listbox_Callback(hObject, eventdata, handles)
0127
0128
0129
0130
0131
0132
0133
0134 if ~isempty(get(hObject,'String'))
0135
0136 set(handles.import_button,'Enable','on');
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148 patient_listbox = get(handles.patient_listbox,'String');
0149 selected_patient = patient_listbox(get(handles.patient_listbox,'Value'));
0150
0151 set(handles.rtseries_listbox,'Value',1);
0152 set(handles.rtseries_listbox,'String',handles.fileList(strcmp(handles.fileList(:,2), 'RTSTRUCT') & strcmp(handles.fileList(:,3), selected_patient),4));
0153
0154 set(handles.rtplan_listbox,'Value',[]);
0155 set(handles.rtplan_listbox,'String',handles.fileList(strcmp(handles.fileList(:,2), 'RTPLAN') & strcmp(handles.fileList(:,3), selected_patient),4));
0156
0157 set(handles.doseseries_listbox,'Value',[]);
0158 set(handles.doseseries_listbox,'String',handles.fileList(strcmp(handles.fileList(:,2), 'RTDOSE') & strcmp(handles.fileList(:,3), selected_patient),4));
0159
0160
0161 if get(handles.SeriesUID_radiobutton,'Value') == 1
0162
0163 set(handles.ctseries_listbox,'Value',1);
0164 set(handles.ctseries_listbox,'String',unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient),4)));
0165
0166 selectedDoseSeriesString = get(handles.doseseries_listbox,'String');
0167
0168 selectedCtSeriesString = get(handles.ctseries_listbox,'String');
0169 if ~isempty(selectedCtSeriesString)
0170 res_x = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),9));
0171 res_y = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),10));
0172 res_z = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),11));
0173 else
0174 res_x = NaN; res_y = NaN; res_z = NaN;
0175 end
0176 else
0177 set(handles.ctseries_listbox,'Value',1);
0178 set(handles.ctseries_listbox,'String',unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient),5)));
0179 selectedCtSeriesString = get(handles.ctseries_listbox,'String');
0180 if ~isempty(selectedCtSeriesString)
0181 res_x = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),9));
0182 res_y = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),10));
0183 res_z = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),11));
0184 else
0185 res_x = NaN; res_y = NaN; res_z = NaN;
0186 end
0187 end
0188 set(handles.resx_edit,'String',res_x);
0189 set(handles.resy_edit,'String',res_y);
0190 if numel(res_z) > 1
0191 set(handles.resz_edit,'String','not equi');
0192 else
0193 set(handles.resz_edit,'String',res_z);
0194 end
0195
0196 guidata(hObject, handles);
0197 end
0198
0199
0200 function patient_listbox_CreateFcn(hObject, eventdata, handles)
0201
0202
0203
0204
0205
0206
0207 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0208 set(hObject,'BackgroundColor','white');
0209 end
0210
0211
0212
0213 function ctseries_listbox_Callback(hObject, eventdata, handles)
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223 function ctseries_listbox_CreateFcn(hObject, eventdata, handles)
0224
0225
0226
0227
0228
0229
0230 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0231 set(hObject,'BackgroundColor','white');
0232 end
0233
0234
0235
0236 function rtseries_listbox_Callback(hObject, eventdata, handles)
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246 function rtseries_listbox_CreateFcn(hObject, eventdata, handles)
0247
0248
0249
0250
0251
0252
0253 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0254 set(hObject,'BackgroundColor','white');
0255 end
0256
0257
0258
0259 function import_button_Callback(hObject, eventdata, handles)
0260
0261
0262
0263
0264 patient_listbox = get(handles.patient_listbox,'String');
0265 ctseries_listbox = get(handles.ctseries_listbox,'String');
0266 rtplan_listbox = get(handles.rtplan_listbox,'String');
0267 doseseries_listbox = get(handles.rtplan_listbox,'String');
0268 if ~isempty(patient_listbox)
0269 selected_patient = patient_listbox(get(handles.patient_listbox,'Value'));
0270 end
0271 if ~isempty(ctseries_listbox)
0272 selected_ctseries = ctseries_listbox(get(handles.ctseries_listbox,'Value'));
0273 end
0274 if ~isempty(rtplan_listbox)
0275 selected_rtplan = rtplan_listbox(get(handles.rtplan_listbox,'Value'));
0276 end
0277
0278 if get(handles.SeriesUID_radiobutton,'Value') == 1
0279 files.ct = handles.fileList(strcmp(handles.fileList(:,3), selected_patient) & ...
0280 strcmp(handles.fileList(:,4), selected_ctseries),:);
0281
0282
0283
0284 else
0285 files.ct = handles.fileList(strcmp(handles.fileList(:,3), selected_patient) & ...
0286 strcmp(handles.fileList(:,5), selected_ctseries) & strcmp(handles.fileList(:,2),'CT'),:);
0287
0288
0289
0290 end
0291
0292 allRtss = handles.fileList(strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,2),'RTSTRUCT'),:);
0293 if ~isempty(allRtss)
0294 files.rtss = allRtss(get(handles.rtseries_listbox,'Value'),:);
0295 else
0296 files.rtss = [];
0297 end
0298
0299 files.resx = str2double(get(handles.resx_edit,'String'));
0300 files.resy = str2double(get(handles.resy_edit,'String'));
0301
0302 if strcmp(get(handles.resz_edit,'String'),'not equi')
0303 msgbox('Ct data not sliced equi-distantly in z direction! Chose uniform resolution.', 'Error','error');
0304 return;
0305 else
0306 files.resz = str2double(get(handles.resz_edit,'String'));
0307 end
0308
0309 rtplan = handles.fileList(strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,2),'RTPLAN'),:);
0310 if ~isempty(rtplan) && ~isempty(get(handles.rtplan_listbox,'Value'))
0311 files.rtplan = rtplan(get(handles.rtplan_listbox,'Value'),:);
0312 end
0313
0314
0315 rtdose = handles.fileList(strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,2),'RTDOSE'),:);
0316 if ~isempty(rtdose) && ~isempty(get(handles.doseseries_listbox,'Value'))
0317 selectedRtDose = get(handles.doseseries_listbox,'String');
0318 selectedRtDoseIx = NaN*ones(1,numel(selectedRtDose));
0319 for i = 1:numel(selectedRtDose)
0320 selectedRtDoseIx(i) = find(strcmp(rtdose(:,4),selectedRtDose{i}));
0321 end
0322 files.rtdose = rtdose(selectedRtDoseIx,:);
0323 end
0324
0325
0326 files.useDoseGrid = get(handles.checkbox3,'Value');
0327
0328
0329 dicomMetaBool = logical(get(handles.checkPatientName,'Value'));
0330 matRad_importDicom(files, dicomMetaBool);
0331
0332
0333
0334 function cancel_button_Callback(hObject, eventdata, handles)
0335
0336
0337
0338 close(handles.figure1);
0339
0340
0341
0342 function rescan_button_Callback(hObject, eventdata, handles)
0343
0344
0345
0346
0347
0348
0349 function figure1_ButtonDownFcn(hObject, eventdata, handles)
0350
0351
0352
0353
0354
0355
0356 function dir_path_field_Callback(hObject, eventdata, handles)
0357
0358
0359
0360
0361
0362
0363
0364 patDir = get(handles.dir_path_field,'String');
0365 if patDir(end) ~= filesep;
0366 patDir = [patDir filesep];
0367 set(handles.dir_path_field,'String',patDir);
0368 guidata(hObject, handles);
0369 end
0370 scan(hObject, eventdata, handles);
0371
0372
0373
0374 function SeriesUID_radiobutton_Callback(hObject, eventdata, handles)
0375
0376
0377
0378
0379 if get(hObject,'Value') == 1
0380 set(handles.SeriesNumber_radiobutton,'Value',0);
0381 else
0382 set(hObject,'Value',1);
0383 set(handles.SeriesNumber_radiobutton,'Value',0);
0384 end
0385 if isfield(handles, 'fileList')
0386 patient_listbox = get(handles.patient_listbox,'String');
0387 selected_patient = patient_listbox(get(handles.patient_listbox,'Value'));
0388 set(handles.ctseries_listbox,'String',unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient),4)));
0389 set(handles.rtseries_listbox,'String',unique(handles.fileList(strcmp(handles.fileList(:,2), 'RTSTRUCT') & strcmp(handles.fileList(:,3), selected_patient),4)));
0390 set(handles.doseseries_listbox,'String',handles.fileList(strcmp(handles.fileList(:,2), 'RTDOSE') & strcmp(handles.fileList(:,3), selected_patient),4));
0391 set(handles.rtplan_listbox,'String',unique(handles.fileList(strcmp(handles.fileList(:,2), 'RTPLAN') & strcmp(handles.fileList(:,3), selected_patient),4)));
0392 else
0393 fprintf('No patient loaded, so just switching default display option to SeriesUID. \n');
0394 end
0395 guidata(hObject, handles);
0396
0397
0398 function SeriesNumber_radiobutton_Callback(hObject, eventdata, handles)
0399
0400
0401
0402 if get(hObject,'Value') == 1
0403 set(handles.SeriesUID_radiobutton,'Value',0);
0404 else
0405 set(hObject,'Value',1);
0406 set(handles.SeriesUID_radiobutton,'Value',0);
0407 end
0408 if isfield(handles, 'fileList')
0409 patient_listbox = get(handles.patient_listbox,'String');
0410 selected_patient = patient_listbox(get(handles.patient_listbox,'Value'));
0411 set(handles.ctseries_listbox,'String',unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient),5)));
0412 else
0413 fprintf('No patient loaded, so just switching default display option to SeriesNumber. \n');
0414 end
0415 guidata(hObject, handles);
0416
0417
0418
0419 function resx_edit_Callback(hObject, eventdata, handles)
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429 function resx_edit_CreateFcn(hObject, eventdata, handles)
0430
0431
0432
0433
0434
0435
0436 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0437 set(hObject,'BackgroundColor','white');
0438 end
0439
0440
0441
0442 function resy_edit_Callback(hObject, eventdata, handles)
0443
0444
0445
0446
0447
0448
0449
0450
0451
0452 function resy_edit_CreateFcn(hObject, eventdata, handles)
0453
0454
0455
0456
0457
0458
0459 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0460 set(hObject,'BackgroundColor','white');
0461 end
0462
0463
0464
0465 function resz_edit_Callback(hObject, eventdata, handles)
0466
0467
0468
0469
0470
0471
0472
0473
0474
0475 function resz_edit_CreateFcn(hObject, eventdata, handles)
0476
0477
0478
0479
0480
0481
0482 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0483 set(hObject,'BackgroundColor','white');
0484 end
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497
0498
0499
0500
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517
0518
0519
0520
0521
0522
0523
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534 function doseseries_listbox_Callback(hObject, eventdata, handles)
0535
0536
0537
0538
0539
0540
0541
0542 if ~isempty(get(hObject,'Value'))
0543 set(handles.checkbox3,'Enable','on');
0544 else
0545 set(handles.checkbox3,'Value',0);
0546 set(handles.checkbox3,'Enable','off');
0547
0548 patient_listbox = get(handles.patient_listbox,'String');
0549 selected_patient = patient_listbox(get(handles.patient_listbox,'Value'));
0550 selectedCtSeriesString = get(handles.ctseries_listbox,'String');
0551 if get(handles.SeriesUID_radiobutton,'Value') == 1
0552 if ~isempty(selectedCtSeriesString)
0553 res_x = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),9));
0554 res_y = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),10));
0555 res_z = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),11));
0556 else
0557 res_x = NaN; res_y = NaN; res_z = NaN;
0558 end
0559 else
0560 if ~isempty(selectedCtSeriesString)
0561 res_x = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),9));
0562 res_y = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),10));
0563 res_z = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),11));
0564 else
0565 res_x = NaN; res_y = NaN; res_z = NaN;
0566 end
0567 end
0568 set(handles.resx_edit,'String',res_x);
0569 set(handles.resy_edit,'String',res_y);
0570 if numel(res_z) > 1
0571 set(handles.resz_edit,'String','not equi');
0572 else
0573 set(handles.resz_edit,'String',res_z);
0574 end
0575
0576 end
0577
0578
0579 function doseseries_listbox_CreateFcn(hObject, eventdata, handles)
0580
0581
0582
0583
0584
0585
0586 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0587 set(hObject,'BackgroundColor','white');
0588 end
0589
0590
0591 function rtplan_listbox_Callback(hObject, eventdata, handles)
0592
0593
0594
0595
0596 contents = cellstr(get(hObject,'String'));
0597 if ~isempty(get(hObject,'Value')) && numel(get(hObject,'Value')) == 1
0598
0599 selectedPlan = contents{get(hObject,'Value')};
0600
0601 selectedPlanLoc = strcmp(handles.fileList(:,4),selectedPlan);
0602
0603
0604 corrDoses = [handles.fileList{selectedPlanLoc,13}];
0605 numOfDoses = numel(corrDoses);
0606 corrDosesLoc = zeros(size(handles.fileList(:,1),1),1);
0607 for j = 1:numOfDoses
0608 if ~isnan(corrDoses{j})
0609 corrDosesLoc = corrDosesLoc | strcmp(handles.fileList(:,4),corrDoses{j});
0610 end
0611 end
0612
0613 if sum(corrDosesLoc) == 0
0614 warndlg('no rt dose file directly associated to plan file. showing all rt dose files.');
0615 corrDosesLoc = strcmp(handles.fileList(:,2),'RTDOSE');
0616 end
0617
0618 set(handles.doseseries_listbox,'Value',[]);
0619 set(handles.doseseries_listbox,'String',handles.fileList(corrDosesLoc,4));
0620
0621
0622 if get(handles.checkbox3,'Value') == 1
0623 set(handles.checkbox3,'Value',0);
0624 checkbox3_Callback(handles.checkbox3,[], handles);
0625 end
0626 set(handles.checkbox3,'Enable','off');
0627
0628
0629 elseif numel(get(hObject,'Value')) >=2
0630 warning('More than one RTPLAN selected. Unsetting selection ...');
0631 patient_listbox_Callback(hObject, eventdata, handles)
0632 else
0633 patient_listbox_Callback(hObject, eventdata, handles)
0634 end
0635
0636
0637
0638 function rtplan_listbox_CreateFcn(hObject, eventdata, handles)
0639
0640
0641
0642
0643
0644
0645 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0646 set(hObject,'BackgroundColor','white');
0647 end
0648
0649
0650
0651 function checkPatientName_Callback(hObject, eventdata, handles)
0652
0653
0654
0655
0656
0657
0658
0659
0660
0661
0662 function checkbox3_Callback(hObject, eventdata, handles)
0663
0664
0665
0666
0667
0668
0669 if get(hObject,'Value')
0670 set(handles.resx_edit,'Enable', 'off');
0671 set(handles.resy_edit,'Enable', 'off');
0672 set(handles.resz_edit,'Enable', 'off');
0673
0674 doseFilesInList = get(handles.doseseries_listbox,'String');
0675 selectedDoseFiles = get(handles.doseseries_listbox,'Value');
0676 if isempty(selectedDoseFiles)
0677 set(hObject,'Value',0)
0678 errordlg('no dose file selected');
0679 return;
0680 end
0681 for i = 1:numel(selectedDoseFiles)
0682 selectedDoseFile = doseFilesInList{selectedDoseFiles(i)};
0683 if verLessThan('matlab','9')
0684 dicomDoseInfo = dicominfo(handles.fileList{find(strcmp(handles.fileList(:,4),selectedDoseFile)),1});
0685 else
0686 dicomDoseInfo = dicominfo(handles.fileList{find(strcmp(handles.fileList(:,4),selectedDoseFile)),1},'UseDictionaryVR',true);
0687 end
0688 res_x{i} = dicomDoseInfo.PixelSpacing(1);
0689 res_y{i} = dicomDoseInfo.PixelSpacing(2);
0690 res_z{i} = dicomDoseInfo.SliceThickness;
0691 end
0692
0693 if numel(unique(cell2mat(res_x)))*numel(unique(cell2mat(res_y)))*numel(unique(cell2mat(res_z))) ~= 1
0694 set(handles.checkbox3,'Value',0);
0695 warndlg('Different resolutions in dose file(s)');
0696 set(handles.resx_edit,'Enable', 'on');
0697 set(handles.resy_edit,'Enable', 'on');
0698 set(handles.resz_edit,'Enable', 'on');
0699 else
0700 set(handles.resx_edit,'String',num2str(res_x{1}));
0701 set(handles.resy_edit,'String',num2str(res_y{1}));
0702 set(handles.resz_edit,'String',num2str(res_z{1}));
0703 end
0704
0705 else
0706 set(handles.resx_edit,'Enable', 'on');
0707 set(handles.resy_edit,'Enable', 'on');
0708 set(handles.resz_edit,'Enable', 'on');
0709
0710 patient_listbox = get(handles.patient_listbox,'String');
0711 selected_patient = patient_listbox(get(handles.patient_listbox,'Value'));
0712 selectedCtSeriesString = get(handles.ctseries_listbox,'String');
0713 if get(handles.SeriesUID_radiobutton,'Value') == 1
0714 if ~isempty(selectedCtSeriesString)
0715 res_x = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),9));
0716 res_y = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),10));
0717 res_z = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,4), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),11));
0718 else
0719 res_x = NaN; res_y = NaN; res_z = NaN;
0720 end
0721 else
0722 if ~isempty(selectedCtSeriesString)
0723 res_x = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),9));
0724 res_y = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),10));
0725 res_z = unique(handles.fileList(strcmp(handles.fileList(:,2), 'CT') & strcmp(handles.fileList(:,3), selected_patient) & strcmp(handles.fileList(:,5), selectedCtSeriesString{get(handles.ctseries_listbox,'Value')}),11));
0726 else
0727 res_x = NaN; res_y = NaN; res_z = NaN;
0728 end
0729 end
0730 set(handles.resx_edit,'String',res_x);
0731 set(handles.resy_edit,'String',res_y);
0732 if numel(res_z) > 1
0733 set(handles.resz_edit,'String','not equi');
0734 else
0735 set(handles.resz_edit,'String',res_z);
0736 end
0737
0738 end