View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003885 | Slicer4 | Core: GUI | public | 2014-11-06 09:32 | 2017-09-27 14:44 |
Reporter | nicole | Assigned To | nicole | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | assigned | Resolution | open | ||
Product Version | |||||
Target Version | backlog | Fixed in Version | |||
Summary | 0003885: Update qMRMLScreenShotDialog to support high-resolution magnified screenshot | ||||
Description | The snapshot image scale slider was added in a previous version of Silcer when we were using VTK calls to capture the window and could do an offscreen buffer rendering at a higher resolution. Slicer 4.4 uses QPixmap().grabWidget and ctk::grabVTKWidget and neither offer a scaling option. We're currently scaling the captured image of the widget using QImage scale after the fact. This seems equivalent to what a user would do if they needed larger images. | ||||
Additional Information | The current code in the scripted module template isn't doing the scaling step. The self test image scale slider value is just being passed through in the creation of the snapshot node, but it doesn't reflect the scale factor of the image passed to the node creation method. | ||||
Tags | No tags attached. | ||||
In previous versions we used vtkWindowToImageFilter, but in the VTK 6 examples, it's ifdef'd out for versions higher than 5. vtkRenderLargeImage seems to be the replacement, but I'm seeing tiling artifacts when using it to capture the 3d window: lm = slicer.app.layoutManager() Results in tiling in the default background, but only in one dimension (if use the black background, you can't tell). |
|
2015-09-08 10:30
|
|
Bug report submitted to VTK: |
|
2015-10-27 15:31
|
|
2015-10-27 15:39
|
|
Can ask the user if they wish to continue with the tiling problem. Render large image results in errors with the 2d windows (imperfect tiling), see RedSliceMagnification3.png Using the window to image filter on 2d windows results in tiling the image when scaled, see RedSliceWindowToImageScale3.png |
|
Hi Nicole, Thanks to Max, we now have a fix ready for testing: https://gitlab.kitware.com/vtk/vtk/merge_requests/841 Could you also create an account on gitlab.kitware.com ? That would allow you to share feedback more easily. Since the plan would be to integrate the fix into Slicer/VTK fork. Would be ideal if you could test this afternoon :) Thanks |
|
Linked my github account into gitlab.kitware, testing now! |
|
Works for me! |
|
Fixed in r24668 See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24668 |
|
Not quite yet, I have to check in the code that uses it. Updating my branch and last compile check being done now! |
|
Good point. I updated the title. |
|
And for clarity: this will only fix the scaling on the 3D window, the 2D windows still have tiling problems. |
|
Could you create an other VTK issue mentioning that tiling with a renderer having multiple viewport doesn't work ? |
|
Pull request: I'll work on an example and submit a but report to the VTK tracker for the 2d case (not sure if it's viewport related, the tiling seen in the attached image on this bug is just from a single slice shown in the Red slice viewer, no lightbox mode enabled). |
|
Thanks for clarifying. If you have a short python script reproducing the problem in Slicer, Max could probably help. |
|
This produces the same type of image attached to this bug as RedSliceMagnification3.png: import SampleData note there are 2 renderers in the collection, using the first one (second one produces same image)ren = rens.GetItemAsObject(0) |
|
Support for high-resolution 3D screenshot integrated in r24670 |
|
It seems that the created screenshots are still not truly high-resolution (there are identical pixels in the output image, so it looks like the original resolution image was just resampled restrospectively). |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2014-11-06 09:32 | nicole | New Issue | |
2014-11-06 09:32 | nicole | Status | new => assigned |
2014-11-06 09:32 | nicole | Assigned To | => nicole |
2014-12-30 10:42 | nicole | Relationship added | related to 0003858 |
2015-09-01 10:20 | nicole | Target Version | Slicer 4.4.1 => Slicer 4.5.0-1 |
2015-09-08 10:30 | nicole | Note Added: 0013260 | |
2015-09-08 10:30 | nicole | File Added: Mag-test.png | |
2015-09-08 10:31 | nicole | Note Edited: 0013260 | |
2015-09-08 10:32 | nicole | Note Edited: 0013260 | |
2015-09-10 07:31 | nicole | Note Added: 0013269 | |
2015-09-10 07:32 | nicole | Relationship added | has duplicate 0002898 |
2015-10-27 11:14 | nicole | Relationship replaced | has duplicate 0003858 |
2015-10-27 15:31 | nicole | File Added: RedSliceMagnification3.png | |
2015-10-27 15:39 | nicole | File Added: RedSliceWindowToImageScale3.png | |
2015-10-27 15:39 | nicole | Note Added: 0013439 | |
2015-10-28 11:40 | jcfr | Note Added: 0013452 | |
2015-10-28 11:40 | jcfr | Note Edited: 0013452 | |
2015-10-28 11:47 | nicole | Note Added: 0013453 | |
2015-10-28 11:59 | nicole | Note Added: 0013454 | |
2015-10-28 11:59 | nicole | Relationship added | related to 0001662 |
2015-10-28 13:31 | jcfr | Note Added: 0013455 | |
2015-10-28 13:31 | jcfr | Status | assigned => resolved |
2015-10-28 13:31 | jcfr | Fixed in Version | => Slicer 4.5.0-1 |
2015-10-28 13:31 | jcfr | Resolution | open => fixed |
2015-10-28 13:35 | nicole | Note Added: 0013456 | |
2015-10-28 13:35 | nicole | Status | resolved => assigned |
2015-10-28 13:36 | nicole | Resolution | fixed => open |
2015-10-28 13:41 | jcfr | Summary | Fix or disable scaling of snapshots => Update snapshot to support scaling |
2015-10-28 13:42 | jcfr | Note Added: 0013457 | |
2015-10-28 13:42 | jcfr | Note Edited: 0013457 | |
2015-10-28 13:51 | nicole | Note Added: 0013458 | |
2015-10-28 14:00 | jcfr | Note Added: 0013459 | |
2015-10-28 14:08 | nicole | Note Added: 0013460 | |
2015-10-28 14:23 | jcfr | Note Added: 0013462 | |
2015-10-28 14:43 | nicole | Note Added: 0013463 | |
2015-10-28 14:43 | nicole | Note Edited: 0013463 | |
2015-10-28 14:45 | nicole | Note Edited: 0013463 | |
2015-10-28 15:50 | jcfr | Fixed in Version | Slicer 4.5.0-1 => |
2015-10-28 15:50 | jcfr | Target Version | Slicer 4.5.0-1 => Slicer 4.5.1 |
2015-10-28 15:50 | jcfr | Summary | Update snapshot to support scaling => Update qMRMLScreenShotDialog to support high-resolution magnified screenshot |
2015-10-28 15:51 | jcfr | Note Added: 0013464 | |
2016-10-12 02:31 | jcfr | Target Version | Slicer 4.5.1 => Slicer 4.7.0 |
2017-09-27 14:44 | lassoan | Target Version | Slicer 4.7.0 => backlog |
2017-09-27 14:44 | lassoan | Note Added: 0015201 |