Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gaussf: different boundary behaviour within methods #159

Closed
AndreZeug opened this issue May 13, 2024 · 2 comments
Closed

gaussf: different boundary behaviour within methods #159

AndreZeug opened this issue May 13, 2024 · 2 comments
Labels
bug component:DIPlib About the DIPlib library (C++ code)

Comments

@AndreZeug
Copy link

Component
Matlab R2024a
DIPimage toolbox for quantitative image analysis
Version 3.4.3 10-May-2024

Describe the bug
The methods included in gaussf (derivative) lead to different boundary behaviour, depending on method used.
When smoothing a z-stack structures from the last/first layer are present in the first/last - depending on the method used.

RAW z0
dd_RAW

iir z0 (ddiir = single(gaussf(double(squeeze(dd)),[.8 .8 .8],'iir'));)
dd_iir

ft z0 (ddft = single(gaussf(double(squeeze(dd)),[.8 .8 .8],'ft'));)
dd_ft

Question
Can 'boundary_condition' , 'truncation' be used with 'ft' to achieve similar behaviour as with 'iir' and 'fir'?
Typically I use a weak smoothing of 0.5 which implicates 'ft' method as default.

To Reproduce
Sample data can be found here dd_uint8.zip.

ddiir = single(gaussf(double(squeeze(dd)),[.8 .8 .8],'iir'));
ddft = single(gaussf(double(squeeze(dd)),[.8 .8 .8],'ft'));
ddfir = single(gaussf(double(squeeze(dd)),[.8 .8 .8],'fir'));

System information:
Win10, Matlab2024a, DIPimage 3.4

@AndreZeug AndreZeug added the bug label May 13, 2024
@crisluengo crisluengo added the component:DIPlib About the DIPlib library (C++ code) label May 13, 2024
@crisluengo
Copy link
Member

I agree, this should be consistent. I’ll have to take a look how to do this properly, we also don’t want to change behavior that people might depend on.

@AndreZeug
Copy link
Author

Dear Chris,
Thank you so much!
You are faster with fixing then I with compiling 🙈
Both conditions work perfect now! (at least for me 🤭)

Best, Andre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:DIPlib About the DIPlib library (C++ code)
Projects
None yet
Development

No branches or pull requests

2 participants