public static Class<?> getDocumentImplementationClass(TCReferencedInstance ref) { String cuid = ref.getClassUID(); if (UID.MultiFrameTrueColorSecondaryCaptureImageStorage.equals(cuid)) { TCReferencedSeries series = ref.getSeries(); String description = series != null ? series.getSeriesDescription() : null; if (description != null && description.equalsIgnoreCase(SERIES_DESCRIPTION)) { return TCImageDocument.class; } } else if (UID.EncapsulatedPDFStorage.equals(cuid)) { return TCEncapsulatedDocument.class; } return null; }
private static final TCReferencedSeries getDocumentSeries( TCReferencedStudy study, String modality) { for (TCReferencedSeries series : study.getSeries()) { String series_modality = series.getSeriesValue(Tag.Modality); String series_description = series.getSeriesDescription(); if (series_modality != null && series_modality.equalsIgnoreCase(modality) && series_description != null && series_description.equalsIgnoreCase(SERIES_DESCRIPTION)) { return series; } } return null; }