Skip to content

Commit

Permalink
fix: dicom dir not close file
Browse files Browse the repository at this point in the history
- DicomDirWriter is not close after dicomdir processing completely
  • Loading branch information
Chinlinlee committed Mar 1, 2024
1 parent 54d8631 commit 630a7ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/DICOM/dcm4che/dicomdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { default: DicomDirWriter } = require("@dcm4che/media/DicomDirWriter");
const { default: RecordFactory } = require("@dcm4che/media/RecordFactory");
const { default: RecordType } = require("@dcm4che/media/RecordType");
const { default: FilesetInfo } = require("@dcm4che/tool/common/FilesetInfo");
const { default: SafeClose } = require("@dcm4che/util/SafeClose");
const { default: UIDUtils } = require("@dcm4che/util/UIDUtils");
const { default: File } = require("@java-wrapper/java/io/File");

Expand Down Expand Up @@ -49,6 +50,9 @@ class DicomDir {
);
}

await SafeClose.close(this.dicomDirReader);
this.dicomDirReader = null;
this.dicomDirOutputWriter = null;
}

async initializeRecords() {
Expand Down

0 comments on commit 630a7ab

Please sign in to comment.