Dear all,
Im running population_template on 10 subjects which have been upsampled x2, current resolution is 1mm3. Each FOD file is around 200MB size.
During execution I get a Segmentation Fault which belongs to the mrregister script and Im not able to find where is this error coming from.
This is the output I get from the mrregister along execution.
mrregister id013_csh.nii.gz average_header.mif -mask1 id013_bmask.nii.gz -rigid_scale 1 -rigid_niter 0 -type rigid -noreorientation -rigid_init_translation mass -datatype float32 -rigid linear_transforms_initial/id013.txt
mrregister: [100%] uncompressing image "id013_csh.nii.gz"
mrregister: [100%] preloading data for "id013_csh.nii.gz"
mrregister: [100%] preloading data for "/tmpdir/average_header.mif"
mrregister: [100%] uncompressing image "id013_bmask.nii.gz"
mrregister: running rigid registration
mrregister: initialising translation and centre of rotation using centre of mass
Segmentation Fault
I can’t see any problem with the data and I can not reproduce your issue. Can I double check that you are using the latest version of mrtrix and not the beta version of eigen (<= 3.2.10)?
mrregister -version
grep Eigen $(dirname `which mrregister`)/../config
Here is described how to use the stable version of eigen.
If you do use eigen stable and still get the error with the latest version of mrregister, could you please share your data with me?
cd /tmp/population_template-tmp-AXFS97
zip ~/files4max.zip id013_csh.nii.gz average_header.mif id013_bmask.nii.gz
Your mask image has a non-orthonormal header (s- and q-form). You can give the mrregister debug command without the mask argument a try. I hope this works, let me know if not.
For your cohort, you might want to use dwi2mask or fsl’s bet(2). Also, your image is very large. I doubt that you need to upsample your data that much (or at all) before passing it to population_template.
you were right, it was a dimension mismatch. I was using the mask in the original DWI space 2x2x2. Now it works perfectly.
Regarding the upsampling, Im going from 2mm3 to 1mm3, following Raffelt et al 2012 guidelines. Should I run the template using the 2mm3 dataset instead?, or it is ok to continue with the upsampling?
I personally do not upsample the data before population_template. I guess it depends what you want to do with the template. For instance, the docs recommend upsampling if you want to do fixel based analysis. @Dave might have more insight on the effects this has on downstream analysis.
Hi Guys,
Just arrived at work and read this. I noticed the issue of dimension mismatch recently and added a check for the mask dimensions in the fixel_format branch. This branch will be merged with master sometime soon.
@maxpietsch I guess there is no reason why the masks can’t be the same dimensions during registration since their values are accessed with interpolation. We would just need to modify the transform initialiser to use a reslice adapter on the mask.
Jose,
In regards to up-sampling, check out this paper.
In my experience registration works better, and the template has less partial voluming of neighbouring structures, compared to if I were to register with native resolution data and then up sample for comparison.