-
Notifications
You must be signed in to change notification settings - Fork 182
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
New function for Slice plotting added. Bug fixing in iso lines plotter. #818
base: dev
Are you sure you want to change the base?
Conversation
The new function Plot Slice allows to plot a single dose slice in a flexible way: ct and dose cube are the only required parameters, but other optional, e.g. colorbar, legend, iso dose lines, line and text properties, can be specified. The bug fixing ensures that a 2D quantity is correctly called within the function.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #818 +/- ##
==========================================
- Coverage 52.40% 50.72% -1.68%
==========================================
Files 612 614 +2
Lines 38702 39074 +372
==========================================
- Hits 20282 19822 -460
- Misses 18420 19252 +832 ☔ View full report in Codecov by Sentry. |
Let's change the function in the following way:
Then please create some tests for calling the function. You can use one of the tiny test data sets to have all strutctures (ct, cst, resultGUI) available. |
Ct is the only required parameter. Dose cube is optional. Option for plotting the ct added.
… dose an optional variable. plotSliceWrapper modified to deprecated function and calling plotSlice instead.
@@ -63,6 +63,8 @@ | |||
% | |||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |||
|
|||
warning('Deprecation warning: matRad_plotSliceWrapper is deprecated. Using matRad_plot_Slice instead'); |
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.
we have a dedicated matRad_cfg.dispDeprecationWarning(...)
for this
@@ -101,6 +103,11 @@ | |||
|
|||
matRad_cfg = MatRad_Config.instance(); | |||
|
|||
warning('Deprecation warning: matRad_plotSliceWrapper is deprecated. Using matRad_plot_Slice instead'); |
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.
see above
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.
You can remove the commented code. We don't need it anymore.
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.
Did this cause issues before?
% | ||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
defaultDose = []; |
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.
Maybe leave a comment here before the argument handling.
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.
Looks nice. I guess by calling matRad_plotSlice from the old matRad_plotSliceWrapper you also cover most of the file with tests now due to the examples.
You would just need to add a few tests for, e.g., leaving out certain arguments.
The matRad_plotSlice function allows to plot one dose slice in a flexible way: ct and dose cube are the only required parameters, while other optional parameters, e.g. cts, colorbar, iso lines, contours, line and text properties, etc., can be specified in the Name-Value pair format. The changes in the iso lines plotter ensure that 2D matrices are correctly passed to the function.