-
Notifications
You must be signed in to change notification settings - Fork 334
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
Conversation
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
One comment that we really should consider.
|
||
const activeCamera = this.getVtkActiveCamera(); | ||
|
||
if (parallelProjection != null) { | ||
activeCamera.setParallelProjection(parallelProjection); | ||
} | ||
|
||
if (orientation && orientation !== OrientationAxis.ACQUISITION) { |
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.
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
?
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.
sure
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.
Perhaps I was not clear... apologies. Why not put the whole if
block (i.e. lines 37-40) in the BaseVolumeViewport
constructor
?
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.
because one has a early return but more logic later
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.
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) { |
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.
Perhaps I was not clear... apologies. Why not put the whole if
block (i.e. lines 37-40) in the BaseVolumeViewport
constructor
?
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.
Looks good. Approved.
This will add
Orientation
to volume viewport 3D