Skip to content

Commit

Permalink
Bump fo-dicom from 5.1.3 to 5.1.4 (#303)
Browse files Browse the repository at this point in the history
* Bump fo-dicom from 5.1.3 to 5.1.4

Bumps [fo-dicom](https://github.com/fo-dicom/fo-dicom) from 5.1.3 to 5.1.4.
- [Release notes](https://github.com/fo-dicom/fo-dicom/releases)
- [Changelog](https://github.com/fo-dicom/fo-dicom/blob/development/ChangeLog.md)
- [Commits](fo-dicom/fo-dicom@5.1.3...5.1.4)

---
updated-dependencies:
- dependency-name: fo-dicom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update DicomTypeTranslaterReader.cs

Do string length checks using UTF8 not ASCII to avoid tripping over non-ASCII characters

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James A Sutherland <[email protected]>
  • Loading branch information
dependabot[bot] and jas88 authored Oct 28, 2024
1 parent cf0bbc4 commit 09db5fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DicomTypeTranslation/DicomTypeTranslaterReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FellowOakDicom;
using MongoDB.Bson;

Expand Down Expand Up @@ -332,9 +333,10 @@ private static BsonValue CreateBsonValue(DicomDataset dataset, DicomItem item, b
else if (!DicomTypeTranslater.SerializeBinaryData && DicomTypeTranslater.DicomVrBlacklist.Contains(item.ValueRepresentation))
retVal = BsonNull.Value;

else if (element is DicomStringElement)
else if (element is DicomStringElement se)
{
if (element is not DicomMultiStringElement && element.Length == 0)
se.TargetEncoding = Encoding.UTF8;
if (se is not DicomMultiStringElement && se.Length == 0)
retVal = BsonNull.Value;
else
retVal = (BsonString)dataset.GetString(element.Tag);
Expand Down
2 changes: 1 addition & 1 deletion DicomTypeTranslation/DicomTypeTranslation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<None Include="Elevation\TagElevation.cd" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="fo-dicom" Version="5.1.3" />
<PackageReference Include="fo-dicom" Version="5.1.4" />
<PackageReference Include="HIC.FAnsiSql" Version="3.2.7" />
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down

0 comments on commit 09db5fb

Please sign in to comment.