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

Add a web browser dose viewer gui to EGSnrc #630

Draft
wants to merge 200 commits into
base: develop
Choose a base branch
from

Conversation

ellieb
Copy link

@ellieb ellieb commented Aug 31, 2020

Add the web browser-based .egsphant, .3ddose, and DICOM file viewer. This project is a WIP, but the idea is to have an online resource for users to upload and view their own .egsphant and .3ddose files. There are many TODOs throughout the code that need to be addressed, but some of the major tasks include:

  • Organize and restructure the code to be cleaner and more inline with web standards
  • Add tests
  • Do a visual cleanup of the site, making it more user friendly
  • Allow for multiple volume viewers to be functional at once
  • Turn the window and slider bars into a double range slider on the density legend
  • Fix the bug where the panel marker moves if changing a slice after zoom

@ftessier ftessier self-assigned this Sep 1, 2020
@ftessier ftessier added this to the Release 2021 milestone Sep 1, 2020
@ftessier ftessier marked this pull request as draft September 1, 2020 11:32
@ftessier ftessier force-pushed the feature-dose-viewer branch from a27fcf6 to df5fd37 Compare September 2, 2020 15:10
@ftessier
Copy link
Member

ftessier commented Sep 2, 2020

Rebased @ellieb's branch on the EGSnrc repo develop branch. Moved the code to HEN_HOUSE/gui/dose-viewer

@rtownson
Copy link
Collaborator

rtownson commented Sep 3, 2020

@ftessier should we instead be adding this code to the gh-pages branch? If I want to link from gh-pages to the dose viewer I will have to move a copy of the code there anyways, so there would be duplication.

@ftessier
Copy link
Member

ftessier commented Sep 4, 2020

Nope, we want the code to be in the repository for source control; We don't want to duplicate source management, pull requests, etc., on an orphan branch; even though as you said this implies that we duplicate code to the gh-pages. We can however create a new branch off of gh-pages, were we can cherry-pick the dose-viewer commits as they are added, so as to not have to manually copy files over everytime. If you put the code on gh-pages, for the moment I would leave it in a "hidden" folder (not linked on the web page), but accessible by url, until we test it a little...

@ftessier
Copy link
Member

ftessier commented Sep 8, 2020

@rtownson I take that back, I see now that we could maintain the web dose viewer code on the orphan gh-pages branch, and create the pull requests against that branch witout issue. However, I still prefer to leave it attached to the main trunk, I feel like it belongs there as part of the code proper, and if the dose viewer development ever requires changes to other parts of the code (say, the DOSXYZnrc output format), then it becomes tricky to synchronize the two disjointed branches. I would also like for users to be able to clone the repo and fire up the viewer on their local machine, right away. There are probably services to host a webpage from a github repo directory... I will look into it!

@ftessier
Copy link
Member

ftessier commented Sep 8, 2020

Ok, well it seems that hosting with github pages remains the best option here. We can also now host a separate repo for egsnrc.github.io (instead of a separate branch), which may prove useful in terms of filtering out old pdfs (or maybe not filtering them out!), and building a more complex site hosting the viewer etc. We could then create pull requests against that repo from the EGSnrc one; anyways, let's continue to think about this.

@ftessier
Copy link
Member

ftessier commented Sep 8, 2020

@ellieb I am considering using JS standard (https://standardjs.com/) to lint and format the .js files in your pull request
to format the code consistently, beyond personnal coding style. This avoids style divergence and meaningless diffs in the long run, especially as other people with different preferences start changing the code. We do this on C and C++ files with astyle for example. JS Standard seems to be the simplest option out there right now: once installed via npm, just issue standard to check all .js files in the directory.

I ran it in the dose-viewer directory, and although there are 2340 suggestions, the vast majority are simply Strings must use singlequote. and Extra semicolon. "errors", which can be fixed automatically by standard. I just want to check that you are fine with this?

@ftessier
Copy link
Member

ftessier commented Sep 8, 2020

@ellieb There are only 41 remaining linting instances that seem to require some attention... At any rate, I will look into those after cleaning and squashing the branch, an consult with you at that point on the remaining issues noted by standard.

@ftessier
Copy link
Member

ftessier commented Sep 8, 2020

And I suggest we use prettier to lint html code (https://prettier.io/). Other suggestions welcome!

@ftessier ftessier added the work in progress Work in progress, don't merge yet label Sep 9, 2020
@ftessier ftessier changed the title [WIP] Add the web browser dose viewer to the EGSnrc code base Add the web browser dose viewer to the EGSnrc code base Sep 9, 2020
@ftessier ftessier modified the milestones: Release 2022, Release 2023 Jun 27, 2022
@rtownson rtownson modified the milestones: Release 2024, Release 2025 Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement work in progress Work in progress, don't merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants