-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3a5378
commit bfa8926
Showing
115 changed files
with
5,465 additions
and
5,017 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
const { UID } = require("@dcm4che/data/UID"); | ||
const { createCGetSCPInjectProxy } = require("@java-wrapper/org/github/chinlinlee/dcm777/net/CGetSCPInject"); | ||
const { default: SimpleCGetSCP } = require("@java-wrapper/org/github/chinlinlee/dcm777/net/SimpleCGetSCP"); | ||
const { PATIENT_ROOT_LEVELS, STUDY_ROOT_LEVELS, PATIENT_STUDY_ONLY_LEVELS } = require("./level"); | ||
const { getInstancesFromKeysAttr } = require("./utils"); | ||
const { default: RetrieveTaskImpl } = require("@dcm4che/tool/dcmqrscp/RetrieveTaskImpl"); | ||
const { Dimse } = require("@dcm4che/net/Dimse"); | ||
const { EnumSet } = require("@java-wrapper/java/util/EnumSet"); | ||
const { default: QueryRetrieveLevel2 } = require("@dcm4che/net/service/QueryRetrieveLevel2"); | ||
|
||
class JsCGetScp { | ||
constructor() { } | ||
|
||
getPatientRootLevel() { | ||
const cGetScpInject = createCGetSCPInjectProxy(this.getCGetScpInjectProxyMethods(), { | ||
keepAsDaemon: true | ||
}); | ||
|
||
let simpleCGetScp = new SimpleCGetSCP( | ||
cGetScpInject, | ||
UID.PatientRootQueryRetrieveInformationModelGet, | ||
PATIENT_ROOT_LEVELS | ||
); | ||
|
||
this.scpObj = simpleCGetScp; | ||
|
||
return simpleCGetScp; | ||
} | ||
|
||
getStudyRootLevel() { | ||
const cGetScpInject = createCGetSCPInjectProxy(this.getCGetScpInjectProxyMethods(), { | ||
keepAsDaemon: true | ||
}); | ||
|
||
let simpleCGetScp = new SimpleCGetSCP( | ||
cGetScpInject, | ||
UID.StudyRootQueryRetrieveInformationModelGet, | ||
STUDY_ROOT_LEVELS | ||
); | ||
|
||
this.scpObj = simpleCGetScp; | ||
|
||
return simpleCGetScp; | ||
} | ||
|
||
getPatientStudyOnlyLevel() { | ||
const cGetScpInject = createCGetSCPInjectProxy(this.getCGetScpInjectProxyMethods(), { | ||
keepAsDaemon: true | ||
}); | ||
|
||
let simpleCGetScp = new SimpleCGetSCP( | ||
cGetScpInject, | ||
UID.PatientStudyOnlyQueryRetrieveInformationModelGet, | ||
PATIENT_STUDY_ONLY_LEVELS | ||
); | ||
|
||
this.scpObj = simpleCGetScp; | ||
|
||
return simpleCGetScp; | ||
} | ||
|
||
getCompositeLevel() { | ||
const cGetScpInject = createCGetSCPInjectProxy(this.getCGetScpInjectProxyMethods(), { | ||
keepAsDaemon: true | ||
}); | ||
|
||
let simpleCGetScp = new SimpleCGetSCP( | ||
cGetScpInject, | ||
UID.CompositeInstanceRetrieveWithoutBulkDataGet, | ||
EnumSet.ofSync(QueryRetrieveLevel2.IMAGE) | ||
); | ||
|
||
this.scpObj = simpleCGetScp; | ||
|
||
return simpleCGetScp; | ||
} | ||
|
||
getCGetScpInjectProxyMethods() { | ||
const cGetScpInjectProxyMethods = { | ||
/** | ||
* | ||
* @param {Association} as | ||
* @param {PresentationContext} pc | ||
* @param {Attributes} rq | ||
* @param {Attributes} keys | ||
*/ | ||
calculateMatches: async (as, pc, rq, keys) => { | ||
let instances = await getInstancesFromKeysAttr(keys); | ||
if (await instances.isEmpty()) { | ||
return null; | ||
} | ||
|
||
let withoutBulkData = await (await this.scpObj.getQrLevels()).size() == 1; | ||
let retrieveTask = await RetrieveTaskImpl.newInstanceAsync( | ||
Dimse.C_GET_RQ, | ||
as, | ||
pc, | ||
rq, | ||
instances, | ||
as, | ||
withoutBulkData, | ||
0 | ||
); | ||
await retrieveTask.setSendPendingRSP(false); | ||
|
||
return retrieveTask; | ||
} | ||
}; | ||
|
||
return cGetScpInjectProxyMethods; | ||
}; | ||
} | ||
|
||
module.exports.JsCGetScp = JsCGetScp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.74 KB
(110%)
models/DICOM/dcm4che/javaNode/dcm4chee/lib/qrscp/dcm777-5.29.2.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.