-
Notifications
You must be signed in to change notification settings - Fork 456
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/stackImagePositionSynchronizer does not crash if no position found #246
Feature/stackImagePositionSynchronizer does not crash if no position found #246
Conversation
fusionRenderer does not crash if the layer is destroyed while rendering (#245)
Merge chafey/master
LengthTool now uses PixelSpacing provided by MetaDataProvider, thanks…
Merge chafey/Master
Merge chafey/master
…r_does_not_crash_if_no_position_found # Conflicts: # src/synchronization/stackImagePositionSynchronizer.js
|
||
const stackToolDataSource = getToolState(targetElement, 'stack'); | ||
const stackData = stackToolDataSource.data[0]; | ||
|
||
let minDistance = Number.MAX_VALUE; | ||
let newImageIdIndex = -1; | ||
let nbComparedPositions = 0; |
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.
I guess this is a remnant of testing? If you remove nbComparedPositions I think we can merge this PR
sourceImagePosition = convertToVector3(sourceImagePlane.imagePositionPatient); | ||
} | ||
|
||
if (sourceImagePosition === undefined) { |
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.
I just realized there is no way this condition can happen. convertToVector3 doesn't have any way to return undefined. I guess it's better to move this If statement above the other one and check if sourceImagePlane.imagePositionPatient is undefined.
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.
Done !
That looks better! Thanks! |
No description provided.