I second what Rob said: I’d fix the input masks if possible and re-runpopulation_template
.
population_template
uses masks to define areas that drive registration, the template itself is generated using all data, irrespective of masks. If you can live with subjects potentially not being well aligned in areas outside the (erroneous) mask you could just refine the template masks.
In case you have the temporary directory of population_template
, you can use mrmath masks_transformed/* sum - | mrview masks_transformed/* -overlay.load - -overlay.opacity 0.2
to check all masks quickly. If you only have the transformations, not the temporary directory, you can transform the input masks to template space:
mrtransform subject_mask.mif -template template.mif -warp_full warp.mif masks_transformed/subject_mask.mif -interp nearest
To recreate the template mask, use mrmath masks_transformed/* min - | maskfilter - median - | maskfilter - dilate -npass 5 new_template_mask.mif
or replace min
with median
if that is what you want to do.