ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.16k stars 375 forks source link

Creation of a darker ring when running SmoothImage #1046

Open CarolineBao opened 4 years ago

CarolineBao commented 4 years ago

I noticed that running SmoothImage on my images creates a darker ring around the brain with smaller values than the original minimum value in my image. Since I then mask the image with a percentage based threshold, this has the effect of creating a halo around the brain.

Here's an image of the results of running SmoothImage 3 __ambmc_200micron.nii 0.4 _ambmc_200micron.nii on this linked file (initial image on the left, image after applying SmoothImage on the right):

Screen Shot 2020-07-13 at 11 17 05 PM

I saw that a similar issue was described in an unresolved issue (https://github.com/ANTsX/ANTs/issues/913). Is what I'm seeing caused by the same issue and is there anything I can do to address this so that there aren't regions around the brain that are decreased in value?

@TheChymera

cookpa commented 4 years ago

I think it's likely the same issue. It would be nice to add a choice of algorithm in a re-write of SmoothImage, but that may be some time. It is also a good use case for masked smoothing, which ITK supports but again would need a re-write of the application.