rg2 / xreg

Library and executables for modeling and registration applications in medical image analysis. Particular emphasis on intraoperative fluoroscopic (X-ray) navigation via 2D/3D registration.
MIT License
91 stars 18 forks source link

implementation of gradient orientation #26

Closed busyyang closed 7 months ago

busyyang commented 8 months ago

I have found GO metric is widely used in papers from your research team. And this metric is proposed also from your research team:

@Article{DeSilva2016,
  author    = {De Silva, T and Uneri, A and Ketcha, M D and Reaungamornrat, S and Kleinszig, G and Vogt, S and Aygun, N and Lo, S-F and Wolinsky, J-P and Siewerdsen, J H},
  journal   = {Physics in Medicine and Biology},
  title     = {3D–2D image registration for target localization in spine surgery: investigation of similarity metrics providing robustness to content mismatch},
  year      = {2016},
  issn      = {1361-6560},
  month     = mar,
  number    = {8},
  pages     = {3009--3025},
  volume    = {61},
  doi       = {10.1088/0031-9155/61/8/3009},
  publisher = {IOP Publishing},
}

But I just noticed you compute the GO metric with cosine distance for moving and fixed gradient magnitute image in 2.3.2.1 in above paper(filted with a threshold). And the code basicly followed the formela (4), also gradient magnitute used, not gradient orientation.

$$ Ga=\sqrt(G_x^2+G_y^2) \ Go = \arctan(\frac{G_y}{G_x}) $$

Here is my question, why you use cosine distance for moving and fixed gradient magnitute image, not gradient orientation image?

rg2 commented 7 months ago

Hi @busyyang , thanks for your question.

Are you referring to this section in the code https://github.com/rg2/xreg/blob/master/lib/regi/sim_metrics_2d/xregImgSimMetric2DGradOrientCPU.cpp#L159-L178 ?

This does compare the angle differences (theta) in gradient angles between fixed and moving images. Line 163 computes cos(theta) = dot(fixed grad, moving grad) / (norm(fixed grad) * norm(moving grad)).

If you have any specific questions about the GO method, I suggest you contact the authors. I was not associated with that work.

I personally found that other methods, such as patch-wise NCC of x/y gradients, work better in practice.

busyyang commented 7 months ago

Hi @busyyang , thanks for your question.

Are you referring to this section in the code https://github.com/rg2/xreg/blob/master/lib/regi/sim_metrics_2d/xregImgSimMetric2DGradOrientCPU.cpp#L159-L178 ?

This does compare the angle differences (theta) in gradient angles between fixed and moving images. Line 163 computes cos(theta) = dot(fixed grad, moving grad) / (norm(fixed grad) * norm(moving grad)).

If you have any specific questions about the GO method, I suggest you contact the authors. I was not associated with that work.

I personally found that other methods, such as patch-wise NCC of x/y gradients, work better in practice.

@rg2 thanks for your kindly reply, yes, I follow the code as you mentioned for this issue. In this code, It is basicly follow the paper, but it is just a kind of NGC not GO.

in my task, I also use other metric for registration. I just feel curious about the GO metric, so I took a look at the related articles and code. Since the effect may not be that good, I don't have much interest in learning about it.

Thank you again. :)