Page MenuHomePhabricator | MITK

Deprecate QmitkPlotWidget
Open, NormalPublic

Description

MitkChartWidget was developed to display charts in MITK.
It's not suitable to have two widgets doing the same in MITK. Insert deprecation macro in QmitkPlotWidget and lead to QmitkChartWidget

Related Objects

StatusAssignedTask
OpenNone
Resolvedhempe
Invalidhempe
Resolvedhentsch
Duplicatehentsch
OpenNone
OpenNone
Resolvedkleina
Resolvedhempe
Resolvedhempe
Resolvedhentsch
Resolvedkleina
Resolvedkleina
Resolvedhentsch
Resolvedkleina
Resolvedhentsch
Resolvedkleina
Resolvedhentsch
Resolvedsteint
OpenNone
OpenNone
OpenNone
OpenNone
Resolvedhentsch
Resolvedhentsch
ResolvedNone
ResolvedNone
Resolvedhentsch
Resolvedhentsch
Resolvedhentsch
ResolvedNone
OpenNone
OpenNone
Resolvedhentsch
Resolvedkraeuter
Resolvedkraeuter
Resolvedhentsch

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
hentsch added a project: Restricted Project.Aug 30 2017, 3:09 PM
hentsch updated the task description. (Show Details)Sep 11 2017, 10:11 AM
hentsch updated the task description. (Show Details)Sep 14 2017, 9:42 AM

@kislinsk can we deprecate QmitkPlotWidget although with mitkChart, we cannot replace all functionality (e.g. errorBars T23384)?

@hentsch at least for CEST showing error bars was one of the requirements. So no.

floca added a subscriber: floca.

Having no possibilities for error bars / variance indicator / or what so ever (T23384) is a real show stopper for getting everything using MITKChart. I know several (reasonable) requests for plotting some kind of range/error in line plots (see e.g. CEST, Perfusion, ...).

I think on mid term we have find a solution, either getting it run with C3 or skipping C3 (or even D3) and use some thing else (e.g. plotly.js; see https://blog.sicara.com/compare-best-javascript-chart-libraries-2017-89fbe8cb112d).

hentsch added a subscriber: kleina.Sep 4 2018, 9:35 AM

@kleina we could do an analysis if skipping C3js is an option (plotly.js seems to have everything we need).

We just took a look at plotly.js. In contrast to C3, it supports error-bars and is still under development (see guithub stats).
To use plotly.js with MITK chart we think, that no fundamental changes on C++ side are necessary. Just the JS stuff needs to be rewritten.

Easy example:

<p>
    Here's a simple Plotly plot - 
    <a href="http://bit.ly/1Or9igj">plotly.js documentation</a>
</p>

<head>
  <!-- Plotly.js -->
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>

<!-- Plots go in blank <div> elements. 
    You can size them in the plot layout,
    or give the div a size as shown here.
-->
<div id="tester" style="width:600px;height:250px;"></div>
TESTER = document.getElementById('tester');

Plotly.plot( TESTER, [{
    x: [1, 2, 3, 4, 5],
    y: [1, 2, 4, 8, 16],
    type:'bar',
    error_y: {
      type: 'data',
      array: [1, 1, 1, 1, 5],
      visible: true
    },
    }], { 
    margin: { t: 0 } } );

/* Current Plotly.js version */
console.log( Plotly.BUILD );
floca added a comment.Sep 14 2018, 2:09 PM

Thanks. So It would be greate to make a test ballon task for another CD to switch from D3 to plotly.js? Wouldn't it?

I created a subtask. We'll look into this.

hentsch added a subtask: Restricted Maniphest Task.Jan 18 2019, 11:21 AM
steint added a subtask: Restricted Maniphest Task.Jan 18 2019, 11:31 AM
steint closed subtask Restricted Maniphest Task as Resolved.Jan 21 2019, 1:23 PM
jungsi closed subtask Restricted Maniphest Task as Resolved.Feb 1 2019, 3:10 PM
steint added a subtask: Restricted Maniphest Task.Feb 15 2019, 10:32 AM

deprecation leads to errors in GCC

first, we have to migrate the existing plots to MitkChart (T23385, T23386, T25832), then we can set the whole class deprecated

floca added a comment.May 2 2019, 1:28 PM

@hentsch / @kislinsk : Shouldn't we already set QmitkPlotDialog/QmitkPlotWidget/QtHistogram to deprecated then. To give us sooner then later the posibilite to realy remove the code from the codebase. If I see it correctly, that would also gives us the possibility to reomive Qwt as a third party package from MITK. What do you think?

This would be favorable. However, if we deprecate the QmitkPlotDialog/QmitkPlotWidget/QtHistogram classes, this leads to warnings (and errors because of warnings-as-errors).
@kislinsk do you see a possibility?