-
Notifications
You must be signed in to change notification settings - Fork 509
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
BUG: use resampled mask for analysis #260
Conversation
I will review after the weekend (holiday now), but as a start, this will also require some updates of the examples. Do you want to look at ot or should I?
…-------- Oorspronkelijk bericht --------
Van: Andrey Fedorov <[email protected]>
Datum: 25-05-17 22:08 (GMT+01:00)
Aan: Radiomics/pyradiomics <[email protected]>
Cc: Subscribed <[email protected]>
Onderwerp: [Radiomics/pyradiomics] BUG: use resampled mask for analysis (#260)
This resolves #259<#259>
In the situation when the mask was corrected to compensate for the differences
between the image and mask geometry, the updated mask was not propagated to be
used for feature calculation.
________________________________
You can view, comment on, or merge this pull request online at:
#260
Commit Summary
* BUG: use resampled mask for analysis
File Changes
* M radiomics/featureextractor.py<https://github.com/Radiomics/pyradiomics/pull/260/files#diff-0> (6)
* M radiomics/imageoperations.py<https://github.com/Radiomics/pyradiomics/pull/260/files#diff-1> (32)
Patch Links:
* https://github.com/Radiomics/pyradiomics/pull/260.patch
* https://github.com/Radiomics/pyradiomics/pull/260.diff
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#260>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ARMRw-EeVPFjH7Pv_9AYI3NyoHPLPidLks5r9d_RgaJpZM4Nm1H2>.
|
Tests broken! 😱 I wonder why is that, since the difference should be very tiny after resampling here: https://github.com/Radiomics/pyradiomics/blob/master/radiomics/imageoperations.py#L289 I actually don't have the notebooks set up to update those. I need to leave very soon, and will be traveling from tomorrow until June 7, don't know how much time I will have (I have not finished preparations for the travels yet!) If you like, please update this branch. You should have the branch push access. |
I was mistaken the failing tests were caused by resampling, it was just that the test util was not updated. All nose tests are passing now (at least on CircleCI). If you could update the notebooks and merge, this would be great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, no comments on the active code in the core, just style stuff (causes flake8 to fail).
What is still missing is the updates of the examples and example notebooks where needed. This is the reason the CircleCI is currently failing (notebooks throw an error).
radiomics/featureextractor.py
Outdated
@@ -323,7 +323,11 @@ def execute(self, imageFilepath, maskFilepath, label=None): | |||
return featureVector | |||
|
|||
# 2. Check whether loaded mask contains a valid ROI for feature extraction and get bounding box | |||
boundingBox = imageoperations.checkMask(image, mask, **self.settings) | |||
(boundingBox,correctedMask) = imageoperations.checkMask(image, mask, **self.settings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be boundingBox, correctedMask
or (boundingBox, correctedMask)
(mind the space), otherwise flake8 will fail (as it currently does). parenthesis are redundant.
tests/testUtils.py
Outdated
@@ -133,7 +133,9 @@ class or test case is changed, function returns True. | |||
interpolator, | |||
self._kwargs.get('label', 1), | |||
self._kwargs.get('padDistance', 5)) | |||
bb = imageoperations.checkMask(self._image, self._mask) | |||
(bb,correctedMask) = imageoperations.checkMask(self._image, self._mask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@fedorov, the changes in this PR have to be applied to |
@fedorov, I only just read your comment that you don't have jupyter set up, so I pushed the changes I proposed. If the tests pass, this branch can be merged. |
2c48dd8
to
6679133
Compare
Thank you Joost, and sorry for not making this a complete PR! As much as I would like to spend time writing code, today I first want to finish my slides for this week's meeting. |
@fedorov, no problem, PyRadiomics is a joint effort! |
e887b3e
to
6679133
Compare
This resolves AIM-Harvard#259 In the situation when the mask was corrected to compensate for the differences between the image and mask geometry, the updated mask was not propagated to be used for feature calculation.
Apply style changes to prevent flake8 errors. Apply changes in usage to the respective examples / scripts that make use of the `checkMask` function. Additionally, document the changes this PR makes to PyRadiomics in the changelog.
6679133
to
405f77b
Compare
This resolves #259
In the situation when the mask was corrected to compensate for the differences
between the image and mask geometry, the updated mask was not propagated to be
used for feature calculation.