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

Changes to RegressionVisualization 3D view and volume plot #6

Open
jamesfishbaugh opened this issue Aug 29, 2018 · 10 comments
Open

Changes to RegressionVisualization 3D view and volume plot #6

jamesfishbaugh opened this issue Aug 29, 2018 · 10 comments

Comments

@jamesfishbaugh
Copy link
Contributor

I would like to request some small changes to the 3D view and volume plot:

  • When the sequence is created and first displayed, center and zoom in on the shape
  • Plot the regression volume as a solid line
  • Change the default location of the legend, top-middle or bottom-middle preferably so as not to obstruct data
  • Optional: Have the legend be draggable to any location in the plot
@phcerdan
Copy link
Collaborator

Also, the plotting in RegressionVisualization requires a CSV input file, and does not seem to be using the input already provided.

Do we require this CSV file for plotting or can we reuse the already provided folder, or use the generated Sequence?
Options:
a) Work with the Sequence node that is generated in the Shape Regression Inputs
b) Or create a RegressionPlot module, with its own input requirements

What do you think?

@jamesfishbaugh
Copy link
Contributor Author

@phcredan the sequence is only a series of vtk shapes. The CSV file contains the rest of the information needed to make the graph, namely the volume of the shape observations, and the time interval of the sequence. The interface for "Regression's Input Shapes" can be improved to make this much more clear.

For your ideas, I prefer to keep the sequence and volume plot together in the same modules, as the volume plot is very helpful for assessing model fit. What I have added in a recent update is to auto populate the CSV file, since the CSV file will have a known name and will be in the same directory as the one the user chose for the input directory. This way, a user can create the sequence, and then just click plot.

@phcerdan
Copy link
Collaborator

Sounds good @jamesfishbaugh, could you provide one of those folders with the csv + vtk shapes? I would like to test the plot to help with this issue.

@jamesfishbaugh
Copy link
Contributor Author

@phcerdan sure, here is a folder with the input shapes, and an output folder with the sequence and the CSV file. You will have to edit the CSV to modify the paths for your system.

regression_example.zip

@phcerdan
Copy link
Collaborator

phcerdan commented Aug 30, 2018

Thanks @jamesfishbaugh, I got this:

regvisplot

Does it look similar to what you get?

Plot the regression volume as a solid line

Aren't the two lines already too similar?

Change the default location of the legend, top-middle or bottom-middle preferably so as not to obstruct data

I agree, will have a look

@jamesfishbaugh
Copy link
Contributor Author

jamesfishbaugh commented Sep 4, 2018

@phcerdan There are a couple of issues with the plot, they are very simple:

  • For some reason, the two series are using their indices for the x-axis, rather than the actual time point (1.1 to 6.1 in this case). I have verified the vtkTables are getting the right float values, so for the life of me I can't figure out why it is plotting integer indices.
  • I would like 'Shape Input' series plotted with just dots (no line connecting). Again, this should be simple but my calls to SetPlotType do not have the desired effect.
  • The 'Shape Regression' series should be plotted only as a line, there is no need to see the dots which only denote the sampling.

Could you look into this?

@phcerdan
Copy link
Collaborator

phcerdan commented Sep 4, 2018

Yeah, I will put this in my todo list, will find time soon. Thanks for the details.

@jamesfishbaugh
Copy link
Contributor Author

@phcerdan thanks. I was actually able to fix the styling, the only thing left is the proper x-axis values:

  • For some reason, the two series are using their indices for the x-axis, rather than the actual time point (1.1 to 6.1 in this case). I have verified the vtkTables are getting the right float values, so for the life of me I can't figure out why it is plotting integer indices.
  • I would like 'Shape Input' series plotted with just dots (no line connecting). Again, this should be simple but my calls to SetPlotType do not have the desired effect.
  • The 'Shape Regression' series should be plotted only as a line, there is no need to see the dots which only denote the sampling.

@jamesfishbaugh
Copy link
Contributor Author

@phcerdan I believe the issue with the plot stems from a bug in the chart. If I change the plot type to 'Scatter', the data is plotted correctly. Do you know where to report this issue?

@phcerdan
Copy link
Collaborator

phcerdan commented Sep 6, 2018

Cool, opening an issue in https://discourse.slicer.org/c/dev might help, expose the problem and the differences between the two types. Maybe, who knows, is not a bug, but a feature :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants