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

Feature/flip volume #184

Merged
merged 8 commits into from
May 13, 2024
Merged

Feature/flip volume #184

merged 8 commits into from
May 13, 2024

Conversation

toloudis
Copy link
Contributor

@toloudis toloudis commented May 2, 2024

Estimated time to review: ~15 min ? A lot of code changes but all small.

Allows users to flip (mirror / invert) each of the three x,y,z axes for the volume.

AGAVE 1 6 0 2024-05-02 11-27-13

The internal storage uses -1 for a flipped axis, and 1 for an unflipped one.

The volume sampling shader has to switch its sampling wrap mode to "REPEAT" to make this work.

When adding a new feature like this, we need to make sure the feature is implemented in json save files (serialization), python script output, as well as client/server communication (aka Commands).

In order to make it easier to add new serialized variables, without having to bump versions, I had to upgrade the json library I am using. Disregard changes to json.hpp as it is a third party file.

@toloudis toloudis force-pushed the feature/flip-volume branch from 299f872 to fe215d0 Compare May 6, 2024 15:01
@toloudis toloudis changed the base branch from main to feature/new-tensorstore May 6, 2024 15:02
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can disregard diff in this file as it is a third party include which I updated

@toloudis toloudis marked this pull request as ready for review May 6, 2024 20:25
@toloudis toloudis requested a review from a team as a code owner May 6, 2024 20:25
@toloudis toloudis requested review from meganrm and rugeli and removed request for a team May 6, 2024 20:25
lights,
capture,
showScaleBar)
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(ViewerState,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment why this macro is here and why it usees WITH_DEFAULT

}

void
ImageXYZC::setVolumeAxesFlipped(float x, float y, float z)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this really should be storing ints or booleans

@@ -369,6 +384,34 @@ QAppearanceSettingsWidget::createSkyLightingControls()
return section;
}

void
QAppearanceSettingsWidget::OnFlipX(bool value)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just making a note of my suggestion to change these 3 functions to one that takes in an axis value to reduce the copied code

Copy link

@meganrm meganrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small suggestions came up in our review meeting, but overall seems good

Copy link

@rugeli rugeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Base automatically changed from feature/new-tensorstore to main May 13, 2024 22:59
@toloudis toloudis merged commit 549f5db into main May 13, 2024
8 checks passed
@toloudis toloudis deleted the feature/flip-volume branch May 13, 2024 23:01
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.

3 participants