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

Modify 'data file' whenever detached_header=True #96

Closed
tashrifbillah opened this issue Jun 6, 2019 · 2 comments · Fixed by #104
Closed

Modify 'data file' whenever detached_header=True #96

tashrifbillah opened this issue Jun 6, 2019 · 2 comments · Fixed by #104
Assignees

Comments

@tashrifbillah
Copy link
Contributor

tashrifbillah commented Jun 6, 2019

We should omit the if-else below:
https://github.com/mhe/pynrrd/blob/master/nrrd/writer.py#L190

Omitting the condition should also address the TODO below:
https://github.com/mhe/pynrrd/blob/master/nrrd/writer.py#L210

I experienced this while modifying an NHDR and saving it as another NHDR. In this case, the modified detached data is not saved where my modified NHDR is.

Correction:
Detached data is saved in the working directory.

@tashrifbillah tashrifbillah changed the title Modified 'data file' whenever detached_header=True Modify 'data file' whenever detached_header=True Jun 6, 2019
@addisonElliott
Copy link
Collaborator

👍 I agree after thinking about your use case. I think it's safe to always overwrite the path for the data filename and update it.

This would be good to document (in the docs). Additionally, would be good to have a test for this. Maybe even take your use case and demonstrate how it causes problems.

@tashrifbillah
Copy link
Contributor Author

Assign: @tashrifbillah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants