From cebf4e30c2d76b822fd8637f13aa7d5e18209cb5 Mon Sep 17 00:00:00 2001 From: Eduardo Pinho Date: Thu, 27 Jun 2024 11:04:16 +0100 Subject: [PATCH] Add robustness to DIMGeneric against BodyPartThickness - do not assume that it is a string, because some index sources might save it as a double --- .../java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java b/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java index 5544f82f0..5462d572a 100755 --- a/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java +++ b/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java @@ -158,8 +158,7 @@ private void fillDim(Map 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); @@ -192,8 +191,6 @@ private void fillDim(Map 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) {