neurodata / ndreg-old

NeuroData's registration library, built in python using ITK
Apache License 2.0
2 stars 2 forks source link

About the speed #48

Open wujiong-hub opened 7 years ago

wujiong-hub commented 7 years ago

Dear Author, I have ran it for image registration which size is 180230190, it will cost more than 10 hours. How can I speed it up without using resample() function?

kkutten1 commented 7 years ago

You can reduce the scale of the transforms. By default the scale is 1.0. This means that for a 100x100x100 image, the transform will be calculated on a 100x100x100 grid. If you set the scale lower, e.g. 0.5, the transform will be calculated on a 50x50x50. This is generally runs several times as fast.

imgMetamorposis(..., scale = 0.5)

wujiong-hub commented 7 years ago

Thanks for your reply. But it will lead to lose some accuracy in registration.

kkutten1 commented 7 years ago

Another thing you could try is to run it starting from the lowest scale and ending at the highest scale e.g.

imgMetamorphosisComposite(..., alphaList=[0.05, 0.02, 0.01], scaleList=[0.25, 0.5, 1.0], ...)