Issues with templates

Hi guys,

I am trying to build some age-specific brain templates using DW data from a public database and I need your help with some issues that emerged during the processing:

  1. When I run dwiintensitynorm to normalize signal intensities across subjects and to create a mean FA template, the output FA template is cropped (see figure)

  2. When I run population_template to create a FOD template, the system crashes. Here is the error:

population_template: [100%] Erasing temporary mask images
population_template: [  0%] Performing initial rigid registration to template... population_template: [ERROR] Command failed: mrregister /isilon/data/filippo.arrigoni/provatemplatemrtrix0305/mrtrix/FOD/1442_V3_FOD.mif average_header.mif -mask1 /isilon/data/filippo.arrigoni/provatemplatemrtrix0305/mrtrix/MASKS/1442_V3_dwi_bc_ups_mask.mif -rigid_scale 1  -rigid_niter 0  -type rigid  -noreorientation  -rigid_init_translation mass  -datatype float32 -rigid linear_transforms_initial/1442_V3.txt (population_template:492)
population_template: Output of failed command:
                     mrregister: [ERROR] Error allocating memory for scratch buffer
population_template: Script failed while executing the command: mrregister /isilon/data/filippo.arrigoni/provatemplatemrtrix0305/mrtrix/FOD/1442_V3_FOD.mif average_header.mif -mask1 /isilon/data/filippo.arrigoni/provatemplatemrtrix0305/mrtrix/MASKS/1442_V3_dwi_bc_ups_mask.mif -rigid_scale 1  -rigid_niter 0  -type rigid  -noreorientation  -rigid_init_translation mass  -datatype float32 -rigid linear_transforms_initial/1442_V3.txt

Do you think that this is related to the storage resources of my workstation or to something else?

  1. Is there a way to visualize/open RGB maps generated by DTITK with MRVIEW? I bult a DTI template with DTITK, obtaining both FA and RGB mean images. The FA map can be opened with MRVIEW, whilte the RGB file can’t be properly visualised

Thank you for your time and help.


Ok, quick thoughts:

  1. dwiintensitynorm relies on registration of FA maps to propagate a common mask of white matter. If that fails, that could explain what you’re seeing. I’m not all that familiar with the internals of that particular script though, so not sure where it might be going wrong.

    However, you might consider using mtnormalise instead, that’s what we would tend to recommend for that so these days. Note that you can use it with single shell data, if you perform 2-tissue MSMT-CSD – it’s a bit approximate in this case, but good enough for intensity normalisation, as far as we can tell.

  2. That does look like an out of RAM error. How big are the images (e.g. what’s the output of mrinfo?), and how much RAM do you have on your system? Also try running with -debug, see whether that provides any further clues.

  3. It depends how DTITK stores the RGB maps. What does mrinfo report for that image? It might be that it ends up with dimensions [ X Y Z 1 3 ], in which case you’d be able to fix that by dropping the 4th dimension with a command like:

    mrconvert RGB_in.nii -axes 0,1,2,4 RGB_out.nii