timjerman / JermanEnhancementFilter

Jerman's tubular (vessel) and spherical (blob) enhancement filters
Other
62 stars 23 forks source link

Issue in implementing equation 13 #2

Closed jxchen01 closed 6 years ago

jxchen01 commented 6 years ago

Hello,

First of all, your method is awesome and already helped me a lot. I just have a question about the implementation.

In line 47 in vesselness3D.m:

https://github.com/timjerman/JermanEnhancementFilter/blob/37d493dddb80a0e8925e55f198c47dcf59d450a0/vesselness3D.m#L47

you use min(Lambda3(:)).

However, in equation (13) in your journal paper, it seems to be max(Lambda3(:)).

Maybe, I misunderstood somewhere. Could you advice?

Thanks, Jianxu

timjerman commented 6 years ago

Hi Jianxu,

the difference was in equation 10 from the journal publication. The sign of the eigenvalues for bright structures on dark background in the code was the other way around compared to the signs in eq. 10. Thus, in line 47 there was a minimum instead of a maximum like in eq. 13. Nevertheless, both version yielded same results.

I just committed a revision of the code, where everything is rewritten to match the equations in the journal publication. Please pull the changes and give it a try.

Regards, Tim

jxchen01 commented 6 years ago

I see. Thanks for your quick reply.

jxchen01 commented 6 years ago

BTW, I wonder if you have any idea about how to modify your filter to enhance 3D plate-like objects?

Thanks,

timjerman commented 6 years ago

Unfortunately I haven't done any work on how to improve the enhancement of plate-like objects, but you can try some of the existing filters.

For example, Li's filter (Selective enhancement filters for nodules, vessels, and airway walls in two- and three-dimensional CT scans) is pretty simple and can be easily implemented. The response in the vesselness3D function can be replaced by (please note that this only valid after pulling yestarday's commit):

response = Lambda3 - Lambda2;
response(Lambda3 <= 0) = 0;

There is also a Sato's filter for plate-like objects, but it is more complex: Tissue Classification Based on 3D Local Intensity Structures for Volume Rendering.

Regards, Tim

timjerman commented 6 years ago

Above if forgot to mention that for plate-like objects a different set of rules for a faster computation applies. Lines vesselness3D.m#L96-L104:

if brightondark == true
    T(B1<=0) = 0;
    T(B2<=0 & B3 == 0) = 0;
    T(B1>0 & B2>0 & B1 .* B2 < B3) = 0;
else
    T(B1>=0) = 0;
    T(B2>=0 & B3 == 0) = 0;
    T(B1<0 & B2<0 & (-B1) .* (-B2) < (-B3)) = 0;
end

should be replaced by:

if brightondark == true
    T(B1<=0 & abs(B2)<1e-10 & abs(B3)<1e-10) = 0;
    T(B1<0 & B2<0 & abs(B3)<1e-10) = 0;
    T(B1<0 & B3<0 & B1 .* B2 < B3) = 0;
else
    T(B1>=0 & abs(B2)<1e-10 & abs(B3)<1e-10) = 0;
    T(B1>0 & B2>0 & abs(B3)<1e-10) = 0;
    T(B1>0 & B3>0 & (-B1) .* (-B2) < (-B3)) = 0;    
end
jxchen01 commented 6 years ago

Thanks a lot, Tim.