[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.

The data we collected is very large and then we realized that the Mrtrix3 can deal with the large dataset very well by performing tracking on FOD images, and the handy multi-thread support (-nthread option) also make our analysis/tracking much efficient.

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!

1 Like

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!