-
Notifications
You must be signed in to change notification settings - Fork 146
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
Update egs_view layout #427
Conversation
No comments other than thank you and please hurry completing this PR! The load/reload fixes and save/load configurations will be great. |
It's functional if you want to start using it (and you have Qt) - I'm just thinking about adding more features :) |
Looks great, the saving feature will be really good! I guess the options to align with either the x,y, or z axes is still there (probably hidden in the camera tab)? One thought, and I am not sure how many people would find it useful, but maybe it would be possible to have a scale along the axes or else where as an option? |
Thanks Victor! Yes I'm thinking about ways to add a grid or measurement tools. |
Amazing job Reid! It was badly needed! |
Commit 1598570 fixed the OS X layout, some other issues and added region visibility. I tried to get window resizing to work but it is tricky - no luck yet. |
df15944
to
557058c
Compare
Hey Reid, the changes look awesome. Would it be possible to put in an option to select the number of particle tracks that you want to be displayed. I know that sometimes I may be viewing tracks and there could just be an overwhelming amount of photons (I still want to be able to see some) and very few electrons. Just a thought. Also, I guess it won't be an issue if there are thousand of regions for the regions tab? |
Things are looking really good, @rtownson ! @victorMalkov The regions tab gets greyed out when there are too many regions. I don't know how many is too many, though! |
@rtownson On Linux with gcc 4.4.7, the following header is required in
Also, older versions of Qt4 (< 4.7 or so) throw the following during compilation:
I think the best solution is for the user to upgrade their version of Qt... which I'm trying right now. I'll report back if I get more errors after upgrading. |
Disregard the 'Monospace' error. I was mis-matching Qt versions by mistake. |
Actually.... it turns out I was correct the first time: the 'Monospace' StyleHint is not available from QFont in Qt 4.6. But it's there in 4.7 and 4.8. At least, it is now documented here! |
Have you tested on Qt4? The buttons (load, save, etc.) don't show up for me, but I'm on Qt4.6 (RedHat Enterprise Linux 6.4, so all the dev tools are a little dated...). |
@mchamberland I haven't updated the screenshots but now those buttons are in the new |
@rtownson I totally missed the File menu. Yep, that works. Thanks! |
77aed18
to
512e5e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
512e5e5
to
63c5040
Compare
Very very nice, @rtownson! Love being able to see the dose results. I know it wouldn't add anything quantitative, but might a future version have an option to display isodose lines as well? |
@blakewalters I hope to add isodose lines in the future, just haven't put the time into it yet. |
Add the ability to save and load egs_view configurations, including material colors, clipping planes, view orientation, etc. The configuration file can be passed as an argument or loaded in the gui. Change the layout of the viewer to hide away options that are not used as often. Tabs have been added to support further development.
Add a new tab to egs_view to show or hide specific regions in the viewer. The tab is disabled for geometries with >1000 regions for performance reasons. Fix the gui display settings to look the same on macOS and Windows.
Add a new tab in egs_view to control various display colors. Also remove the 'other' particle type controls since it does nothing. Change the file opening dialogs to default to the same directory as the input file.
Add control of the vacuum color and transparency in egs_view. Previously the vacuum regions were always transparent, but now they can be shown.
Add hit coordinate display when the user left clicks on a surface. Add a double click function to set the rotation point to the first hit on the surface. Add zoom scaling to follow a power function at small distances. Also fix a couple minor compiler warnings.
Add camera position controls, and enforce the rotation point to be inside the geometry. Add additional hunting for an initial point inside the geometry so that geometries far from the origin still have a chance of being found. Fix a bug where the axis flipped direction when the geometry was not near the origin. Improve the region list display and the scaling that occurs with window resizing. Fix the clearGeometries() function in egs_base_geometry so that it removes composite geometries properly. This fixes a crash that occurred when reloading inputs. Add a QT version check before requesting a monospace font style hint.
Add the feature to load dose distributions in egs_view. Currently only 3ddose files are supported. In the input file, use an egs_dose_scoring ausgab object to output the dose file. Then egs_view reads in any dose files referred to in the ausgab objects. This required adding a new function to egs_dose_scoring to get the dose filename. For speed, dose distributions are loaded as unordered_maps. This requires c++11, so that has been added as a compile flag in view.pro. Fix the geometry memory cleanup routines in egs_base_geometry.cpp. The reloading functionality in egs_view is now more robust. Add font size, window positions and window sizes to the settings file.
Add the ability to change the simulation geometry being viewed within egs_view. Also add track range selection. To do this it was necessary to add two new functions in egs_base_geometry to get the geometry list and the number of geometries in it. Fix some memory leaks.
63c5040
to
560cd86
Compare
Fix memory leaks that lead to crashes in Windows when loading tracks in egs_view. These bugs were added in PR #427.
Fix memory leaks that lead to crashes in Windows when loading tracks in egs_view. These bugs were added in #427.
Fix memory leaks that lead to crashes in Windows when loading tracks in egs_view. These bugs were added in #427.
New egs_view layout, settings file, dose viewing and more..
egs_view
. This includes saving the current look orientation, window size, track options, clipping planes, etc. You can load the config file from the GUI, or pass it as an argument (with or without ptracks file argument). E.g.egs_view myInput.egsinp myInput.egsview
Fixed various segmentation faults that occurred when reloading files. This includes a fix to clearGeometries() in egs_base_geometry so that composite geometries actually get cleaned up. Added an option to load a new input file.
Changed the layout - now there are tabs to divide sections, and the more commonly used options are together. Also, clipping planes are more intuitive! The key-bindings can be found in the
Camera
tab, and there might be some there you didn't know about (plus a newdouble click
functionality).Zooming has been modified - at higher zoom levels it switches to scaling with a power-law to slow it down (let me know if you don't like it and I could make it optional).
Added region-by-region visibility, but only for geometries with <=1000 regions (for performance). Added color controls in the
Color
tab of backgrounds, tracks, etc. Also, you can now control the display of vacuum regions.The coordinate on the first surface hit by your mouse is now displayed in the viewer when region display is turned on.
Fixed a number of display bugs, like the axis flipping direction when the geometry was not near the origin. Added more hunting for an initial point inside the geometry so that it's less likely to crash when not near the origin or windowed properly.
Added dose viewing (3ddose files). Replace
dosxyz_show
by loading the egsphant in an XYZ geometry and including an ausgab object for dose scoring that points to your 3ddose file. You can use any XYZ geometry. For speed, the dose is stored in an unordered_map, which requiresc++11
, so this was added as a compile flag since qt4 doesn't enable that compatibility by default. 3ddose example for egsphant files:Added the ability to select the geometry that is being viewed. This includes geometries that are automatically generated, likes planes for an ND geometry, which may have no visual representation but allow for region analysis.
Added track range selection.