[Solved]Mrview Screen Capture automatically across slices



Dear experts of Mrtrix,

I have a question about the “Screen Capture” of Mrview.

Currently, I am making movie clips on new ex-vivo marmoset data in the following way:
T2* test scan video

The above video is a scalar image so I can use imageJ to automatically screenshot on each slice and then make a video from these screenshots.

However, for the MRtrix-process DEC data (FOD-DEC, etc), imageJ cannot open it properly and it would be better to open it using Mrview.

How can I use Mrview to do the automatical screenshot on each slice?

I checked the Screen Capture tool and it can do automatically screenshot on rotate and translation. How can I control it to do automatically screenshot across slices?

Previously, for our old dataset (150um) I did the screenshot manually in Mrview, but the new data (80um and 64um) have too many slices to do it manually.

It would be great if we could make a similar video like the demo of mrview on youtube.

I want to also thank the Mrtrix team in the post, as it help our project essentially.

We spent many efforts trying to push the limit of the MRI to get the new data.

After we successfully obtained the data, we realized that the Mrtrix3 is the one and the only comprehensive dMRI tools that are capable to deal with the large dataset.

Most other common dMRI tools required the DWI data as input for tracking and are hard to deal with this big dataset.

The Mrtrix, on contrary, will compute FOD image from the large DWI image. The FOD file is much smaller in size than all DWI images as input. In addition, the handy multi-thread support (-nthread option) also make our analysis/tracking much efficient.

I am very looking forward to the ISMRM, catching the new feature of MRtrix and express thankfulness to the MRtrix team .


Thanks for the thumbs-up, it’s always encouraging to hear!

As to your screenshot question: yes, it is possible via the screen capture tool. What you need to do is set the translation vector to the required value for the full shot, and also set the number of frames you want that shot to take. So if you want 200 slices in 200 frames, set the translation to 200 voxels and the number of frames to 200. Obviously, if you want to fly through 200 voxels at a slower rate, then increase the number of frames as required.

You can choose to set the translation vector in voxel units, or in millimeters relative to scanner (real world) coordinates, or camera coordinates. In your case, if you know you need to capture 200 slices along the AP direction, then:

  1. set the view to coronal
  2. move to the slice you want to start from
  3. set the translation to [ 0 200 0 ] in voxel units
  4. set the number of frames to 200
  5. press the ‘Play’ button to check that it does what it’s supposed to.
  6. press the ‘Restore’ button to go back to where you were, and adjust the settings if needed.
  7. press the ‘Record’ button once you’re satisfied with the shot.

This will produce one PNG image per shot, in the target folder specified, named according to the prefix specified. You can change both to suit. You’ll then need to create your movie from these PNG files using whichever means you prefer (I tend to use ffmpeg or mencoder, but there are lots of other apps out there than can do it).

Hopefully that’ll be enough to get you started!


Hi, J-Donald,

Thanks a lot for your explanation. Very clear!

Now, I understood what these option means and the logic of the “Screen Capture” tool which is high versatile and useful!