Skip to content

Commit f3103cf

Browse files
committed
ENH: add support for cyan-magenta and blend compare methods
Add cell showing cyan-magenta to ThinPlateSpline notebook.
1 parent aed38fc commit f3103cf

File tree

2 files changed

+133
-11
lines changed

2 files changed

+133
-11
lines changed

examples/integrations/itk/ThinPlateSpline.ipynb

Lines changed: 131 additions & 9 deletions
Large diffs are not rendered by default.

itkwidgets/viewer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def set_image_volume_sample_distance(self, distance: float):
275275
def set_image_volume_scattering_blend(self, scattering_blend: float):
276276
self.queue_request('setImageVolumeScatteringBlend', scattering_blend)
277277

278-
def compare_images(self, fixed_image: Union[str, Image], moving_image: Union[str, Image], method: str = 'checkerboard', pattern: Tuple[int, int, int] = [4, 4, 4], swap_image_order: bool = False):
278+
def compare_images(self, fixed_image: Union[str, Image], moving_image: Union[str, Image], method: str = 'checkerboard', pattern: Tuple[int, int, int] = [4, 4, 4], swap_image_order: bool = False, image_mix: float = .5):
279279
# image args may be image name or image object
280280
fixed_name = 'Fixed'
281281
if isinstance(fixed_image, str):
@@ -287,7 +287,7 @@ def compare_images(self, fixed_image: Union[str, Image], moving_image: Union[str
287287
moving_name = moving_image
288288
else:
289289
self.set_image(moving_image, moving_name)
290-
options = { 'method': method, 'pattern': pattern, 'swapImageOrder': swap_image_order }
290+
options = { 'method': method, 'pattern': pattern, 'swapImageOrder': swap_image_order, 'imageMix': image_mix }
291291
self.queue_request('compareImages', fixed_name, moving_name, options)
292292

293293
def set_label_image(self, label_image: Image):

0 commit comments

Comments
 (0)