Skip to content

Commit

Permalink
Fixed handling of Explicit VR Big Endian transfer syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
PantelisGeorgiadis committed Feb 17, 2024
1 parent 5d2f226 commit fb5029c
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 88 deletions.
Binary file added datasets/ebe.dcm
Binary file not shown.
5 changes: 4 additions & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ function performCFindMwl(host, port, callingAeTitle, calledAeTitle, opts) {
function performCStore(host, port, callingAeTitle, calledAeTitle, opts) {
const rootPath = process.cwd();
const elePath = path.join(rootPath, 'datasets', 'ele.dcm');
const ebePath = path.join(rootPath, 'datasets', 'ebe.dcm');
const j2kPath = path.join(rootPath, 'datasets', 'j2k.dcm');
const srPath = path.join(rootPath, 'datasets', 'sr.dcm');
const pdfPath = path.join(rootPath, 'datasets', 'pdf.dcm');

const client = new Client();
client.addRequest(new CStoreRequest(elePath));
client.addRequest(new CStoreRequest(ebePath));
client.addRequest(new CStoreRequest(j2kPath));
client.addRequest(new CStoreRequest(srPath));
client.addRequest(new CStoreRequest(pdfPath));
Expand Down Expand Up @@ -122,7 +124,8 @@ class ExampleScp extends Scp {
transferSyntaxes.forEach((transferSyntax) => {
if (
transferSyntax === TransferSyntax.ImplicitVRLittleEndian ||
transferSyntax === TransferSyntax.ExplicitVRLittleEndian
transferSyntax === TransferSyntax.ExplicitVRLittleEndian ||
transferSyntax === TransferSyntax.ExplicitVRBigEndian
) {
context.setResult(PresentationContextResult.Accept, transferSyntax);
} else {
Expand Down
5 changes: 4 additions & 1 deletion examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ function performCStore(
) {
const rootPath = process.cwd();
const elePath = path.join(rootPath, 'datasets', 'ele.dcm');
const ebePath = path.join(rootPath, 'datasets', 'ebe.dcm');
const j2kPath = path.join(rootPath, 'datasets', 'j2k.dcm');
const srPath = path.join(rootPath, 'datasets', 'sr.dcm');
const pdfPath = path.join(rootPath, 'datasets', 'pdf.dcm');

const client = new Client();
client.addRequest(new CStoreRequest(elePath));
client.addRequest(new CStoreRequest(ebePath));
client.addRequest(new CStoreRequest(j2kPath));
client.addRequest(new CStoreRequest(srPath));
client.addRequest(new CStoreRequest(pdfPath));
Expand Down Expand Up @@ -175,7 +177,8 @@ class ExampleScp extends Scp {
transferSyntaxes.forEach((transferSyntax) => {
if (
transferSyntax === TransferSyntax.ImplicitVRLittleEndian ||
transferSyntax === TransferSyntax.ExplicitVRLittleEndian
transferSyntax === TransferSyntax.ExplicitVRLittleEndian ||
transferSyntax === TransferSyntax.ExplicitVRBigEndian
) {
context.setResult(PresentationContextResult.Accept, transferSyntax);
} else {
Expand Down
156 changes: 82 additions & 74 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb5029c

Please sign in to comment.