cutright / DVH-Analytics

A DICOM Database Application for Radiation Oncology
Other
82 stars 30 forks source link

DVH Line Width and Line Dash require restart to update #86

Closed cutright closed 4 years ago

cutright commented 4 years ago

The line_width and line_dash for ROI specific DVHs (i.e., dvhs_renderer) appear to not be editable after initialization. I've only observed this in Bokeh 1.4... will have to look into what's involved to finally move up to >=2.0, but 2.0 crashed DVHA and I didn't have time to figure out why. Posted an issue on the bokeh discourse page here. Bryan said my code appears to be OK as is, so it might be a Bokeh bug.

This issue posted as of DVHA v0.8.2.

https://github.com/cutright/DVH-Analytics/blob/d3de1ade6554927ae56450217057716d2f927c01/dvha/models/plot.py#L510-L529

cutright commented 4 years ago

I needed to edit selection_glyph and nonselection_glyph with something like:

for glyph_type in ['glyph', 'selection_glyph', 'nonselection_glyph']:
    glyph = getattr(self.dvhs_renderer, glyph_type)
    glyph.line_width = self.options.DVH_LINE_WIDTH
    glyph.line_dash = self.options.DVH_LINE_DASH
cutright commented 4 years ago

Fixed for DVHA v0.8.3. Will push to master this week.

Bonus: you can change the visuals for both selected and non-selected DVHs. Look for options that end with Selection or Nonselection in Preferences/Settings.

Unfortunately, I don't know how to maintain your currently selected DVHs between applying options since I'm working with static webpages, can't use bokeh server with this set-up/environment, and I don't know how to extract data from the javascript session. So your selected DVHs always clear after applying visuals. But this is a pretty minor nuisance.

Messages Image(3783602189)
cutright commented 3 years ago

Just an update about Bokeh >=2.0: I just tried Bokeh 2.2.3 on macOS and had no issues and no changes to DVHA source code, however no graphs were displayed on MSW7. I believe that's due to Bokeh dropping IE support.