Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

movescu's --bit-preserving option is not respecting the --output-directory option (issue #1122) #98

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

luissantosHCIT
Copy link

Simplest attempt at correcting issue #1122.
When movescu is called with +B (--bit-preserving) option, the output file ends up in the current working directory as opposed to the desired output directory even if you add the -od (--output-directory) option in the command line.

Note that a better approach could be to have a singular writing function and adjust the function signatures to pass whether other processing logic should be skipped. However, that could cause a lot of headaches ensuring all logic paths are checked against the current bit-preserving behavior of outputting the data as-is.

I leave the option to the maintainer if to request further work to address this issue more comprehensively or if the change proposed here is good enough for the project.

The changes here work as intended in my test environment.

https://support.dcmtk.org/redmine/issues/1122

Simplest attempt at correcting issue #1122.
When movescu is called with +B (--bit-preserving) option, the output file ends up in the current working directory as opposed to the desired output directory even if you add the -od (--output-directory) option in the command line.

Note that a better approach could be to have a singular writing function and adjust the function signatures to pass whether other processing logic should be skipped. However, that could cause a lot of headaches ensuring all logic paths are checked against the current bit-preserving behavior of outputting the data as-is.

I leave the option to the maintainer if to request further work to address this issue more comprehensively or if the change proposed here is good enough for the project.

The changes here appears to work as intended in my test environment.
Stylistic correction to comments
Unlike movescu, storescp does not recompute the file path in the storeSCP callback. It assumes that imageFileName already includes the directory name. However, I separated the imageFileName generation from the full path generation, so I realized I needed to correct the deleteFile logic as well. Will need to do something like this in movescu to ensure consistency across both codebases.
Keeping consistency between movescu and storescp so they both look at the file path in a similar manner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant