Skip to content

Commit

Permalink
Add robustness to DIMGeneric against BodyPartThickness
Browse files Browse the repository at this point in the history
- do not assume that it is a string,
  because some index sources might save it as a double
  • Loading branch information
Enet4 committed Jun 27, 2024
1 parent 71e1d82 commit cebf4e3
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ private void fillDim(Map<String, Object> extra, URI uri) {
* Get data to Series
*/
String serieUID = toTrimmedString(extra.get("SeriesInstanceUID"), false);
String BodyPartThickness = (String) extra.get("BodyPartThickness");
// System.out.println("serieUID"+serieUID);
String BodyPartThickness = toTrimmedString(extra.get("BodyPartThickness"), true);
String serieNumber = toTrimmedString(extra.get("SeriesNumber"), true);
String serieDescription = toTrimmedString(extra.get("SeriesDescription"), false);
String modality = toTrimmedString(extra.get("Modality"), false);
Expand Down Expand Up @@ -192,8 +191,6 @@ private void fillDim(Map<String, Object> extra, URI uri) {
/**
* Get data to Image
*/
// TODO:Error checking here... but according to standard, all images
// must have one of these...
String sopInstUID = toTrimmedString(extra.get("SOPInstanceUID"), true);

if (sopInstUID == null) {
Expand Down

0 comments on commit cebf4e3

Please sign in to comment.