Higher resolution for screen captures of 3D view?

Hello,
I’m wondering if there’s a way to get higher resolution screen captures of the 3D view. I need images of my segmentations with a high enough dpi to print on a poster (about 300 is what I’m thinking). Is there a way to increase the resolution in 3D slicer/export images in some other way? Open to other suggestions as well…
Thanks!
-Nick

The Screen Capture dialog (image button on the toolbar) has an oversample mode to get higher resolution captures, but we’ve noticed it’s sometimes buggy with the current VTK OpenGL back end for GPU volume rendering, but should be okay for looking at slice views and segmentations, but use CPU if you do volume rendering. If you haven’t used it before, you can capture the image to the scene, and then save it from the regular Save dialog.

Also for slice visibility in the 3D view can be controlled independently from the 2D views, so you might try working with those options.

image

Thanks for the quick reply! Are you referring to the “sample factor” in this menu? I can’t seem to find the oversample mode…
03%20PM

Yes, I meant Scale factor. Be careful with it - it rerenders at the magnification you enter, so do like 2 not 100 or it’ll take forever. Let us know how it goes - fixing this to be more user friendly is on our wishlist. Like putting a Save As button directly in the dialog, and maybe some feedback about the capture resolution.

2 Likes

+1 for the Save As button!

Okay, by popular demand, I’ve added a Save As button. It will be in tomorrow’s preview build.

As mentioned, there are still some problems with the Scale factor that need to be addressed at some point.

image

3 Likes

If high-resolution screenshots are useful then maybe we could add them to Screen Capture module, too. It would allow us to create high-resolution videos and not just static screenshots.

Murat and I talked about it and the current driving use case was publications, not videos. But yes, highres videos would be nice too.

The underlying problem right now is that vtkRenderLargeImage doesn’t work well. I’m not sure it’s the right method anyway, since things like the orientation marker don’t work with it. Probably making an actual viewer instance of the desired size would cause the least headaches.

Specifically for poster-size prints, I export models to Blender and then render at whatever resolution I need - I’ve rendered out 5000x5000 and larger. My scene files are typically simple - camera, model, maybe 3 lights (key, fill, kick) and usually very simple surface shaders. Takes a little while to render out, depending on your machine, but it’s very flexible.

I should add that some models I’ve rendered out in Blender are 30 million polys or more. It’s fairly robust.

Here is an example of a fossil snail shell segmented in 3D Slicer and exported as a model to Blender, then rendered at (I think) 600dpi, (might have been 300dpi?) Anyway, very simple shader, 2 or 3 area lights, black background. With a little knowledge of Blender, it takes a few minutes to set it up.

I’ve been meaning to add this to the list of works using Slicer…

From David A. Bullis, Hollister W. Herhold, Jesse E. Czekanski-Moir, David A. Grimaldi, Rebecca J. Rundell, Diverse new tropical land snail species from mid-Cretaceous Burmese amber (Mollusca: Gastropoda: Cyclophoroidea, Assimineidae), Cretaceous Research, 2019, https://doi.org/10.1016/j.cretres.2019.104267.

1 Like

Blender is no doubt a powerful software.

Nevertheless, it doesn’t support voxel data and volume rendering, so you have to have a surface AFAIK.

Second, people have to get familiar with extracting surface, cleaning up/editing meshes understanding issues about polygon format (lack of units in STLs for example). For someone downloading a 3D specimen from morphosource to do comparative anatomy, they will be using 3D Slicer to visualize, segment, etc. Why not do hi-res screen capture within Slicer? All the tools are there. I would be more inclined to support fixing the current issues, so that we can render arbitrarily large still image. If people want to do a lot more in terms of animation, perhaps they should use Blender. But let’s make sure basic use case is covered sufficiently well in Slicer.

As far as the high-resolution animations, I am not sure if there would be any immediate reason need to render more than 4K, which you can do if your screen resolution supports it. But sure, it would be nice to have that capability too. Between in terms of prioritizing I would say still image capture is more important and immediate need.

Yep, very good points, and I totally agree on the utility of being able to volume render out to high resolution in Slicer. I only added the Blender suggestion in the interest of time, because it sounded like Nick’s segmentation was complete, and could be exported as models. But I’d love to see high-res capture in Slicer, it would save me many steps. Since Andras added his Lights, for me there are fewer and fewer reasons to export to another program.

1 Like

Does slicer use vtkRenderImage?

I meant vtkRenderLargeImage?

Hi Bill - Yes, we use it but it seems to be missing up with the new opengl back end. It works in Slicer 4.10.2 with old opengl, but in the current nightly with vtk opengl2 not all actors work - cpu ray casting seems to work but not gpu - haven’t yet tried this in pure vtk.

Hi Steve,

Did the Save as... button ever made it to the build? I can’t see it.

@pieper, Indeed it appears you added a new saveAs method in https://github.com/Slicer/Slicer/commit/17b485e520a821d562e9a7792735b40cd0cdd321
, but you didn’t commit any changes to qMRMLScreenShotDialog.ui for connecting the new method to a GUI object as you showed in the image you posted earlier in this thread.

1 Like

Oops, sorry, forgot to add that part. Just committed it.

http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=28653

p.s. thanks for the reminder!

1 Like

Hi, just wondering if high-res screen capture ever proceeded beyond the discussion of the possibility in this thread. It’s something I’d want to make use of, if the capability is there. Thanks,

Yes, you can increase the output dimensions by specifying the scaling factor (e.g., if your screen is 1920x1080, scaling x2 would give you a 3840x2160 output). However, make sure you switch to 3D only layout first and use full layout option in screen capture.

image

1 Like