Skip to content

Commit

Permalink
fix(ImageActorContext): default compare method to cyan-magenta
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHax committed May 29, 2023
1 parent e6fb59a commit ee8bda0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Context/ImageActorContext.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const defaultCompare = {
method: 'disabled', // 'checkerboard', 'cyan-magenta' | 'blend' | 'disabled'
method: 'cyan-magenta', // 'checkerboard', 'cyan-magenta' | 'blend' | 'disabled'
imageMix: 0.5, // changes opaqueness of moving vs fixed image. Value of 1 means max opacity for moving image, 0 for fixed image.
checkerboard: false, // mixes the 2 images in a alternating pattern.
checkerboard: false, // mixes the 2 images with an alternating pattern.
pattern: [4, 4, 4], // when checkerboard, number of "squares" across each dimension
swapImageOrder: false, // when checkerboard, switches moving/fixed image in each square
}
Expand Down Expand Up @@ -130,7 +130,7 @@ class ImageActorContext {
histograms = new Map()

// Option config object for fusing 2 images, i.e. 'checkerboard'. See defaultCompare for object shape.
compare = { method: 'disabled' } // mostly object allows initial update "diff" to detect changes and apply parameters
compare = {} // mostly object allows initial update "diff" to detect changes and apply parameters

// Override default left button mouse interactor to use window width/level interactor
windowLevelEnabled = false
Expand Down
2 changes: 1 addition & 1 deletion src/Rendering/Images/createImageRenderingActor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const getOutputIntensityComponentCount = actorContext => {
image,
compare: { method },
} = actorContext
if (method !== 'disabled') return 2
if (method && method !== 'disabled') return 2
return image.imageType.components
}

Expand Down

0 comments on commit ee8bda0

Please sign in to comment.