Screen capture high resolution image

Hi MRtrix experts!

I would like to print an image that I have created with MRtrix. However, the resolution of the image seems to depend on the resolution of the screen. Is there a way to create images with higher resolution?

Thanks a lot!


Not directly, unfortunately. It would require quite deep modifications to the OpenGL handling. It was possible for a brief while when this approach worked, but for some reason, that no longer seems possible – at least not on my system.

But what I’ve often resorted to is to grab lots of different zoomed-in screenshots, panning around between each shot, so that the combination covers the full frame that you want to produce. You can then recombine them using a decent image editing program (I used GIMP for that). It’s a bit fiddly to stitch all the frames together (in GIMP, I used layers with a bit of transparency to position each one correctly – takes some getting used to, but relatively easy once you’ve figured it out). But assuming this is not something you need to do routinely, it does the job…

Here’s an example I just put together to illustrate. WM ODFs from the HCP example subject, size 3200x3768 (much bigger than my screen) – done by stitching together 8 tiles, each a full-screen screenshot of a portion of the frame, and recombined in GIMP.

On Linux (which I believe is what you are using), it used to be possible to set a (virtual) resolution that exceeds that of the monitor, resulting in a scrolling desktop. I only have headless Linux machines, so I have no idea if it still works and how it would play with screenshots. @jdtournier: what do you think?

@Hannelore_Aerts et al., this may sound simplistic:

But, I usually connect my mac laptop (assuming thats where I run MRtrix locally) to a high-resolution monitor and set the resolution to maximum.

Then, I change the mac screenshot default output to pdf, following this link

After doing so, I can export the pdf image into image processing suites such as GIMP or photoshop - and then increase the dpi to max resolution.

This results in print publishing quality :slight_smile:



I’m not sure this can do anything more than a generic upsampling of the original screengrab – and judging from the comments on that link, that’s more or less what others also suggest. It would be incredibly difficult for the OS to force OpenGL applications to generate output at a higher resolution than they’re designed to (the screen in our case). I can’t see how this can result in genuinely higher resolution than the PNG screenshot…

Good suggestion. I haven’t tried that in a while though. I’m guessing that’ll still be possible, worth a try!

However, another option that can work (at least it does on my Arch Linux, Gnome 3 desktop), is to make the window larger than the screen. This can be a bit difficult to achieve if you don’t know the shortcuts to do this, but they’re incredibly useful anyway, so worth learning (you’ll never want to faff about trying to grab the edge of the window to resize once you know you can do this):

On most Linux Desktop Environments, you can use a combination of a keyboard modifier and mouse click & drag to resize. On my system, I can hold the Win key (between Ctrl & Alt), and left-click & drag to move the window, and right-click & drag to resize. This means I can make the window way larger than the screen, and the screenshot tool still captures the lot.

On Ubuntu (with Unity), the relevant shortcuts tend to be Alt + left/middle click respectively. The exact combination can vary between systems, and can be configured differently, so you may need to experiment a little and rummage around in your settings…

Here’s an example of this in action – much easier than my earlier suggestion… :stuck_out_tongue_winking_eye:

1 Like

Thank you all for your helpful suggestions!
I got a pretty decent resolution now, using the shortcuts (in my case alt+left click to resize; alt+middle click to move) and the workspace switcher in Ubuntu to make my MRtrix window as large as 4 screen sizes! Now let’s hope people of the Brain’Art challenge will like the result :slight_smile: