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

feat(volume3d): add orientation to volume viewport 3d #482

Merged
merged 4 commits into from
Mar 16, 2023

Conversation

sedghi
Copy link
Member

@sedghi sedghi commented Mar 15, 2023

This will add Orientation to volume viewport 3D

@netlify
Copy link

netlify bot commented Mar 15, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 4b3189b
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/6412309b719d2c00079b9cb9
😎 Deploy Preview https://deploy-preview-482--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sedghi sedghi requested a review from jbocce March 15, 2023 20:27
Copy link
Contributor

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

One comment that we really should consider.


const activeCamera = this.getVtkActiveCamera();

if (parallelProjection != null) {
activeCamera.setParallelProjection(parallelProjection);
}

if (orientation && orientation !== OrientationAxis.ACQUISITION) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually... does it make sense to refactor this code and put it in the BaseVolumeViewport constructor? That is move it there and remove it from here and in VolumeViewport?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps I was not clear... apologies. Why not put the whole if block (i.e. lines 37-40) in the BaseVolumeViewport constructor?

Copy link
Member Author

Choose a reason for hiding this comment

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

because one has a early return but more logic later

@sedghi sedghi requested a review from jbocce March 15, 2023 20:54
Copy link
Contributor

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

Apologies, I just wanted to clarify what I had meant.


const activeCamera = this.getVtkActiveCamera();

if (parallelProjection != null) {
activeCamera.setParallelProjection(parallelProjection);
}

if (orientation && orientation !== OrientationAxis.ACQUISITION) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps I was not clear... apologies. Why not put the whole if block (i.e. lines 37-40) in the BaseVolumeViewport constructor?

Copy link
Contributor

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

Looks good. Approved.

@sedghi sedghi merged commit 55d7f44 into main Mar 16, 2023
@sedghi sedghi deleted the feat/viewport-3d-orientation branch August 2, 2023 20:33
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.

2 participants