I have the N4BiasFieldCorrectionImageFilter implemented in c# (visual studio) and it is working correctly and improving images.
However, I need to use a ShrinkFactor higher than 1, so I need to use the method: GetLogBiasFieldAsImage() in order to recover the full-resolution, filtered, image.
But when I call this method I get the following compilation error:
“‘N4BiasFieldCorrectionImageFilter’ does not contain a definition for ‘GetLogBiasFieldAsImage’ and no accessible extension method…”
What can cause this method to be missing?
Any hint would be helpful (I hope)…
GetLogBiasFieldAsImage is not an ITK feature but it is added by SimpleITK in a very recent release. It is already available in latest Slicer Preview Release.
However, it may be simpler to use “N4ITK MRI bias correction” module, which takes care shrinking and applying the field to the full-resolution image. You can run it from Python as described here.
Thank you for your answer! I need to incorporate the GetLogBiasFieldAsImage into a c# code. So should I download that recent release of simpleITK that you mention? If you recommend, then what version is it and where should I download it from?
Here we give help to SimpleITK users in Slicer’s Python environment. You need to ask SimpleITK developers about their C# wrappings.
I did that now and got an answer. Thank you for your advice!
For reference, the question was answered here.