Skip to content

Commit

Permalink
fix(refui-applyColorMap): check for null in compare image case
Browse files Browse the repository at this point in the history
First call to applyColorMap in compare image case
gives fusedImage with null scalar values.
  • Loading branch information
PaulHax committed Feb 6, 2024
1 parent 3622a93 commit 60f4138
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/UI/reference-ui/dist/referenceUIMachineOptions.js
Expand Up @@ -26877,7 +26877,11 @@ function applyColorMap(context, _ref) {
colorTransferFunction
)
}
if (actorContext.fusedImage) {
if (
actorContext.fusedImage &&
// When comparing images, getScalars is null first time
actorContext.fusedImage.getPointData().getScalars()
) {
var range = actorContext.fusedImage
.getPointData()
.getScalars()
Expand Down
6 changes: 5 additions & 1 deletion src/UI/reference-ui/src/Images/applyColorMap.js
Expand Up @@ -13,7 +13,11 @@ function applyColorMap(context, { data: { component, name } }) {
colorTransferFunction
)
}
if (actorContext.fusedImage) {
if (
actorContext.fusedImage &&
// When comparing images, getScalars is null first time
actorContext.fusedImage.getPointData().getScalars()
) {
const range = actorContext.fusedImage
.getPointData()
.getScalars()
Expand Down

0 comments on commit 60f4138

Please sign in to comment.