コード例 #1
0
ファイル: GPSPSPerformer.java プロジェクト: DicomFlow/repos
 public void setAttributes(DicomObject attrs) {
   PersonName pn = new PersonName(attrs.getString(Tag.HumanPerformerName));
   this.humanPerformerName = pn.componentGroupString(PersonName.SINGLE_BYTE, false).toUpperCase();
   this.humanPerformerIdeographicName = pn.componentGroupString(PersonName.IDEOGRAPHIC, false);
   this.humanPerformerPhoneticName = pn.componentGroupString(PersonName.PHONETIC, false);
   if (AttributeFilter.isSoundexEnabled()) {
     this.humanPerformerFamilyNameSoundex = AttributeFilter.toSoundex(pn, PersonName.FAMILY, "*");
     this.humanPerformerGivenNameSoundex = AttributeFilter.toSoundex(pn, PersonName.GIVEN, "*");
   }
 }
コード例 #2
0
ファイル: Series.java プロジェクト: DicomFlow/repos
 public void setAttributes(DicomObject attrs) {
   AttributeFilter filter = AttributeFilter.getSeriesAttributeFilter();
   this.seriesInstanceUID = attrs.getString(Tag.SeriesInstanceUID);
   this.seriesNumber = attrs.getString(Tag.SeriesNumber, "");
   this.seriesDescription =
       filter.toUpperCase(attrs.getString(Tag.SeriesDescription, ""), Tag.SeriesDescription);
   this.modality = filter.toUpperCase(attrs.getString(Tag.Modality, ""), Tag.Modality);
   this.institutionalDepartmentName =
       filter.toUpperCase(
           attrs.getString(Tag.InstitutionalDepartmentName, ""), Tag.InstitutionalDepartmentName);
   this.institutionName =
       filter.toUpperCase(attrs.getString(Tag.InstitutionName, ""), Tag.InstitutionName);
   this.stationName = filter.toUpperCase(attrs.getString(Tag.StationName, ""), Tag.StationName);
   String srcAET = attrs.getString(attrs.resolveTag(PrivateTag.CallingAET, PrivateTag.CreatorID));
   if (srcAET != null && srcAET.trim().length() > 1) this.sourceAET = srcAET;
   this.bodyPartExamined =
       filter.toUpperCase(attrs.getString(Tag.BodyPartExamined, ""), Tag.BodyPartExamined);
   this.laterality = filter.toUpperCase(attrs.getString(Tag.Laterality, ""), Tag.Laterality);
   PersonName pn = new PersonName(attrs.getString(Tag.PerformingPhysicianName));
   this.performingPhysicianName =
       pn.componentGroupString(PersonName.SINGLE_BYTE, false).toUpperCase();
   this.performingPhysicianIdeographicName =
       pn.componentGroupString(PersonName.IDEOGRAPHIC, false);
   this.performingPhysicianPhoneticName = pn.componentGroupString(PersonName.PHONETIC, false);
   if (AttributeFilter.isSoundexEnabled()) {
     this.performingPhysicianFamilyNameSoundex =
         AttributeFilter.toSoundex(pn, PersonName.FAMILY, "*");
     this.performingPhysicianGivenNameSoundex =
         AttributeFilter.toSoundex(pn, PersonName.GIVEN, "*");
   }
   this.performedProcedureStepStartDateTime =
       attrs.getDate(Tag.PerformedProcedureStepStartDate, Tag.PerformedProcedureStepStartTime);
   this.performedProcedureStepInstanceUID =
       attrs.getString(
           new int[] {
             Tag.ReferencedPerformedProcedureStepSequence, 0, Tag.ReferencedSOPInstanceUID
           });
   int[] fieldTags = filter.getFieldTags();
   for (int i = 0; i < fieldTags.length; i++) {
     try {
       setField(filter.getField(fieldTags[i]), attrs.getString(fieldTags[i], ""));
     } catch (Exception e) {
       throw new ConfigurationException(e);
     }
   }
   this.encodedAttributes =
       DicomObjectUtils.encode(filter.filter(attrs), filter.getTransferSyntaxUID());
 }