Skip to content

Link Window/Level across views in MPR mode #558

Description

@swederik

This is easy enough to do by adding an onModified hook to the volume's volumeProperty RGB Transfer Function that calls renderWindow.render() in any other viewports that the volume is displayed in. I had this implemented but I didn't have a good way to remove the onModified handler when the viewports were destroyed.

/*const rgbTransferFunction = apiByViewport[0].volumes[0]
.getProperty()
.getRGBTransferFunction(0);
rgbTransferFunction.onModified(() => {
apiByViewport.forEach(a => {
const renderWindow = a.genericRenderWindow.getRenderWindow();
renderWindow.render();
});
});*/

This means that whenever I switched back to 2d, then back to 3d, I would end up with duplicate handlers. For now I disabled the feature, and so windowing happens in one viewport (and updates on the next render in the others, which is pretty awkward).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions