dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
291 stars 110 forks source link

[Cornerstone adapters] Tool is undefined when saving FreehandRoi tool in structured report #306

Closed SveinungOverland closed 1 year ago

SveinungOverland commented 1 year ago

https://github.com/dcmjs-org/dcmjs/blob/78528325e16624e86e205c7bf6a334e18dc279e1/src/adapters/Cornerstone/FreehandRoi.js#L46-L47

Hey, we use DCMjs to create structured reports from cornerstone and cornerstone-tools (not the new cornerstone3d). For the most part this seems to work just fine, but we recently wanted to add FreehandRoi tooling to the reports. This never seemed to work as tool was always undefined when saving the report. Upon further examination the code seems to work just fine if tool is put into the argument list. The question is really just, why is tool commented out? The function seems to work just fine with it in, and not work at all without it.

pieper commented 1 year ago

Thanks for the report @SveinungOverland.

@wayfarer3130 can you comment?

https://github.com/dcmjs-org/dcmjs/commit/c65b93000a31b72b2a3ef3aede03838463dd4264#diff-e912a5f9f4a457613ce5a4cfb6d57552cb1bf3b38f8f07a56ea8501ca41bfea5

wayfarer3130 commented 1 year ago

@SveinungOverland - I'm not sure why it was commented out - it shouldn't have been, but for that class I was just updating it to match the format of the other ones, without having a full configuration that enabled it to run. Please create a PR with it added back end, testing both save and restore.

SveinungOverland commented 1 year ago

@wayfarer3130 - I created the PR, but from what I can see dcmjs seems to be missing a testing structure for adapters and I don't think I should be the one to create it. So if you know of anyone more familiar with dcmjs and js testing I would appreciate if you tag them here.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 0.28.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: