The github link is: https://github.com/zuzhiang/MedicalImageProcess
The data is very complicated, so I don’t bother to organize them one by one. Many of them are experimental and there may be problems, but I have forgotten about them after a long time. If you have any problems, please read the code and solve them by yourself. What is the general use:
phi
:my_show_grid.py
: First generate a regular grid picture, and then use STN to deform it according to the read-in deformation fieldshow_grid.py
: Read in the .nii file of the deformation field, and then generate a visualized picture of the deformation field
show_nii
:show_nii.py
: Display three-dimensional .nii imagesshow_nii3.py
: Simultaneously display the three-dimensional .nii format organ, organ segmentation mask, and lesion segmentation mask images
ants.py
: Use SyN in the ANTs package to register imagesantspy.py
: Use the python version of ANTs-antspy to register the image and its corresponding label at the same timeCBAM
: Implementation of CBAM attention modulecrop_resize.py
: First find the smallest rectangular box containing the brain area, and then manually calculate the size of the rectangular box (each dimension should be a multiple of 16), and then use the commented out part to resizedata_augmentation.py
: Data enhancement code, including B-spline sampling, inversion, translation, scaling, rotation, gray value equalization, etc., but B-spline sampling seems to be problematicdcm2nii.py
: Convert 3D images in dcm format to .nii formatFreeSurfer+FSL.py
: First use FreeSurfer to peel off the brain image, and then use FSL to affine the image and label at the same timeFreeSurfer.py
: Use FreeSurfer to perform skull peeling on brain imagesimage_combine_example.py
: Someone else gave it, never used itimg2nii.py
: Convert 3D images in .img format to .nii formatjacobian.py
: Calculate the Jacobian Determinant of Deformation Fieldresize_img.py
: Resize the imagetor_datagenerators.py
: Data generator based on pytorch