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

enhanced gui functionality #108

Closed
wants to merge 23 commits into from
Closed

Conversation

SimonSegert
Copy link
Contributor

Added:

  • spin boxes to allow user to change bounds of visible window in slice diagram, while updating persistence diagram accordingly (bottom left corner of pd corresponds to bottom control dot, and length of sides of pd corresponds to length of main diagonal of visible window in slice diagram)

  • "-inf<" strip along left side of persistence diagram to display deaths of barcodes whose births occur to the left of the current window

  • three additional counters corresponding to: (1) barcodes which die too early to appear in the diagram, (2) essential and (3) nonessential barcodes which span the entire length of the persistence diagram

  • two default window options in drop down menu (original view, and minimal view containing betti number supports)

  • option to restore line to center of window if it goes out of bounds

  • light gray box in viewing window circumscribing original view

Changed:

  • internal scale of persistence diagram does not depend on size of application window. Previously, changing the size of this window could cause some dots to run off the diagram

allow user to adjust window bounds, restore default windows, show box around original window, keep line in visible window
used clang-format -i **/*.cpp **/*.h
@mlwright84 mlwright84 self-assigned this Feb 5, 2018
negative filtration values now appear correctly; changing window now does not query arrangement
arranged controls in 2x2 grid so slice diagram is closer in size to persistence diagram
line can't be dragged out of bounds, line doesn't appear until augmented arrangement is ready, labels aren't covered by rectangles, labels changed to numbers
enalrged default window size, add white boxes around axis labels
fix bug with bottom left counter in pd
@mlwright84
Copy link
Contributor

mlwright84 commented Feb 27, 2018

Simon, thanks for your work on this! It looks very good overall.

However, starting with commit 5c4c3db, the viewer crashes (with a segmentation fault) as soon as it appears on the screen. The cause seems to be the following delete statements in SliceDiagram::redraw_labels()

delete rect1;
delete rect2;
...
delete rect6;

It seems that rect1, ..., rect6 are null pointers when they are deleted, and this causes a crash (on some systems, but evidently not on yours or Mike's). Could we edit the code to remove these delete statements? For example, could we simply move the rectangles without deleting them?

@SimonSegert
Copy link
Contributor Author

SimonSegert commented Feb 27, 2018 via email

@mlwright84
Copy link
Contributor

Simon, your change fixed the issue on my machine. However, I think that a more efficient solution would avoid the new and delete commands in redraw_labels(). This should be possible by using functions such as:

  • Resize rectangles with QGraphicsRectItem::setRect()
  • Move rectangles/text with QGraphicsItem::SetPos()
  • Ensure that rectangles/text stay on top of the other visualization elements with QGraphicsItem::setZValue()

Could we try this approach?

@SimonSegert
Copy link
Contributor Author

SimonSegert commented Feb 27, 2018 via email

@SimonSegert
Copy link
Contributor Author

SimonSegert commented Feb 28, 2018 via email

SimonSegert and others added 7 commits March 13, 2018 13:12
Fix drifting of top dot while bottom is being moved (and vice versa), line becoming detached from dots. Cosmetic changes to persistence diagram.
Remove division of bottom controls into two groups so that default sizes of the two windows are more balanced
translate entire diagram so there are equal amounts of whitespace above/below and left/right
…l panel sizing

Left labels no longer get cut off in initial view. Also on bottom control panel, slice diagram controls are now a fixed size and allowed to "bleed over" when window is made smaller
@xoltar
Copy link
Contributor

xoltar commented Apr 27, 2018

Hi @SimonSegert could you please rebase this onto current master to address the conflicts & then I'll review? Sorry for the delay, I didn't get any notification from github that Matthew had requested me to review it.

Thanks!

@SimonSegert
Copy link
Contributor Author

Hi @xoltar this pull request is no longer up to date. I will close it, and soon will open up another request on another branch. Sorry for the confusion!

@SimonSegert SimonSegert closed this May 1, 2018
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

Successfully merging this pull request may close these issues.

4 participants