Hi,
I'm not really sure why this isn't working for you.
Maybe there are some very minor differences in the voxel sizes.
To make them exactly the same do:
fslcpgeom struct.nii.gz actue_lesion_weights.nii.gz
and try it again.
The datatype should not make any difference.
Hopefully the above will fix the problem.
Let us know if it works or not.
All the best,
Mark
> On 28 Feb 2017, at 19:31, Olga Boukrina <[log in to unmask]> wrote:
>
> Dear all,
> I am trying to register a stroke patient's brain to MNI using a lesion mask with 0s inside the lesion and 1s outside the lesion. I use the following command:
>
> fnirt --ref=/usr/share/fsl/5.0/data/standard/MNI152_T1_1mm.nii.gz --aff=affine_transf.mat --in=struct.nii.gz --inmask=acute_lesion_weights.nii.gz --lambda=150 --applyinmask=1
>
> where struct.nii.gz has the following dimensions:
> data_type INT16
> dim1 248
> dim2 256
> dim3 176
> dim4 1
> datatype 4
> pixdim1 1.000000
> pixdim2 1.000000
> pixdim3 0.999855
> pixdim4 0.000000
> cal_max 0.0000
> cal_min 0.0000
> file_type NIFTI-1+
>
> And actue_lesion_weights has these dimensions:
> data_type FLOAT32
> dim1 248
> dim2 256
> dim3 176
> dim4 1
> datatype 16
> pixdim1 1.000000
> pixdim2 1.000000
> pixdim3 0.999855
> pixdim4 0.000000
> cal_max 0.0000
> cal_min 0.0000
> file_type NIFTI-1+
>
> I get the following error: fnirt::fnirt_clp: --in=struct.nii.gz and --inmask: acute_lesion_weights.nii.gz have different dimension. I can overlay the two images in fslview, I also tried to change data_type to INT16 using fslmaths acute_lesion_weights.nii.gz acute_lesion_weights2.nii.gz -odt short to no avail. The affine_transf.mat was obtained by registering struct.nii.gz to MNI152_1mm_brain using the same acute_lesion_weights.nii.gz as -inweight mask. Please help!
>
> -Olga
|