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 initial 3d support to GUI and Pixel simulator #850

Merged
merged 1 commit into from May 25, 2023

Conversation

lkeegan
Copy link
Member

@lkeegan lkeegan commented Jan 4, 2023

  • Add basic 3d objects (thin wrappers extending previous 2d Qt objects)
    • Voxel: QPoint + z-index
    • VoxelF: QPointF + double for z
    • Volume: QSize + z size
    • VolumeF: QSizeF + double for z
    • ImageStack: vector of QImages, one for each z-slice
  • Replace all (x,y) QImages with (x,y,z) ImageStacks
  • add 3d versions of image utils
    • add VoxelFlattener: 3d equivalent of QPointFlattener
    • add VoxelIndexer: 3d equivalent of QPointIndexer
  • extend Compartment, Membrane, Field to 3d
    • QPoint -> Voxel
    • QImage -> ImageStack
    • QSize -> Volume
    • Compartment
      • add up_z(), dn_z()
      • extend fill missing by dilation to 3d
    • Membrane
      • add iteration of z-pairs to existing x,y-pairs, extend iteration over entire ImageStack
  • import analytic geometry from sbml as 3d ImageStack
  • sme (python bindings)
    • add z dimension to all image arrays
    • update docstrings
    • migrate tests from unittest to pytest
  • Pixel 2d -> 3d
    • Add z term to diffusion
    • Add z to x,y species for spatially-dependent reaction terms
    • resolves Pixel 3d-support #835
  • QLabelMouseTracker
  • MainWindow
    • add z-slider
    • sets z-slice for whole GUI (excluding dialogs)
  • DialogAnalytic, DialogConcentrationImage, DialogGeometryImage
    • QImage -> ImageStack
    • add z-sliders to QLabelMouseTracker
  • add 3d diffusion model to example models
  • add test of simulation of 3d diffusion model
  • mesh generation is disabled for images with more than 1 z-slice
  • ModelGeometry.getPhysicalPoint() now returns location of centre of supplied voxel
  • initModelData now catches runtime_errors and sets an error message to be displayed in GUI
    • ModelSpecies now throws if a species compartment is a membrane instead of segfaulting

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Merging #850 (e99cab4) into main (782cb3c) will increase coverage by 0.14%.
The diff coverage is 91.74%.

❗ Current head e99cab4 differs from pull request most recent head c6c0370. Consider uploading reports for the commit c6c0370 to get more accurate results

@@            Coverage Diff             @@
##             main     #850      +/-   ##
==========================================
+ Coverage   89.73%   89.87%   +0.14%     
==========================================
  Files         135      142       +7     
  Lines       12944    13166     +222     
==========================================
+ Hits        11615    11833     +218     
- Misses       1329     1333       +4     
Flag Coverage Δ
cli 26.08% <27.28%> (-1.34%) ⬇️
core 53.98% <59.21%> (-0.86%) ⬇️
gui 71.20% <72.96%> (-0.15%) ⬇️
mainwindow 42.97% <42.56%> (-0.92%) ⬇️
sme 32.47% <39.06%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
benchmark/bench.hpp 0.00% <0.00%> (ø)
benchmark/benchmark.cpp 0.00% <0.00%> (ø)
core/common/include/sme/utils.hpp 68.00% <ø> (+68.00%) ⬆️
core/common/src/utils.cpp 100.00% <ø> (ø)
core/mesh/src/boundaries_bench.cpp 0.00% <0.00%> (ø)
core/mesh/src/interior_point_bench.cpp 0.00% <0.00%> (ø)
core/mesh/src/line_simplifier_bench.cpp 0.00% <0.00%> (ø)
core/mesh/src/mesh_bench.cpp 0.00% <0.00%> (ø)
core/mesh/src/triangulate_bench.cpp 0.00% <0.00%> (ø)
core/model/include/sme/model.hpp 0.00% <ø> (ø)
... and 52 more

... and 18 files with indirect coverage changes

@lkeegan lkeegan force-pushed the fix_836_z_slider_qlabelmousetracker branch 8 times, most recently from dfc749c to 68e249b Compare January 10, 2023 10:48
@lkeegan lkeegan force-pushed the fix_836_z_slider_qlabelmousetracker branch 5 times, most recently from 47a3a7a to aaf64c4 Compare March 3, 2023 11:12
@lkeegan lkeegan force-pushed the fix_836_z_slider_qlabelmousetracker branch from 18c6b8e to c97ce67 Compare March 9, 2023 15:23
@lkeegan lkeegan force-pushed the fix_836_z_slider_qlabelmousetracker branch from c97ce67 to e99cab4 Compare March 28, 2023 09:35
@lkeegan lkeegan force-pushed the fix_836_z_slider_qlabelmousetracker branch 2 times, most recently from afe26a7 to 5400210 Compare April 28, 2023 12:16
- Add basic 3d objects (thin wrappers extending previous 2d Qt objects)
  - Voxel: QPoint + z-index
  - VoxelF: QPointF + double for z
  - Volume: QSize + z size
  - VolumeF: QSizeF + double for z
  - ImageStack: vector of QImages, one for each z-slice
- Replace all (x,y) QImages with (x,y,z) ImageStacks
- add 3d versions of image utils
  - add VoxelFlattener: 3d equivalent of QPointFlattener
  - add VoxelIndexer: 3d equivalent of QPointIndexer
- extend Compartment, Membrane, Field to 3d
  - QPoint -> Voxel
  - QImage -> ImageStack
  - QSize -> Volume
  - Compartment
    - add up_z(), dn_z()
    - extend fill missing by dilation to 3d
  - Membrane
    - add iteration of z-pairs to existing x,y-pairs, extend iteration over entire ImageStack
- import analytic geometry from sbml as 3d ImageStack
- sme (python bindings)
  - add z dimension to all image arrays
  - update docstrings
  - migrate tests from unittest to pytest
- Pixel 2d -> 3d
  - Add z term to diffusion
  - Add z to x,y species for spatially-dependent reaction terms
  - resolves #835
- QLabelMouseTracker
  - can set the z slice
  - can connect a QSlider to set them
  - resolves #836
- MainWindow
  - add z-slider
  - sets z-slice for whole GUI (excluding dialogs)
- DialogAnalytic, DialogConcentrationImage, DialogGeometryImage
  - QImage -> ImageStack
  - add z-sliders to QLabelMouseTracker
- add 3d diffusion model to example models
- add test of simulation of 3d diffusion model
- mesh generation is disabled for images with more than 1 z-slice
- ModelGeometry.getPhysicalPoint() now returns location of *centre* of supplied voxel
- initModelData now catches runtime_errors and sets an error message to be displayed in GUI
  - ModelSpecies now throws if a species compartment is a membrane instead of segfaulting
@lkeegan lkeegan force-pushed the fix_836_z_slider_qlabelmousetracker branch from 5400210 to c6c0370 Compare May 25, 2023 09:13
@lkeegan lkeegan changed the title WIP 3d support Add initial 3d support to GUI and Pixel simulator May 25, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 41 Code Smells

94.9% 94.9% Coverage
0.0% 0.0% Duplication

@lkeegan lkeegan merged commit 689e066 into main May 25, 2023
18 checks passed
@lkeegan lkeegan deleted the fix_836_z_slider_qlabelmousetracker branch May 25, 2023 10:23
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.

QLabelMouseTracker 3d support Pixel 3d-support
1 participant