Watermark feature

@jcfr @pieper @lassoan.

We finished our first SlicerMorph workshop and our trainees pretty much feel in love with Slicer and its capabilities (check out https://twitter.com/SlicerMorph/status/1168022612313686016 for some visualizations). We got four more to go, and I am hoping Slicer will have even large following within the biosciences community. Even the alpha version of SlicerAnimator liked quite a bit.

Anyways, I thought it would be cool to display an optional small watermark in the volume rendering window that will essentially show the nice sticker Kitware designed (from this thread Feedback on Slicer Sticker design).

I am sure a lot of them would proudly display, if it is only a single click to enable it. I would.

4 Likes

(First - thanks for posting the images from the workshop - glad it went well!)

A watermark is a great idea. There’s actually a vtkLogoWidget that was added to support exactly this use case in Slicer (search for ‘watermark’ on this page) but we never ended up enabling it for whatever reason.

Anyway, if you want to try it out here’s a snippet that works in any recent slicer. I’m sure we can improve the esthetics.

import os

logoURL = 'https://www.slicer.org/w/images/7/71/3DSlicerLogo-DesktopIcon-128x128.png'
pngPath = os.path.join(slicer.app.temporaryPath, "SlicerLogo.png")
slicer.util.downloadFile(logoURL, pngPath)

reader = vtk.vtkPNGReader()
reader.SetFileName(pngPath)
reader.Update()

logoRepresentation = vtk.vtkLogoRepresentation()
logoRepresentation.SetImage(reader.GetOutput())
logoRepresentation.SetPosition(0,0)
logoRepresentation.SetPosition2(.2, .2)
logoRepresentation.GetImageProperty().SetOpacity(.7)

logoWidget = vtk.vtkLogoWidget()
renderWindow = slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow()
logoWidget.SetInteractor(renderWindow.GetInteractor())
logoWidget.SetRepresentation(logoRepresentation)

logoWidget.On()
renderWindow.Render()

1 Like

I’ve added watermark option to Screen Capture module (in Advanced section):

image

Example watermark with opacity = 100%:

image

Example watermark with opacity = 40%:

The feature will be available in Preview Release rev28477.

3 Likes

thanks @lassoan !!!