Dear Barbara,
> I have a question relating to the registration of preoperative and postoperative scans (same subject). After reading the instructions I figured these steps would be correct:
>
> 1. Linear registration of unbetted data (this really worked so much better for me than on betted data with higher Dice coefficient between registered postop and prep images)
> flirt -nosearch -in preop -ref postop_region -cost corratio -inweight operation-mask-lacuna_inverted_mask -out %s_flirt_12doF_wholebrain_masked -omat %s_flirt_12dof_wholebrain_masked
yes, I am not surprised that you got better results with the non-betted data since you used the exact same sequence on the same scanner and subject. The recommendation to use betted data pertains more to the (normal) case where your sequence/scanner might be quite different from that used to acquire the template (standard brain).
I assume that the errata you sent for step 2 also pertains to step 1?
I am not sure what those % signs means, but I will assume they are kosher.
>
> 2. Non-linear registration of pre and post images (using flirt matrix output):
> fnirt --ref=postop_region.nii.gz --in=preop --inmask=%s-mask-lacuna_inverted_mask.nii.gz --aff=%s_flirt_12dof_wholebrain_masked --iout=%s_fnirt_12dof_wholebrain_masked
>
> -> So for both steps (fnirt and flirt) I am using the mask which has zeros in the resection area and ones all around it.
>
The important thing here is that the mask needs to be defined in the space of your input image as it is given as a —inmask argument. So, if you overlay your mask onto the images given as argument to —in it should look good.
Note also that it is useful to define the inmask with a 1-2 voxels margin, i.e. it is better to mask out a little “too much” than “too little”.
> 3. Then I warp the mask to the preoperational scan:
> applywarp -i %s-mask-lacuna_inverted_mask.nii.gz -r preop_region -o %s-mask-lacuna_inverted_mask_fnirt12dof -w %s_warpcoef.nii.gz
>
> 4. As a last step I binarize the fnirted/warped mask again:
> fslmaths %s-mask-lacuna_inverted_mask_fnirt12dof -sub 1 -mul -1 -bin %s-mask-lacuna_inverted_mask_fnirt12dof_bin
>
You can avoid the binarising step by specifying —interp=nn.
On the whole, yes it looks like you are doing it just right.
Good luck Jesper
> Thanks a lot,
> Barbara
|