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

Core dump when saving image using ITK bindings. #2

Closed
loli opened this issue Jan 29, 2014 · 3 comments
Closed

Core dump when saving image using ITK bindings. #2

loli opened this issue Jan 29, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@loli
Copy link
Owner

loli commented Jan 29, 2014

Occurs when saving an image as .mhd (therefore probably when using the ITK bindings) at a location where an image of the same name already exists. Correct behaviour would be the error message, that the target image already exists.

Does not appear when the -f flag is set.

Using nibabel as third party lib, the error did not occur.

Observed while calling:
medpy_intensity_range_standardization.py adc.mhd --load-model model.pkl --save-images=tmp/ -vd

Issue could be repeated with medpy_convert.py, but this, as most scripts, does a previous internal check whether the target image exists and is therefore usually not affected by the bug (except in race conditions).

@loli
Copy link
Owner Author

loli commented Jan 29, 2014

Took a look at it and observed some strange behaviour. The error occurs in medpy.io.save module in the save(...) function at line 151 when calling:
raise ImageSavingError('The target file {} already exists.'.format(filename))

I can not really see, why there should occur a core dump (which most likely is caused by itk) should be triggered here. Raising another type of exception lead to exactly the same problem.

Have to think about it.

@loli
Copy link
Owner Author

loli commented Jan 29, 2014

For now, use -f flag in these cases.

@loli loli added the bug label Oct 6, 2014
@loli loli added this to the MedPy 0.2.3 milestone Oct 6, 2014
@loli loli self-assigned this Oct 6, 2014
@loli
Copy link
Owner Author

loli commented Nov 23, 2018

Should be fixed when doing #80

@loli loli closed this as completed Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant