├── LICENSE ├── LIDC_mat_2_gt_image.m ├── LIDC_mat_2_mask.m ├── LIDC_pmap_2_mat.m ├── LIDC_process_annotations.m ├── LIDC_split_annotations.m ├── LIDC_xml_2_pmap.m ├── README.md ├── correct_path.m ├── find_files.m ├── sample_output ├── README.md ├── gts │ ├── 190188259083742759886805142125 │ │ ├── slice1 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice2 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice3 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice4 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice5 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice6 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice7 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ └── slice_correspondences.txt │ ├── 191425307197546732281885591780 │ │ ├── slice1 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice2 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice3 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice4 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ ├── slice5 │ │ │ ├── GT_id1.tif │ │ │ ├── GT_id2.tif │ │ │ ├── GT_id3.tif │ │ │ └── GT_id4.tif │ │ └── slice_correspondences.txt │ └── 490157381160200744295382098329 │ │ ├── slice1 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice10 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice11 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice12 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice13 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice14 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice15 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice16 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice17 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice18 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice19 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice2 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice20 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice21 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice22 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice23 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice24 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice25 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice26 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice27 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice28 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice3 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice4 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice5 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice6 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice7 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice8 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ ├── slice9 │ │ ├── GT_id1.tif │ │ └── GT_id2.tif │ │ └── slice_correspondences.txt ├── images │ ├── 190188259083742759886805142125 │ │ ├── slice1.tif │ │ ├── slice2.tif │ │ ├── slice3.tif │ │ ├── slice4.tif │ │ ├── slice5.tif │ │ ├── slice6.tif │ │ ├── slice7.tif │ │ └── slice_correspondences.txt │ ├── 191425307197546732281885591780 │ │ ├── slice1.tif │ │ ├── slice2.tif │ │ ├── slice3.tif │ │ ├── slice4.tif │ │ ├── slice5.tif │ │ └── slice_correspondences.txt │ └── 490157381160200744295382098329 │ │ ├── slice1.tif │ │ ├── slice10.tif │ │ ├── slice11.tif │ │ ├── slice12.tif │ │ ├── slice13.tif │ │ ├── slice14.tif │ │ ├── slice15.tif │ │ ├── slice16.tif │ │ ├── slice17.tif │ │ ├── slice18.tif │ │ ├── slice19.tif │ │ ├── slice2.tif │ │ ├── slice20.tif │ │ ├── slice21.tif │ │ ├── slice22.tif │ │ ├── slice23.tif │ │ ├── slice24.tif │ │ ├── slice25.tif │ │ ├── slice26.tif │ │ ├── slice27.tif │ │ ├── slice28.tif │ │ ├── slice3.tif │ │ ├── slice4.tif │ │ ├── slice5.tif │ │ ├── slice6.tif │ │ ├── slice7.tif │ │ ├── slice8.tif │ │ ├── slice9.tif │ │ └── slice_correspondences.txt └── masks │ ├── 190188259083742759886805142125 │ ├── slice1.tif │ ├── slice2.tif │ ├── slice3.tif │ ├── slice4.tif │ ├── slice5.tif │ ├── slice6.tif │ ├── slice7.tif │ └── slice_correspondences.txt │ ├── 191425307197546732281885591780 │ ├── slice1.tif │ ├── slice2.tif │ ├── slice3.tif │ ├── slice4.tif │ ├── slice5.tif │ └── slice_correspondences.txt │ └── 490157381160200744295382098329 │ ├── slice1.tif │ ├── slice10.tif │ ├── slice11.tif │ ├── slice12.tif │ ├── slice13.tif │ ├── slice14.tif │ ├── slice15.tif │ ├── slice16.tif │ ├── slice17.tif │ ├── slice18.tif │ ├── slice19.tif │ ├── slice2.tif │ ├── slice20.tif │ ├── slice21.tif │ ├── slice22.tif │ ├── slice23.tif │ ├── slice24.tif │ ├── slice25.tif │ ├── slice26.tif │ ├── slice27.tif │ ├── slice28.tif │ ├── slice3.tif │ ├── slice4.tif │ ├── slice5.tif │ ├── slice6.tif │ ├── slice7.tif │ ├── slice8.tif │ ├── slice9.tif │ └── slice_correspondences.txt └── support_software └── max-V107b ├── CopyrightAndLicense.txt ├── ReadMe.txt ├── ReleaseNotes.txt ├── Site_Max ├── Site_Max.pm ├── filelist ├── get_image_geom-V201.pl ├── get_image_geom.pl ├── getfiles.sh ├── getpix-V100.sh ├── getpix.sh ├── max-V107b.pl ├── max-faq.txt └── max.pl /LIDC_mat_2_gt_image.m: -------------------------------------------------------------------------------- 1 | function LIDC_mat_2_gt_image(image_path, output_path, studyID, ignore_matching_warnings) 2 | 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % LIDC Toolbox 6 | % 7 | % If you use the software for research purposes I kindly ask you to cite 8 | % the following paper: 9 | % 10 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 11 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 12 | % Processing 25 (6): 2557–2572, 2016. 13 | % 14 | % 15 | % The LIDC_convert_xml_2_mat function produces a MAT file with all the 16 | % annotation information contained. This function takes this file and 17 | % creates from it the annotators GT images and puts them in order of where 18 | % they appear in the data slice. It then puts them in $output_path$/gts. 19 | % 20 | % 21 | % Thomas Lampert, http://sites.google.com/site/tomalampert 22 | % 23 | % Copyright 2013 24 | % 25 | % 26 | % This is free software: you can redistribute it and/or modify 27 | % it under the terms of the GNU General Public License as published by 28 | % the Free Software Foundation, either version 3 of the License, or 29 | % (at your option) any later version. 30 | % 31 | % This software is distributed in the hope that it will be useful, 32 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | % GNU General Public License for more details. 35 | % 36 | % You should have received a copy of the GNU General Public License 37 | % along with this software. If not, see . 38 | % 39 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 40 | 41 | 42 | 43 | image_path = correct_path(image_path); 44 | output_path = correct_path(output_path); 45 | 46 | 47 | mat_path = image_path; % will recursively search this path for mat files 48 | gt_path = [output_path 'gts' filesep studyID filesep]; 49 | 50 | if ~exist(gt_path, 'dir') 51 | mkdir(gt_path); 52 | end 53 | 54 | no_images = 0; % Used to keep track of whether all images were found 55 | 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % Each annotator may have missed some slices so we union the set of 60 | % each annotators slice identifiers to find the set of all slices that 61 | % have been annotated 62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 63 | 64 | annotator_file_list = find_files(mat_path, '.mat'); 65 | overall_index = []; 66 | overall_z_pos = []; 67 | for i = 1:numel(annotator_file_list) 68 | 69 | load(annotator_file_list{i}); 70 | for j = 1:numel(slice_index) 71 | slice_index{j} = char(slice_index{j}); 72 | end 73 | 74 | %overall_index = union(overall_index, slice_index); 75 | 76 | [~,ia,ib] = union(overall_index, slice_index); 77 | 78 | [overall_index, ix] = sort([overall_index(ia); slice_index(ib)']); 79 | 80 | overall_z_pos = [overall_z_pos(ia), z_pos(ib)]; 81 | overall_z_pos = overall_z_pos(ix); 82 | 83 | end 84 | clear slice_index 85 | clear z_pos 86 | 87 | 88 | 89 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 90 | % Search through the image slices to find the one that corresponds to 91 | % each of the slices that have been annotated and save it's position 92 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 93 | 94 | fprintf('Searching for correspondences (for GT images)...\n'); 95 | LIDC_slice_index = zeros(1, numel(overall_index)); 96 | image_file_list = find_files(image_path, '.dcm'); 97 | DICOM_filenames = cell(1, numel(overall_index)); 98 | match_found = zeros(1, numel(overall_index)); 99 | z_pos = zeros(1, numel(overall_index)); 100 | 101 | k = 0; 102 | for j = 1:numel(image_file_list) 103 | 104 | dicomInfo = dicominfo(image_file_list{j}); 105 | 106 | % Find whether slice is in overall annotated slice index 107 | [intrsct, ind] = intersect(overall_index, dicomInfo.SOPInstanceUID); 108 | if ~isempty(intrsct) && strcmpi(strrep(dicomInfo.StudyInstanceUID, '1.3.6.1.4.1.14519.5.2.1.6279.6001.', ''), studyID) 109 | 110 | LIDC_slice_index(ind) = dicomInfo.InstanceNumber; 111 | 112 | [~, fname] = fileparts(dicomInfo.Filename); 113 | DICOM_filenames{ind} = [fname '.dcm']; 114 | match_found(ind) = 1; 115 | 116 | k = k + 1; 117 | 118 | end 119 | 120 | end 121 | 122 | if all(match_found == 0) 123 | if numel(image_file_list) ~= 0 124 | warning(sprintf('No images were found that match the GT annotations (although it appears that there are DICOM images in the same directory as the XML file)\nPress any key to continue (output will not be in anatomical order)')); 125 | if ~ignore_matching_warnings 126 | pause 127 | end 128 | else 129 | warning(['No image found (looking in ' image_path ') GTs will not be in slice order\n']); 130 | end 131 | no_images = 1; 132 | else 133 | if sum(match_found) < numel(overall_index) 134 | wrn1 = sprintf('Only %d correspondences were found between the readers'' annotations and the DICOM slice images\n', k); 135 | warning([wrn1 'Press any key to continue writing the GT images in partial order']); 136 | no_images = 2; 137 | if ~ignore_matching_warnings 138 | pause 139 | end 140 | end 141 | 142 | end 143 | 144 | 145 | 146 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 147 | % Find the correct slice order 148 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 149 | 150 | [~, ind] = sort(LIDC_slice_index); 151 | sorted_overall_index = overall_index(ind); 152 | sorted_DICOM_filename = DICOM_filenames(ind); 153 | sorted_match_found = match_found(ind); 154 | sorted_z_pos = overall_z_pos(ind); 155 | 156 | 157 | 158 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 159 | % Go through each annotator's annotations to find which slice they 160 | % correspond to 161 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 162 | 163 | try 164 | fid = fopen([gt_path 'slice_correspondences.txt'], 'w'); 165 | catch e 166 | error(['Could not create slice index file ' gt_path 'slice_correspondences.txt for writing.']); 167 | end 168 | switch no_images 169 | case 0 170 | fprintf(fid, 'DICOM images found (slices are in order).\n'); 171 | case 1 172 | fprintf(fid, 'DICOM images not found (slices are not in order).\n'); 173 | case 2 174 | fprintf(fid, sprintf('Only %d DICOM image matches were found (first %d slices are in order).\n', sum(match_found), sum(match_found))); 175 | end 176 | fprintf(fid, 'Original Data Path: %s\n', image_path); 177 | fprintf(fid, 'Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.%s\n', studyID); 178 | 179 | gts_size = []; 180 | i = 1; 181 | missing = 0; 182 | max_missing = numel(annotator_file_list); 183 | while i <= numel(annotator_file_list) 184 | 185 | load(annotator_file_list{i}); % loads gts and slice_index 186 | 187 | if ~isempty(gts) 188 | % save the GT size in case MAX failed with some 189 | gts_size = size(gts); 190 | else 191 | missing = missing + 1; 192 | % if the GT is empty (MAX failed), create blank GT image 193 | if ~isempty(gts_size) 194 | gts = zeros(gts_size(1:2)); 195 | else 196 | if missing < max_missing 197 | % put it at the end, hopefully another will have the 198 | % gt size 199 | annotator_file_list{end+1} = annotator_file_list{i}; 200 | i = i + 1; 201 | continue 202 | else 203 | % return without creating gts as they are all empty 204 | i = i + 1; 205 | continue; 206 | end 207 | end 208 | end 209 | 210 | gts(gts > 0) = 1; 211 | current_ann_slice_index = slice_index; 212 | clear slice_index 213 | clear z_pos 214 | 215 | 216 | % Find the slices in which this annotator didn't mark anything 217 | if ~isempty(current_ann_slice_index) 218 | missing_gt_ind = ~ismember(sorted_overall_index, current_ann_slice_index); 219 | else 220 | missing_gt_ind = ones(1, numel(sorted_overall_index)); 221 | end 222 | 223 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 224 | % Write the gts to file in order of slices 225 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 226 | 227 | written_count = 1; 228 | 229 | for k = 1:-1:0 % First write the GTs that we found images for then the rest 230 | 231 | for j = 1:numel(sorted_overall_index) 232 | 233 | if sorted_match_found(j) == k 234 | 235 | slice_dir = [gt_path 'slice' num2str(written_count) filesep]; 236 | 237 | % Create the output directory if it doesn't exist 238 | if ~exist(slice_dir, 'dir') 239 | mkdir(slice_dir); 240 | end 241 | 242 | if missing_gt_ind(j) 243 | 244 | imwrite(zeros(size(gts(:,:,1))), [gt_path 'slice' num2str(written_count) filesep 'GT_id' num2str(i) '.tif']); 245 | 246 | else 247 | 248 | [~, ind] = intersect(current_ann_slice_index, sorted_overall_index(j)); 249 | 250 | imwrite(gts(:,:,ind), [gt_path 'slice' num2str(written_count) filesep 'GT_id' num2str(i) '.tif']); 251 | 252 | end 253 | 254 | if i - missing == 1 255 | if k == 1 256 | fprintf(fid, 'slice: %d - z pos: %f - SOPInstanceUID: %s - DICOM filename: %s\n', written_count, sorted_z_pos(j), sorted_overall_index{j}, sorted_DICOM_filename{j}); 257 | else 258 | fprintf(fid, 'slice: %d - z pos: %f - SOPInstanceUID: %s\n', written_count, sorted_z_pos(j), sorted_overall_index{j}); 259 | end 260 | end 261 | 262 | written_count = written_count + 1; 263 | 264 | end 265 | end 266 | end 267 | 268 | i = i + 1; 269 | 270 | end 271 | 272 | fclose(fid); 273 | 274 | end 275 | -------------------------------------------------------------------------------- /LIDC_mat_2_mask.m: -------------------------------------------------------------------------------- 1 | function LIDC_mat_2_mask(image_path, output_path, studyID, ignore_matching_warnings) 2 | 3 | 4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 | % 6 | % LIDC Toolbox 7 | % 8 | % If you use the software for research purposes I kindly ask you to cite 9 | % the following paper: 10 | % 11 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 12 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 13 | % Processing 25 (6): 2557–2572, 2016. 14 | % 15 | % 16 | % The LIDC_convert_xml_2_mat function produces a MAT file with all the 17 | % annotation information contained. This function takes this file and 18 | % creates the images and masks corresponding each slice that the annotator 19 | % has marked. It then puts them in $output_path$/images and 20 | % $output_path$/masks. 21 | % 22 | % 23 | % Thomas Lampert, http://sites.google.com/site/tomalampert 24 | % 25 | % Copyright 2013 26 | % 27 | % 28 | % This is free software: you can redistribute it and/or modify 29 | % it under the terms of the GNU General Public License as published by 30 | % the Free Software Foundation, either version 3 of the License, or 31 | % (at your option) any later version. 32 | % 33 | % This software is distributed in the hope that it will be useful, 34 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | % GNU General Public License for more details. 37 | % 38 | % You should have received a copy of the GNU General Public License 39 | % along with this software. If not, see . 40 | % 41 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 42 | 43 | 44 | image_path = correct_path(image_path); 45 | output_path = correct_path(output_path); 46 | 47 | mat_path = image_path; % will recursively search this path for mat files 48 | image_path_out = [output_path 'images' filesep studyID filesep]; 49 | mask_path = [output_path 'masks' filesep studyID filesep]; 50 | 51 | 52 | if ~exist(mask_path, 'dir') 53 | mkdir(mask_path); 54 | end 55 | if ~exist(image_path_out, 'dir') 56 | mkdir(image_path_out); 57 | end 58 | 59 | no_images = 0; % Used to keep track of whether all images were found 60 | 61 | 62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 63 | % Each annotator may have missed some slices so we union the set of 64 | % each annotators slices to find the set of all slices that have been 65 | % annotated. 66 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 67 | 68 | file_list = find_files(mat_path, '.mat'); 69 | overall_index = []; 70 | overall_z_pos = []; 71 | for i = 1:numel(file_list) 72 | 73 | load(file_list{i}); 74 | for j = 1:numel(slice_index) 75 | slice_index{j} = char(slice_index{j}); 76 | end 77 | 78 | %overall_index = union(overall_index, slice_index); 79 | 80 | [~,ia,ib] = union(overall_index, slice_index); 81 | 82 | [overall_index, ix] = sort([overall_index(ia); slice_index(ib)']); 83 | 84 | overall_z_pos = [overall_z_pos(ia), z_pos(ib)]; 85 | overall_z_pos = overall_z_pos(ix); 86 | 87 | end 88 | 89 | clear slice_index 90 | clear z_pos 91 | 92 | 93 | 94 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 95 | % Search through the image slices to find the one that corresponds to 96 | % the annotators slice, save it's position and create the mask. 97 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 98 | 99 | 100 | fprintf('Searching for correspondences (for masks and slice images)...\n'); 101 | 102 | image_file_list = find_files(image_path, '.dcm'); 103 | if numel(image_file_list) ~= 0 104 | 105 | % check that the DICOM information matches that which we're looking 106 | % for 107 | no_image = 1; 108 | for i = 1:numel(image_file_list) 109 | dicomInfo = dicominfo(image_file_list{i}); 110 | if strcmpi(strrep(dicomInfo.StudyInstanceUID, '1.3.6.1.4.1.14519.5.2.1.6279.6001.', ''), studyID) 111 | no_image = 0; 112 | end 113 | end 114 | 115 | % setup the mask and image variables using the information in the 116 | % DICOM header 117 | if no_image == 0 118 | masks = zeros(dicomInfo.Height, dicomInfo.Width, numel(overall_index)); 119 | 120 | if dicomInfo.PixelRepresentation == 0 121 | datatype = 'uint'; 122 | elseif dicomInfo.PixelRepresentation == 1 123 | datatype = 'int'; 124 | else 125 | error('The DICOM''s PixelRepresentation tag is neither 0 (uint) or 1 (int), this is not supported'); 126 | end 127 | 128 | bits = 2^ceil(log2(double(dicomInfo.BitsStored))); 129 | 130 | if bits > 32 131 | error('Images with more than 32 bits are not supported'); 132 | end 133 | 134 | datatype = strcat(datatype, num2str(bits)); 135 | 136 | if bits == 1 137 | images = zeros(size(masks), 'logical'); 138 | else 139 | images = zeros(size(masks), datatype); 140 | end 141 | else 142 | masks = []; 143 | images = []; 144 | end 145 | end 146 | LIDC_slice_index = zeros(1, numel(overall_index)); 147 | DICOM_filenames = cell(1, numel(overall_index)); 148 | LIDC_SOP_UID = cell(1, numel(overall_index)); 149 | match_found = zeros(1, numel(overall_index)); 150 | z_pos = zeros(1, numel(overall_index)); 151 | 152 | % Find the image that corresponds to the slices that have GTs 153 | k = 1; 154 | for j = 1:numel(image_file_list) 155 | 156 | dicomInfo = dicominfo(image_file_list{j}); 157 | 158 | if ~isempty(intersect(overall_index, dicomInfo.SOPInstanceUID)) && strcmpi(strrep(dicomInfo.StudyInstanceUID, '1.3.6.1.4.1.14519.5.2.1.6279.6001.', ''), studyID) 159 | 160 | img_bw = dicomread(image_file_list{j}); 161 | 162 | if ~isfield(dicomInfo, 'PixelPaddingValue') 163 | warning('No padding value found. If negative values are found in the image then these will be used for the mask, if not, the mask will be empty'); 164 | end 165 | 166 | temp_mask = zeros(dicomInfo.Height, dicomInfo.Width); 167 | % The pixel padding value is not consistent between the actual 168 | % value in the image and that in the DICOM info so we set it to 169 | % the minimum value in the image if there is a value below 0 170 | actual_mask_value = min(min(img_bw)); 171 | if actual_mask_value < 0 172 | if isfield(dicomInfo, 'PixelPaddingValue') && actual_mask_value ~= dicomInfo.PixelPaddingValue 173 | warning(['The DICOM PixelPaddingValue used to create the mask has been corrected from ' ... 174 | num2str(dicomInfo.PixelPaddingValue) ' to ' num2str(actual_mask_value)]); 175 | end 176 | dicomInfo.PixelPaddingValue = actual_mask_value; 177 | end 178 | 179 | if isfield(dicomInfo, 'PixelPaddingValue') 180 | temp_mask(img_bw == dicomInfo.PixelPaddingValue) = 1; 181 | end 182 | masks(:,:,k) = temp_mask; 183 | 184 | if isfield(dicomInfo, 'PixelPaddingValue') 185 | img_bw(img_bw == dicomInfo.PixelPaddingValue) = 0; 186 | end 187 | images(:,:,k) = img_bw; 188 | 189 | LIDC_slice_index(k) = dicomInfo.InstanceNumber; 190 | 191 | LIDC_SOP_UID{k} = dicomInfo.SOPInstanceUID; 192 | 193 | z_pos(k) = dicomInfo.SliceLocation; 194 | 195 | [~, fname] = fileparts(dicomInfo.Filename); 196 | DICOM_filenames{k} = [fname '.dcm']; 197 | 198 | match_found(k) = 1; 199 | 200 | k = k + 1; 201 | 202 | end 203 | end 204 | 205 | if all(match_found == 0) 206 | if numel(image_file_list) ~= 0 207 | warning('No images were found that match the GT annotations (although it appears that there are DICOM images in the same directory as the XML file)\nPress any key to continue writing only the GTs'); 208 | if ~ignore_matching_warnings 209 | pause 210 | end 211 | else 212 | warning(['No image found (looking in ' image_path ') masks and slice images will not be created\n']); 213 | end 214 | no_images = 1; 215 | else 216 | if sum(match_found) < numel(overall_index) 217 | wrn1 = sprintf('Only %d correspondences were found between the readers'' annotations and the DICOM slice images\n', k-1); 218 | warning([wrn1 'Press any key to continue writing the images and masks of only those correspondences found']); 219 | no_images = 2; 220 | if ~ignore_matching_warnings 221 | pause 222 | end 223 | end 224 | 225 | end 226 | 227 | 228 | 229 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 230 | % Find the correct slice order and sort the masks accordingly 231 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 232 | 233 | [~, ind] = sort(LIDC_slice_index); 234 | if any(match_found == 1) 235 | masks = masks(:,:,ind); 236 | images = images(:,:,ind); 237 | end 238 | sorted_LIDC_SOP_UID = LIDC_SOP_UID(ind); 239 | sorted_DICOM_filenames = DICOM_filenames(ind); 240 | sorted_match_found = match_found(ind); 241 | sorted_z_pos = z_pos(ind); 242 | 243 | 244 | 245 | %%%%%%%%%%%%%%%%%%%%%%%%% 246 | % Write the masks to file 247 | %%%%%%%%%%%%%%%%%%%%%%%%% 248 | try 249 | fid = fopen([image_path_out 'slice_correspondences.txt'], 'w'); 250 | catch e 251 | error(['Could not create slice index file ' image_path_out 'slice_correspondences.txt for writing.']); 252 | end 253 | switch no_images 254 | case 0 255 | fprintf(fid, 'DICOM images found (slices are in order).\n'); 256 | case 1 257 | fprintf(fid, 'DICOM images not found (masks not created).\n'); 258 | case 2 259 | fprintf(fid, sprintf('Only %d DICOM image matches were found (masks and images of the matches have been written in order).\n', sum(match_found))); 260 | end 261 | fprintf(fid, 'Original Data Path: %s\n', image_path); 262 | fprintf(fid, 'Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.%s\n', studyID); 263 | 264 | if any(match_found == 1) 265 | for i = 1:size(masks,3) 266 | 267 | if sorted_match_found(i) 268 | imwrite(masks(:,:,i), [mask_path 'slice' num2str(i) '.tif']); 269 | 270 | t = Tiff([image_path_out 'slice' num2str(i) '.tif'], 'w'); 271 | 272 | t.setTag('ImageLength', size(images,1)); 273 | t.setTag('ImageWidth', size(images,2)); 274 | t.setTag('Photometric', Tiff.Photometric.MinIsBlack); 275 | t.setTag('BitsPerSample', bits); 276 | t.setTag('SamplesPerPixel', 1); 277 | t.setTag('Compression', Tiff.Compression.LZW); 278 | t.setTag('PlanarConfiguration', Tiff.PlanarConfiguration.Chunky); 279 | if strcmpi(datatype(1:3), 'int') 280 | t.setTag('SampleFormat', Tiff.SampleFormat.Int); 281 | elseif strcmpi(datatype(1:4), 'uint') 282 | t.setTag('SampleFormat', Tiff.SampleFormat.UInt); 283 | else 284 | error('Unknown data type') 285 | end 286 | 287 | t.write(images(:,:,i)); 288 | t.close(); 289 | 290 | fprintf(fid, 'slice: %d - z pos: %f - SOPInstanceUID: %s - DICOM filename: %s\n', i, sorted_z_pos(i), sorted_LIDC_SOP_UID{i}, sorted_DICOM_filenames{i}); 291 | end 292 | 293 | end 294 | end 295 | clear gts 296 | 297 | fclose(fid); 298 | 299 | try 300 | copyfile([image_path_out 'slice_correspondences.txt'], [mask_path 'slice_correspondences.txt']); 301 | catch e 302 | warning(['Could not copy the slice index file ' image_path_out 'slice_correspondences.txt to ' mask_path 'slice_correspondences.txt.']); 303 | end 304 | end 305 | -------------------------------------------------------------------------------- /LIDC_pmap_2_mat.m: -------------------------------------------------------------------------------- 1 | function [gts, slice_index, z_pos] = LIDC_pmap_2_mat(data_dir, filename) 2 | 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % LIDC Toolbox 6 | % 7 | % If you use the software for research purposes I kindly ask you to cite 8 | % the following paper: 9 | % 10 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 11 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 12 | % Processing 25 (6): 2557–2572, 2016. 13 | % 14 | % 15 | % Used by LIDC_pmap_2_mat to convert the XML probability map calculated 16 | % from the LIDC annotations into an image and save it as a MAT file. 17 | % 18 | % 19 | % Thomas Lampert, http://sites.google.com/site/tomalampert 20 | % 21 | % Copyright 2013 22 | % 23 | % 24 | % This is free software: you can redistribute it and/or modify 25 | % it under the terms of the GNU General Public License as published by 26 | % the Free Software Foundation, either version 3 of the License, or 27 | % (at your option) any later version. 28 | % 29 | % This software is distributed in the hope that it will be useful, 30 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 31 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 32 | % GNU General Public License for more details. 33 | % 34 | % You should have received a copy of the GNU General Public License 35 | % along with this software. If not, see . 36 | % 37 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 | 39 | 40 | 41 | 42 | try 43 | docNode = xmlread([data_dir filename]); 44 | 45 | catch e 46 | warning('Invalid or empty XML file (happens if reader only annotated small nodes, <= 3mm). This will be ignored and a blank GT created, this should be checked.'); 47 | gts = []; 48 | 49 | % Create empty output file so that correct number of annotators is known 50 | fprintf([data_dir filename(1:end-4)]); 51 | slice_index = []; 52 | z_pos = []; 53 | save([data_dir filename(1:end-4)], 'gts', 'slice_index', 'z_pos'); 54 | 55 | return 56 | end 57 | 58 | fprintf('Converting PMAP to MAT format...'); 59 | 60 | document = docNode.getDocumentElement; 61 | reading_sessions = document.getChildNodes; 62 | 63 | slice_index = []; 64 | z_pos = []; 65 | c1 = 0; 66 | c_gt = 1; 67 | while ~isempty(reading_sessions.item(c1)) 68 | 69 | if strcmpi(reading_sessions.item(c1).getNodeName, 'DataInfoHeader') 70 | % Get image size information 71 | 72 | data_info = reading_sessions.item(c1).getChildNodes; 73 | 74 | c2 = 0; 75 | 76 | while ~isempty(data_info.item(c2)) 77 | 78 | if strcmpi(data_info.item(c2).getNodeName, 'ImageGeometry') 79 | x_size = str2double(char(data_info.item(c2).getAttributes.getNamedItem('xdim').getTextContent)); 80 | y_size = str2double(char(data_info.item(c2).getAttributes.getNamedItem('ydim').getTextContent)); 81 | end 82 | 83 | c2 = c2+1; 84 | 85 | end 86 | 87 | gts = zeros(y_size, x_size, 1); 88 | 89 | end 90 | 91 | if strcmpi(reading_sessions.item(c1).getNodeName, 'Pmaps') 92 | 93 | current_reading_session = reading_sessions.item(c1).getChildNodes; 94 | 95 | cx = 0; 96 | while ~isempty(current_reading_session.item(cx)) 97 | 98 | if strcmpi(current_reading_session.item(cx).getNodeName, 'PmapData') 99 | 100 | current_pmap_data = current_reading_session.item(cx).getChildNodes; 101 | 102 | c2 = 0; 103 | while ~isempty(current_pmap_data.item(c2)) 104 | 105 | if strcmpi(current_pmap_data.item(c2).getNodeName, 'Slice') 106 | 107 | slice_index{c_gt} = char(current_pmap_data.item(c2).getAttributes.getNamedItem('sopinstanceuid').getTextContent); 108 | 109 | z_pos(c_gt) = str2double(char(current_pmap_data.item(c2).getAttributes.getNamedItem('z').getTextContent)); 110 | 111 | current_roi = current_pmap_data.item(c2).getChildNodes; 112 | 113 | x = []; 114 | y = []; 115 | count = []; 116 | c3 = 0; 117 | while ~isempty(current_roi.item(c3)) 118 | 119 | if strcmpi(current_roi.item(c3).getNodeName, 'Count') 120 | count = [count str2num(current_roi.item(c3).getTextContent)]; 121 | 122 | x = [x str2num(current_roi.item(c3).getAttributes.getNamedItem('i').getTextContent)]; 123 | y = [y str2num(current_roi.item(c3).getAttributes.getNamedItem('j').getTextContent)]; 124 | end 125 | c3 = c3+1; 126 | end 127 | 128 | for i = 1:numel(x) 129 | gts(y(i), x(i), c_gt) = count(i); 130 | end 131 | 132 | c_gt = c_gt + 1; 133 | end 134 | 135 | c2 = c2+1; 136 | 137 | end 138 | 139 | end 140 | 141 | cx = cx + 1; 142 | 143 | end 144 | 145 | end 146 | 147 | c1 = c1+1; 148 | 149 | end 150 | 151 | %[slice_index, s_ind] = sort(slice_index); 152 | %gts = gts(:,:,s_ind); 153 | 154 | i = 1; 155 | while i < numel(slice_index) 156 | locations = find(strcmp(slice_index, slice_index{i})); 157 | 158 | if numel(locations) > 1 159 | for j = locations(2:end) 160 | gts(:, :, locations(1)) = gts(:, :, locations(1)) + gts(:, :, j); 161 | end 162 | 163 | gts(:, :, locations(2:end)) = []; 164 | slice_index(locations(2:end)) = []; 165 | z_pos(locations(2:end)) = []; 166 | end 167 | 168 | i = i + 1; 169 | end 170 | 171 | fprintf([data_dir filename(1:end-4)]); 172 | 173 | save([data_dir filename(1:end-4)], 'gts', 'slice_index', 'z_pos'); 174 | 175 | end 176 | 177 | 178 | 179 | function imageInfo = getImageGeometry(appInfoHeaderNode) 180 | 181 | contentNodes = appInfoHeaderNode.getChildNodes; 182 | 183 | c1 = 0; 184 | while ~isempty(contentNodes.item(c1)) 185 | 186 | if strcmpi(contentNodes.item(c1).getNodeName, 'ImageGeometry') 187 | 188 | imageInfo.pixelSize = str2double(contentNodes.item(c1).getAttributes.getNamedItem('pixelsize').getTextContent); 189 | imageInfo.XDim = str2double(contentNodes.item(c1).getAttributes.getNamedItem('xdim').getTextContent); 190 | imageInfo.YDim = str2double(contentNodes.item(c1).getAttributes.getNamedItem('ydim').getTextContent); 191 | imageInfo.SliceSpacing = str2double(contentNodes.item(c1).getAttributes.getNamedItem('slicespacing').getTextContent); 192 | 193 | end 194 | 195 | c1 = c1 + 1; 196 | end 197 | 198 | end 199 | -------------------------------------------------------------------------------- /LIDC_process_annotations.m: -------------------------------------------------------------------------------- 1 | function LIDC_process_annotations 2 | 3 | 4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 | % 6 | % LIDC Toolbox 7 | % 8 | % If you use the software for research purposes I kindly ask you to cite 9 | % the following paper: 10 | % 11 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 12 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 13 | % Processing 25 (6): 2557-2572, 2016. 14 | % 15 | % 16 | % Runs through all of the LIDC scans within the directory specified by 17 | % LIDC_path and converts the XML annotations into GT images, along with the 18 | % corresponding masks and slice images (if the images are present). The 19 | % results are put in the specified output_path under: 20 | % 21 | % $output_path$/gts/$StudyInstanceID$/ 22 | % $output_path$/images/$StudyInstanceID$/ 23 | % $output_path$/masks/$StudyInstanceID$/ 24 | % 25 | % Where $StudyInstanceID$ is the ID found within the DICOM minus the 26 | % '1.3.6.1.4.1.14519.5.2.1.6279.6001.', which is constant within the 27 | % dataset. An additional file names slice_info.txt is output within each of 28 | % the above directories that contain the slice number, SOPInstanceUID and 29 | % DICOM filename correspondances. 30 | % 31 | % These functions only extract the slice images, GTs and masks for those 32 | % scan slices that have annotations associated with them. 33 | % 34 | % If you get an error similar to "Can't locate XML/Twig.pm" then you either 35 | % need to install the correct Perl packges required by MAX (see next 36 | % paragraph) or need to set the perl_library_path variable in 37 | % LIDC_convert_xml_2_mat.m to the location of the perl libraries (not 38 | % needed if using Windows). 39 | % 40 | % Requires PERL to be installed (MAX uses this) along with the following 41 | % packages (see readme): 42 | % 43 | % XML::Twig 44 | % XML::Parser 45 | % Math::Polygon::Calc 46 | % Tie::IxHash 47 | % 48 | % NOTE TO USERS: I cannot guarantee that slicing distances and other 49 | % anatomical data is preserved during this conversion (these functions rely 50 | % on MAX to calculate all of this and I don't know whether I provide MAX 51 | % with enough information for this to be done reliably). I've tried my best 52 | % to do things 'to-the-book' but I am not entirely familiar with the LIDC 53 | % protocol. 54 | % 55 | % I've tested this on the first 100 LIDC files (LIDC-IDRI-0001 - 56 | % LIDC-IDRI-0100) and all seems to be ok... 57 | % 58 | % The DCM and XML files corresponding to the same scan should be in the 59 | % same directory, one directory for each scan (as is the structure of the 60 | % original data). If the only the XML files are used then the masks and 61 | % images will not be created and the GTs will not be in the order of the 62 | % scan. 63 | % 64 | % 65 | % Thomas Lampert, http://sites.google.com/site/tomalampert 66 | % 67 | % Copyright 2013 68 | % 69 | % 70 | % This is free software: you can redistribute it and/or modify 71 | % it under the terms of the GNU General Public License as published by 72 | % the Free Software Foundation, either version 3 of the License, or 73 | % (at your option) any later version. 74 | % 75 | % This software is distributed in the hope that it will be useful, 76 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 77 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 78 | % GNU General Public License for more details. 79 | % 80 | % You should have received a copy of the GNU General Public License 81 | % along with this software. If not, see . 82 | % 83 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 84 | 85 | 86 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 87 | % SET VARIABLES 88 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 89 | 90 | % Set these paths correctly... 91 | LIDC_path = ''; % REPLACE WITH LIDC DATSET PATH 92 | output_path = ''; % REPLACE WITH OUTPUT PATH 93 | 94 | % Used if no images are found (i.e. you have only downloaded the XML files) 95 | default_pixel_spacing = 0.787109; 96 | 97 | % Turns off image missing warnings if using the XML only download 98 | ignore_missing_file_warnings = false; 99 | 100 | % Ignore matching warnings when matching GT to images (i.e. if images do 101 | % not exist, GTs will not be in anatomical order and not all images may be 102 | % written, this is a 'feature' of the dataset and not an error in the code) 103 | ignore_matching_warnings = false; 104 | 105 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 106 | 107 | 108 | 109 | 110 | output_path = correct_path(output_path); 111 | LIDC_path = correct_path(LIDC_path); 112 | 113 | if contains(LIDC_path, ' ') 114 | error('The LIDC path cannot contain spaces.'); 115 | end 116 | if contains(output_path, ' ') 117 | error('The output path cannot contain spaces.'); 118 | end 119 | 120 | xml_files = find_files(LIDC_path, '.xml', 'max'); 121 | new_xml_paths = cell(1, numel(xml_files)); % Keep a record of the paths that have been processed 122 | for i = 1:numel(xml_files) % so that they can be cleaned up if something goes wrong 123 | 124 | [xml_path, filename] = fileparts(xml_files{i}); 125 | filename = [filename '.xml']; 126 | xml_path = correct_path(xml_path); 127 | 128 | % Extract the individual annotations from the xml files 129 | [new_xml_paths{i}, new_xml_filenames, studyID] = LIDC_split_annotations(xml_path, filename); 130 | 131 | if numel(new_xml_paths{i}) > 0 132 | try 133 | 134 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 135 | % Get the dicom information from the first DICOM file found 136 | % in the XML directory so that we know what pixel spacing 137 | % to pass to MAX (if not found, use the default) 138 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 139 | 140 | missing_image = true; 141 | dcm_files = find_files(xml_path, '.dcm'); 142 | for j = 1:numel(dcm_files) 143 | dicomInformation = dicominfo(dcm_files{1}); 144 | 145 | % Make sure that the StudyInstanceUID matches that found in 146 | % the XML annotations 147 | if strcmpi(strrep(dicomInformation.StudyInstanceUID, '1.3.6.1.4.1.14519.5.2.1.6279.6001.', ''), studyID) && missing_image 148 | missing_image = false; 149 | break 150 | end 151 | end 152 | 153 | if ~missing_image 154 | pixel_spacing = dicomInformation.PixelSpacing(1); 155 | slice_thickness = dicomInformation.SliceThickness; 156 | else 157 | pixel_spacing = default_pixel_spacing; 158 | slice_thickness = -1; 159 | if ~ignore_missing_file_warnings 160 | warning(['No image found (looking in ' xml_path ') continuing with the default pixel spacing of ' num2str(pixel_spacing) ... 161 | '/nMasks and Images will not be created and the GTs will not be in slice order\n'... 162 | '/nThis warning can be turned off by setting ignore_missing_file_warnings = true in LIDC_process_annotations']); 163 | end 164 | end 165 | 166 | 167 | 168 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 169 | % Create individual ground truths for each annotater and put them 170 | % in a temporary directory 171 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 172 | 173 | if missing_image % These are only used if the images do not exist because in these cases Max cannot automatically infer the slice spacing 174 | switch studyID 175 | case '973595488903805096383507205745' 176 | slice_thickness = 2.5; 177 | case '769199091929930563098632346243' 178 | slice_thickness = 2.5; 179 | case '230628711415147360622019058241' 180 | slice_thickness = 2.5; 181 | case '184813778824165059499766817473' 182 | slice_thickness = 1.25; 183 | case '462307810912575525200563047628' 184 | slice_thickness = 2.5; 185 | case '290645258537791702736959842739' 186 | slice_thickness = 2.5; 187 | case '344370459068774891776634727699' 188 | slice_thickness = 2.5; 189 | case '373403474709639219417003839681' 190 | slice_thickness = 1.25; 191 | case '268602395458796193334776892547' 192 | slice_thickness = 2.5; 193 | case '814893999756843549134491977041' 194 | slice_thickness = 1.25; 195 | case '239106706584154405243531806759' 196 | slice_thickness = 2.5; 197 | case '177931410497444598503378575664' 198 | slice_thickness = 3; 199 | case '311744239959995611370181604400' 200 | slice_thickness = 3; 201 | case '385607958794725144174496012285' 202 | slice_thickness = 2.5; 203 | case '229359531540674087919898613528' 204 | slice_thickness = 1.25; 205 | case '998011886506191043815267149469' 206 | slice_thickness = 2.5; 207 | case '309197613983514716651302448908' 208 | slice_thickness = 2.5; 209 | case '233318337711699124969399854418' 210 | slice_thickness = 2.5; 211 | case '250876878281865060245064180921' 212 | slice_thickness = 2.5; 213 | case '101368220317159246676393493553' 214 | slice_thickness = 2.5; 215 | case '285544678683551057709080736846' 216 | slice_thickness = 2.5; 217 | case '306979641566588911923060002188' 218 | slice_thickness = 2.5; 219 | case '166927528009001339756280929911' 220 | slice_thickness = 2.5; 221 | case '854778727666988682245040938192' 222 | slice_thickness = 2.5; 223 | end 224 | end 225 | 226 | switch studyID % Max always fails with these even with the image determined spacing 227 | case '208751380258614309420535124059' 228 | slice_thickness = 0.3; 229 | case '282560440087299355954880509248' 230 | continue % this annotation only contains small nodules and max always fails so we skip 231 | end 232 | 233 | for j = 1:numel(new_xml_filenames) 234 | LIDC_xml_2_pmap(new_xml_paths{i}{j}, new_xml_filenames{j}, pixel_spacing, slice_thickness, [xml_path, filename], studyID); 235 | end 236 | 237 | 238 | 239 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 240 | % Extract the masks and ground truths from the dataset and put 241 | % them in $output_path$/images 242 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 243 | 244 | 245 | LIDC_mat_2_mask(xml_path, output_path, studyID, ignore_matching_warnings) 246 | 247 | 248 | 249 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 250 | % Extract the images and GTs from the dataset and put them 251 | % in $output_path$/images and $output_path$/gts 252 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 253 | 254 | LIDC_mat_2_gt_image(xml_path, output_path, studyID, ignore_matching_warnings) 255 | 256 | 257 | 258 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 259 | % Cleanup the temporary files for the current scans 260 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 261 | 262 | for j = 1:numel(new_xml_filenames) 263 | if exist(new_xml_paths{i}{j}, 'dir') 264 | rmdir(new_xml_paths{i}{j}, 's'); 265 | end 266 | end 267 | 268 | 269 | catch e 270 | 271 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 272 | % If something goes wrong cleanup the temporary files for all the 273 | % scans that were successfully processed 274 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 275 | 276 | for k = 1:i 277 | for j = 1:numel(new_xml_paths{k}) 278 | if exist(new_xml_paths{k}{j}, 'dir') 279 | rmdir(new_xml_paths{k}{j}, 's'); 280 | end 281 | end 282 | end 283 | 284 | rethrow(e); 285 | end 286 | end 287 | end -------------------------------------------------------------------------------- /LIDC_split_annotations.m: -------------------------------------------------------------------------------- 1 | function [new_xml_paths, new_xml_filenames, studyID] = LIDC_split_annotations(xml_path, filename) 2 | 3 | 4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 | % 6 | % LIDC Toolbox 7 | % 8 | % If you use the software for research purposes I kindly ask you to cite 9 | % the following paper: 10 | % 11 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 12 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 13 | % Processing 25 (6): 2557–2572, 2016. 14 | % 15 | % 16 | % The annotations from each annotator within the LIDC database are 17 | % contained within the same XML file. This function splits the annotations 18 | % for each expert into different XML files allowing the GTs to be 19 | % reconstructed using LIDC_xml_2_pmap. (If they were all in the same file 20 | % then LIDC_xml_2_pmap creates probability maps in which the individual 21 | % markings cannot be discerned.) 22 | % 23 | % 24 | % Thomas Lampert, http://sites.google.com/site/tomalampert 25 | % 26 | % Copyright 2013 27 | % 28 | % 29 | % This is free software: you can redistribute it and/or modify 30 | % it under the terms of the GNU General Public License as published by 31 | % the Free Software Foundation, either version 3 of the License, or 32 | % (at your option) any later version. 33 | % 34 | % This software is distributed in the hope that it will be useful, 35 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 36 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 37 | % GNU General Public License for more details. 38 | % 39 | % You should have received a copy of the GNU General Public License 40 | % along with this software. If not, see . 41 | % 42 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 43 | 44 | 45 | xml_path = correct_path(xml_path); 46 | 47 | try 48 | docNode = xmlread([xml_path filesep filename]); 49 | catch e 50 | error('Failed to read XML file %s.', filename); 51 | end 52 | 53 | 54 | 55 | document = docNode.getDocumentElement; 56 | reading_sessions = document.getChildNodes; 57 | 58 | 59 | % Count the number of readers in the XML file 60 | c1 = 0; 61 | reading_session_count = 0; 62 | while ~isempty(reading_sessions.item(c1)) 63 | 64 | if strcmpi(reading_sessions.item(c1).getNodeName, 'ResponseHeader') 65 | 66 | studyID = getStudyInstanceUID(reading_sessions.item(c1)); 67 | 68 | end 69 | 70 | if strcmpi(reading_sessions.item(c1).getNodeName, 'readingSession') 71 | 72 | reading_session{reading_session_count+1} = reading_sessions.item(c1); 73 | 74 | reading_session_count = reading_session_count + 1; 75 | 76 | end 77 | c1 = c1 + 1; 78 | end 79 | 80 | 81 | % Split the readers annotations into separate files 82 | new_xml_paths = cell(1, reading_session_count); 83 | new_xml_filenames = cell(1, reading_session_count); 84 | for i = 1:reading_session_count 85 | 86 | 87 | % Create a new folder for each annotation 88 | new_xml_paths{i} = [xml_path num2str(i) filesep]; 89 | [~, fname] = fileparts(filename); 90 | new_xml_filenames{i} = [fname '_' num2str(i) '.xmltemp']; 91 | if ~exist(new_xml_paths{i}, 'dir') 92 | mkdir(new_xml_paths{i}) 93 | end 94 | 95 | 96 | new_docNode = docNode.cloneNode(1); 97 | new_document = new_docNode.getDocumentElement; 98 | new_reading_sessions = new_document.getChildNodes; 99 | 100 | new_reading_count = 1; 101 | c1 = 0; 102 | while ~isempty(new_reading_sessions.item(c1)) 103 | 104 | if strcmpi(new_reading_sessions.item(c1).getNodeName, 'readingSession') 105 | 106 | if i ~= new_reading_count 107 | new_reading_sessions.removeChild(new_reading_sessions.item(c1)); 108 | end 109 | 110 | new_reading_count = new_reading_count + 1; 111 | 112 | end 113 | 114 | c1 = c1 + 1; 115 | 116 | end 117 | 118 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 119 | % The reason for the following code is that MAX requires that there be 120 | % more than one reader in each XML file, we have just removed all the 121 | % others as we want to extract the individual readers. So now we add a 122 | % dummy empty reader entry. XML Code: 123 | % 124 | % 125 | % 3.12 126 | % anon 127 | % 128 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 129 | 130 | 131 | entry_node = new_docNode.createElement('readingSession'); 132 | new_docNode.getDocumentElement.appendChild(entry_node); 133 | 134 | name_node = new_docNode.createElement('annotationVersion'); 135 | name_text = new_docNode.createTextNode('3.12'); 136 | name_node.appendChild(name_text); 137 | entry_node.appendChild(name_node); 138 | 139 | phone_number_node = new_docNode.createElement('servicingRadiologistID'); 140 | phone_number_text = new_docNode.createTextNode('anon'); 141 | phone_number_node.appendChild(phone_number_text); 142 | entry_node.appendChild(phone_number_node); 143 | 144 | 145 | % Output the individual's annotation 146 | 147 | xmlwrite([new_xml_paths{i} new_xml_filenames{i}], new_docNode); 148 | 149 | clear new_docNode new_document new_reading_sessions 150 | end 151 | 152 | end 153 | 154 | function studyID = getStudyInstanceUID(responseHeaderNode) 155 | 156 | contentNodes = responseHeaderNode.getChildNodes; 157 | 158 | c1 = 0; 159 | while ~isempty(contentNodes.item(c1)) 160 | 161 | if strcmpi(contentNodes.item(c1).getNodeName, 'StudyInstanceUID') 162 | 163 | studyID = char(contentNodes.item(c1).getTextContent); 164 | 165 | studyID = strrep(studyID, '1.3.6.1.4.1.14519.5.2.1.6279.6001.', ''); 166 | 167 | end 168 | 169 | c1 = c1 + 1; 170 | end 171 | 172 | end -------------------------------------------------------------------------------- /LIDC_xml_2_pmap.m: -------------------------------------------------------------------------------- 1 | function [new_path, new_filename] = LIDC_xml_2_pmap(xml_path, xml_filename, pixel_spacing, slice_spacing, parent_xml_file, studyID) 2 | 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % LIDC Toolbox 6 | % 7 | % If you use the software for research purposes I kindly ask you to cite 8 | % the following paper: 9 | % 10 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 11 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 12 | % Processing 25 (6): 2557-2572, 2016. 13 | % 14 | % 15 | % Runs MAX to convert the XML annotation to a probability map. 16 | % 17 | % The function LIDC_pmap_2_mat is then called to convert this 18 | % probability map into GT images that are saved within a mat file. 19 | % 20 | % 21 | % Thomas Lampert, http://sites.google.com/site/tomalampert 22 | % 23 | % Copyright 2013 24 | % 25 | % 26 | % This is free software: you can redistribute it and/or modify 27 | % it under the terms of the GNU General Public License as published by 28 | % the Free Software Foundation, either version 3 of the License, or 29 | % (at your option) any later version. 30 | % 31 | % This software is distributed in the hope that it will be useful, 32 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | % GNU General Public License for more details. 35 | % 36 | % You should have received a copy of the GNU General Public License 37 | % along with this software. If not, see . 38 | % 39 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 40 | 41 | 42 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 43 | % SET VARIABLES 44 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 45 | 46 | 47 | % NOT USED UNDER WINDOWS: Path to the XML::Twig, XML::Parser, 48 | % Math::Polygon::Calc and Tie::IxHash in OSX these aren't installed in 49 | % Perl's default path. 50 | perl_library_path = '/opt/local/lib/perl5/site_perl/5.12.4/'; 51 | 52 | 53 | % Should be ok as it is (it's included with the toolbox) 54 | MAX_path = [fileparts(which('LIDC_mat_2_gt_image')) filesep 'support_software/max-V107b/']; 55 | 56 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 57 | 58 | 59 | 60 | 61 | perl_library_path = correct_path(perl_library_path); 62 | MAX_path = correct_path(MAX_path); 63 | 64 | 65 | path_str = ''; 66 | if strcmpi(computer, 'MACI64') || strcmpi(computer, 'GLNXA64') 67 | path_str = sprintf('export PERL5LIB=$PERL5LIB:%s ;', perl_library_path); 68 | end 69 | 70 | % 71 | % Test that the Perl installation contains the correct packages 72 | % 73 | t = system([path_str 'perl -MXML::Twig -e 1']); 74 | if t ~= 0 75 | error('The XML::Twig Perl package is required by MAX, please see ./support_software/max-V107/max.pl for more information'); 76 | end 77 | t = system([path_str 'perl -MXML::Parser -e 1']); 78 | if t ~= 0 79 | error('The XML::Parser Perl package is required by MAX, please see ./support_software/max-V107/max.pl for more information'); 80 | end 81 | t = system([path_str 'perl -MMath::Polygon::Calc -e 1']); 82 | if t ~= 0 83 | error('The Math::Polygon::Calc Perl package is required by MAX, please see ./support_software/max-V107/max.pl for more information'); 84 | end 85 | t = system([path_str 'perl -MTie::IxHash -e 1']); 86 | if t ~= 0 87 | error('The Tie::IxHash Perl package is required by MAX, please see ./support_software/max-V107/max.pl for more information'); 88 | end 89 | 90 | 91 | 92 | xml_path = correct_path(xml_path); 93 | 94 | % Make Matlab GT output directory 95 | if isdir([xml_path 'mat_GTs']) 96 | rmdir([xml_path 'mat_GTs'], 's'); 97 | end 98 | mkdir(xml_path, 'mat_GTs'); 99 | 100 | 101 | 102 | fprintf('Processing file: %s\n', xml_filename); 103 | 104 | 105 | % IGNORE THIS IF CALLING FROM LIDC_process_annotations.... 106 | % ONLY USE IF USING NEW UNZIPPED LIDCXML FILES, MAX COMPLAINS <- don't need 107 | % this when splitting annotations as they are put in their own directory. 108 | % IF EACH XML FILE IS WITHIN IN IT'S OWN DIRECTORY... 109 | %[p,f] = fileparts(xml_files{i}); 110 | %mkdir([p filesep], f); 111 | %movefile(xml_files{i},[p filesep f filesep f '.xml']); 112 | 113 | 114 | % MAKE MAX DIR 115 | if ~isdir([xml_path 'max']) 116 | mkdir(xml_path, 'max'); 117 | end 118 | 119 | % EXECUTE MAX 120 | 121 | passed_spacing = true; 122 | if slice_spacing == -1 % If no spacing is specified, calculate it automatically from the original xml file 123 | slice_spacing = get_slice_spacing(MAX_path, path_str, parent_xml_file); 124 | passed_spacing = false; 125 | end 126 | 127 | if strcmpi(computer, 'MACI64') || strcmpi(computer, 'GLNXA64') 128 | cmd_str = ['perl "' MAX_path sprintf('max-V107b.pl" --skip-num-files-check --pixel-dim=%f --slice-spacing=%f --files=''%s'' --dir-out=''%s''', pixel_spacing, slice_spacing, [xml_path xml_filename], [xml_path 'max' filesep])]; 129 | else 130 | cmd_str = ['perl "' MAX_path sprintf('max-V107b.pl" --skip-num-files-check --pixel-dim=%f --slice-spacing=%f --files=%s --dir-out=%s', pixel_spacing, slice_spacing, [xml_path xml_filename], [xml_path 'max' filesep])]; 131 | end 132 | 133 | fprintf('Executing: %s', cmd_str); 134 | status = system([path_str cmd_str]); 135 | 136 | if status > 0 && status ~= 116 % Some XML files are empty and we can ignore these (error code is 116) 137 | % If max fails with the specified slice spacing, use the automatically 138 | % calculated spacing 139 | if passed_spacing 140 | slice_spacing = get_slice_spacing(MAX_path, path_str, parent_xml_file); 141 | if strcmpi(computer, 'MACI64') || strcmpi(computer, 'GLNXA64') 142 | cmd_str = ['perl "' MAX_path sprintf('max-V107b.pl" --skip-num-files-check --pixel-dim=%f --slice-spacing=%f --files=''%s'' --dir-out=''%s''', pixel_spacing, slice_spacing, [xml_path xml_filename], [xml_path 'max' filesep])]; 143 | else 144 | cmd_str = ['perl "' MAX_path sprintf('max-V107b.pl" --skip-num-files-check --pixel-dim=%f --slice-spacing=%f --files=%s --dir-out=%s', pixel_spacing, slice_spacing, [xml_path xml_filename], [xml_path 'max' filesep])]; 145 | end 146 | fprintf('Failed, retrying with automatically determined slice spacing: %s', cmd_str); 147 | status = system([path_str cmd_str]); 148 | end 149 | 150 | if status > 0 && status ~= 116 151 | error('There was a problem executing Max (perhaps the slice spacing or something more serious -- see Max output above). The studyID was %s and the input file was %s', studyID, [xml_path xml_filename]); 152 | end 153 | end 154 | 155 | 156 | % CONVERT OUTPUT INTO A MAT FILE 157 | gt = LIDC_pmap_2_mat([xml_path, filesep, 'max', filesep], 'pmap.xml'); 158 | 159 | [~, patient_id] = fileparts(xml_filename); 160 | 161 | j = 1; 162 | while exist([xml_path filesep 'mat_GTs' filesep patient_id '_' num2str(j) '.mat'], 'file') 163 | j = j + 1; 164 | end 165 | 166 | new_path = [xml_path filesep 'mat_GTs' filesep]; 167 | new_filename = [patient_id '_' num2str(j) '.mat']; 168 | 169 | movefile([xml_path, filesep, 'max', filesep, 'pmap.mat'], [new_path new_filename]); 170 | 171 | end 172 | 173 | function slice_spacing = get_slice_spacing(MAX_path, path_str, xml_file) 174 | if strcmpi(computer, 'MACI64') || strcmpi(computer, 'GLNXA64') 175 | slice_space_cmd_str = ['perl "' MAX_path sprintf('max-V107b.pl" --skip-num-files-check --z-analyze --files=''%s''', xml_file)]; 176 | else 177 | slice_space_cmd_str = ['perl "' MAX_path sprintf('max-V107b.pl" --skip-num-files-check --z-analyze --files=%s', xml_file)]; 178 | end 179 | [~, cmdout] = system([path_str slice_space_cmd_str], '-echo'); 180 | k_1 = strfind(cmdout,'A delta-Z of '); 181 | k_2 = strfind(cmdout,' mm. appears '); 182 | slice_spacing = str2double(cmdout(k_1+13:k_2-1)); 183 | end 184 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LIDC Matlab Toolbox 2 | 3 | Thomas A. Lampert, ICube, University of Strasbourg 4 | 5 | This work was carried out as part of the FOSTER project, which is funded by the French Research Agency (Contract 6 | ANR Cosinus, ANR-10-COSI-012-03-FOSTER, 2011—2014): http://foster.univ-nc.nc/ 7 | 8 | ## Introduction 9 | 10 | This toolbox accompanies the following paper: 11 | 12 | T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert Agreement and Ground Truth Estimation', IEEE Transactions on Image Processing 25 (6): 2557–2572, 2016. 13 | 14 | I kindly request you to cite the paper if you use this toolbox for research purposes. 15 | 16 | 17 | 18 | The toolbox contains functions for converting the LIDC database XML annotation files into images. The main 19 | function is LIDC_process_annotations, this function extracts the readings for each individual marker in the 20 | database, and then creates a TIFF image related to each slice of the scan. 21 | 22 | ## Overview 23 | 24 | 25 | The function works whether the images are present or not. Nevertheless, the images are used to sort the slices 26 | and therefore without them the output will not be in 'anatomical' order. The slice spacing is first determined 27 | from the dicom images if they are present, and if Max fails it is then calculated automatically from the 28 | annotations. 29 | 30 | There are two paths to set in the LIDC_process_annotations.m file, the first to the LIDC dataset, this will be 31 | searched recursively for all XML files and the processing will be performed on each. The second path is the 32 | output path, if the images are present in the dataset then three folders will be created: gts, images, masks. 33 | Please note that neither of these paths can contain a space. Each of these folders will contain folders that 34 | are named after the StudyInstanceID of the relevant scan (minus the first '1.3.6.1.4.1.14519.5.2.1.6279.6001.', 35 | which seems to be constant throughout the dataset), and within the gts folder several folders named slice1 ... 36 | sliceX, where X is the number of slices for which reader annotations were found. Each of these folders contains 37 | the files `GT_id1.tif ... GT_isY.tif` where Y is the number of readers found for that particular scan (each file 38 | is a binary image where ones denote the markers GT). The gts folder will also contain a text file that details 39 | the correspondence between the folder's name (slice number), the SOPInstanceUID (unique for each slice of the 40 | scan) and the DICOM filename that contains that slice (if the images are present). The masks folder contains 41 | binary images `slice1.tif ... sliceY.tif`, where one indicates that the area is out-of-bounds of the scan. The 42 | images folder contains images `slice1.tif ... sliceY.tif`, which contain the slice images. The masks and images 43 | folder are only created if the images are present in the folder in which the XML annotations exist (as is the 44 | structure when the LIDC dataset is downloaded). The toolbox will only extract the slices for which annotations 45 | are found, the remaining slices can be obtained from the DICOM images quite easily. 46 | 47 | 48 | ## Installation 49 | 50 | To use the toolbox's functions, simply add the toolbox directory to Matlab's path. Within the header of each 51 | function may be found a short description of its purpose. 52 | 53 | The function LIDC_xml_2_pmap uses (a slightly modified version of) the external Perl script max.pl 54 | (https://wiki.cancerimagingarchive.net/display/Public/Lung+Image+Database+Consortium) and therefore requires 55 | that Perl is installed, furthermore the following packages should be installed: 56 | 57 | XML::Twig 58 | XML::Parser 59 | Math::Polygon::Calc 60 | Tie::IxHash 61 | 62 | More information can be found in the header of LIDC_process_annotations.m and the max.pl script located in 63 | ./support_software/max.pl. If you are using OSX (and perhaps Linux) you may also need to update the 64 | perl_library_path variable in LIDC_xml_2_pmap.m to point to the correct location of these libraries 65 | (particularly if you receive the error "Can't locate XML/Twig.pm" or it complains that XML::Twig is not 66 | installed, when it is). To install these packages the following command can be executed (use sudo if on OSX): 67 | 68 | perl -MCPAN -e "install XML::Twig" 69 | 70 | NOTE: This toolbox was created under Matlab 2013a and OSX, I have also tested it under Windows 7 x64 using 71 | Matlab 2012b. 72 | 73 | NOTE: Many functions include assignments such as [~, var1] = someFunction(input), which is only supported in 74 | versions of Matlab newer than 2009b. You can replace these assignments to [ignore, var1] = someFunction(input) 75 | for versions earlier than 2010a, although I've not tested that no other incompatibilities exist. 76 | 77 | 78 | ## Quick Start - Windows 79 | 80 | 1. Download and Install Activestate (http://www.activestate.com/activeperl/downloads) 81 | 2. Install the following perl packages 82 | * `XML::Twig` 83 | * `XML::Parser` 84 | * `Math::Polygon::Calc` 85 | * `Tie::IxHash` 86 | 87 | To do that, start the Windows command prompt and execute the following commands: 88 |
`perl -MCPAN -e "install XML::Twig"` 89 |
`perl -MCPAN -e "install XML::Parser"` 90 |
`perl -MCPAN -e "install Math::Polygon::Calc"` 91 |
`perl -MCPAN -e "install Tie::IxHash"` 92 | 3. Restart your PC 93 | 94 | Your computer is now ready to use the toolbox. 95 | 96 | To begin using the toolbox 97 | 98 | 1. Open the file "LIDC_process_annotations.m" 99 | 2. Set the Paths for the LIDC-IDRI folder and to the Output folder 100 | * Note: Make sure your path does not include a space, For example: 101 |
  "c:\LIDCtoolbox v1.3" is an invalid path due to the space between "toolbox" and "v1.3" 102 |
  "c:\LIDCtoolbox_v1.3" is a valid path 103 | 3. Open the file 104 | 4. Run "LIDC_process_annotations.m" 105 | 106 | 107 | ## Quick Start - OS X/Linux 108 | 109 | 1. Install the following perl packages 110 | * XML::Twig 111 | * XML::Parser 112 | * Math::Polygon::Calc 113 | * Tie::IxHash 114 | 115 | To do that, start the terminal and execute the following commands: 116 |
`sudo perl -MCPAN -e "install XML::Twig"` 117 |
`sudo perl -MCPAN -e "install XML::Parser"` 118 |
`sudo perl -MCPAN -e "install Math::Polygon::Calc"` 119 |
`sudo perl -MCPAN -e "install Tie::IxHash"` 120 | 121 | Your computer is now ready to use the toolbox. 122 | 123 | To begin using the toolbox 124 | 125 | 1. Open the file "LIDC_process_annotations.m" 126 | 2. Set the Paths for the LIDC-IDRI folder and to the Output folder 127 | * Note: Make sure your path does not include a space, For example: 128 |
  "/users/LIDCtoolbox v1.3" is an invalid path due to the space between "toolbox" and "v1.3" 129 |
  "/users/LIDCtoolbox_v1.3" is a valid path 130 | 3. Open the file "LIDC_xml_2_pmap.m" 131 | 4. Set the path stored in the variable "perl_library_path" to that which contains the above installed 132 | perl packages. 133 | 5. Run "LIDC_process_annotations.m" 134 | 135 | If you find any problems or would like to contribute some code to the toolbox then please contact me. 136 | 137 | 138 | ## Validation 139 | 140 | The sample output of three scans is included in the "sample_output" directory. This is a sample of the output that should be expected when the full dataset is downloaded (i.e. annotations and images) and processed. When only the annotations are present, the "images" and "masks" directories will not be created. 141 | 142 | Please note that the images will appear black in most standard viewers, this is because the masks contain binary values (0s and 1s), and the scan images contain the original DICOM values and therefore they are not scaled to the standard image value range (0–255). The recommended viewing method is to load them into a programming environment and use an image viewing function that performs automatic range scaling, i.e. (using Matlab) 143 |
`img = imread(filename)` 144 |
`imagesc(img)` 145 | 146 | 147 | # Known Problems 148 | 149 | Without the images Max (used in the backend) will attempt to infer the slice spacing from the annotations, which may fail or the automatically calculated value will cause error messages such as: 150 |
`FATAL[6501] (in MAX in sub rSpass2 near line 4366): Couldn't get a Z index at Z coordinate -105.300 mm` 151 |
I have manually added values for these cases, see the switch statement on line 175 of LIDC_process_annotations.m. If this happens for other cases, then you will need to manually add the slice spacing into the switch statement. The studyID to be used in the switch statement will be output during the failure. The slice spacing can be inferred from the DICOM info contained in the images (this is done automatically when they are present), by analysing the xml file with Max using the command (executed in the toolbox path): 152 |
`perl support_software/max-V107b/max-V107b.pl --skip-num-files-check --z-analyze --files=` 153 |
or by trial-and-error. The toolbox does not use any information derived from this value. Besides, this occurs mainly (but not exclusively) in scans where only small nodules are marked and are therefore unused. 154 | 155 | 156 | ## Acknowledgements 157 | 158 | Peyton Bland gave considerable advice with regards to the Max software upon which this toolbox is based. 159 | Hamada Rasheed Hassan also contributed through extensive testing of the toolbox under Windows and in helping write this readme file. 160 | 161 | [![Analytics](https://ga-beacon.appspot.com/UA-112264682-1/welcome-page?pixel)](https://github.com/igrigorik/ga-beacon) 162 | -------------------------------------------------------------------------------- /correct_path.m: -------------------------------------------------------------------------------- 1 | function p = correct_path(p) 2 | 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % LIDC Toolbox 6 | % 7 | % If you use the software for research purposes I kindly ask you to cite 8 | % the following paper: 9 | % 10 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 11 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 12 | % Processing 25 (6): 2557–2572, 2016. 13 | % 14 | % 15 | % Makes sure that the path has the correct file separators for the OS and 16 | % that it is terminated in a file separator. 17 | % 18 | % 19 | % Thomas Lampert, http://sites.google.com/site/tomalampert 20 | % 21 | % Copyright 2013 22 | % 23 | % 24 | % This is free software: you can redistribute it and/or modify 25 | % it under the terms of the GNU General Public License as published by 26 | % the Free Software Foundation, either version 3 of the License, or 27 | % (at your option) any later version. 28 | % 29 | % This software is distributed in the hope that it will be useful, 30 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 31 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 32 | % GNU General Public License for more details. 33 | % 34 | % You should have received a copy of the GNU General Public License 35 | % along with this software. If not, see . 36 | % 37 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 | 39 | 40 | 41 | p = strrep(p, '\', filesep); 42 | p = strrep(p, '/', filesep); 43 | if ~strcmp(p(end), filesep) 44 | p = [p, filesep]; 45 | end 46 | -------------------------------------------------------------------------------- /find_files.m: -------------------------------------------------------------------------------- 1 | function [fileList] = find_files(dirName, extension, ignore_dirs) 2 | 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % LIDC Toolbox 6 | % 7 | % If you use the software for research purposes I kindly ask you to cite 8 | % the following paper: 9 | % 10 | % T. Lampert, A. Stumpf, and P. Gancarski, 'An Empirical Study of Expert 11 | % Agreement and Ground Truth Estimation', IEEE Transactions on Image 12 | % Processing 25 (6): 2557–2572, 2016. 13 | % 14 | % 15 | % Recursively finds files in a directory structure 16 | % dirName = starting directory (root) 17 | % extension = extension of files to look for 18 | % ignore_dirs = (optional) if there are any directory names to exclude 19 | % (cell array of strings) 20 | % 21 | % 22 | % Thomas Lampert, http://sites.google.com/site/tomalampert 23 | % 24 | % Copyright 2013 25 | % 26 | % 27 | % This is free software: you can redistribute it and/or modify 28 | % it under the terms of the GNU General Public License as published by 29 | % the Free Software Foundation, either version 3 of the License, or 30 | % (at your option) any later version. 31 | % 32 | % This software is distributed in the hope that it will be useful, 33 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 34 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 35 | % GNU General Public License for more details. 36 | % 37 | % You should have received a copy of the GNU General Public License 38 | % along with this software. If not, see . 39 | % 40 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 41 | 42 | 43 | 44 | if ~exist('ignore_dirs', 'var') 45 | ignore_dirs = {}; 46 | end 47 | 48 | ignore_dirs_full = cat(2,{'.','..'},ignore_dirs); 49 | 50 | dirData = dir(dirName); %# Get the data for the current directory 51 | dirIndex = [dirData.isdir]; %# Find the index for directories 52 | fileList = {dirData(~dirIndex).name}'; %# Get a list of the files 53 | 54 | mat_ind = cellfun(@(x) strcmpi(x(end-3:end), extension), fileList, 'UniformOutput', true); % FIND XML FILES 55 | fileList = fileList(mat_ind); % keep only XML files 56 | 57 | if ~isempty(fileList) 58 | 59 | fileList = cellfun(@(x) fullfile(dirName,x), fileList, 'UniformOutput', false); %# Prepend path to files 60 | 61 | end 62 | 63 | subDirs = {dirData(dirIndex).name}; %# Get a list of the subdirectories 64 | validIndex = ~ismember(subDirs, ignore_dirs_full); %# Find index of subdirectories 65 | %# that are not '.' or '..' 66 | 67 | for iDir = find(validIndex) %# Loop over valid subdirectories 68 | nextDir = fullfile(dirName,subDirs{iDir}); %# Get the subdirectory path 69 | fileList = [fileList; find_files(nextDir, extension, ignore_dirs)]; %# Recursively call getAllFiles 70 | end 71 | 72 | end -------------------------------------------------------------------------------- /sample_output/README.md: -------------------------------------------------------------------------------- 1 | To obtain the original data that this output is based upon: 2 | 3 | 1. Go to https://public.cancerimagingarchive.net/ 4 | 2. Select "Search Images" 5 | 3. Under "Collection(s)" select "LIDC-IDRI" 6 | 4. Add Subject IDs "LIDC-IDRI-0002", "LIDC-IDRI-0004", and "LIDC-IDRI-0005" to the basket 7 | 5. Click "Manage Data Basket" 8 | 6. Ensure that "Include annotation files in the download?" is selected 9 | 7. Click "Download Manager" 10 | 8. Load the downloaded Java download manager, select a destination folder, and click "Start" 11 | -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice1/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice1/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice1/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice1/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice1/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice1/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice1/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice1/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice2/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice2/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice2/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice2/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice2/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice2/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice2/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice2/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice3/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice3/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice3/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice3/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice3/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice3/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice3/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice3/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice4/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice4/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice4/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice4/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice4/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice4/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice4/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice4/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice5/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice5/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice5/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice5/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice5/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice5/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice5/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice5/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice6/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice6/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice6/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice6/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice6/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice6/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice6/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice6/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice7/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice7/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice7/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice7/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice7/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice7/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice7/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/190188259083742759886805142125/slice7/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/190188259083742759886805142125/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0005/1.3.6.1.4.1.14519.5.2.1.6279.6001.190188259083742759886805142125/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.190188259083742759886805142125 4 | slice: 1 - z pos: -120.045000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.240311620606661265501934295872 - DICOM filename: 000079.dcm 5 | slice: 2 - z pos: -122.545000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.158628732394963585751959079142 - DICOM filename: 000122.dcm 6 | slice: 3 - z pos: -137.545000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.217111089417483199058390980242 - DICOM filename: 000001.dcm 7 | slice: 4 - z pos: -140.045000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.311195925875901500077224495899 - DICOM filename: 000074.dcm 8 | slice: 5 - z pos: -142.545000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.814708737017677423299099062610 - DICOM filename: 000094.dcm 9 | slice: 6 - z pos: -145.045000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.230648696103592332528776948445 - DICOM filename: 000032.dcm 10 | slice: 7 - z pos: -147.545000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.397214514135704746947495121412 - DICOM filename: 000082.dcm 11 | -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice1/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice1/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice1/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice1/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice1/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice1/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice1/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice1/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice2/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice2/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice2/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice2/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice2/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice2/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice2/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice2/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice3/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice3/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice3/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice3/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice3/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice3/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice3/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice3/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice4/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice4/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice4/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice4/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice4/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice4/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice4/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice4/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice5/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice5/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice5/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice5/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice5/GT_id3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice5/GT_id3.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice5/GT_id4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/191425307197546732281885591780/slice5/GT_id4.tif -------------------------------------------------------------------------------- /sample_output/gts/191425307197546732281885591780/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0004/1.3.6.1.4.1.14519.5.2.1.6279.6001.191425307197546732281885591780/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.191425307197546732281885591780 4 | slice: 1 - z pos: -227.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.327645525490609179713645244850 - DICOM filename: 000203.dcm 5 | slice: 2 - z pos: -228.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.203766013809021049942391947414 - DICOM filename: 000238.dcm 6 | slice: 3 - z pos: -230.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.226269353909047545554945460400 - DICOM filename: 000108.dcm 7 | slice: 4 - z pos: -231.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.175159594489113303104755002435 - DICOM filename: 000089.dcm 8 | slice: 5 - z pos: -232.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.153759531653726148364082207422 - DICOM filename: 000030.dcm 9 | -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice1/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice1/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice1/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice1/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice10/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice10/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice10/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice10/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice11/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice11/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice11/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice11/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice12/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice12/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice12/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice12/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice13/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice13/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice13/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice13/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice14/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice14/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice14/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice14/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice15/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice15/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice15/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice15/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice16/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice16/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice16/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice16/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice17/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice17/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice17/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice17/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice18/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice18/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice18/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice18/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice19/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice19/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice19/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice19/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice2/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice2/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice2/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice2/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice20/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice20/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice20/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice20/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice21/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice21/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice21/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice21/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice22/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice22/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice22/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice22/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice23/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice23/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice23/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice23/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice24/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice24/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice24/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice24/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice25/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice25/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice25/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice25/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice26/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice26/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice26/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice26/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice27/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice27/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice27/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice27/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice28/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice28/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice28/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice28/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice3/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice3/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice3/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice3/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice4/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice4/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice4/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice4/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice5/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice5/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice5/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice5/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice6/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice6/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice6/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice6/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice7/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice7/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice7/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice7/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice8/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice8/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice8/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice8/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice9/GT_id1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice9/GT_id1.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice9/GT_id2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/gts/490157381160200744295382098329/slice9/GT_id2.tif -------------------------------------------------------------------------------- /sample_output/gts/490157381160200744295382098329/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0002/1.3.6.1.4.1.14519.5.2.1.6279.6001.490157381160200744295382098329/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.490157381160200744295382098329 4 | slice: 1 - z pos: -87.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.110206842273056092025778910231 - DICOM filename: 000124.dcm 5 | slice: 2 - z pos: -88.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.192356774218897518066570340640 - DICOM filename: 000134.dcm 6 | slice: 3 - z pos: -89.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.167466377536343139160649799738 - DICOM filename: 000210.dcm 7 | slice: 4 - z pos: -90.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.225404737561325574338197593333 - DICOM filename: 000036.dcm 8 | slice: 5 - z pos: -92.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.290687429942916131788804489834 - DICOM filename: 000070.dcm 9 | slice: 6 - z pos: -93.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.207639974548777125018021316400 - DICOM filename: 000139.dcm 10 | slice: 7 - z pos: -94.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.771043236992909552716071428500 - DICOM filename: 000073.dcm 11 | slice: 8 - z pos: -95.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.206718851532932567135543712383 - DICOM filename: 000069.dcm 12 | slice: 9 - z pos: -97.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.185504326476186667423320934813 - DICOM filename: 000081.dcm 13 | slice: 10 - z pos: -98.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.224309844095099931756440238994 - DICOM filename: 000132.dcm 14 | slice: 11 - z pos: -99.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.254555781971701209579426035380 - DICOM filename: 000056.dcm 15 | slice: 12 - z pos: -100.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.271763018473964678881085483178 - DICOM filename: 000214.dcm 16 | slice: 13 - z pos: -102.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.215046240157258276988020089262 - DICOM filename: 000100.dcm 17 | slice: 14 - z pos: -103.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.880081554574177051350158640134 - DICOM filename: 000035.dcm 18 | slice: 15 - z pos: -104.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.161039214912426170962209490402 - DICOM filename: 000172.dcm 19 | slice: 16 - z pos: -105.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.114572072351795480109385734381 - DICOM filename: 000211.dcm 20 | slice: 17 - z pos: -107.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.210219748240103156791231130739 - DICOM filename: 000027.dcm 21 | slice: 18 - z pos: -108.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.267184368686790425396619982691 - DICOM filename: 000002.dcm 22 | slice: 19 - z pos: -109.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.317648506593685573494322906217 - DICOM filename: 000031.dcm 23 | slice: 20 - z pos: -110.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.168442490859825336181121519361 - DICOM filename: 000148.dcm 24 | slice: 21 - z pos: -112.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.191479282202959962274439587790 - DICOM filename: 000113.dcm 25 | slice: 22 - z pos: -113.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.167138065437712444042919787193 - DICOM filename: 000149.dcm 26 | slice: 23 - z pos: -114.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.199285487701625234652336468456 - DICOM filename: 000050.dcm 27 | slice: 24 - z pos: -115.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.980378880012590285307474381165 - DICOM filename: 000011.dcm 28 | slice: 25 - z pos: -117.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.280214660351049281524048431309 - DICOM filename: 000250.dcm 29 | slice: 26 - z pos: -118.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.281881228568016618641357685183 - DICOM filename: 000016.dcm 30 | slice: 27 - z pos: -119.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.257290875673306575280071313533 - DICOM filename: 000094.dcm 31 | slice: 28 - z pos: -120.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.213540253346911626862227649966 - DICOM filename: 000255.dcm 32 | -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice1.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice2.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice3.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice4.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice5.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice6.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice6.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice7.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/190188259083742759886805142125/slice7.tif -------------------------------------------------------------------------------- /sample_output/images/190188259083742759886805142125/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0005/1.3.6.1.4.1.14519.5.2.1.6279.6001.190188259083742759886805142125/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.190188259083742759886805142125 4 | slice: 1 - z pos: -120.044998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.240311620606661265501934295872 - DICOM filename: 000079.dcm 5 | slice: 2 - z pos: -122.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.158628732394963585751959079142 - DICOM filename: 000122.dcm 6 | slice: 3 - z pos: -137.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.217111089417483199058390980242 - DICOM filename: 000001.dcm 7 | slice: 4 - z pos: -140.044998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.311195925875901500077224495899 - DICOM filename: 000074.dcm 8 | slice: 5 - z pos: -142.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.814708737017677423299099062610 - DICOM filename: 000094.dcm 9 | slice: 6 - z pos: -145.044998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.230648696103592332528776948445 - DICOM filename: 000032.dcm 10 | slice: 7 - z pos: -147.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.397214514135704746947495121412 - DICOM filename: 000082.dcm 11 | -------------------------------------------------------------------------------- /sample_output/images/191425307197546732281885591780/slice1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/191425307197546732281885591780/slice1.tif -------------------------------------------------------------------------------- /sample_output/images/191425307197546732281885591780/slice2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/191425307197546732281885591780/slice2.tif -------------------------------------------------------------------------------- /sample_output/images/191425307197546732281885591780/slice3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/191425307197546732281885591780/slice3.tif -------------------------------------------------------------------------------- /sample_output/images/191425307197546732281885591780/slice4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/191425307197546732281885591780/slice4.tif -------------------------------------------------------------------------------- /sample_output/images/191425307197546732281885591780/slice5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/191425307197546732281885591780/slice5.tif -------------------------------------------------------------------------------- /sample_output/images/191425307197546732281885591780/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0004/1.3.6.1.4.1.14519.5.2.1.6279.6001.191425307197546732281885591780/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.191425307197546732281885591780 4 | slice: 1 - z pos: -227.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.327645525490609179713645244850 - DICOM filename: 000203.dcm 5 | slice: 2 - z pos: -228.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.203766013809021049942391947414 - DICOM filename: 000238.dcm 6 | slice: 3 - z pos: -230.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.226269353909047545554945460400 - DICOM filename: 000108.dcm 7 | slice: 4 - z pos: -231.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.175159594489113303104755002435 - DICOM filename: 000089.dcm 8 | slice: 5 - z pos: -232.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.153759531653726148364082207422 - DICOM filename: 000030.dcm 9 | -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice1.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice10.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice10.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice11.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice11.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice12.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice12.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice13.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice13.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice14.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice14.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice15.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice15.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice16.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice16.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice17.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice17.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice18.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice18.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice19.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice19.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice2.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice20.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice20.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice21.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice21.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice22.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice22.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice23.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice23.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice24.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice24.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice25.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice25.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice26.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice26.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice27.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice27.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice28.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice28.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice3.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice4.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice5.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice6.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice6.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice7.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice7.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice8.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice8.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice9.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/images/490157381160200744295382098329/slice9.tif -------------------------------------------------------------------------------- /sample_output/images/490157381160200744295382098329/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0002/1.3.6.1.4.1.14519.5.2.1.6279.6001.490157381160200744295382098329/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.490157381160200744295382098329 4 | slice: 1 - z pos: -87.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.110206842273056092025778910231 - DICOM filename: 000124.dcm 5 | slice: 2 - z pos: -88.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.192356774218897518066570340640 - DICOM filename: 000134.dcm 6 | slice: 3 - z pos: -89.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.167466377536343139160649799738 - DICOM filename: 000210.dcm 7 | slice: 4 - z pos: -90.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.225404737561325574338197593333 - DICOM filename: 000036.dcm 8 | slice: 5 - z pos: -92.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.290687429942916131788804489834 - DICOM filename: 000070.dcm 9 | slice: 6 - z pos: -93.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.207639974548777125018021316400 - DICOM filename: 000139.dcm 10 | slice: 7 - z pos: -94.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.771043236992909552716071428500 - DICOM filename: 000073.dcm 11 | slice: 8 - z pos: -95.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.206718851532932567135543712383 - DICOM filename: 000069.dcm 12 | slice: 9 - z pos: -97.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.185504326476186667423320934813 - DICOM filename: 000081.dcm 13 | slice: 10 - z pos: -98.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.224309844095099931756440238994 - DICOM filename: 000132.dcm 14 | slice: 11 - z pos: -99.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.254555781971701209579426035380 - DICOM filename: 000056.dcm 15 | slice: 12 - z pos: -100.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.271763018473964678881085483178 - DICOM filename: 000214.dcm 16 | slice: 13 - z pos: -102.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.215046240157258276988020089262 - DICOM filename: 000100.dcm 17 | slice: 14 - z pos: -103.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.880081554574177051350158640134 - DICOM filename: 000035.dcm 18 | slice: 15 - z pos: -104.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.161039214912426170962209490402 - DICOM filename: 000172.dcm 19 | slice: 16 - z pos: -105.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.114572072351795480109385734381 - DICOM filename: 000211.dcm 20 | slice: 17 - z pos: -107.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.210219748240103156791231130739 - DICOM filename: 000027.dcm 21 | slice: 18 - z pos: -108.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.267184368686790425396619982691 - DICOM filename: 000002.dcm 22 | slice: 19 - z pos: -109.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.317648506593685573494322906217 - DICOM filename: 000031.dcm 23 | slice: 20 - z pos: -110.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.168442490859825336181121519361 - DICOM filename: 000148.dcm 24 | slice: 21 - z pos: -112.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.191479282202959962274439587790 - DICOM filename: 000113.dcm 25 | slice: 22 - z pos: -113.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.167138065437712444042919787193 - DICOM filename: 000149.dcm 26 | slice: 23 - z pos: -114.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.199285487701625234652336468456 - DICOM filename: 000050.dcm 27 | slice: 24 - z pos: -115.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.980378880012590285307474381165 - DICOM filename: 000011.dcm 28 | slice: 25 - z pos: -117.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.280214660351049281524048431309 - DICOM filename: 000250.dcm 29 | slice: 26 - z pos: -118.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.281881228568016618641357685183 - DICOM filename: 000016.dcm 30 | slice: 27 - z pos: -119.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.257290875673306575280071313533 - DICOM filename: 000094.dcm 31 | slice: 28 - z pos: -120.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.213540253346911626862227649966 - DICOM filename: 000255.dcm 32 | -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice1.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice2.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice3.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice4.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice5.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice6.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice6.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice7.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/190188259083742759886805142125/slice7.tif -------------------------------------------------------------------------------- /sample_output/masks/190188259083742759886805142125/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0005/1.3.6.1.4.1.14519.5.2.1.6279.6001.190188259083742759886805142125/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.190188259083742759886805142125 4 | slice: 1 - z pos: -120.044998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.240311620606661265501934295872 - DICOM filename: 000079.dcm 5 | slice: 2 - z pos: -122.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.158628732394963585751959079142 - DICOM filename: 000122.dcm 6 | slice: 3 - z pos: -137.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.217111089417483199058390980242 - DICOM filename: 000001.dcm 7 | slice: 4 - z pos: -140.044998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.311195925875901500077224495899 - DICOM filename: 000074.dcm 8 | slice: 5 - z pos: -142.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.814708737017677423299099062610 - DICOM filename: 000094.dcm 9 | slice: 6 - z pos: -145.044998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.230648696103592332528776948445 - DICOM filename: 000032.dcm 10 | slice: 7 - z pos: -147.544998 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.397214514135704746947495121412 - DICOM filename: 000082.dcm 11 | -------------------------------------------------------------------------------- /sample_output/masks/191425307197546732281885591780/slice1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/191425307197546732281885591780/slice1.tif -------------------------------------------------------------------------------- /sample_output/masks/191425307197546732281885591780/slice2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/191425307197546732281885591780/slice2.tif -------------------------------------------------------------------------------- /sample_output/masks/191425307197546732281885591780/slice3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/191425307197546732281885591780/slice3.tif -------------------------------------------------------------------------------- /sample_output/masks/191425307197546732281885591780/slice4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/191425307197546732281885591780/slice4.tif -------------------------------------------------------------------------------- /sample_output/masks/191425307197546732281885591780/slice5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/191425307197546732281885591780/slice5.tif -------------------------------------------------------------------------------- /sample_output/masks/191425307197546732281885591780/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0004/1.3.6.1.4.1.14519.5.2.1.6279.6001.191425307197546732281885591780/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.191425307197546732281885591780 4 | slice: 1 - z pos: -227.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.327645525490609179713645244850 - DICOM filename: 000203.dcm 5 | slice: 2 - z pos: -228.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.203766013809021049942391947414 - DICOM filename: 000238.dcm 6 | slice: 3 - z pos: -230.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.226269353909047545554945460400 - DICOM filename: 000108.dcm 7 | slice: 4 - z pos: -231.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.175159594489113303104755002435 - DICOM filename: 000089.dcm 8 | slice: 5 - z pos: -232.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.153759531653726148364082207422 - DICOM filename: 000030.dcm 9 | -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice1.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice10.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice10.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice11.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice11.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice12.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice12.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice13.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice13.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice14.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice14.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice15.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice15.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice16.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice16.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice17.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice17.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice18.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice18.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice19.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice19.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice2.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice20.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice20.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice21.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice21.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice22.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice22.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice23.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice23.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice24.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice24.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice25.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice25.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice26.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice26.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice27.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice27.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice28.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice28.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice3.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice4.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice5.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice6.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice6.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice7.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice7.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice8.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice8.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice9.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesterTi/LIDCToolbox/1f4ed73bbc667fb97683801c41bff3a2af45135a/sample_output/masks/490157381160200744295382098329/slice9.tif -------------------------------------------------------------------------------- /sample_output/masks/490157381160200744295382098329/slice_correspondences.txt: -------------------------------------------------------------------------------- 1 | DICOM images found (slices are in order). 2 | Original Data Path: /dataset_LIDC/LIDC-IDRI-0002/1.3.6.1.4.1.14519.5.2.1.6279.6001.490157381160200744295382098329/000000/ 3 | Study Instance UID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.490157381160200744295382098329 4 | slice: 1 - z pos: -87.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.110206842273056092025778910231 - DICOM filename: 000124.dcm 5 | slice: 2 - z pos: -88.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.192356774218897518066570340640 - DICOM filename: 000134.dcm 6 | slice: 3 - z pos: -89.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.167466377536343139160649799738 - DICOM filename: 000210.dcm 7 | slice: 4 - z pos: -90.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.225404737561325574338197593333 - DICOM filename: 000036.dcm 8 | slice: 5 - z pos: -92.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.290687429942916131788804489834 - DICOM filename: 000070.dcm 9 | slice: 6 - z pos: -93.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.207639974548777125018021316400 - DICOM filename: 000139.dcm 10 | slice: 7 - z pos: -94.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.771043236992909552716071428500 - DICOM filename: 000073.dcm 11 | slice: 8 - z pos: -95.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.206718851532932567135543712383 - DICOM filename: 000069.dcm 12 | slice: 9 - z pos: -97.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.185504326476186667423320934813 - DICOM filename: 000081.dcm 13 | slice: 10 - z pos: -98.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.224309844095099931756440238994 - DICOM filename: 000132.dcm 14 | slice: 11 - z pos: -99.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.254555781971701209579426035380 - DICOM filename: 000056.dcm 15 | slice: 12 - z pos: -100.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.271763018473964678881085483178 - DICOM filename: 000214.dcm 16 | slice: 13 - z pos: -102.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.215046240157258276988020089262 - DICOM filename: 000100.dcm 17 | slice: 14 - z pos: -103.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.880081554574177051350158640134 - DICOM filename: 000035.dcm 18 | slice: 15 - z pos: -104.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.161039214912426170962209490402 - DICOM filename: 000172.dcm 19 | slice: 16 - z pos: -105.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.114572072351795480109385734381 - DICOM filename: 000211.dcm 20 | slice: 17 - z pos: -107.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.210219748240103156791231130739 - DICOM filename: 000027.dcm 21 | slice: 18 - z pos: -108.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.267184368686790425396619982691 - DICOM filename: 000002.dcm 22 | slice: 19 - z pos: -109.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.317648506593685573494322906217 - DICOM filename: 000031.dcm 23 | slice: 20 - z pos: -110.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.168442490859825336181121519361 - DICOM filename: 000148.dcm 24 | slice: 21 - z pos: -112.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.191479282202959962274439587790 - DICOM filename: 000113.dcm 25 | slice: 22 - z pos: -113.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.167138065437712444042919787193 - DICOM filename: 000149.dcm 26 | slice: 23 - z pos: -114.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.199285487701625234652336468456 - DICOM filename: 000050.dcm 27 | slice: 24 - z pos: -115.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.980378880012590285307474381165 - DICOM filename: 000011.dcm 28 | slice: 25 - z pos: -117.000000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.280214660351049281524048431309 - DICOM filename: 000250.dcm 29 | slice: 26 - z pos: -118.250000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.281881228568016618641357685183 - DICOM filename: 000016.dcm 30 | slice: 27 - z pos: -119.500000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.257290875673306575280071313533 - DICOM filename: 000094.dcm 31 | slice: 28 - z pos: -120.750000 - SOPInstanceUID: 1.3.6.1.4.1.14519.5.2.1.6279.6001.213540253346911626862227649966 - DICOM filename: 000255.dcm 32 | -------------------------------------------------------------------------------- /support_software/max-V107b/CopyrightAndLicense.txt: -------------------------------------------------------------------------------- 1 | Copyright 2006 - 2010 2 | THE REGENTS OF THE UNIVERSITY OF MICHIGAN 3 | ALL RIGHTS RESERVED 4 | 5 | The software and supporting documentation was developed by the 6 | 7 | Digital Image Processing Laboratory 8 | Department of Radiology 9 | University of Michigan 10 | 1500 East Medical Center Dr. 11 | Ann Arbor, MI 48109 12 | 13 | It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01. 14 | 15 | IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY THE SOFTWARE TO PERFORM THE 16 | OPERATIONS THAT ARE REQUIRED BY THE USER. 17 | 18 | THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS 19 | TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY 20 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF 22 | MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, 23 | OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH 24 | THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY 25 | OF SUCH DAMAGES. 26 | 27 | PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND REDISTRIBUTE THIS SOFTWARE 28 | AND SUCH DERIVATIVE WORKS FOR ANY PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, 29 | INCLUDING THE GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; AND SO LONG 30 | AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY ADVERTISING OR PUBLICITY 31 | PERTAINING TO THE USE OR DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 32 | AUTHORIZATION. 33 | -------------------------------------------------------------------------------- /support_software/max-V107b/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ReadMe.txt 2 | ========== 3 | 4 | 5 | MAX V1.07 - max-V107.pl 6 | 29 July 2010 7 | 8 | 9 | ------------------------------------------------------------------------------------------------ 10 | Copyright 2006 - 2010 11 | THE REGENTS OF THE UNIVERSITY OF MICHIGAN 12 | ALL RIGHTS RESERVED 13 | 14 | The software and supporting documentation was developed by the 15 | 16 | Digital Image Processing Laboratory 17 | Department of Radiology 18 | University of Michigan 19 | 1500 East Medical Center Dr. 20 | Ann Arbor, MI 48109 21 | 22 | It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01. 23 | 24 | IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY THE SOFTWARE TO PERFORM THE 25 | OPERATIONS THAT ARE REQUIRED BY THE USER. 26 | 27 | THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS 28 | TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY 29 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 30 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF 31 | MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, 32 | OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH 33 | THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY 34 | OF SUCH DAMAGES. 35 | 36 | PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND REDISTRIBUTE THIS SOFTWARE 37 | AND SUCH DERIVATIVE WORKS FOR ANY PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, 38 | INCLUDING THE GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; AND SO LONG 39 | AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY ADVERTISING OR PUBLICITY 40 | PERTAINING TO THE USE OR DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 41 | AUTHORIZATION. 42 | ------------------------------------------------------------------------------------------------ 43 | 44 | 45 | General 46 | ------- 47 | 48 | MAX -- Multipurpose Application for XML -- performs nodule matching, pmap generation, and other 49 | XML-related and QA/QC-related tasks on the blinded and unblinded LIDC read responses. 50 | 51 | This release of MAX continues its development, fixes some bugs, and adds a number of features & 52 | enhancements. See the ReleaseNotes.txt file for details. 53 | 54 | MAX is implemented with of a small number of Perl files. The files can be placed in any directory 55 | that is accessible to your users. 56 | 57 | 58 | Development 59 | ----------- 60 | 61 | MAX was developed under RedHat Linux Enterprise. The Perl versions used were v5.8.0 and v5.8.8. 62 | It is quite possible that MAX will run on older versions of Perl, but this hasn't been tested. 63 | 64 | Although Perl can be run under Windows, we have little or no experience in doing this, so the use 65 | of Linux is recommended. See, however, the comments in the file max.pl that are labeled "Porting 66 | to other operation systems". 67 | 68 | 69 | Environment 70 | ----------- 71 | 72 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 73 | The Perl environment for MAX should be setup according to the comments in the file max.pl that 74 | are labeled "Pre-requisites and environment". Setting up the Perl environment involves being sure 75 | that your Perl installation contains the necessary extra modules that are in the public domain. 76 | 77 | 78 | Installation 79 | ------------ 80 | 81 | The two main files that comprise MAX are max.pl and Site_Max.pm. These are actually symbolic 82 | links to the "real" files in this distro: max-V107.pl and Site_Max-V200.pm, respectively. 83 | 84 | The archive of this distro was produced using the following command: 85 | 86 | % tar -cvz -T filelist -f max-V107.tar.gz (where "%" represents the shell prompt) 87 | 88 | You need to be certain that the current installation of MAX is completely independent of any 89 | previous installations. Pay particular attention to the Site_Max*.pm file. Unless instructed 90 | otherwise, you must always replace it with the new version furnished in the distro. If you 91 | have installed them in a library directory that is included in @INC (perhaps by the use of an 92 | environmental variable such as PERL5LIB), be sure to replace that version in the library 93 | directory. (The simplest way to install MAX is for max*.pl and Site_Max*.pm to reside in the 94 | same directory rather than to use a separate directory for Site_Max*.pm.) 95 | 96 | An installation procedure similar to the following is recommended. Our examples here assume that 97 | the previous version of MAX was installed in a directory /usr/local/max. 98 | 99 | % cd /usr/local 100 | % mv max max-V106 # if applicable 101 | % mkdir max 102 | % cd max 103 | % cp /from/somewhere/max-V107.tar.gz . 104 | % tar -xvz -f max-V107.tar.gz 105 | 106 | The resulting directory should look something like this: 107 | 108 | -rw-r--r-- 1 bland dipl 4321 Feb 28 16:34 ReadMe.txt 109 | -rw-r--r-- 1 bland dipl 15241 Feb 28 16:50 ReleaseNotes.txt 110 | -rwxr-xr-x 1 bland dipl 15330 Feb 28 14:29 Site_Max-V200.pm 111 | lrwxrwxrwx 1 bland dipl 16 Feb 28 14:56 Site_Max.pm -> Site_Max-V200.pm 112 | -rw-r--r-- 1 bland dipl 191 Feb 28 16:50 filelist 113 | -rwxr-xr-x 1 bland dipl 5900 Feb 28 16:48 get_image_geom-V201.pl 114 | lrwxrwxrwx 1 bland dipl 22 Feb 28 16:40 get_image_geom.pl -> get_image_geom-V201.pl 115 | -rwxr-xr-x 1 bland dipl 504 Feb 28 16:38 getfiles.sh 116 | -rwxr-xr-x 1 bland dipl 2940 Feb 28 16:38 getpix-V100.sh 117 | lrwxrwxrwx 1 bland dipl 14 Feb 28 16:38 getpix.sh -> getpix-V100.sh 118 | -rwxr-xr-x 1 bland dipl 439983 Feb 28 15:00 max-V107.pl 119 | -rw-r--r-- 1 bland dipl 176266 Feb 28 16:51 max-V107.tar.gz 120 | -rw-r--r-- 1 bland dipl 207 Feb 28 14:56 max-faq.txt 121 | lrwxrwxrwx 1 bland dipl 11 Feb 28 14:57 max.pl -> max-V107.pl 122 | 123 | 124 | Configuration 125 | ------------- 126 | 127 | MAX can probably be run "as is". However, some customizations or adjustments can be made to the 128 | "Site_Max" file; see the comments in the file max.pl that are labeled "Porting to other sites". 129 | 130 | 131 | The first test of MAX 132 | --------------------- 133 | 134 | As a first test, run MAX with its "--help" option to display its in-line documentation: 135 | 136 | % ./max.pl --help 137 | 138 | Success in running MAX in this way validates your installation of MAX and shows that all necessary 139 | Perl modules were loaded properly. 140 | 141 | If you see an error message that looks something like the following, then the environment for MAX 142 | is not properly setup. 143 | 144 | -------- 145 | Can't locate Math/Polygon/Calc.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi 146 | /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi ... 147 | BEGIN failed--compilation aborted at ./TestSetup.pl line 22 (#1) 148 | (F) You said to do (or require, or use) a file that couldn't be 149 | found. Perl looks for the file in all the locations mentioned in @INC, 150 | unless the file name included the full path to the file. Perhaps you 151 | need to set the PERL5LIB or PERL5OPT environment variable to say where 152 | the extra library is, or maybe the script needs to add the library name 153 | to @INC. Or maybe you just misspelled the name of the file. See 154 | perlfunc/require and lib. 155 | 156 | Uncaught exception from user code: 157 | Can't locate Math/Polygon/Calc.pm in @INC (@INC contains: 158 | /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 ... 159 | BEGIN failed--compilation aborted at ./TestSetup.pl line 22. 160 | -------- 161 | 162 | Read the error message carefully, and refer again to comments in the code of the file max.pl that 163 | are labeled "Pre-requisites and environment". 164 | 165 | In any case, use the "help" information thus displayed to learn how to run MAX. The source code 166 | to MAX also contains information that might be useful. 167 | 168 | Alternatively, use the perldoc utility to show this help text without running MAX explicitly: 169 | 170 | % perldoc -t max.pl 171 | 172 | 173 | MAX examples 174 | ------------ 175 | 176 | Let's consider a simple example of running MAX that might be useful for getting started with 177 | analyzing unblinded read XML files. Assume that we are in a directory containing one file of the 178 | four unblinded read results XML merged together: 179 | 180 | % /usr/local/max/max.pl --pixel-size=0.82 --slice-spacing=2.5 \ 181 | --fname UM_nih.xml --skip-num-files-check --xml-ops=none 182 | 183 | Running with --xmlops=none prevents the XML files from being created. 184 | 185 | To run MAX and allow it to create the XML files, omit "--xml-ops=none". By default, MAX writes 186 | the XML files in a directory called max/ in the current directory. To specify another directory 187 | other than max/, use "--dir-out" or edit the constant DIROUTDEF in Site_Max.pm. 188 | 189 | 190 | Support scripts 191 | --------------- 192 | 193 | The distro includes a number of small support scripts that we use in our lab to facilitate the use 194 | of MAX. Two are used to get pixel size and slice spacing from the CT data associated with the 195 | unblinded read data. (This is necessary since these parameters are not stored in the XML files.) 196 | There is also a script that generates the names of the four unblinded read files which is useful 197 | when analyzing the unblinded reads as separate files. These scripts are almost certainly not 198 | usable "as is" but are instead furnished to serve as examples. See MAX's in-line help text (run 199 | with "--help") for examples. However, using these scripts is not at all mandatory: Many users 200 | may prefer to specify slice spacing and pixel size as shown above. 201 | 202 | 203 | Questions, Troubleshooting 204 | -------------------------- 205 | 206 | If you have trouble installing MAX, refer to the following: 207 | * this file: Readme.txt (mainly "Environment", "Installation", and "The first test of MAX") 208 | * the FAQ: max-faq.txt 209 | * comments in the file max.pl as notes in ReadMe.txt 210 | 211 | If you have trouble analyzing data with MAX, refer to the following: 212 | * this file: Readme.txt ("MAX examples" and "Support scripts") 213 | * the FAQ: max-faq.txt 214 | * MAX's in-line help (run with "--help" as noted above) 215 | 216 | Otherwise, contact Peyton Bland: bland@umich.edu 217 | 218 | -------------------------------------------------------------------------------- /support_software/max-V107b/Site_Max: -------------------------------------------------------------------------------- 1 | package Site_Max; 2 | 3 | #------------------------------------------------------------------------------ 4 | # 5 | # Copyright 2010 6 | # THE REGENTS OF THE UNIVERSITY OF MICHIGAN 7 | # ALL RIGHTS RESERVED 8 | # 9 | # The software and supporting documentation was developed by the 10 | # 11 | # Digital Image Processing Laboratory 12 | # Department of Radiology 13 | # University of Michigan 14 | # 1500 East Medical Center Dr. 15 | # Ann Arbor, MI 48109 16 | # 17 | # It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01 and 18 | # DHHS/NIH/NCI 1 P01 CA87634-01. 19 | # 20 | # IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY 21 | # THE SOFTWARE TO PERFORM THE OPERATIONS THAT ARE REQUIRED BY THE 22 | # USER. 23 | # 24 | # THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE 25 | # UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND 26 | # WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, 27 | # EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 28 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 29 | # PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF MICHIGAN 30 | # SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, 31 | # INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM 32 | # ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, 33 | # EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF 34 | # SUCH DAMAGES. 35 | # 36 | # PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND 37 | # REDISTRIBUTE THIS SOFTWARE AND SUCH DERIVATIVE WORKS FOR ANY 38 | # PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, INCLUDING THE 39 | # GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; 40 | # AND SO LONG AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED 41 | # IN ANY ADVERTISING OR PUBLICITY PERTAINING TO THE USE OR 42 | # DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 43 | # AUTHORIZATION. 44 | # 45 | #------------------------------------------------------------------------------ 46 | 47 | # This package is specifically for use with the LIDC application known as MAX. It attempts 48 | # to localize all site-specific code and data structures into a single file, thus making it 49 | # easier to port the application to other sites. Ideally, max.pl would never have to be 50 | # edited by the different sites; instead, edit Site_Max.pl (and even then, editing shouldn't 51 | # be necessary in most cases). 52 | 53 | # Porting issues 54 | # -------------- 55 | # 56 | # This module defines various constants. In general, they don't need to be customized. 57 | # However, the most likely candidates for modification are the string constants for the various 58 | # filenames and the @TAB array which controls the indentation for the XML. See the code below. 59 | 60 | # Revision History 61 | # ---------------- 62 | # 63 | #=== October 17-18, 2005: V0.01 64 | # Original version written. Include %RETURN_CODE, get_seriesid, LIDCDEFDBNAMERD, 65 | # and LIDCDEFDBNAMEWR. 66 | #=== October 18, 2005: V0.02 67 | # Re-code get_seriesid 68 | # Rename to Site_Max & Site_Max.pm 69 | #=== October 26, 2005: 70 | # Add nonoduleswarning to %RETURN_CODE 71 | #=== November 11, 2005: V1.00 72 | # Make it V1.00 since this version works fine! 73 | # Add PMAPXMLDEFFILENAME and pmapxmlfileerror . 74 | #=== November 18-, 2005: 75 | # Move get_zinfo from max and add internal data generation to it. 76 | # Move get_pixeldim from max.pl . 77 | # Move some more constants from max.pl . 78 | # Add "use warnings". 79 | #=== January 4, 2006: 80 | # Add characteristicserror to %RETURN_CODE 81 | #=== January 30, 2006: 82 | # Add VERSIONPMAPXML & XMLINDENT 83 | #=== February 14 - ?, 2006: V2.00 (major change) 84 | # Eliminate subs get_pixeldim & get_seriesid as a part of the simplification where we stop 85 | # accessing the DB and remove as much site customizations as possible. 86 | # Remove DB-related constants. 87 | # Add NUMDIGRND & ZSPACINGTOLFILLIN. 88 | # === March 6-8, 2006: 89 | # Add HISTORYXMLDEFFILENAME MATCHINGXMLDEFFILENAME VERSIONMATCHINGXML and VERSIONHISTORYXML . 90 | # Eliminated lots of unused commented-out code (z info stuff and DB-related). 91 | # === March 10, 2006: 92 | # Add comments tags to delineate the constants so that they can be picked-out by the --internals 93 | # option. 94 | # === March 13, 2006: 95 | # Add XMLLINE1 and @TAB 96 | # === April 5-6, 2006: 97 | # Add VIRTSPHEREDEFDIAM, DIRINDEF, and DIROUTDEF 98 | # === April 12, 2006: 99 | # Add MINNUMEMPTS 100 | # === April 19, 2006: 101 | # Add MSGDEFFILENAME. Add outfileerror to %RETURN_CODE 102 | # === May 16, 2006: 103 | # Change ZSPACINGTOLFILLIN to 0.0001 104 | # === June 2, 2006: 105 | # Add LNIDEFFILENAME 106 | # === June 12, 2006: 107 | # Add CENTSEPFACTOR 108 | # === June 13, 2006: 109 | # Add MAJORITYTHR 110 | # === August 31 & Sept 24, 2006: 111 | # Add SMNONSEPTHR 112 | # === Dec. 1, 2006: 113 | # Set VERSIONMATCHINGXML to 1.01 114 | # === March 6 - May 2, 2007: 115 | # Added return code documentation to %RETURN_CODE (see the string '#""" Return code doc: '); 116 | # works with the (new) --internaldoc option in MAX. 117 | # Re-do the return codes associated with the files used to pass info between runs: See 118 | # savefileouterror, savefileevalerror, and savefileinerror. 119 | # Bump VERSIONMATCHINGXML to 1.02. 120 | # Add FILEINDEFREX 121 | # === May 11, 2007: 122 | # Added NARROWNESSSEARCHOFFSET 123 | # === June 5, 2007: 124 | # Add %FILEOUTSUFFIXES 125 | # === June 6, 2007: 126 | # Added "interrupted" to %RETURN_CODE 127 | # === June 8, 2007: 128 | # Added GNUPLOTARGS 129 | # === June 29, 2007: 130 | # Moved VERSIONPMAPXML, VERSIONMATCHINGXML & VERSIONHISTORYXML to max.pl itself since these 131 | # aren't user-configurable. 132 | # === Sept. 19-20, 2007: 133 | # Added CXRREQXMLDEFFILENAME, IDRIREADMESSAGETAGOPEN, & IDRIREADMESSAGETAGCLOSE 134 | 135 | 136 | # Various pragmas and declarations... 137 | # 138 | use strict; 139 | use diagnostics; 140 | use warnings; 141 | # 142 | # for general use... 143 | use Data::Dumper; 144 | 145 | 146 | 147 | # ======================================================================= 148 | # ===================== Do some setup & bookkeeping ===================== 149 | # ======================================================================= 150 | 151 | # Setup our exporting... 152 | require Exporter; 153 | our @ISA = qw(Exporter); 154 | # Export all constants, variables, etc. that we want the outside world to be able to access: 155 | our @EXPORT = qw( 156 | GNUPLOTARGS 157 | XMLINDENT 158 | XMLLINE1 159 | DIRINDEF DIROUTDEF 160 | FILEINDEFREX 161 | PMAPDEFFILENAME AVSFIELDDEFFILENAME SAVEDATADEFFILENAME 162 | HISTORYXMLDEFFILENAME MATCHINGXMLDEFFILENAME PMAPXMLDEFFILENAME MSGDEFFILENAME 163 | %FILEOUTSUFFIXES 164 | CXRREQXMLDEFFILENAME 165 | IDRIREADMESSAGETAGOPEN IDRIREADMESSAGETAGCLOSE 166 | LNIDEFFILENAME LNI1DEFFILENAME 167 | PIXSPACINGTOL CTIMAGESIZE DIAMTHR VIRTSPHEREDEFDIAM CENTSEPFACTOR SMNONSEPTHR 168 | ZSPACINGTOL ZSPACINGTOLFILLIN 169 | MINNUMEMPTS 170 | NUMREADERS 171 | NUMDIGRND 172 | MAJORITYTHR 173 | NARROWNESSSEARCHOFFSET 174 | %RETURN_CODE 175 | @TAB 176 | ); 177 | 178 | our $VERSION = 2.00; 179 | 180 | 181 | 182 | # ======================================================================= 183 | # ================== Site-specific constants/variables ================== 184 | # ======================================================================= 185 | 186 | # N.B.: Keep the "begin constant section" tag and the corresponding "end" tag. They allow this 187 | # section to be extracted and displayed; see the --internals option. Be sure all constants 188 | # are placed in this section. 189 | # 190 | # ++++++++++ begin constant section ++++++++++ 191 | 192 | # The first line of XML... 193 | use constant XMLLINE1 => q !!; 194 | # XML lines used in the IDRI/CXR request 195 | use constant IDRIREADMESSAGETAGOPEN => q !!; 196 | use constant IDRIREADMESSAGETAGCLOSE => q !!; 197 | 198 | # Some directory-related defaults... 199 | use constant DIRINDEF => '.'; 200 | use constant DIROUTDEF => 'max'; 201 | 202 | # Some filename-related defaults... 203 | use constant FILEINDEFREX => '\.xml$'; # "file in default regular expression" - input filenames end in ".xml" 204 | use constant SAVEDATADEFFILENAME => "savedata.dump"; 205 | use constant PMAPDEFFILENAME => "file.pmap"; 206 | use constant AVSFIELDDEFFILENAME => "file.fld"; 207 | use constant HISTORYXMLDEFFILENAME => "history.xml"; 208 | use constant MATCHINGXMLDEFFILENAME => "matching.xml"; 209 | use constant PMAPXMLDEFFILENAME => "pmap.xml"; 210 | use constant MSGDEFFILENAME => "messages.txt"; 211 | use constant CXRREQXMLDEFFILENAME => "cxrrequest-partial.xml"; 212 | use constant LNIDEFFILENAME => "largenodinfo.dump"; 213 | use constant LNI1DEFFILENAME => "largenodinfo1.dump"; 214 | # Define a set of suffixes to add to filenames to differentiate among the different types of runs that MAX can do: 215 | our %FILEOUTSUFFIXES; 216 | # N.B.: Don't change the strings within the "{}" (the keys) that we use to "index" into the hash!!! 217 | # It's OK to change the values - the strings in single quotes. 218 | $FILEOUTSUFFIXES{blinded}{request} = ''; # MAX doesn't analyze blinded request files 219 | $FILEOUTSUFFIXES{blinded}{response} = '-bl_resp'; 220 | $FILEOUTSUFFIXES{unblinded}{request} = '-unbl_req'; 221 | $FILEOUTSUFFIXES{unblinded}{response} = '-unbl_resp'; 222 | 223 | # Related to edge map point counts... 224 | use constant MINNUMEMPTS => 5; # minimum number of edge map points that should be present in an inclusion ROI 225 | # >> Set this to 0 to effectively disable this check. 226 | use constant NARROWNESSSEARCHOFFSET => 3; # search for narrow contour pixels at this offset from the beginning of the segment; used in sub check_for_narrow_contour 227 | 228 | # Various dimensional/geometrical constants: 229 | use constant CTIMAGESIZE => 512; # we *should* read this from the DICOM file! 230 | use constant PIXSPACINGTOL => 0.05; # fractional tolerance to use for pixel spacing comparisons 231 | use constant ZSPACINGTOL => 0.1; # fractional tolerance to use for Z spacing comparisons 232 | use constant ZSPACINGTOLFILLIN => 0.0001; # fractional tolerance to use for comparisons in filling-in Z slices 233 | use constant DIAMTHR => 3.0; # diameter (in mm.) to discriminate between small and non-small nodules 234 | use constant SMNONSEPTHR => 5.0; # centroid separation threshold (in mm.) for testing for overlap between small and non-nodules 235 | use constant VIRTSPHEREDEFDIAM => 3.0; # default diameter of the virtual sphere constructed around small nodules 236 | use constant CENTSEPFACTOR => 2.0; # a multiplier on the centroid separation checking code 237 | 238 | # Other constants: 239 | use constant NUMREADERS => 4; # the number of readers that we expect 240 | use constant NUMDIGRND => 4; # number of digits for rounding of floating point numbers (typically 241 | # for Z coords) for comparisons, storage, and use as hash keys 242 | use constant MAJORITYTHR => 3; # The threshold for determining whether the majority of readers 243 | # marked a particular thing as being a large nodule; for QA #6. 244 | use constant GNUPLOTARGS => '-geometry 1000x1000'; # add -persist to keep the plots 245 | 246 | # ++++++++++ end constant section ++++++++++ 247 | 248 | # Indentation for the XML: 249 | # As furnished, the code uses a tab for each indentation level for the XML. If desired, you can 250 | # activate the space code which would (as furnished) use 4 spaces per level. 251 | use constant XMLINDENT => 4; 252 | my $indentstr = sprintf ' ' x XMLINDENT; # a single space repeated according to the value of XMLINDENT 253 | our @TAB; 254 | $TAB[0] = ''; 255 | foreach my $i ( 1 .. 20 ) { # 20 is arbitrary: it's just the maximum number of levels that we anticipate -- could be made more or less 256 | # Fill with spaces per above: 257 | #$tab[$i] = $tab[$i-1] . $indentstr; 258 | # Or just fill with tabs instead: 259 | $TAB[$i] = "\t" x $i; 260 | } 261 | 262 | # Use a hash to define return codes... 263 | # Porting notes: This probably doesn't need to be changed. But if you do, you probably 264 | # should keep the "normal", "reserved", "error", and "unanticipatederror" values as shown. 265 | our %RETURN_CODE; 266 | tie %RETURN_CODE, "Tie::IxHash"; # Preserve ordering 267 | %RETURN_CODE = ( 268 | normal => 0, #""" Return code doc: 0: The normal return code (no errors detected). 269 | error => 1, #""" Return code doc: 1: Generic error return (probably not used). 270 | reserved => 2, # apparently used by pod2usage if we don't specify anything for -exitstatus 271 | othererror => 101, #""" Return code doc: 101: An option was specified that is not ready for use (secondary matching or "include small"). 272 | cmnderror => 102, #""" Return code doc: 102: The form of an option on the command line is incorrect or the value given with an option is invalid or missing. 273 | validationerror => 103, #""" Return code doc: 103: Error in a tag value in the XML. 274 | inputerror => 104, #""" Return code doc: 104: Incorrect number of input files or error in opening or reading an input file or directory. 275 | configfileerror => 105, #""" Return code doc: 105: Error in opening, reading, or interpreting the configuration file. 276 | savefileerror => 106, # obsolete 277 | internalerror => 107, #""" Return code doc: 107: Internal error (matching, pmap construction, saving information between runs, unreachable code). 278 | pmapfileerror => 108, # obsolete 279 | dbconnectionerror => 109, # obsolete 280 | dbqueryerror => 110, # obsolete 281 | serieserror => 111, # obsolete 282 | pixelerror => 112, # obsolete 283 | matchingerror => 113, #""" Return code doc: 113: Matching error (inconsistency in assigning an SNID). 284 | othermatchingerror => 114, #""" Return code doc: 114: Other error during matching (incorrect Z information). 285 | dbautherror => 115, #obsolete 286 | nonoduleserror => 116, #""" Return code doc: 116: No nodules were found; matching cannot be done. 287 | pmapxmlfileerror => 117, # obsolete 288 | characteristicserror => 118, # obsolete 289 | seriesinfoerror => 119, # obsolete 290 | zinfoerror => 120, #""" Return code doc: 120: Z information error (getting or inferring slice spacing, filling-in Z coordinates). 291 | xmloutfileerror => 121, #""" Return code doc: 121: Error in opening one of the various XML output files. 292 | outfileerror => 122, # obsolete 293 | xmlinputdataerror => 123, #""" Return code doc: 123: Inconsistent read type detected between/within the input XML data file(s). 294 | messagesfileerror => 124, #""" Return code doc: 124: Error in opening the messages file or its directory. 295 | savefileinerror => 125, # obsolete/changed (see below) 296 | savefileouterror => 126, #""" Return code doc: 126: Error in saving data to file for passing information between runs. 297 | savefileevalerror => 127, #""" Return code doc: 127: Error in evaluating a file for passing information between runs. 298 | savefileinerror => 128, #""" Return code doc: 128: Error in opening or accessing a file for passing information between runs. 299 | xmlinputparsingerror => 129, #""" Return code doc: 129: Error in parsing the XML in an input file. 300 | interrupted => 130, #""" Return code doc: 130: An interrupt signal (control-C) was detected. 301 | 302 | unanticipatederror => 255 # apparently used by Perl if it detects an error of its own, so we should never use this value #""" Return code doc: 255: used by Perl if it detects an error during execution 303 | ); 304 | 305 | 306 | # And speaking of return codes... 307 | 1; # return code for the entire module when it is loaded (must be "true") 308 | -------------------------------------------------------------------------------- /support_software/max-V107b/Site_Max.pm: -------------------------------------------------------------------------------- 1 | package Site_Max; 2 | 3 | #------------------------------------------------------------------------------ 4 | # 5 | # Copyright 2010 6 | # THE REGENTS OF THE UNIVERSITY OF MICHIGAN 7 | # ALL RIGHTS RESERVED 8 | # 9 | # The software and supporting documentation was developed by the 10 | # 11 | # Digital Image Processing Laboratory 12 | # Department of Radiology 13 | # University of Michigan 14 | # 1500 East Medical Center Dr. 15 | # Ann Arbor, MI 48109 16 | # 17 | # It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01 and 18 | # DHHS/NIH/NCI 1 P01 CA87634-01. 19 | # 20 | # IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY 21 | # THE SOFTWARE TO PERFORM THE OPERATIONS THAT ARE REQUIRED BY THE 22 | # USER. 23 | # 24 | # THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE 25 | # UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND 26 | # WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, 27 | # EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 28 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 29 | # PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF MICHIGAN 30 | # SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, 31 | # INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM 32 | # ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, 33 | # EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF 34 | # SUCH DAMAGES. 35 | # 36 | # PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND 37 | # REDISTRIBUTE THIS SOFTWARE AND SUCH DERIVATIVE WORKS FOR ANY 38 | # PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, INCLUDING THE 39 | # GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; 40 | # AND SO LONG AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED 41 | # IN ANY ADVERTISING OR PUBLICITY PERTAINING TO THE USE OR 42 | # DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 43 | # AUTHORIZATION. 44 | # 45 | #------------------------------------------------------------------------------ 46 | 47 | # This package is specifically for use with the LIDC application known as MAX. It attempts 48 | # to localize all site-specific code and data structures into a single file, thus making it 49 | # easier to port the application to other sites. Ideally, max.pl would never have to be 50 | # edited by the different sites; instead, edit Site_Max.pl (and even then, editing shouldn't 51 | # be necessary in most cases). 52 | 53 | # Porting issues 54 | # -------------- 55 | # 56 | # This module defines various constants. In general, they don't need to be customized. 57 | # However, the most likely candidates for modification are the string constants for the various 58 | # filenames and the @TAB array which controls the indentation for the XML. See the code below. 59 | 60 | # Revision History 61 | # ---------------- 62 | # 63 | #=== October 17-18, 2005: V0.01 64 | # Original version written. Include %RETURN_CODE, get_seriesid, LIDCDEFDBNAMERD, 65 | # and LIDCDEFDBNAMEWR. 66 | #=== October 18, 2005: V0.02 67 | # Re-code get_seriesid 68 | # Rename to Site_Max & Site_Max.pm 69 | #=== October 26, 2005: 70 | # Add nonoduleswarning to %RETURN_CODE 71 | #=== November 11, 2005: V1.00 72 | # Make it V1.00 since this version works fine! 73 | # Add PMAPXMLDEFFILENAME and pmapxmlfileerror . 74 | #=== November 18-, 2005: 75 | # Move get_zinfo from max and add internal data generation to it. 76 | # Move get_pixeldim from max.pl . 77 | # Move some more constants from max.pl . 78 | # Add "use warnings". 79 | #=== January 4, 2006: 80 | # Add characteristicserror to %RETURN_CODE 81 | #=== January 30, 2006: 82 | # Add VERSIONPMAPXML & XMLINDENT 83 | #=== February 14 - ?, 2006: V2.00 (major change) 84 | # Eliminate subs get_pixeldim & get_seriesid as a part of the simplification where we stop 85 | # accessing the DB and remove as much site customizations as possible. 86 | # Remove DB-related constants. 87 | # Add NUMDIGRND & ZSPACINGTOLFILLIN. 88 | # === March 6-8, 2006: 89 | # Add HISTORYXMLDEFFILENAME MATCHINGXMLDEFFILENAME VERSIONMATCHINGXML and VERSIONHISTORYXML . 90 | # Eliminated lots of unused commented-out code (z info stuff and DB-related). 91 | # === March 10, 2006: 92 | # Add comments tags to delineate the constants so that they can be picked-out by the --internals 93 | # option. 94 | # === March 13, 2006: 95 | # Add XMLLINE1 and @TAB 96 | # === April 5-6, 2006: 97 | # Add VIRTSPHEREDEFDIAM, DIRINDEF, and DIROUTDEF 98 | # === April 12, 2006: 99 | # Add MINNUMEMPTS 100 | # === April 19, 2006: 101 | # Add MSGDEFFILENAME. Add outfileerror to %RETURN_CODE 102 | # === May 16, 2006: 103 | # Change ZSPACINGTOLFILLIN to 0.0001 104 | # === June 2, 2006: 105 | # Add LNIDEFFILENAME 106 | # === June 12, 2006: 107 | # Add CENTSEPFACTOR 108 | # === June 13, 2006: 109 | # Add MAJORITYTHR 110 | # === August 31 & Sept 24, 2006: 111 | # Add SMNONSEPTHR 112 | # === Dec. 1, 2006: 113 | # Set VERSIONMATCHINGXML to 1.01 114 | # === March 6 - May 2, 2007: 115 | # Added return code documentation to %RETURN_CODE (see the string '#""" Return code doc: '); 116 | # works with the (new) --internaldoc option in MAX. 117 | # Re-do the return codes associated with the files used to pass info between runs: See 118 | # savefileouterror, savefileevalerror, and savefileinerror. 119 | # Bump VERSIONMATCHINGXML to 1.02. 120 | # Add FILEINDEFREX 121 | # === May 11, 2007: 122 | # Added NARROWNESSSEARCHOFFSET 123 | # === June 5, 2007: 124 | # Add %FILEOUTSUFFIXES 125 | # === June 6, 2007: 126 | # Added "interrupted" to %RETURN_CODE 127 | # === June 8, 2007: 128 | # Added GNUPLOTARGS 129 | # === June 29, 2007: 130 | # Moved VERSIONPMAPXML, VERSIONMATCHINGXML & VERSIONHISTORYXML to max.pl itself since these 131 | # aren't user-configurable. 132 | # === Sept. 19-20, 2007: 133 | # Added CXRREQXMLDEFFILENAME, IDRIREADMESSAGETAGOPEN, & IDRIREADMESSAGETAGCLOSE 134 | 135 | 136 | # Various pragmas and declarations... 137 | # 138 | use strict; 139 | use diagnostics; 140 | use warnings; 141 | # 142 | # for general use... 143 | use Data::Dumper; 144 | 145 | 146 | 147 | # ======================================================================= 148 | # ===================== Do some setup & bookkeeping ===================== 149 | # ======================================================================= 150 | 151 | # Setup our exporting... 152 | require Exporter; 153 | our @ISA = qw(Exporter); 154 | # Export all constants, variables, etc. that we want the outside world to be able to access: 155 | our @EXPORT = qw( 156 | GNUPLOTARGS 157 | XMLINDENT 158 | XMLLINE1 159 | DIRINDEF DIROUTDEF 160 | FILEINDEFREX 161 | PMAPDEFFILENAME AVSFIELDDEFFILENAME SAVEDATADEFFILENAME 162 | HISTORYXMLDEFFILENAME MATCHINGXMLDEFFILENAME PMAPXMLDEFFILENAME MSGDEFFILENAME 163 | %FILEOUTSUFFIXES 164 | CXRREQXMLDEFFILENAME 165 | IDRIREADMESSAGETAGOPEN IDRIREADMESSAGETAGCLOSE 166 | LNIDEFFILENAME LNI1DEFFILENAME 167 | PIXSPACINGTOL CTIMAGESIZE DIAMTHR VIRTSPHEREDEFDIAM CENTSEPFACTOR SMNONSEPTHR 168 | ZSPACINGTOL ZSPACINGTOLFILLIN 169 | MINNUMEMPTS 170 | NUMREADERS 171 | NUMDIGRND 172 | MAJORITYTHR 173 | NARROWNESSSEARCHOFFSET 174 | %RETURN_CODE 175 | @TAB 176 | ); 177 | 178 | our $VERSION = 2.00; 179 | 180 | 181 | 182 | # ======================================================================= 183 | # ================== Site-specific constants/variables ================== 184 | # ======================================================================= 185 | 186 | # N.B.: Keep the "begin constant section" tag and the corresponding "end" tag. They allow this 187 | # section to be extracted and displayed; see the --internals option. Be sure all constants 188 | # are placed in this section. 189 | # 190 | # ++++++++++ begin constant section ++++++++++ 191 | 192 | # The first line of XML... 193 | use constant XMLLINE1 => q !!; 194 | # XML lines used in the IDRI/CXR request 195 | use constant IDRIREADMESSAGETAGOPEN => q !!; 196 | use constant IDRIREADMESSAGETAGCLOSE => q !!; 197 | 198 | # Some directory-related defaults... 199 | use constant DIRINDEF => '.'; 200 | use constant DIROUTDEF => 'max'; 201 | 202 | # Some filename-related defaults... 203 | use constant FILEINDEFREX => '\.xml$'; # "file in default regular expression" - input filenames end in ".xml" 204 | use constant SAVEDATADEFFILENAME => "savedata.dump"; 205 | use constant PMAPDEFFILENAME => "file.pmap"; 206 | use constant AVSFIELDDEFFILENAME => "file.fld"; 207 | use constant HISTORYXMLDEFFILENAME => "history.xml"; 208 | use constant MATCHINGXMLDEFFILENAME => "matching.xml"; 209 | use constant PMAPXMLDEFFILENAME => "pmap.xml"; 210 | use constant MSGDEFFILENAME => "messages.txt"; 211 | use constant CXRREQXMLDEFFILENAME => "cxrrequest-partial.xml"; 212 | use constant LNIDEFFILENAME => "largenodinfo.dump"; 213 | use constant LNI1DEFFILENAME => "largenodinfo1.dump"; 214 | # Define a set of suffixes to add to filenames to differentiate among the different types of runs that MAX can do: 215 | our %FILEOUTSUFFIXES; 216 | # N.B.: Don't change the strings within the "{}" (the keys) that we use to "index" into the hash!!! 217 | # It's OK to change the values - the strings in single quotes. 218 | $FILEOUTSUFFIXES{blinded}{request} = ''; # MAX doesn't analyze blinded request files 219 | $FILEOUTSUFFIXES{blinded}{response} = '-bl_resp'; 220 | $FILEOUTSUFFIXES{unblinded}{request} = '-unbl_req'; 221 | $FILEOUTSUFFIXES{unblinded}{response} = '-unbl_resp'; 222 | 223 | # Related to edge map point counts... 224 | use constant MINNUMEMPTS => 5; # minimum number of edge map points that should be present in an inclusion ROI 225 | # >> Set this to 0 to effectively disable this check. 226 | use constant NARROWNESSSEARCHOFFSET => 3; # search for narrow contour pixels at this offset from the beginning of the segment; used in sub check_for_narrow_contour 227 | 228 | # Various dimensional/geometrical constants: 229 | use constant CTIMAGESIZE => 512; # we *should* read this from the DICOM file! 230 | use constant PIXSPACINGTOL => 0.05; # fractional tolerance to use for pixel spacing comparisons 231 | use constant ZSPACINGTOL => 0.1; # fractional tolerance to use for Z spacing comparisons 232 | use constant ZSPACINGTOLFILLIN => 0.0001; # fractional tolerance to use for comparisons in filling-in Z slices 233 | use constant DIAMTHR => 3.0; # diameter (in mm.) to discriminate between small and non-small nodules 234 | use constant SMNONSEPTHR => 5.0; # centroid separation threshold (in mm.) for testing for overlap between small and non-nodules 235 | use constant VIRTSPHEREDEFDIAM => 3.0; # default diameter of the virtual sphere constructed around small nodules 236 | use constant CENTSEPFACTOR => 2.0; # a multiplier on the centroid separation checking code 237 | 238 | # Other constants: 239 | use constant NUMREADERS => 4; # the number of readers that we expect 240 | use constant NUMDIGRND => 4; # number of digits for rounding of floating point numbers (typically 241 | # for Z coords) for comparisons, storage, and use as hash keys 242 | use constant MAJORITYTHR => 3; # The threshold for determining whether the majority of readers 243 | # marked a particular thing as being a large nodule; for QA #6. 244 | use constant GNUPLOTARGS => '-geometry 1000x1000'; # add -persist to keep the plots 245 | 246 | # ++++++++++ end constant section ++++++++++ 247 | 248 | # Indentation for the XML: 249 | # As furnished, the code uses a tab for each indentation level for the XML. If desired, you can 250 | # activate the space code which would (as furnished) use 4 spaces per level. 251 | use constant XMLINDENT => 4; 252 | my $indentstr = sprintf ' ' x XMLINDENT; # a single space repeated according to the value of XMLINDENT 253 | our @TAB; 254 | $TAB[0] = ''; 255 | foreach my $i ( 1 .. 20 ) { # 20 is arbitrary: it's just the maximum number of levels that we anticipate -- could be made more or less 256 | # Fill with spaces per above: 257 | #$tab[$i] = $tab[$i-1] . $indentstr; 258 | # Or just fill with tabs instead: 259 | $TAB[$i] = "\t" x $i; 260 | } 261 | 262 | # Use a hash to define return codes... 263 | # Porting notes: This probably doesn't need to be changed. But if you do, you probably 264 | # should keep the "normal", "reserved", "error", and "unanticipatederror" values as shown. 265 | our %RETURN_CODE; 266 | tie %RETURN_CODE, "Tie::IxHash"; # Preserve ordering 267 | %RETURN_CODE = ( 268 | normal => 0, #""" Return code doc: 0: The normal return code (no errors detected). 269 | error => 1, #""" Return code doc: 1: Generic error return (probably not used). 270 | reserved => 2, # apparently used by pod2usage if we don't specify anything for -exitstatus 271 | othererror => 101, #""" Return code doc: 101: An option was specified that is not ready for use (secondary matching or "include small"). 272 | cmnderror => 102, #""" Return code doc: 102: The form of an option on the command line is incorrect or the value given with an option is invalid or missing. 273 | validationerror => 103, #""" Return code doc: 103: Error in a tag value in the XML. 274 | inputerror => 104, #""" Return code doc: 104: Incorrect number of input files or error in opening or reading an input file or directory. 275 | configfileerror => 105, #""" Return code doc: 105: Error in opening, reading, or interpreting the configuration file. 276 | savefileerror => 106, # obsolete 277 | internalerror => 107, #""" Return code doc: 107: Internal error (matching, pmap construction, saving information between runs, unreachable code). 278 | pmapfileerror => 108, # obsolete 279 | dbconnectionerror => 109, # obsolete 280 | dbqueryerror => 110, # obsolete 281 | serieserror => 111, # obsolete 282 | pixelerror => 112, # obsolete 283 | matchingerror => 113, #""" Return code doc: 113: Matching error (inconsistency in assigning an SNID). 284 | othermatchingerror => 114, #""" Return code doc: 114: Other error during matching (incorrect Z information). 285 | dbautherror => 115, #obsolete 286 | nonoduleserror => 116, #""" Return code doc: 116: No nodules were found; matching cannot be done. 287 | pmapxmlfileerror => 117, # obsolete 288 | characteristicserror => 118, # obsolete 289 | seriesinfoerror => 119, # obsolete 290 | zinfoerror => 120, #""" Return code doc: 120: Z information error (getting or inferring slice spacing, filling-in Z coordinates). 291 | xmloutfileerror => 121, #""" Return code doc: 121: Error in opening one of the various XML output files. 292 | outfileerror => 122, # obsolete 293 | xmlinputdataerror => 123, #""" Return code doc: 123: Inconsistent read type detected between/within the input XML data file(s). 294 | messagesfileerror => 124, #""" Return code doc: 124: Error in opening the messages file or its directory. 295 | savefileinerror => 125, # obsolete/changed (see below) 296 | savefileouterror => 126, #""" Return code doc: 126: Error in saving data to file for passing information between runs. 297 | savefileevalerror => 127, #""" Return code doc: 127: Error in evaluating a file for passing information between runs. 298 | savefileinerror => 128, #""" Return code doc: 128: Error in opening or accessing a file for passing information between runs. 299 | xmlinputparsingerror => 129, #""" Return code doc: 129: Error in parsing the XML in an input file. 300 | interrupted => 130, #""" Return code doc: 130: An interrupt signal (control-C) was detected. 301 | 302 | unanticipatederror => 255 # apparently used by Perl if it detects an error of its own, so we should never use this value #""" Return code doc: 255: used by Perl if it detects an error during execution 303 | ); 304 | 305 | 306 | # And speaking of return codes... 307 | 1; # return code for the entire module when it is loaded (must be "true") 308 | -------------------------------------------------------------------------------- /support_software/max-V107b/filelist: -------------------------------------------------------------------------------- 1 | CopyrightAndLicense.txt 2 | ReadMe.txt 3 | ReleaseNotes.txt 4 | Site_Max-V200.pm 5 | Site_Max.pm 6 | filelist 7 | get_image_geom-V201.pl 8 | get_image_geom.pl 9 | getfiles.sh 10 | getpix-V100.sh 11 | getpix.sh 12 | max-V107.pl 13 | max-faq.txt 14 | max.pl 15 | -------------------------------------------------------------------------------- /support_software/max-V107b/get_image_geom-V201.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # Name: 3 | # get_image_geom-V201.pl 4 | 5 | # ---------------------------------------------------------------------------------------------- 6 | # Copyright 2010 7 | # THE REGENTS OF THE UNIVERSITY OF MICHIGAN 8 | # ALL RIGHTS RESERVED 9 | # 10 | # The software and supporting documentation was developed by the 11 | # 12 | # Digital Image Processing Laboratory 13 | # Department of Radiology 14 | # University of Michigan 15 | # 1500 East Medical Center Dr. 16 | # Ann Arbor, MI 48109 17 | # 18 | # It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01. 19 | # 20 | # IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY THE SOFTWARE TO PERFORM THE 21 | # OPERATIONS THAT ARE REQUIRED BY THE USER. 22 | # 23 | # THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS 24 | # TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY 25 | # KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 26 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF 27 | # MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, 28 | # OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH 29 | # THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY 30 | # OF SUCH DAMAGES. 31 | # 32 | # PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND REDISTRIBUTE THIS SOFTWARE 33 | # AND SUCH DERIVATIVE WORKS FOR ANY PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, 34 | # INCLUDING THE GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; AND SO LONG 35 | # AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY ADVERTISING OR PUBLICITY 36 | # PERTAINING TO THE USE OR DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 37 | # AUTHORIZATION. 38 | # ---------------------------------------------------------------------------------------------- 39 | 40 | # Purpose: 41 | # Get the pixel spacing and slice spacing from a set of DICOM files and create a string that 42 | # can be used by MAX. 43 | 44 | # Notes: 45 | # * This is a very funky script that could be improved in many ways, but it's OK for now. 46 | # It is VERY specific to UofM's LIDC directory tree layout. 47 | 48 | # Running the script: 49 | # * Simply invoke the script; no arguments are needed. 50 | # % cd /to/an/lidc/dir 51 | # % /some/dir/max.pl `get_image_geom.pl` --some-more-opts 52 | # It emits a string like the following... 53 | # --pixel-dim 0.7031 --slice-spacing 0.625 54 | # If either part cannot be found, it is omitted in which case MAX deals with it. 55 | # * Return status: Follows the usual Linux conventions: 0 if we can't determine which 56 | # directory tree we're in or 1 for success. 57 | # * See below for directory tree considerations. 58 | 59 | # Requirements and porting to other systems: 60 | # * Software: 61 | # - Tie::IxHash -- from CPAN 62 | # - our locally developed Perl module Site_Max 63 | # - Bourne scripts getpix.sh and check_seq.sh 64 | # - /local/DIPLenv.csh (sourced by check_seq.sh) 65 | # - Mallinckrodt CTN suite: dcm_dump_file 66 | # * Edit the code below that is specific to directory structure. 67 | 68 | # Revision history: 69 | # === ca. 2005: 70 | # * Written. 71 | # === March 8, 2007: 72 | # * Generalized to run in either the request or servicing part of the tree. 73 | # === March 12, 2007: V2.00 started (everything keys off finding a .flis file) 74 | # === April 25, 2007: 75 | # * Minor additions to the text output with the --interactive switch. 76 | # === Sept. 19, 2007: V2.01 - new feature 77 | # * Add capability of getting pixel & slice spacing args & values from the image_geom.args file 78 | # which should be located (1) in the same dir with the images and the .flis file or (2) in 79 | # max/ or (3) under the directory named by $startdir. 80 | # === Oct. 17, 2007: 81 | # * Add "=" between the option name and value. 82 | 83 | 84 | # Start with the usual stuff... 85 | use strict; 86 | use diagnostics; 87 | use warnings; 88 | 89 | # Here are some particular modules that we need: 90 | use Getopt::Long; # this allows command line processing with long ("--") options 91 | use Data::Dumper; # useful for general diagnostic purposes 92 | use Tie::IxHash; # contains routines that preserve order of XML tags in hashes (needed by Site_Max) 93 | use Cwd; # this gets us getcwd() 94 | use File::Basename; # this gets us dirname() 95 | 96 | # Add the directory that MAX (and Site_Max) lives in to the module/library search path: 97 | use FindBin; 98 | use lib "$FindBin::Bin"; 99 | 100 | # Site-specific: 101 | use Site_Max; # our own package that contains site-specific constants, etc. (gives us ZSPACINGTOL) 102 | 103 | 104 | # Simple command line processing: 105 | my $interactive; 106 | my %GetOptsHash = ( 'interactive' => \$interactive ); 107 | GetOptions ( %GetOptsHash ); 108 | 109 | # Define utilities that we'll use later: 110 | my $ckseq = '/local/scripts/dicom/check_seq.sh'; 111 | my $ddf = '/usr/local/ctn/bin/dcm_dump_file'; 112 | 113 | # Find the directory in which we should start our search for a .flis file: 114 | my $startdir; 115 | my $curdir = getcwd; 116 | if ( $curdir =~ m/\/galaxy\/LIDC\/req/ ) { 117 | # One level up, there is a 5-digit series directory which contains the .flis file. 118 | $startdir = '..'; 119 | } 120 | elsif ( $curdir =~ m/\/galaxy\/LIDC\/serv/ ) { 121 | # In the current directory, there is a directory whose name is the same as the basename of our 122 | # current location; there is an .flis file in this directory. 123 | $startdir = '.'; 124 | } 125 | else { 126 | # Otherwise, we don't really know where we are, so error out: 127 | print "Can't identify where we are. \n" if $interactive; 128 | exit 1; 129 | } 130 | 131 | # See if there is an image_geom.args file. If so, use it and exit. 132 | my @argslist = split /\n/, `find $startdir -name image_geom.args`; 133 | my $numargsfiles = scalar(@argslist); 134 | # There should be exactly one: 135 | if ( $numargsfiles == 1 ) { 136 | my $argsfname = $argslist[0]; 137 | print `cat $argsfname`; 138 | print "\n" if $interactive; 139 | exit 0; 140 | } 141 | elsif ( $numargsfiles > 1 ) { 142 | # We don't really know what to do with multiples, so error out: 143 | print "Found $numargsfiles image_geom.args files under directory $startdir/.\n" if $interactive; 144 | exit 1; 145 | } 146 | else { 147 | #print "Found no image_geom.args files under directory $startdir/\n" if $interactive; 148 | # ... and just go on... 149 | } 150 | 151 | # Find the .flis file: 152 | my @flislist = split /\n/, `find $startdir -name "*.flis"`; 153 | my $flisfname; 154 | my $numfiles = scalar(@flislist); 155 | # There should be exactly one: 156 | if ( $numfiles == 1 ) { 157 | $flisfname = $flislist[0]; 158 | } 159 | else { 160 | # Otherwise, we don't really know what to do, so error out: 161 | print "Didn't find exactly 1 .flis file under directory $startdir/ -- found $numfiles instead.\n" if $interactive; 162 | exit 1; 163 | } 164 | 165 | # Get the slice spacing from the .flis file: 166 | if ( $flisfname ) { 167 | my $minmaxslsp = `$ckseq -m $flisfname`; 168 | my ( $minslsp, $maxslsp ) = split ( / /, $minmaxslsp ); 169 | printf " --slice-spacing=%.3f ", $minslsp if approxeq ( $minslsp, $maxslsp, ZSPACINGTOL ); 170 | } 171 | 172 | # This code gets the pixel dimension from a DICOM image: 173 | my $dicomfname = dirname($flisfname) . '/' . `head -n 1 $flisfname | cut -d ' ' -f3`; # print "\n $dicomfname \n"; exit; 174 | chomp $dicomfname; 175 | push my @args, "-t", "$dicomfname"; 176 | open ( my $ddfh, "-|", "$ddf", "-t", "$dicomfname" ) or die "Can't run program: $!\n"; 177 | my $pixspacing; 178 | while (<$ddfh>) { 179 | if ( /Pixel Spacing/ ) { 180 | my $line = $_; 181 | # The pixel spacing line typically looks like 182 | # 0028 0030 24 // IMG Pixel Spacing//0.677734375\0.677734375 183 | $pixspacing = ( split /\\/, $line )[1]; 184 | } 185 | } 186 | close $ddfh; 187 | printf " --pixel-spacing=%.3f ", $pixspacing if $pixspacing; 188 | 189 | print "\n" if $interactive; 190 | exit 0; 191 | 192 | 193 | # Borrowed from MAX... 194 | sub approxeq { 195 | # Check 2 numbers for equality to the specified tolerance 196 | my ( $x1, $x2, $tol ) = @_; 197 | return 0 if ( ! $x1 || ! $x2 ); 198 | my $delta = $x1 - $x2; 199 | my $ave = ( $x1 + $x2 ) / 2.0; 200 | my $frac = abs ( $delta / $ave ); 201 | my $flag = ( $frac <= $tol ); 202 | return $flag; 203 | } 204 | -------------------------------------------------------------------------------- /support_software/max-V107b/get_image_geom.pl: -------------------------------------------------------------------------------- 1 | get_image_geom-V201.pl -------------------------------------------------------------------------------- /support_software/max-V107b/getfiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ---------------------------------------------------------------------------------------------- 4 | # Copyright 2010 5 | # THE REGENTS OF THE UNIVERSITY OF MICHIGAN 6 | # ALL RIGHTS RESERVED 7 | # 8 | # The software and supporting documentation was developed by the 9 | # 10 | # Digital Image Processing Laboratory 11 | # Department of Radiology 12 | # University of Michigan 13 | # 1500 East Medical Center Dr. 14 | # Ann Arbor, MI 48109 15 | # 16 | # It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01. 17 | # 18 | # IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY THE SOFTWARE TO PERFORM THE 19 | # OPERATIONS THAT ARE REQUIRED BY THE USER. 20 | # 21 | # THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS 22 | # TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY 23 | # KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 24 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF 25 | # MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, 26 | # OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH 27 | # THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY 28 | # OF SUCH DAMAGES. 29 | # 30 | # PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND REDISTRIBUTE THIS SOFTWARE 31 | # AND SUCH DERIVATIVE WORKS FOR ANY PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, 32 | # INCLUDING THE GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; AND SO LONG 33 | # AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY ADVERTISING OR PUBLICITY 34 | # PERTAINING TO THE USE OR DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 35 | # AUTHORIZATION. 36 | # ---------------------------------------------------------------------------------------------- 37 | 38 | # A VERY simple script that works in our setup. Must be adapted for use in other environments! 39 | # It makes a comma-separated list of the XML files found in the current dir preceeded by the 40 | # --files command line option. 41 | 42 | # This little section is probably useful for testing only: 43 | if [ $1 ] 44 | then 45 | cd $1 46 | fi 47 | 48 | # for testing: 49 | #/bin/ls -m *.xml | wc -l 50 | 51 | # This is it... 52 | echo -n "--files=" 53 | # Find all *.xml files, but filter-out some specific filenames, and delete spaces: 54 | #/bin/ls -m *.xml | grep -v -E 'UM.*nih.xml|ORIG|ORG' | tr -d '[:space:]' 55 | #/bin/ls -m *.xml | grep -v -E '*nih*.xml|ORIG|ORG' | tr -d '[:space:]' 56 | /bin/ls -1 *.xml | grep -v -E '*nih*.xml|ORIG|ORG' | tr '[:space:]' ',' 57 | -------------------------------------------------------------------------------- /support_software/max-V107b/getpix-V100.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Name: 3 | # getpix.sh 4 | 5 | # ---------------------------------------------------------------------------------------------- 6 | # Copyright 2010 7 | # THE REGENTS OF THE UNIVERSITY OF MICHIGAN 8 | # ALL RIGHTS RESERVED 9 | # 10 | # The software and supporting documentation was developed by the 11 | # 12 | # Digital Image Processing Laboratory 13 | # Department of Radiology 14 | # University of Michigan 15 | # 1500 East Medical Center Dr. 16 | # Ann Arbor, MI 48109 17 | # 18 | # It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01. 19 | # 20 | # IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY THE SOFTWARE TO PERFORM THE 21 | # OPERATIONS THAT ARE REQUIRED BY THE USER. 22 | # 23 | # THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS 24 | # TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY 25 | # KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 26 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF 27 | # MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, 28 | # OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH 29 | # THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY 30 | # OF SUCH DAMAGES. 31 | # 32 | # PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND REDISTRIBUTE THIS SOFTWARE 33 | # AND SUCH DERIVATIVE WORKS FOR ANY PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, 34 | # INCLUDING THE GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; AND SO LONG 35 | # AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY ADVERTISING OR PUBLICITY 36 | # PERTAINING TO THE USE OR DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 37 | # AUTHORIZATION. 38 | # ---------------------------------------------------------------------------------------------- 39 | 40 | # Purpose: 41 | # Get the pixel spacing from a DICOM file. Typically used by MAX. 42 | 43 | # Notes: 44 | # * This is a very funky script that could be improved in many ways, but it's OK for now. 45 | # It is VERY specific to UofM's LIDC directory tree layout. 46 | # * Borrows code from our directory.sh and make_fld_file.sh scripts. 47 | 48 | # Running the script: 49 | # * Simply invoke the script; no arguments are needed. 50 | # * See below for directory tree considerations. 51 | # * Output: A floating point number (the pixel spacing). 52 | # * Return status: Follows the usual Linux conventions: 1 if we can't determine which 53 | # directory tree we're in or 0 for success. 54 | 55 | # Requirements and porting to other systems: 56 | # * dcm_dump_file 57 | # * Edit the code below that is specific to directory structure. 58 | 59 | # Revision history: 60 | # === ca. 2005: 61 | # * Written. 62 | # === March 8, 2007: 63 | # * Generalized to run in either the request or servicing part of the tree. 64 | # === March 3, 2008: 65 | # * removed -t from dcm_dump_file 66 | 67 | 68 | # Depending on where we are, we use different assumptions for finding the files: 69 | if pwd | grep /galaxy/LIDC/req >/dev/null 2>&1 70 | # The request directory tree contains directories of this form: 71 | # /galaxy/LIDC/req/completed/1.2.826.0.1.3680043.2.108.14.0.0.30070.11/unbl_resp 72 | # This script executes from within such a directory. 73 | # We know that one level up, there is a series directory named with a 5-digit string. 74 | # Get the 1st DICOM file in this series directory; we know that the filenames start with 75 | # 1.2.826.0.1.3680043.2.108 since these are files that we created as requester. 76 | then 77 | #echo we are in the request tree 78 | if /bin/ls ../[0-9][0-9][0-9][0-9][0-9]/1.2.826.0.1.3680043.2.108.* >/dev/null 2>&1 79 | then 80 | dicomfname=../[0-9][0-9][0-9][0-9][0-9]/`/bin/ls ../[0-9][0-9][0-9][0-9][0-9]/1.2.826.0.1.3680043.2.108.* 2>/dev/null | head -n 1` 81 | fi 82 | elif pwd | grep /galaxy/LIDC/serv >/dev/null 2>&1 83 | # The servicing directory tree contains directories of this form: 84 | # /galaxy/LIDC/serv/BS/1.2.826.0.1.3680043.2.446.150.14.0.0.30070.11/ 85 | # This script executes from within such a directory. 86 | # We know that there is a series directory whose name is the same as the last part of the current directory. 87 | # Get a DICOM file from this series directory. 88 | then 89 | #echo we are in the service tree 90 | cwd=`pwd` 91 | imagedir=`basename $cwd` 92 | dicomfname=`find $imagedir -type f 2>/dev/null | head -n 8 | tail -n 1` 93 | else 94 | # we don't know where we are, so return nothing, but signal an error... 95 | exit 1 96 | fi 97 | 98 | # Get the value of the pixel spacing from the DICOM file: 99 | if [ -n "$dicomfname" ] 100 | then 101 | psline=`/usr/local/ctn/bin/dcm_dump_file $dicomfname | grep "Pixel Spacing"` # extract the line from the file 102 | psline=`echo $psline | tr -d '[:space:]' | tr -s '\\\' ','` # clean it up 103 | psnum=`echo $psline | cut -d',' -f2` # extract the spacing (a floating point number) 104 | psnum=`printf "%8.4f" $psnum` # format it 105 | echo $psnum # output it 106 | fi 107 | 108 | exit 0 109 | -------------------------------------------------------------------------------- /support_software/max-V107b/getpix.sh: -------------------------------------------------------------------------------- 1 | getpix-V100.sh -------------------------------------------------------------------------------- /support_software/max-V107b/max-faq.txt: -------------------------------------------------------------------------------- 1 | Frequently Asked Questions for MAX 2 | ================================== 3 | 4 | # ---------------------------------------------------------------------------------------------- 5 | # Copyright 2006 - 2010 6 | # THE REGENTS OF THE UNIVERSITY OF MICHIGAN 7 | # ALL RIGHTS RESERVED 8 | # 9 | # The software and supporting documentation was developed by the 10 | # 11 | # Digital Image Processing Laboratory 12 | # Department of Radiology 13 | # University of Michigan 14 | # 1500 East Medical Center Dr. 15 | # Ann Arbor, MI 48109 16 | # 17 | # It is funded in part by DHHS/NIH/NCI 1 U01 CA91099-01. 18 | # 19 | # IT IS THE RESPONSIBILITY OF THE USER TO CONFIGURE AND/OR MODIFY THE SOFTWARE TO PERFORM THE 20 | # OPERATIONS THAT ARE REQUIRED BY THE USER. 21 | # 22 | # THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS 23 | # TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY 24 | # KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF 25 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF 26 | # MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, 27 | # OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH 28 | # THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY 29 | # OF SUCH DAMAGES. 30 | # 31 | # PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS AND REDISTRIBUTE THIS SOFTWARE 32 | # AND SUCH DERIVATIVE WORKS FOR ANY PURPOSE, SO LONG AS THIS ENTIRE COPYRIGHT NOTICE, 33 | # INCLUDING THE GRANT OF PERMISSION, AND DISCLAIMERS, APPEAR IN ALL COPIES MADE; AND SO LONG 34 | # AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY ADVERTISING OR PUBLICITY 35 | # PERTAINING TO THE USE OR DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN PRIOR 36 | # AUTHORIZATION. 37 | # ---------------------------------------------------------------------------------------------- 38 | 39 | 40 | This is very much a work in progress, so not most entries are merely titles at this time and are 41 | not filled-in yet. 42 | 43 | 1. The weak reference problem 44 | 45 | If you get this message when you run MAX, "Weak references are not implemented in the version of 46 | perl", you need to reinstall Scalar::Util from CPAN (not from RedHat): 47 | 48 | % perl -MCPAN -e shell 49 | force install Scalar::Util 50 | 51 | For more info, see http://www.perlmonks.org/?node_id=424737 . If this doesn't work, the problem 52 | might be with a .so file associated with Scalar::Util as vaguely implied by the mention of the C 53 | compiler in http://perldoc.perl.org/Scalar/Util.html . (XML::Twig uses weak references which 54 | are implemented[?] by Scalar::Util.) 55 | 56 | 57 | 2. How do I analyze XML files obtained from NCI/NIH? 58 | 59 | Since the four unblinded reads are in a single file, include the "--skip-num-files-check" (or 60 | "--skip" for short) on the command line. Everything else is the same as for analyzing four 61 | separate files. 62 | 63 | 64 | 3. Extraneous looking output related to Z axis coordinates 65 | 66 | If you included "--z-analyze" on the command line, omit it. It's only needed if you are trouble- 67 | shooting Z coordinate problems. 68 | 69 | 70 | 4. Problems due to not doing a completely fresh install of all files 71 | 72 | Be sure that if the distro is re-installed that *all* files are replaced -- including the 73 | Site_Max file. 74 | 75 | 76 | 5. Windows issues 77 | 78 | To run MAX under Windows, consider ActiveState. There are other possibilities -- perhaps PAR. 79 | 80 | -------------------------------------------------------------------------------- /support_software/max-V107b/max.pl: -------------------------------------------------------------------------------- 1 | max-V107b.pl --------------------------------------------------------------------------------