Commit a4c4e40
Fix encapsulated pixeldata handling (#103)
* remove restriction for bits stored, because its value can be modality specific e.g. in case of CT it can be 12,13,14,15,16
* fix offset reading and frame reading for encapsulated pixel data
* fix offset calculation for encapsualted fragments: length was essentially not read, undefined length was assumed
use more intuitive offset calculation: previous offset + tag and length size + current length
* split regular and encapsulated frame parsing
fix indexing problem when creating offsets table
fix frame size calculation: bits allocated was not considered
* fix offset calculation for non-encapsulated frames: bits allocated was not considered
* coding style, code documentation, review fixes: simplification, error handling, etc
* functional tests for encapsulated pixel data handling
* simplify BOT construction
avoid overflow for length value in dcm_parse_encapsulated_frame
* simplify first BOT offset calculation
restore some error handling
* review fixesL coding style, comments, error messages
* indentation
---------
Co-authored-by: Antal Ispanovity <aispanovity@workstation>1 parent b269219 commit a4c4e40
File tree
11 files changed
+250
-34
lines changed- data/test_files
- src
- tests
11 files changed
+250
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1811 | 1811 | | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | | - | |
1815 | | - | |
1816 | | - | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
1821 | 1814 | | |
1822 | 1815 | | |
1823 | 1816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1374 | 1387 | | |
1375 | 1388 | | |
1376 | 1389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
965 | | - | |
966 | 964 | | |
967 | 965 | | |
968 | 966 | | |
| |||
975 | 973 | | |
976 | 974 | | |
977 | 975 | | |
978 | | - | |
| 976 | + | |
979 | 977 | | |
980 | 978 | | |
981 | 979 | | |
| |||
984 | 982 | | |
985 | 983 | | |
986 | 984 | | |
987 | | - | |
| 985 | + | |
988 | 986 | | |
989 | | - | |
990 | | - | |
| 987 | + | |
| 988 | + | |
991 | 989 | | |
992 | 990 | | |
993 | 991 | | |
994 | 992 | | |
995 | 993 | | |
996 | 994 | | |
997 | | - | |
| 995 | + | |
| 996 | + | |
998 | 997 | | |
999 | 998 | | |
1000 | 999 | | |
1001 | | - | |
| 1000 | + | |
1002 | 1001 | | |
1003 | 1002 | | |
1004 | 1003 | | |
| |||
1009 | 1008 | | |
1010 | 1009 | | |
1011 | 1010 | | |
| 1011 | + | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
| |||
1022 | 1022 | | |
1023 | 1023 | | |
1024 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1025 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
1026 | 1039 | | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1031 | 1067 | | |
1032 | 1068 | | |
1033 | | - | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1034 | 1072 | | |
1035 | 1073 | | |
1036 | 1074 | | |
1037 | 1075 | | |
1038 | 1076 | | |
1039 | 1077 | | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1043 | 1089 | | |
1044 | 1090 | | |
1045 | | - | |
| 1091 | + | |
1046 | 1092 | | |
1047 | 1093 | | |
1048 | 1094 | | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1052 | 1098 | | |
1053 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1054 | 1115 | | |
1055 | 1116 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
0 commit comments