KCL-BMEIS / niftyreg

This project contains command line tools to perform rigid, affine and non-linear registration of nifti or analyse images as well as utilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reg_f3d nrr_cpp.nii

Rigel-X opened this issue · comments

I guess nrr_cpp.nii, the output from reg_f3d, is the motion field? but how should I interpret it? show it as grid? vector?
I checked its dimention -- likely control grid. but why is there a drift along x / y separately? neither (x,y) or x^2+y^2 made sense to me...
image

Or is there any built-in tool to visualize the nrr_cpp.nii?

They are the cubic B-Spline parametrised grid. I use reg_transform to generate the flow field from it. Check (http://cmictig.cs.ucl.ac.uk/wiki/index.php/Reg_transform) .

Thanks! reg_transform -ref ref.nii -def nrr_cpp.nii field.nii made it make more sense! I still have a question regarding the field.nii, which had the third dimension -- how should I combine them?
image

SORRY it's -disp not -def

I found one:
https://www.mathworks.com/matlabcentral/fileexchange/20057-b-spline-grid-image-and-point-based-registration
Spacing = [5,5];
figure,
for np = FloPhase
Igrid=make_grid_image(Spacing,size(refimg));
O_trans = squeeze(Bgrid(:,:,:,np)); % Bgrid was nrr_cpp
[Igrid,~]=bspline_transform(O_trans,Igrid,Spacing);
imshow(1-Igrid,[]); title('grid');
end