Open Mobbyjj opened 1 year ago
i also want to konw .if you have solution,plz tell me .Thank you very much.
Hi @HBB0517 and @Mobbyjj, this does not necessarily reproduce the same exact figure but I used something like
import nibabel as nib
flow_image = nib.Nifti1Image(flow.permute(2, 3, 4, 0, 1).cpu().numpy(), affine, header)
nib.save(flow_image, fn) # fn: output filename
where flow
is the output flow field from the model. affine
and header
are the affine and header matrices from the target image .nii file. permute(2, 3, 4, 0, 1)
is performed to transpose the flow field such that the order of dimensions agrees with nifti convention. Finally, the output .nii file can be opened in ITK-Snap or similar programs to visualize the flow field.
Hi @kvttt, thanks for your reply. I have also seen such code like saving it into the header of a nii or as the transformation mha file in SimpleITK.
Specifically, I just wonder what 'programs' you have mentioned that can draw the colorbar in the second figure (I guess it can be implemented using matplotlib?) . Of course feel free to raise another program with references that has similar visualisation performance.
Cheers!
Hi @kvttt, thanks for your reply. I have also seen such code like saving it into the header of a nii or as the transformation mha file in SimpleITK.
Specifically, I just wonder what 'programs' you have mentioned that can draw the colorbar in the second figure (I guess it can be implemented using matplotlib?) . Of course feel free to raise another program with references that has similar visualisation performance.
Cheers!
Can you communicate with me? My qq is 1135451439
I got similar solutions from the optical flow visualisation and hope this can help. [https://github.com/tomrunia/OpticalFlow_Visualization].
I got similar solutions from the optical flow visualisation and hope this can help. [https://github.com/tomrunia/OpticalFlow_Visualization].
Hello May I add your qq contact information to communicate with you
Thank you for providing the codes for Transmorph and complementary files about the comparison studies. I wonder how the flow field in the manuscript is drawn. Could you provide the visualisation codes or any links about this? Thanks.